Skip to content

Commit 9a6fae5

Browse files
geojazEric Hole
authored andcommitted
kube_pod_nodeselector -> kube_pod_nodeselectors
1 parent 2b08520 commit 9a6fae5

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

docs/pod-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| kube_pod_completion_time | Gauge | Completion time in unix timestamp for a pod | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
99
| kube_pod_owner | Gauge | Information about the Pod's owner | |`pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `owner_kind`=&lt;owner kind&gt; <br> `owner_name`=&lt;owner name&gt; <br> `owner_is_controller`=&lt;whether owner is controller&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
1010
| kube_pod_labels | Gauge | Kubernetes labels converted to Prometheus labels | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `label_POD_LABEL`=&lt;POD_LABEL&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
11-
| kube_pod_nodeselector | Gauge | Describes the Pod nodeSelectors | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `nodeselector_NODE_SELECTOR`=&lt;NODE_SELECTOR&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | Opt-in |
11+
| kube_pod_nodeselectors| Gauge | Describes the Pod nodeSelectors | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `nodeselectors_NODE_SELECTOR`=&lt;NODE_SELECTOR&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | Opt-in |
1212
| kube_pod_status_phase | Gauge | The pods current phase | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `phase`=&lt;Pending\|Running\|Succeeded\|Failed\|Unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
1313
| kube_pod_status_ready | Gauge | Describes whether the pod is ready to serve requests | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
1414
| kube_pod_status_scheduled | Gauge | Describes the status of the scheduling process for the pod | |`pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |

internal/store/pod.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func podMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat
8282
createPodStatusScheduledFamilyGenerator(),
8383
createPodStatusScheduledTimeFamilyGenerator(),
8484
createPodStatusUnschedulableFamilyGenerator(),
85-
createPodNodeSelectorFamilyGenerator(),
85+
createPodNodeSelectorsFamilyGenerator(),
8686
}
8787
}
8888

@@ -1359,9 +1359,9 @@ func createPodStatusUnschedulableFamilyGenerator() generator.FamilyGenerator {
13591359
)
13601360
}
13611361

1362-
func createPodNodeSelectorFamilyGenerator() generator.FamilyGenerator {
1362+
func createPodNodeSelectorsFamilyGenerator() generator.FamilyGenerator {
13631363
return *generator.NewOptInFamilyGenerator(
1364-
"kube_pod_nodeselector",
1364+
"kube_pod_nodeselectors",
13651365
"Describes the Pod nodeSelectors.",
13661366
metric.Gauge,
13671367
"",

internal/store/pod_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,12 +1829,12 @@ func TestPodStore(t *testing.T) {
18291829
},
18301830
AllowLabelsList: []string{options.LabelWildcard},
18311831
Want: `
1832-
# HELP kube_pod_nodeselector Describes the Pod nodeSelectors.
1833-
# TYPE kube_pod_nodeselector gauge
1834-
kube_pod_nodeselector{nodeselector_a="b",namespace="ns1",pod="pod1",uid="uid1"} 1
1832+
# HELP kube_pod_nodeselectors Describes the Pod nodeSelectors.
1833+
# TYPE kube_pod_nodeselectors gauge
1834+
kube_pod_nodeselectors{nodeselector_a="b",namespace="ns1",pod="pod1",uid="uid1"} 1
18351835
`,
18361836
MetricNames: []string{
1837-
"kube_pod_nodeselector",
1837+
"kube_pod_nodeselectors",
18381838
},
18391839
},
18401840
{
@@ -1853,9 +1853,9 @@ func TestPodStore(t *testing.T) {
18531853
},
18541854
AllowLabelsList: []string{options.LabelWildcard},
18551855
Want: `
1856-
# HELP kube_pod_nodeselector Describes the Pod nodeSelectors.
1857-
# TYPE kube_pod_nodeselector gauge
1858-
kube_pod_nodeselector{nodeselector_kubernetes_io_os="linux",nodeselector_cloud_google_com_gke_accelerator="nvidia-tesla-t4",namespace="ns1",pod="pod2",uid="uid6"} 1
1856+
# HELP kube_pod_nodeselectors Describes the Pod nodeSelectors.
1857+
# TYPE kube_pod_nodeselectors gauge
1858+
kube_pod_nodeselectors{nodeselector_kubernetes_io_os="linux",nodeselector_cloud_google_com_gke_accelerator="nvidia-tesla-t4",namespace="ns1",pod="pod2",uid="uid6"} 1
18591859
`,
18601860
MetricNames: []string{
18611861
"kube_pod_nodeselector",

pkg/app/server_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func TestFullScrapeCycle(t *testing.T) {
207207
# HELP kube_pod_init_container_status_waiting Describes whether the init container is currently in waiting state.
208208
# HELP kube_pod_init_container_status_waiting_reason Describes the reason the init container is currently in waiting state.
209209
# HELP kube_pod_labels Kubernetes labels converted to Prometheus labels.
210-
# HELP kube_pod_nodeselector Describes the Pod nodeSelectors.
210+
# HELP kube_pod_nodeselectors Describes the Pod nodeSelectors.
211211
# HELP kube_pod_overhead_cpu_cores The pod overhead in regards to cpu cores associated with running a pod.
212212
# HELP kube_pod_overhead_memory_bytes The pod overhead in regards to memory associated with running a pod.
213213
# HELP kube_pod_runtimeclass_name_info The runtimeclass associated with the pod.
@@ -251,7 +251,7 @@ func TestFullScrapeCycle(t *testing.T) {
251251
# TYPE kube_pod_init_container_status_waiting gauge
252252
# TYPE kube_pod_init_container_status_waiting_reason gauge
253253
# TYPE kube_pod_labels gauge
254-
# TYPE kube_pod_nodeselector gauge
254+
# TYPE kube_pod_nodeselectors gauge
255255
# TYPE kube_pod_overhead_cpu_cores gauge
256256
# TYPE kube_pod_overhead_memory_bytes gauge
257257
# TYPE kube_pod_runtimeclass_name_info gauge
@@ -298,7 +298,7 @@ kube_pod_container_status_waiting{namespace="default",pod="pod0",uid="abc-0",con
298298
kube_pod_created{namespace="default",pod="pod0",uid="abc-0"} 1.5e+09
299299
kube_pod_info{namespace="default",pod="pod0",uid="abc-0",host_ip="1.1.1.1",pod_ip="1.2.3.4",node="node1",created_by_kind="<none>",created_by_name="<none>",priority_class="",host_network="false"} 1
300300
kube_pod_labels{namespace="default",pod="pod0",uid="abc-0"} 1
301-
kube_pod_nodeselector{namespace="default",pod="pod0",uid="abc-0"} 1
301+
kube_pod_nodeselectors{namespace="default",pod="pod0",uid="abc-0"} 1
302302
kube_pod_owner{namespace="default",pod="pod0",uid="abc-0",owner_kind="<none>",owner_name="<none>",owner_is_controller="<none>"} 1
303303
kube_pod_restart_policy{namespace="default",pod="pod0",uid="abc-0",type="Always"} 1
304304
kube_pod_status_phase{namespace="default",pod="pod0",uid="abc-0",phase="Failed"} 0

0 commit comments

Comments
 (0)