From cb1ec0a0d915c01f8dbf54ccaa3d7d94338d11c5 Mon Sep 17 00:00:00 2001 From: Ian Martin Date: Fri, 7 Jul 2023 23:06:40 -0600 Subject: [PATCH] fix: helm templating syntax in post-job (#17600) --- helm/minio/templates/post-job.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/helm/minio/templates/post-job.yaml b/helm/minio/templates/post-job.yaml index 99b6997b2..5316b8a8c 100644 --- a/helm/minio/templates/post-job.yaml +++ b/helm/minio/templates/post-job.yaml @@ -85,27 +85,27 @@ spec: {{- if .Values.serviceAccount.create }} serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} - { { - if .Values.policies } } + {{ - if .Values.policies }} initContainers: - name: minio-make-policy image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" - { { - if .Values.makePolicyJob.securityContext.enabled } } + {{ - if .Values.makePolicyJob.securityContext.enabled }} securityContext: - runAsUser: { { .Values.makePolicyJob.securityContext.runAsUser } } - runAsGroup: { { .Values.makePolicyJob.securityContext.runAsGroup } } - { { - end } } - imagePullPolicy: { { .Values.mcImage.pullPolicy } } - { { - if .Values.makePolicyJob.exitCommand } } + runAsUser: {{ .Values.makePolicyJob.securityContext.runAsUser }} + runAsGroup: {{ .Values.makePolicyJob.securityContext.runAsGroup }} + {{ - end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{ - if .Values.makePolicyJob.exitCommand }} command: [ "/bin/sh", "-c" ] args: [ "/bin/sh /config/add-policy; EV=$?; {{ .Values.makePolicyJob.exitCommand }} && exit $EV" ] - { { - else } } + {{ - else }} command: [ "/bin/sh", "/config/add-policy" ] - { { - end } } + {{ - end }} env: - name: MINIO_ENDPOINT - value: { { template "minio.fullname" . } } + value: {{ template "minio.fullname" . }} - name: MINIO_PORT - value: { { .Values.service.port | quote } } + value: {{ .Values.service.port | quote }} volumeMounts: - name: etc-path mountPath: /etc/minio/mc @@ -113,12 +113,12 @@ spec: mountPath: /tmp - name: minio-configuration mountPath: /config - { { - if .Values.tls.enabled } } + {{ - if .Values.tls.enabled }} - name: cert-secret-volume-mc - mountPath: { { .Values.configPathmc } }certs + mountPath: {{ .Values.configPathmc }}certs {{- end }} - resources: { { - toYaml .Values.makePolicyJob.resources | nindent 12 } } - { { - end } } + resources: {{ - toYaml .Values.makePolicyJob.resources | nindent 12 }} + {{ - end }} containers: {{- if .Values.buckets }} - name: minio-make-bucket