feat(helm): support global image pull secrets - #306
Conversation
Signed-off-by: Gentleelephant <1132960613@qq.com>
There was a problem hiding this comment.
Code Review
This pull request adds support for global image pull secrets by integrating imagePullSecrets into the operator deployment and service account templates, and defining a default empty list in values.yaml. The reviewer provided valuable feedback pointing out potential nil pointer evaluation errors if .Values.global is omitted or null, and suggested wrapping the template blocks in conditional checks to ensure safe navigation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| {{- with .Values.global.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} |
There was a problem hiding this comment.
If .Values.global is omitted or set to null in a custom values file, accessing .Values.global.imagePullSecrets will result in a template rendering error due to a nil pointer evaluation. Wrapping the block in a check for .Values.global prevents this issue.
{{- if .Values.global }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}| {{- with .Values.global.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml . | nindent 2 }} | ||
| {{- end }} |
There was a problem hiding this comment.
If .Values.global is omitted or set to null in a custom values file, accessing .Values.global.imagePullSecrets will result in a template rendering error due to a nil pointer evaluation. Wrapping the block in a check for .Values.global ensures safe navigation.
{{- if .Values.global }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
No description provided.