I have a use case to pull the images using my private registry and image pull secrets. However, the Helm chart doesn’t allow me to add the pull secrets and it’s failing for the Job (cert-generator) which comes up first followed by the actual NGF pod. Could you please take a look and suggest on priority?
helm upgrade --install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric \
-n nginx-gateway
–version 0.0.0-edge
–set nginxGateway.image.repository=
–set nginxGateway.image.tag=0.0.0-edge
–set nginxGateway.image.pullPolicy=IfNotPresent
–set nginx.imagePullSecret= #it does exist in the same namespace
–set imagePullSecrets[0].name=
–set nginxGateway.snippetsFilters.enable=true
I even tried this parameter as template for the certs job is looking for it but no luck.
{{- if or .Values.nginxGateway.serviceAccount.imagePullSecret .Values.nginxGateway.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- if .Values.nginxGateway.serviceAccount.imagePullSecret }}
- name: {{ .Values.nginxGateway.serviceAccount.imagePullSecret }}
{{- end }}
{{- if .Values.nginxGateway.serviceAccount.imagePullSecrets }}
{{- range .Values.nginxGateway.serviceAccount.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
Well the ServiceAccount properly references your image secret, and the cert-generator Job is using that ServiceAccount. So there’s no issue in using the Secret.
The error message says failed to resolve reference, which tells me that either that image and tag does not exist at that path, or maybe kube DNS can’t resolve that domain to pull the image.