Skip to content

feat(helm): support global image pull secrets - #306

Merged
wanjunlei merged 1 commit into
kubesphere:release-2.6from
Gentleelephant:release-2.6-global-imagepullsecrets
Jun 8, 2026
Merged

feat(helm): support global image pull secrets#306
wanjunlei merged 1 commit into
kubesphere:release-2.6from
Gentleelephant:release-2.6-global-imagepullsecrets

Conversation

@Gentleelephant

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Gentleelephant <1132960613@qq.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +18 to +21
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

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

Comment on lines +6 to +9
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

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

@wanjunlei
wanjunlei merged commit 4411847 into kubesphere:release-2.6 Jun 8, 2026
4 of 5 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