Skip to content

Commit

Permalink
Testing pre-delete flink deployments script
Browse files Browse the repository at this point in the history
  • Loading branch information
pielas committed Jun 20, 2024
1 parent 7817e83 commit 65e2ee8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/templates/flink-k8s-operator/pre-delete-flink-deployments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if and (hasKey .Values "flinkK8sOperator") .Values.flinkK8sOperator.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: delete-flinkdeployments
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
containers:
- name: delete-flinkdeployments
image: bitnami/kubectl:latest
command:
- /bin/sh
- -c
- |
kubectl delete flinkdeployments --all -n {{ .Release.Namespace }}
restartPolicy: Never
backoffLimit: 1
{{- end }}

0 comments on commit 65e2ee8

Please sign in to comment.