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
|
2020-12-03 15:02:28 +00:00
|
|
|
namespace: {{ include "release_namespace" . }}
|
2020-07-08 23:56:34 +00:00
|
|
|
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
2019-05-08 17:21:58 +00:00
|
|
|
spec:
|
|
|
|
activeDeadlineSeconds: 900
|
|
|
|
backoffLimit: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall
|
2020-07-08 23:56:34 +00:00
|
|
|
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
2019-05-08 17:21:58 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: longhorn-uninstall
|
2020-09-29 09:16:09 +00:00
|
|
|
image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
|
2020-11-21 06:38:04 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2021-03-16 15:06:41 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2019-05-08 17:21:58 +00:00
|
|
|
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
|
2020-11-21 06:38:04 +00:00
|
|
|
{{- if .Values.privateRegistry.registrySecret }}
|
2020-03-19 22:20:09 +00:00
|
|
|
imagePullSecrets:
|
2020-11-21 06:38:04 +00:00
|
|
|
- name: {{ .Values.privateRegistry.registrySecret }}
|
2020-03-19 22:20:09 +00:00
|
|
|
{{- end }}
|
2021-03-15 19:12:28 +00:00
|
|
|
{{- if .Values.longhornManager.priorityClass }}
|
|
|
|
priorityClassName: {{ .Values.longhornManager.priorityClass | quote}}
|
|
|
|
{{- end }}
|
2019-05-08 17:21:58 +00:00
|
|
|
serviceAccountName: longhorn-service-account
|
2021-03-15 19:12:28 +00:00
|
|
|
{{- if .Values.longhornManager.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{ toYaml .Values.longhornManager.tolerations | indent 6 }}
|
|
|
|
{{- end }}
|
2021-04-13 22:50:25 +00:00
|
|
|
{{- if .Values.longhornManager.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{ toYaml .Values.longhornManager.nodeSelector | indent 8 }}
|
|
|
|
{{- end }}
|