Skip to content

Commit

Permalink
Merge pull request #1818 from panslava/fix-l4-metrics
Browse files Browse the repository at this point in the history
Fix L4 Premium Network Tier metric, fix comments
  • Loading branch information
k8s-ci-robot authored Oct 3, 2022
2 parents 42eca78 + 3f3f82d commit 0d703c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/metrics/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ const (
l4ILBInError = feature("L4ILBInError")

l4NetLBService = feature("L4NetLBService")
// L4NetLBPremiumNetworkTier feature specifies that NetLB VIP is configured in Premium Network Tier.
// l4NetLBPremiumNetworkTier feature specifies that NetLB VIP is configured in Premium Network Tier.
l4NetLBPremiumNetworkTier = feature("L4NetLBPremiumNetworkTier")
// L4NetLBPremiumNetworkTier feature specifies that static IP Address is managed by controller.
// l4NetLBManagedStaticIP feature specifies that static IP Address is managed by controller.
l4NetLBManagedStaticIP = feature("L4NetLBManagedStaticIP")
// L4NetLBPremiumNetworkTier feature specifies number of all static IP Address managed by controller and by user.
// l4NetLBStaticIP feature specifies number of all static IP Address managed by controller and by user.
l4NetLBStaticIP = feature("L4NetLBStaticIP")
// l4NetLBInSuccess feature specifies that NetLB VIP is configured.
l4NetLBInSuccess = feature("L4NetLBInSuccess")
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type netLBFeatureCount struct {
func (netlbCount *netLBFeatureCount) record() {
l4NetLBCount.With(prometheus.Labels{label: l4NetLBService.String()}).Set(float64(netlbCount.service))
l4NetLBCount.With(prometheus.Labels{label: l4NetLBStaticIP.String()}).Set(float64(netlbCount.success))
l4NetLBCount.With(prometheus.Labels{label: l4NetLBPremiumNetworkTier.String()}).Set(float64(netlbCount.premiumNetworkTier))
l4NetLBCount.With(prometheus.Labels{label: l4NetLBManagedStaticIP.String()}).Set(float64(netlbCount.managedStaticIP))
l4NetLBCount.With(prometheus.Labels{label: l4NetLBInSuccess.String()}).Set(float64(netlbCount.success))
l4NetLBCount.With(prometheus.Labels{label: l4NetLBInUserError.String()}).Set(float64(netlbCount.inUserError))
Expand Down

0 comments on commit 0d703c9

Please sign in to comment.