-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathdeployment-controller.yaml
77 lines (77 loc) · 3.24 KB
/
deployment-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
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kubefledged.fullname" . }}-controller
labels:
{{- include "kubefledged.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.controllerReplicaCount }}
selector:
matchLabels:
{{- include "kubefledged.selectorLabels" . | nindent 6 }}-controller
template:
metadata:
labels:
{{- include "kubefledged.selectorLabels" . | nindent 8 }}-controller
spec:
{{- if .Values.controller.hostNetwork -}}
hostNetwork: true
{{- end }}
{{- if .Values.controller.priorityClassName -}}
priorityClassName: {{ .Values.controller.priorityClassName }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "kubefledged.fullname" . }}-controller
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ .Values.image.kubefledgedControllerRepository }}:{{ .Chart.AppVersion }}
command: {{ .Values.command.kubefledgedControllerCommand }}
args:
- "--stderrthreshold={{ .Values.args.controllerLogLevel }}"
- "--image-pull-deadline-duration={{ .Values.args.controllerImagePullDeadlineDuration }}"
- "--image-cache-refresh-frequency={{ .Values.args.controllerImageCacheRefreshFrequency }}"
- "--image-pull-policy={{ .Values.args.controllerImagePullPolicy }}"
- "--image-delete-job-host-network={{ .Values.args.controllerImageDeleteJobHostNetwork }}"
{{- if .Values.args.controllerServiceAccountName }}
- "--service-account-name={{ .Values.args.controllerServiceAccountName }}"
{{- end }}
{{- if .Values.args.controllerJobPriorityClassName }}
- "--job-priority-class-name={{ .Values.args.controllerJobPriorityClassName }}"
{{- end }}
{{- if .Values.args.controllerJobRetentionPolicy }}
- "--job-retention-policy={{ .Values.args.controllerJobRetentionPolicy }}"
{{- end }}
{{- if .Values.args.controllerCRISocketPath }}
- "--cri-socket-path={{ .Values.args.controllerCRISocketPath }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: KUBEFLEDGED_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KUBEFLEDGED_CRI_CLIENT_IMAGE
value: {{ .Values.image.kubefledgedCRIClientRepository }}:{{ .Chart.AppVersion }}
- name: BUSYBOX_IMAGE
value: {{ .Values.image.busyboxImageRepository }}:{{ .Values.image.busyboxImageVersion }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}