helm icon indicating copy to clipboard operation
helm copied to clipboard

imagePullSecret structure doesn't match in deployments vs service accounts

Open renehernandez opened this issue 1 year ago • 2 comments

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 }}

renehernandez avatar Dec 15 '23 17:12 renehernandez

I can open a PR with a fix if there is interest

renehernandez avatar Dec 15 '23 19:12 renehernandez

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.

hagaibarel avatar Dec 17 '23 09:12 hagaibarel