rancher-charts/charts/longhorn/1.0.201/templates/uninstall-job.yaml

37 lines
1.1 KiB
YAML
Raw Normal View History

2020-09-30 23:34:22 +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 }}
2020-09-30 23:34:22 +00:00
labels: {{- include "longhorn.labels" . | nindent 4 }}
spec:
activeDeadlineSeconds: 900
backoffLimit: 1
template:
metadata:
name: longhorn-uninstall
labels: {{- include "longhorn.labels" . | nindent 8 }}
spec:
containers:
- name: longhorn-uninstall
image: {{ template "system_default_registry" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: Always
2020-09-30 23:34:22 +00:00
command:
- longhorn-manager
- uninstall
- --force
env:
- name: LONGHORN_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
restartPolicy: OnFailure
{{- if .Values.defaultSettings.registrySecret }}
2020-09-30 23:34:22 +00:00
imagePullSecrets:
- name: {{ .Values.defaultSettings.registrySecret }}
2020-09-30 23:34:22 +00:00
{{- end }}
serviceAccountName: longhorn-service-account