From 7b83b454a0bb76a8ed2cee00eee44b74dc1f3775 Mon Sep 17 00:00:00 2001 From: Carlos M <1761056+cmontemuino@users.noreply.github.com> Date: Sat, 30 Dec 2023 16:02:13 +0100 Subject: [PATCH] [kube-state-metrics] skip imagePullSecrets when no override provided (#4060) [kube-state-metrics] skip imagePullSecrets when no override provided Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com> --- charts/kube-state-metrics/Chart.yaml | 2 +- charts/kube-state-metrics/templates/serviceaccount.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/kube-state-metrics/Chart.yaml b/charts/kube-state-metrics/Chart.yaml index f0a0f0f2f4d5..a7682a33f665 100644 --- a/charts/kube-state-metrics/Chart.yaml +++ b/charts/kube-state-metrics/Chart.yaml @@ -7,7 +7,7 @@ keywords: - prometheus - kubernetes type: application -version: 5.15.2 +version: 5.15.3 appVersion: 2.10.1 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/charts/kube-state-metrics/templates/serviceaccount.yaml b/charts/kube-state-metrics/templates/serviceaccount.yaml index a7ff4dd3d7e3..38a93b31d1e6 100644 --- a/charts/kube-state-metrics/templates/serviceaccount.yaml +++ b/charts/kube-state-metrics/templates/serviceaccount.yaml @@ -10,6 +10,8 @@ metadata: annotations: {{ toYaml .Values.serviceAccount.annotations | indent 4 }} {{- end }} +{{- if or .Values.serviceAccount.imagePullSecrets .Values.global.imagePullSecrets }} imagePullSecrets: {{- include "kube-state-metrics.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }} +{{- end }} {{- end -}}