Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions deployment/network-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,24 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
imagePullSecrets helpers
imagePullSecrets helper - supports global.imagePullSecrets, operator.imagePullSecrets and root imagePullSecrets fallback
*/}}
{{- define "network-operator.operator.imagePullSecrets" }}
{{- $imagePullSecrets := list }}
{{- if .Values.operator.imagePullSecrets }}
{{- range .Values.operator.imagePullSecrets }}
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" . ) }}
{{- end }}
{{- else }}
{{- if .Values.imagePullSecrets }}
{{- range .Values.imagePullSecrets }}
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" . ) }}
{{- end }}
{{- end }}
{{- end }}
{{- define "network-operator.operator.imagePullSecrets" -}}
{{- $imagePullSecrets := list -}}
{{- if .Values.operator.imagePullSecrets -}}
{{- range .Values.operator.imagePullSecrets -}}
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) -}}
{{- end -}}
{{- else if .Values.imagePullSecrets -}}
{{- range .Values.imagePullSecrets -}}
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) -}}
{{- end -}}
{{- else if .Values.global.imagePullSecrets -}}
{{- range .Values.global.imagePullSecrets -}}
{{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) -}}
{{- end -}}
{{- end -}}
{{- if $imagePullSecrets -}}
{{- $imagePullSecrets | toJson }}
{{- end }}
{{- end -}}
{{- end -}}
5 changes: 5 additions & 0 deletions deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ operator:

# -- An optional list of references to secrets to use for pulling any of the
# Network Operator images.
# Kept for backward compatibility.
imagePullSecrets: []

# -- Global values to be propagated into Network-Operator sub-charts
global:
Copy link
Member

Choose a reason for hiding this comment

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

The format seems different between charts. May be problematic.
Some uses:

imagePullSecrets:
- name: my-secret

Other uses:

imagePullSecrets:
-  my-secret

imagePullSecrets: []

# @ignore
test:
pf: ens2f0
5 changes: 5 additions & 0 deletions hack/templates/values/values.template
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ operator:

# -- An optional list of references to secrets to use for pulling any of the
# Network Operator images.
# Kept for backward compatibility.
imagePullSecrets: []

# -- Global values to be propagated into Network-Operator sub-charts
global:
imagePullSecrets: []

# @ignore
test:
pf: ens2f0
Loading