first commit
This commit is contained in:
38
templates/fusion-operator/jobs/crd_remove.yaml
Normal file
38
templates/fusion-operator/jobs/crd_remove.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
{{- if and .Values.fusionOperator.enabled (eq (include "parent.dataplaneMode" . ) "shared") }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: remove-crd
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
dplane: "crd-job"
|
||||
spec:
|
||||
ttlSecondsAfterFinished: {{ .Values.fusionOperator.job.removeJob_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: delete-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
|
||||
- |
|
||||
kubectl delete crd orchestrators.operator.fusion.axway.com --ignore-not-found=true
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user