mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-26 17:01:50 +02:00
add serviceMonitorNamespaceSelector to the prometheus jsonnet library
to implement the feature from PR #1227
This commit is contained in:
parent
fa32316597
commit
0f76dc63b6
@ -167,6 +167,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
|||||||
baseImage: $._config.imageRepos.prometheus,
|
baseImage: $._config.imageRepos.prometheus,
|
||||||
serviceAccountName: 'prometheus-' + $._config.prometheus.name,
|
serviceAccountName: 'prometheus-' + $._config.prometheus.name,
|
||||||
serviceMonitorSelector: selector.withMatchExpressions({ key: 'k8s-app', operator: 'Exists' }),
|
serviceMonitorSelector: selector.withMatchExpressions({ key: 'k8s-app', operator: 'Exists' }),
|
||||||
|
serviceMonitorNamespaceSelector: selector.withMatchExpressions({ key: 'prometheus', operator: 'In', values: ['yes', 'true'] }),
|
||||||
nodeSelector: { 'beta.kubernetes.io/os': 'linux' },
|
nodeSelector: { 'beta.kubernetes.io/os': 'linux' },
|
||||||
ruleSelector: selector.withMatchLabels({
|
ruleSelector: selector.withMatchLabels({
|
||||||
role: 'alert-rules',
|
role: 'alert-rules',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user