-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdeployment.yaml
111 lines (111 loc) · 3.51 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: controller-manager
name: {{ include "name" . }}-controller-manager
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
template:
metadata:
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
labels:
control-plane: controller-manager
spec:
securityContext:
seccompProfile:
type: RuntimeDefault
containers:
- name: manager
command:
- /manager
args:
- --leader-elect
- --zap-devel=false
{{- if .Values.namespaceIsolation.enabled }}
- --isolation-namespaces={{ include "operator.isolatedNamespaces" . }}
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
{{- if .Values.image.pullPolicy }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- end }}
env:
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 8 }}
{{- end }}
- name: WANDB_MANAGER_SERVICE_ACCOUNT
value: {{ include "manager.serviceAccount.name" . }}
- name: OPERATOR_NAMESPACE
value: {{ .Release.Namespace }}
- name: SERVICE_ACCOUNT_NAME
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: AIRGAPPED
value: {{ .Values.airgapped | quote }}
{{- if or .Values.customCACerts .Values.caCertsConfigMap }}
- name: SSL_CERT_DIR
value: /certs/
{{- end }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources: {{- toYaml .Values.resources | nindent 10 }}
{{- if or .Values.airgapped .Values.customCACerts .Values.caCertsConfigMap }}
volumeMounts:
{{- if or .Values.airgapped }}
- name: {{ include "name" . }}-charts
mountPath: /charts
{{- end }}
{{- if .Values.caCertsConfigMap }}
- name: wandb-ca-certs
mountPath: /certs/
{{- end }}
{{- end }}
{{- if or .Values.airgapped .Values.customCACerts .Values.caCertsConfigMap }}
volumes:
{{- if .Values.airgapped }}
- name: {{ include "name" . }}-charts
configMap:
name: {{ include "name" . }}-charts
optional: true
{{- end }}
- name: wandb-ca-certs
projected:
sources:
{{- if .Values.caCertsConfigMap }}
- configMap:
name: {{ .Values.caCertsConfigMap }}
{{- end }}
{{- if .Values.customCACerts }}
- configMap:
name: {{ include "operator.fullname" . }}-ca-certs
{{- end }}
{{- end }}
serviceAccountName: {{ include "manager.serviceAccount.name" . }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10