Skip to content

Commit

Permalink
[kube-prometheus-stack] fix kps deployment when thanos field is set t…
Browse files Browse the repository at this point in the history
…o null (#3163)

kps deployment fails when disabling thanos sidecar by setting `prometheus.prometheusSpec.thanos` field to null due to the reference of a field in thanos object in csi-secret.yaml. This change gives the ability to disable thanos sidecar by setting `prometheus.prometheusSpec.thanos=null`

Signed-off-by: Renju <renjugeo@gmail.com>
  • Loading branch information
renjugeo committed Apr 5, 2023
1 parent 0864413 commit a3c0023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 45.9.0
version: 45.9.1
appVersion: v0.63.0
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.prometheus.prometheusSpec.thanos.secretProviderClass }}
{{- if and .Values.prometheus.prometheusSpec.thanos .Values.prometheus.prometheusSpec.thanos.secretProviderClass }}
---
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
Expand All @@ -9,4 +9,4 @@ metadata:
app: {{ template "kube-prometheus-stack.name" . }}-prometheus
spec:
{{ toYaml .Values.prometheus.prometheusSpec.thanos.secretProviderClass | indent 2 }}
{{- end }}
{{- end }}

0 comments on commit a3c0023

Please sign in to comment.