Skip to content

Commit

Permalink
metrics: do not export information if a subnet is not validated (kube…
Browse files Browse the repository at this point in the history
…ovn#4444)

Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Aug 30, 2024
1 parent 810d6db commit 2960014
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func (c *Controller) exportSubnetMetrics() {

resetSubnetMetrics()
for _, subnet := range subnets {
if !subnet.Status.IsValidated() {
continue
}

c.exportSubnetAvailableIPsGauge(subnet)
c.exportSubnetUsedIPsGauge(subnet)
c.exportSubnetIPAMInfo(subnet)
Expand Down

0 comments on commit 2960014

Please sign in to comment.