Fix helm templating syntax in post-job (#17605)

This commit is contained in:
yaohwu 2023-07-09 03:18:31 +08:00 committed by GitHub
parent 28a01f0320
commit 69e131ee69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,22 +85,22 @@ 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 }}
{{- end }}
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
{{ - if .Values.makePolicyJob.exitCommand }}
{{- 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" . }}
@ -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
{{- 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