Only the leader updates metrics for SSL certificate expiration

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-03-11 13:31:38 -03:00
parent 870b89c72b
commit f4e4335d8c
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
4 changed files with 44 additions and 16 deletions

View file

@ -159,4 +159,5 @@ func (c *collector) OnStartedLeading(electionID string) {
// OnStoppedLeading indicates the pod stopped being the leader
func (c *collector) OnStoppedLeading(electionID string) {
c.ingressController.OnStoppedLeading(electionID)
c.ingressController.RemoveAllSSLExpireMetrics(c.registry)
}