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 imagePullSecrets helper func #8

Merged
merged 2 commits into from
Aug 10, 2022
Merged

Conversation

realHarter
Copy link
Contributor

What?

Fix imagePullSecret helper function

Why?

When using imagePullSecrets in the values.yaml like:

imagePullSecrets:
  - name: secret1
  - name: secret2

the nsqd-lookupd and nsqd-admin deployment append it correct using:

{{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
{{- end }}

The nsqd-statefulset however uses the helper function:

{{- include "nsq.imagePullSecrets" . | nindent 6 }}

which results in the deployment to look like:

imagePullSecrets:
  - name: map[name:secret1]
  - name: map[name:secret2]

The pull secrets can't be resolved leading to an img pull error in the deployment.

How?

When building the list in the helper function, use only the name instead if the key,value pair.

@ploxiln
Copy link
Member

ploxiln commented Aug 10, 2022

Maybe the nsqd template should do the same thing for imagePullSecrets as nsqlookupd and nsqadmin do, and the helper should be removed?

@ploxiln
Copy link
Member

ploxiln commented Aug 10, 2022

(also, can you bump chart patch version?)

@realHarter
Copy link
Contributor Author

As far as I understand it the helper merges the imagePullSecrets for the main nsq image aswell as the metrics image together. Since the nsqd deployment needs them both deleting the helper function would break the deployment there.

But I agree that there is probably a better way to do it, that was just the first fix that came into my mind.

@ploxiln
Copy link
Member

ploxiln commented Aug 10, 2022

ah, ok, thanks

@ploxiln ploxiln merged commit b4a37d2 into nsqio:master Aug 10, 2022
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