diff --git a/internal/ingress/metric/collectors/controller.go b/internal/ingress/metric/collectors/controller.go index 8aeeaffe9..5c281b988 100644 --- a/internal/ingress/metric/collectors/controller.go +++ b/internal/ingress/metric/collectors/controller.go @@ -136,12 +136,12 @@ func (cm *Controller) IncReloadErrorCount() { cm.reloadOperationErrors.With(cm.constLabels).Inc() } -// OnStartedLeading indicates the pod is not the current leader +// OnStartedLeading indicates the pod was elected as the leader func (cm *Controller) OnStartedLeading(electionID string) { cm.leaderElection.WithLabelValues(electionID).Set(0) } -// OnStoppedLeading indicates the pod is not the current leader +// OnStoppedLeading indicates the pod stopped being the leader func (cm *Controller) OnStoppedLeading(electionID string) { cm.leaderElection.WithLabelValues(electionID).Set(1.0) } diff --git a/internal/ingress/metric/main.go b/internal/ingress/metric/main.go index fc161c4fa..d604b7fb0 100644 --- a/internal/ingress/metric/main.go +++ b/internal/ingress/metric/main.go @@ -151,12 +151,12 @@ func (c *collector) SetHosts(hosts sets.String) { c.socket.SetHosts(hosts) } -// OnStartedLeading indicates the pod is not the current leader +// OnStartedLeading indicates the pod was elected as the leader func (c *collector) OnStartedLeading(electionID string) { c.ingressController.OnStartedLeading(electionID) } -// OnStoppedLeading indicates the pod is not the current leader +// OnStoppedLeading indicates the pod stopped being the leader func (c *collector) OnStoppedLeading(electionID string) { c.ingressController.OnStoppedLeading(electionID) }