Skip to content

Commit

Permalink
fix: align image pull secrets usage
Browse files Browse the repository at this point in the history
This assumes that users specify pull secrets like this in their values.yaml:

imagePullSecrets: - name: some-name-here
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
  • Loading branch information
sebhoss committed Jul 24, 2024
1 parent 2d92fff commit 51049fc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ spec:
mountPath: {{ .Values.minio.configPathmc }}certs
{{ end }}
{{- end }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.adminApi.hostAliases }}
hostAliases:
Expand Down Expand Up @@ -165,4 +163,4 @@ spec:
path: CAs/public.crt
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ spec:
{{- toYaml .Values.enterpriseGateway.podSecurityContext | nindent 8 }}
initContainers:
{{- toYaml .Values.enterpriseGateway.initContainers | nindent 8 }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.enterpriseGateway.hostAliases }}
hostAliases:
Expand Down Expand Up @@ -141,4 +139,4 @@ spec:
{{- if .Values.enterpriseGateway.extraVolumes }}
{{ toYaml .Values.enterpriseGateway.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ spec:
tolerations:
{{- toYaml .tolerations | nindent 8 }}
terminationGracePeriodSeconds: {{ .terminationGracePeriodSeconds }}
{{- if $.ctx.Values.imagePullSecrets }}
{{- with $.ctx.Values.imagePullSecrets }}
imagePullSecrets:
{{- range $.ctx.Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .extraVolumes }}
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.enterprise.provisioner.securityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: provisioner
Expand Down
4 changes: 2 additions & 2 deletions production/helm/loki/templates/tokengen/job-tokengen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.enterprise.tokengen.securityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: loki
Expand Down

0 comments on commit 51049fc

Please sign in to comment.