Skip to content

Commit 1bc5ed4

Browse files
committed
update metric kubernetes_build_info labels from camelCase to snake_case.
1 parent 2dc408a commit 1bc5ed4

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

staging/src/k8s.io/component-base/metrics/prometheus/version/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.",
3030
StabilityLevel: metrics.ALPHA,
3131
},
32-
[]string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"},
32+
[]string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"},
3333
)
3434
)
3535

staging/src/k8s.io/component-base/metrics/testutil/promlint.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ var exceptionMetrics = []string{
4747
"authentication_attempts",
4848
"get_token_count",
4949
"get_token_fail_count",
50-
"kubernetes_build_info",
5150
"node_collector_evictions_number",
5251

53-
// kube-proxy
54-
"kubernetes_build_info",
55-
5652
// kubelet-resource-v1alpha1
5753
"container_cpu_usage_seconds_total",
5854
"node_cpu_usage_seconds_total",

staging/src/k8s.io/component-base/metrics/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.",
2626
StabilityLevel: ALPHA,
2727
},
28-
[]string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"},
28+
[]string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"},
2929
)
3030
)
3131

0 commit comments

Comments
 (0)