-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy pathdeployment.yaml
76 lines (76 loc) · 2.03 KB
/
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
apiVersion: apps/v1
kind: Deployment
metadata:
{{- if .Values.deploymentAnnotations }}
annotations:
{{ toYaml .Values.deploymentAnnotations | indent 4 }}
{{- end }}
labels:
app: operator.trident.netapp.io
name: trident-operator
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: operator.trident.netapp.io
name: trident-operator
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
labels:
app: operator.trident.netapp.io
name: trident-operator
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
- amd64
- key: kubernetes.io/os
operator: In
values:
- linux
{{- if .Values.nodeSelector }}
{{- range $key, $value := .Values.nodeSelector}}
- key: {{ $key }}
operator: In
values:
- {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
serviceAccountName: trident-operator
containers:
- command:
- /trident-operator
{{- if .Values.operatorDebug }}
- -debug
{{- end }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: trident-operator
image: {{ include "trident-operator.image" $ }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
name: trident-operator