Skip to content

Commit 2960014

Browse files
committed
metrics: do not export information if a subnet is not validated (kubeovn#4444)
Signed-off-by: zhangzujian <[email protected]>
1 parent 810d6db commit 2960014

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: pkg/controller/exporter.go

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ func (c *Controller) exportSubnetMetrics() {
3939

4040
resetSubnetMetrics()
4141
for _, subnet := range subnets {
42+
if !subnet.Status.IsValidated() {
43+
continue
44+
}
45+
4246
c.exportSubnetAvailableIPsGauge(subnet)
4347
c.exportSubnetUsedIPsGauge(subnet)
4448
c.exportSubnetIPAMInfo(subnet)

0 commit comments

Comments
 (0)