Skip to content

Commit

Permalink
fix(kube-state-metrics): skip imagePullSecrets when no override provided
Browse files Browse the repository at this point in the history
Template for ServiceAccount is not taking into account that element
`serviceAccount.imagePullSecrets` might be empty. In such a case, an
empty element `imagePullSecrets` is added to the ServiceAccount resource.

fixes #4059

Signed-off-by: cmontemuino <[email protected]>
  • Loading branch information
cmontemuino committed Dec 6, 2023
1 parent 11127a4 commit 50fbd98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/kube-state-metrics/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
{{- if .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- include "kube-state-metrics.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }}
{{- end }}
{{- end -}}

0 comments on commit 50fbd98

Please sign in to comment.