-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathpre-delete-hook.yaml
More file actions
95 lines (95 loc) · 3.41 KB
/
pre-delete-hook.yaml
File metadata and controls
95 lines (95 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Release.Name }}-pre-delete-job
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
backoffLimit: 0
completions: 1
template:
metadata:
name: {{ .Release.Name }}
labels:
{{- include "zrok2.labelsFrontend" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
restartPolicy: Never
serviceAccountName: {{ include "zrok2.serviceAccountName" . }}
containers:
- name: pre-install-job
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: ZITI_MGMT_API
value: {{ .Values.ziti.advertisedHost }}:{{ .Values.ziti.advertisedPort }}
- name: ZITI_ADMIN_USER
valueFrom:
secretKeyRef:
name: {{ include "zrok2.fullname" . }}-ziti-mgmt-secret
key: admin-username
- name: ZITI_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "zrok2.fullname" . }}-ziti-mgmt-secret
key: admin-password
- name: HOME
value: /tmp
volumeMounts:
- name: zrok2-frontend-config
mountPath: /usr/local/bin/unbootstrap.bash
subPath: unbootstrap.bash
- name: zrok2-controller-config
mountPath: /etc/zrok2
readOnly: true
- name: ziti-ctrl-plane-cas
mountPath: {{ .Values.ziti.ca_cert_dir }}/{{ .Values.ziti.ca_cert_file }}
subPath: {{ .Values.ziti.ca_cert_file }}
readOnly: true
- mountPath: /usr/local/bin/zitiLogin
name: zrok2-frontend-config
subPath: zitiLogin
command: ["unbootstrap.bash"]
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: zrok2-frontend-config
configMap:
name: {{ include "zrok2.fullname" . }}-frontend-config
items:
- key: unbootstrap.bash
path: unbootstrap.bash
mode: 0555
- key: zitiLogin
path: zitiLogin
mode: 0555
- name: zrok2-controller-config
configMap:
name: {{ include "zrok2.fullname" . }}-config
defaultMode: 0444
items:
- key: ctrl.yaml
path: ctrl.yaml
- name: ziti-ctrl-plane-cas
configMap:
name: {{ .Values.ziti.ca_cert_configmap }}
defaultMode: 0444
items:
- key: {{ .Values.ziti.ca_cert_file }}
path: {{ .Values.ziti.ca_cert_file }}