-
Notifications
You must be signed in to change notification settings - Fork 137
/
controller.yaml
52 lines (52 loc) · 1.74 KB
/
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
{{- if .Values.controller.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: akri-controller-deployment
spec:
replicas: 1
selector:
matchLabels:
app: akri-controller
template:
metadata:
labels:
app: akri-controller
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: 'akri-controller-sa'
{{- end }}
containers:
- name: akri-controller
{{- if .Values.useDevelopmentContainers }}
{{- if .Values.useLatestContainers }}
image: {{ printf "%s:latest-dev" .Values.controller.image.repository | quote }}
{{- else }}
image: {{ printf "%s:%s" .Values.controller.image.repository (default (printf "v%s-dev" .Chart.AppVersion) .Values.controller.image.tag) | quote }}
{{- end }}
{{- else }}
{{- if .Values.useLatestContainers }}
image: {{ printf "%s:latest" .Values.controller.image.repository | quote }}
{{- else }}
image: {{ printf "%s:%s" .Values.controller.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.controller.image.tag) | quote }}
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.controller.linuxOnly }}
nodeSelector:
"kubernetes.io/os": linux
{{- end }}
{{- if .Values.controller.onlyOnMaster }}
# Only run this pod on the master.
tolerations:
# Allow this pod to run on the master.
- key: node-role.kubernetes.io/master
effect: NoSchedule
nodeSelector:
node-role.kubernetes.io/master: ""
{{- end }}
{{- end }}