41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
{{- if and .Values.fusionOperator.enabled (eq (include "parent.dataplaneMode" . ) "shared") }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: apply-crd
|
|
annotations:
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
|
labels:
|
|
dplane: "crd-job"
|
|
spec:
|
|
ttlSecondsAfterFinished: {{ .Values.fusionOperator.job.updateJob_ttl }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
dplane: "crd-job"
|
|
spec:
|
|
{{- with .Values.global.image.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.fusionOperator.job.serviceAccount.enabled }}
|
|
serviceAccountName: {{ include "fusionOperator.job.serviceAccountName" . }}
|
|
{{- end }}
|
|
{{- if .Values.fusionOperator.podSecurityContextEnabled }}
|
|
securityContext: {{- toYaml .Values.fusionOperator.podSecurityContext | nindent 8 }}
|
|
{{- end }}
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: apply-crd
|
|
securityContext: {{- toYaml .Values.fusionOperator.securityContext | nindent 12 }}
|
|
image: "{{ default .Values.global.image.repository .Values.global.alpinetools.image.repository }}/{{ .Values.global.alpinetools.image.name }}:{{ .Values.global.alpinetools.image.tag }}"
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
cat <<EOF | kubectl apply -f -
|
|
{{ .Files.Get "crd/orchestrator.yaml" | nindent 14 }}
|
|
EOF
|
|
{{- end }}
|