mirror of
https://github.com/truenas/charts.git
synced 2026-04-23 18:10:06 +08:00
25 lines
800 B
YAML
25 lines
800 B
YAML
{{- if .Values.ixChartContext.isUpgrade -}}
|
|
{{ $values := (. | mustDeepCopy) }}
|
|
{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "pre-upgrade-hook1"
|
|
annotations:
|
|
"helm.sh/hook": pre-upgrade
|
|
"helm.sh/hook-weight": "-1"
|
|
"helm.sh/hook-delete-policy": hook-succeeded
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
spec:
|
|
template:
|
|
metadata:
|
|
name: "pre-upgrade-hook1"
|
|
spec:
|
|
restartPolicy: Never
|
|
serviceAccountName: "{{ template "common.names.serviceAccountName" . }}"
|
|
containers:
|
|
- name: kubectl
|
|
image: "bitnami/kubectl:1.19"
|
|
command: ["kubectl", "delete" , "deployment", "{{ template "common.names.fullname" . }}", "{{ template "common.names.fullname" $values }}"]
|
|
{{- end -}}
|