imagePullSecrets configured in values.yaml but not rendered in Deployment/StatefulSet templates
Describe the bug
The imagePullSecrets value configured in values.yaml is not being rendered into the Deployment or StatefulSet templates, causing pods to fail pulling images from private registries despite correct configuration.
To Reproduce Steps to reproduce the behavior:
- Add
imagePullSecretstovalues.yaml:
imagePullSecret:
- my-secret-name
- Run
helm template .orhelm install - Inspect generated manifests: Deployment/StatefulSet
spec.template.spec.imagePullSecretsmissing - Pods that needs authentication for pulling image fail with:
ErrImagePull/ImagePullBackOff
Expected behavior
When imagePullSecrets is set in values.yaml, the generated Deployment and StatefulSet manifests should include:
spec:
template:
spec:
imagePullSecrets:
- name: my-registry-secret # <- This should be rendered
Environment
- Helm version: version.BuildInfo{Version:"v4.0.1", GitCommit:"12500dd401faa7629f30ba5d5bff36287f3e94d3", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"}
- Chart version: 1.0.3
Additional context
This prevents deployments from private registries. Most Helm charts inject {{ .Values.imagePullSecrets }} into Deployment/StatefulSet templates. Chart templates appear to lack this rendering logic.
@czaloumis Thanks for you feedback, will check this issue and update later.
@czaloumis Already add support for pulling image from private registry. #1127 . After the pr is merged, you can pull the latest helm chart code to deploy. Thx.
@majinghe, I reviewed your commit—really nice that we can now configure imagePullSecrets via the Helm chart! However, I think it would be better to also support referencing an existing imagePullSecret rather than only creating a new one.
Would you be open to me submitting an MR for this enhancement?
@czaloumis Good suggestion, existing imagePullSecret should be considered, please free feel to open a pr to enhance helm chart. Thx.