From e58d6fb5a5bd1854cc645a850929a238cfe26546 Mon Sep 17 00:00:00 2001 From: Thanasis Petrovas <108522410+than-pet@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:32:25 +0300 Subject: [PATCH] [kube-promettheus-stack] fix ThanosRuler custom resource name label selector (#4458) --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/thanos-ruler/podDisruptionBudget.yaml | 2 +- .../kube-prometheus-stack/templates/thanos-ruler/ruler.yaml | 4 ++-- .../kube-prometheus-stack/templates/thanos-ruler/service.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 5a7b6409d86a..72c2bb662d85 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 58.1.1 +version: 58.1.2 appVersion: v0.73.1 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/thanos-ruler/podDisruptionBudget.yaml b/charts/kube-prometheus-stack/templates/thanos-ruler/podDisruptionBudget.yaml index 83e54edf9b51..c28f9146477f 100644 --- a/charts/kube-prometheus-stack/templates/thanos-ruler/podDisruptionBudget.yaml +++ b/charts/kube-prometheus-stack/templates/thanos-ruler/podDisruptionBudget.yaml @@ -17,5 +17,5 @@ spec: selector: matchLabels: app.kubernetes.io/name: thanos-ruler - thanos-ruler: {{ template "kube-prometheus-stack.thanosRuler.name" . }} + thanos-ruler: {{ template "kube-prometheus-stack.thanosRuler.crname" . }} {{- end }} diff --git a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml index 908d6a45aa42..123dc245e107 100644 --- a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml +++ b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml @@ -142,7 +142,7 @@ spec: labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [thanos-ruler]} - - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.thanosRuler.name" . }}]} + - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.thanosRuler.crname" . }}]} {{- else if eq .Values.thanosRuler.thanosRulerSpec.podAntiAffinity "soft" }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: @@ -152,7 +152,7 @@ spec: labelSelector: matchExpressions: - {key: app.kubernetes.io/name, operator: In, values: [thanos-ruler]} - - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.thanosRuler.name" . }}]} + - {key: thanos-ruler, operator: In, values: [{{ template "kube-prometheus-stack.thanosRuler.crname" . }}]} {{- end }} {{- if .Values.thanosRuler.thanosRulerSpec.tolerations }} tolerations: diff --git a/charts/kube-prometheus-stack/templates/thanos-ruler/service.yaml b/charts/kube-prometheus-stack/templates/thanos-ruler/service.yaml index be0c8445910d..e08b71ff82d9 100644 --- a/charts/kube-prometheus-stack/templates/thanos-ruler/service.yaml +++ b/charts/kube-prometheus-stack/templates/thanos-ruler/service.yaml @@ -48,6 +48,6 @@ spec: {{- end }} selector: app.kubernetes.io/name: thanos-ruler - thanos-ruler: {{ template "kube-prometheus-stack.thanosRuler.name" . }} + thanos-ruler: {{ template "kube-prometheus-stack.thanosRuler.crname" . }} type: "{{ .Values.thanosRuler.service.type }}" {{- end }}