Skip to content

Commit

Permalink
Fix none to blank string
Browse files Browse the repository at this point in the history
  • Loading branch information
evir35 committed Sep 23, 2022
1 parent 242cea3 commit 7f453f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/store/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen
} else {
ms = append(ms, &metric.Metric{
LabelKeys: []string{"host", "path", "service_name", "service_port"},
LabelValues: []string{rule.Host, path.Path, "<none>", "<none>"},
LabelValues: []string{rule.Host, path.Path, "", ""},
Value: 1,
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/store/ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func TestIngressStore(t *testing.T) {
kube_ingress_created{namespace="ns4",ingress="ingress4"} 1.501569018e+09
kube_ingress_labels{namespace="ns4",ingress="ingress4"} 1
kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath",service_name="someservice",service_port="1234"} 1
kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath2",service_name="<none>",service_port="<none>"} 1
kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath2",service_name="",service_port=""} 1
`,
MetricNames: []string{"kube_ingress_info", "kube_ingress_metadata_resource_version", "kube_ingress_created", "kube_ingress_labels", "kube_ingress_path", "kube_ingress_tls"},
},
Expand Down

0 comments on commit 7f453f0

Please sign in to comment.