mittwald / kubernetes-secret-generator

Kubernetes controller for automatically generating and updating secrets
Apache License 2.0
329 stars 56 forks source link

fix: pull secrets example in values #87

Closed Johannes- closed 8 months ago

Johannes- commented 1 year ago

This PR fixes the values.yaml. In the values.yaml the key .Values.imagePullSecrets is included wich is misleading as it is not used.

The helper method uses the values in .global.imagePullSecrets and .Values.images.pullSecrets. Hence I deleted the imagePullSecrets Key and moved it to .Values.images.pullSecrets.

_helperts.tpl ...

{{- define "kubernetes-secret-generator.images.pullSecrets" -}}
  {{- $pullSecrets := list }}

  {{- if .global }}
    {{- range .global.imagePullSecrets -}}
      {{- $pullSecrets = append $pullSecrets . -}}
    {{- end -}}
  {{- end -}}

  {{- range .images -}}
    {{- range .pullSecrets -}}
      {{- $pullSecrets = append $pullSecrets . -}}
    {{- end -}}
  {{- end -}}

  {{- if (not (empty $pullSecrets)) }}
imagePullSecrets:
    {{- range $pullSecrets }}
  - name: {{ . }}
    {{- end }}
  {{- end }}
{{- end -}}

...