diff --git a/production/helm/loki/templates/admin-api/deployment-admin-api.yaml b/production/helm/loki/templates/admin-api/deployment-admin-api.yaml index 15391665ca776..f8adf6c206dee 100644 --- a/production/helm/loki/templates/admin-api/deployment-admin-api.yaml +++ b/production/helm/loki/templates/admin-api/deployment-admin-api.yaml @@ -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: @@ -165,4 +163,4 @@ spec: path: CAs/public.crt {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml b/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml index de8ba11058eb1..884c07768d1f1 100644 --- a/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml +++ b/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml @@ -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: @@ -141,4 +139,4 @@ spec: {{- if .Values.enterpriseGateway.extraVolumes }} {{ toYaml .Values.enterpriseGateway.extraVolumes | nindent 8 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/production/helm/loki/templates/memcached/_memcached-statefulset.tpl b/production/helm/loki/templates/memcached/_memcached-statefulset.tpl index 8310e49dbc723..8e2479af8a05f 100644 --- a/production/helm/loki/templates/memcached/_memcached-statefulset.tpl +++ b/production/helm/loki/templates/memcached/_memcached-statefulset.tpl @@ -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: diff --git a/production/helm/loki/templates/provisioner/job-provisioner.yaml b/production/helm/loki/templates/provisioner/job-provisioner.yaml index deb6e73c17d0c..61fd2be8501ba 100644 --- a/production/helm/loki/templates/provisioner/job-provisioner.yaml +++ b/production/helm/loki/templates/provisioner/job-provisioner.yaml @@ -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 diff --git a/production/helm/loki/templates/tokengen/job-tokengen.yaml b/production/helm/loki/templates/tokengen/job-tokengen.yaml index f9ae7374c2d17..55876a1567759 100644 --- a/production/helm/loki/templates/tokengen/job-tokengen.yaml +++ b/production/helm/loki/templates/tokengen/job-tokengen.yaml @@ -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