-
Notifications
You must be signed in to change notification settings - Fork 263
Expand file tree
/
Copy pathdeployment.yaml
More file actions
81 lines (81 loc) · 2.39 KB
/
deployment.yaml
File metadata and controls
81 lines (81 loc) · 2.39 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
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
{{- if and (eq .Values.cloudProvider "Azure") (ne .Values.cloudIdentity "") }}
azure.workload.identity/use: 'true'
{{- end }}
spec:
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
serviceAccountName: trident-operator
containers:
- command:
- /trident-operator
{{- if or .Values.anfConfigurator.enabled .Values.ontapConfigurator.enabled }}
- -configurator-reconcile-interval={{ .Values.configuratorReconcileInterval }}
{{- end }}
{{- if .Values.operatorDebug }}
- -debug
{{- end }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: trident-operator
{{- if and (eq .Values.cloudProvider "Azure") (eq .Values.cloudIdentity "") }}
- name: AZURE_CREDENTIAL_FILE
value: /etc/kubernetes/azure.json
volumeMounts:
- name: azure-cred
mountPath: /etc/kubernetes
{{- end }}
image: {{ include "trident-operator.image" $ }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
name: trident-operator
resources:
requests:
{{ toYaml .Values.resources | indent 10 }}
{{- if and (eq .Values.cloudProvider "Azure") (eq .Values.cloudIdentity "") }}
volumes:
- name: azure-cred
hostPath:
path: /etc/kubernetes
type: DirectoryOrCreate
{{- end }}