Skip to content

Commit

Permalink
[kube-prometheus-stack] - Add template option to namespaces flag (#2466)
Browse files Browse the repository at this point in the history
Signed-off-by: birca <Allex21ro@yahoo.com>

Signed-off-by: birca <Allex21ro@yahoo.com>
  • Loading branch information
Allex1 committed Sep 23, 2022
1 parent cc3507f commit 26b80d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions charts/kube-prometheus-stack/Chart.lock
Expand Up @@ -7,6 +7,6 @@ dependencies:
version: 4.2.0
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.38.0
digest: sha256:580878299295a169ad147f2b42befa3ecd7f0db88b808661703b997420f3ff7c
generated: "2022-09-13T19:13:45.544420686+02:00"
version: 6.38.3
digest: sha256:8648a29699c9053da6a53415e18c35546337306279d6d95d97ed4a97acc7d381
generated: "2022-09-19T17:20:22.16598+03:00"
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Expand Up @@ -22,7 +22,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 40.1.0
version: 40.1.1
appVersion: 0.59.1
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Expand Up @@ -54,14 +54,19 @@ spec:
- --log-level={{ .Values.prometheusOperator.logLevel }}
{{- end }}
{{- if .Values.prometheusOperator.denyNamespaces }}
- --deny-namespaces={{ .Values.prometheusOperator.denyNamespaces | join "," }}
- --deny-namespaces={{ tpl (.Values.prometheusOperator.denyNamespaces | join ",") $ }}
{{- end }}
{{- with $.Values.prometheusOperator.namespaces }}
{{ $ns := default (list nil) .additional }}
{{- $namespaces := list }}
{{- if .releaseNamespace }}
{{- $ns = append $ns $namespace }}
{{- $namespaces = append $namespaces $namespace }}
{{- end }}
- --namespaces={{ $ns | join "," }}
{{- if .additional }}
{{- range $ns := .additional }}
{{- $namespaces = append $namespaces (tpl $ns $) }}
{{- end }}
{{- end }}
- --namespaces={{ $namespaces | mustUniq | join "," }}
{{- end }}
- --localhost=127.0.0.1
{{- if .Values.prometheusOperator.prometheusDefaultBaseImage }}
Expand Down

0 comments on commit 26b80d9

Please sign in to comment.