Skip to content

Commit 7ad69ad

Browse files
committed
MON-4115: expose label metrics for jobs and cronjobs
Adds jobs and cronjobs to the exposed set of label metrics: * '--metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]' Signed-off-by: Pranshu Srivastava <[email protected]>
1 parent 0264620 commit 7ad69ad

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Note: This CHANGELOG is only for the monitoring team to track all monitoring related changes. Please see OpenShift release notes for official changes.
22

3+
## 4.19
4+
5+
- [#2553](https://github.com/openshift/cluster-monitoring-operator/pull/2553) Expose `kube_cronjob_labels` and `kube_job_labels` metrics.
6+
37
## 4.18
48

59
- [#2503](https://github.com/openshift/cluster-monitoring-operator/issues/2503) Expose `scrapeInterval` setting for UWM Prometheus.

assets/kube-state-metrics/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
^kube_.+_annotations$
4343
^kube_customresource_.+_annotations_info$,
4444
^kube_customresource_.+_labels_info$,
45-
- --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*]
45+
- --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]
4646
- |
4747
--metric-denylist=
4848
^kube_.+_created$,

jsonnet/components/kube-state-metrics.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function(params)
244244
^kube_customresource_.+_annotations_info$,
245245
^kube_customresource_.+_labels_info$,
246246
|||,
247-
'--metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*]',
247+
'--metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]',
248248
],
249249
securityContext: {},
250250
resources: {

0 commit comments

Comments
 (0)