Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pull secrets example in values #87

Merged

Conversation

Johannes-
Copy link
Contributor

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

...

Copy link
Member

@martin-helmich martin-helmich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! 👍 Sorry this took a while to review. 🙏

@martin-helmich martin-helmich force-pushed the fix/helm-pull-secret-values branch from 71d4eb4 to c63f753 Compare December 22, 2023 08:07
@martin-helmich martin-helmich enabled auto-merge (squash) December 22, 2023 08:07
@martin-helmich martin-helmich merged commit c445ee1 into mittwald:master Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants