From 58eafa30fb84a93d5c8b64090c4d48d814efe047 Mon Sep 17 00:00:00 2001 From: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:05:21 +0000 Subject: [PATCH] feat(prometheus-stack): Add lifecyle and terminationGracePeriodSeconds settings to prometheus-operator Signed-off-by: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/prometheus-operator/deployment.yaml | 6 ++++++ charts/kube-prometheus-stack/values.yaml | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index e479711e8b48..55d034b84a29 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: 67.7.0 +version: 67.8.0 appVersion: v0.79.2 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml index be35dd80af28..ac3b03bbe396 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml @@ -146,6 +146,9 @@ spec: {{- with .Values.prometheusOperator.extraArgs }} {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} + {{- with .Values.prometheusOperator.lifecycle }} + lifecycle: {{ toYaml . | nindent 12 }} + {{- end }} ports: - containerPort: {{ .Values.prometheusOperator.tls.internalPort }} name: https @@ -228,6 +231,9 @@ spec: affinity: {{ toYaml . | indent 8 }} {{- end }} + {{- with .Values.prometheusOperator.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ . }} + {{- end }} {{- with .Values.prometheusOperator.tolerations }} tolerations: {{ toYaml . | indent 8 }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index 6e96b684923c..8775c8a143ba 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -2718,6 +2718,10 @@ prometheusOperator: automountServiceAccountToken: true annotations: {} + # -- terminationGracePeriodSeconds for container lifecycle hook + terminationGracePeriodSeconds: 30 + # -- Specify lifecycle hooks for the controller + lifecycle: {} ## Configuration for Prometheus operator service ## service: