helm
helm copied to clipboard
imagePullSecret structure doesn't match in deployments vs service accounts
Currently the imagePullSecret values are handle different between ServiceAccount and Deployment resources. This, in turn, prevents us from properly configuring secrets to pull from private registries.
deployment config:
{{- if not (empty .Values.image.pullSecrets) }}
imagePullSecrets:
{{ toYaml .Values.image.pullSecrets | indent 8 }}
{{- end }}
service account config:
{{- if .Values.autoscaler.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.autoscaler.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
I can open a PR with a fix if there is interest
I think you're right and there shouldn't be a difference in the structure. Just note that we actually have two places where we configure this, for coredns itself and in the autoscaler configurations (the deployment and service account for each).
Would be happy to review if you're willing to create PR for this.