longhorn/chart/templates/uninstall-job.yaml

41 lines
1.3 KiB
YAML
Raw Normal View History

2019-05-08 17:21:58 +00:00
apiVersion: batch/v1
kind: Job
metadata:
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded
name: longhorn-uninstall
namespace: {{ .Release.Namespace }}
labels: {{- include "longhorn.labels" . | nindent 4 }}
2019-05-08 17:21:58 +00:00
spec:
activeDeadlineSeconds: 900
backoffLimit: 1
template:
metadata:
name: longhorn-uninstall
labels: {{- include "longhorn.labels" . | nindent 8 }}
2019-05-08 17:21:58 +00:00
spec:
containers:
- name: longhorn-uninstall
{{- if .Values.privateRegistry.registryUrl }}
image: "{{ .Values.privateRegistry.registryUrl }}/{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
{{- else }}
2019-05-08 17:21:58 +00:00
image: "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
{{- end }}
2019-05-08 17:21:58 +00:00
imagePullPolicy: Always
command:
- longhorn-manager
- uninstall
- --force
env:
2019-05-08 17:30:11 +00:00
- name: LONGHORN_NAMESPACE
2019-05-08 17:21:58 +00:00
valueFrom:
fieldRef:
fieldPath: metadata.namespace
restartPolicy: OnFailure
{{- if .Values.defaultSettings.registrySecret }}
imagePullSecrets:
- name: {{ .Values.defaultSettings.registrySecret }}
{{- end }}
2019-05-08 17:21:58 +00:00
serviceAccountName: longhorn-service-account