/
helm-controller.yaml
73 lines (73 loc) · 1.92 KB
/
helm-controller.yaml
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
{{- if and .Values.helmcontroller.create}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: helm-controller
{{- with .Values.helmcontroller.serviceaccount.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: controller
name: helm-controller
spec:
replicas: 1
selector:
matchLabels:
app: helm-controller
template:
metadata:
{{- with .Values.helmcontroller.annotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
labels:
app: helm-controller
{{ with .Values.helmcontroller.labels }}{{ toYaml . | indent 8 }}{{ end }}
spec:
containers:
- args:
- --events-addr=http://notification-controller/
- --watch-all-namespaces
- --log-level=info
- --log-encoding=json
- --enable-leader-election
env:
- name: RUNTIME_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: {{ .Values.helmcontroller.image }}:{{ .Values.helmcontroller.tag }}
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz
port: healthz
name: manager
ports:
- containerPort: 8080
name: http-prom
- containerPort: 9440
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: healthz
{{- with .Values.helmcontroller.resources }}
resources: {{ toYaml . | nindent 10 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp
name: temp
serviceAccountName: helm-controller
terminationGracePeriodSeconds: 600
volumes:
- emptyDir: {}
name: temp
{{- end }}