Refactor metric prometheus leader helper
This commit is contained in:
parent
7c6ffeaeac
commit
ccd88f625c
3 changed files with 28 additions and 21 deletions
|
|
@ -124,10 +124,7 @@ func (n *NGINXController) syncIngress(interface{}) error {
|
|||
ings := n.store.ListIngresses(nil)
|
||||
hosts, servers, pcfg := n.getConfiguration(ings)
|
||||
|
||||
if n.isLeader() {
|
||||
klog.V(2).Infof("Updating ssl expiration metrics.")
|
||||
n.metricCollector.SetSSLExpireTime(servers)
|
||||
}
|
||||
n.metricCollector.SetSSLExpireTime(servers)
|
||||
|
||||
if n.runningConfig.Equal(pcfg) {
|
||||
klog.V(3).Infof("No configuration change detected, skipping backend reload.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue