-
Notifications
You must be signed in to change notification settings - Fork 73
/
operator-deployment.yaml
76 lines (76 loc) · 2.57 KB
/
operator-deployment.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
74
75
76
{{- if .Values.operator.create }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.operator.applicationName }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: operator
{{- include "onepassword-connect.labels" . | nindent 4 }}
{{- with .Values.operator.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.operator.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
name: {{ .Values.connect.applicationName }}
template:
metadata:
labels:
name: {{ .Values.connect.applicationName }}
app.kubernetes.io/component: operator
{{- with .Values.operator.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.operator.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
tolerations:
{{ toYaml .Values.operator.tolerations | indent 8 }}
serviceAccountName: {{ .Values.operator.serviceAccount.name }}
containers:
- name: {{ .Values.connect.applicationName }}
image: {{ .Values.operator.imageRepository }}:{{ .Values.operator.version | default "latest" }}
imagePullPolicy: {{ .Values.connect.imagePullPolicy }}
securityContext:
runAsUser: 65532
runAsGroup: 65532
allowPrivilegeEscalation: false
capabilities:
drop:
- all
command: ["/manager"]
env:
- name: WATCH_NAMESPACE
value: {{ default "" (tpl (include "helm-toolkit.utils.joinListWithComma" .Values.operator.watchNamespace) .) }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "{{ .Values.operator.applicationName }}"
- name: OP_CONNECT_HOST
value: "{{- include "onepassword-connect.url" . }}"
- name: POLLING_INTERVAL
value: "{{ .Values.operator.pollingInterval }}"
- name: OP_CONNECT_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.operator.token.name }}
key: {{ .Values.operator.token.key }}
- name: AUTO_RESTART
value: "{{ .Values.operator.autoRestart }}"
resources:
{{- toYaml .Values.operator.resources | nindent 12 }}
{{- end }}