-
Notifications
You must be signed in to change notification settings - Fork 137
/
agent.yaml
82 lines (82 loc) · 2.69 KB
/
agent.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
{{- if .Values.agent.enabled }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: akri-agent-daemonset
spec:
selector:
matchLabels:
name: akri-agent
template:
metadata:
labels:
name: akri-agent
spec:
hostNetwork: true
{{- if .Values.agent.linuxOnly }}
nodeSelector:
"kubernetes.io/os": linux
{{- end }}
{{- if .Values.rbac.enabled }}
serviceAccountName: 'akri-agent-sa'
{{- end }}
containers:
- name: akri-agent
{{- if .Values.useDevelopmentContainers }}
{{- if .Values.useLatestContainers }}
image: {{ printf "%s:latest-dev" .Values.agent.image.repository | quote }}
{{- else }}
image: {{ printf "%s:%s" .Values.agent.image.repository (default (printf "v%s-dev" .Chart.AppVersion) .Values.agent.image.tag) | quote }}
{{- end }}
{{- else }}
{{- if .Values.useLatestContainers }}
image: {{ printf "%s:latest" .Values.agent.image.repository | quote }}
{{- else }}
image: {{ printf "%s:%s" .Values.agent.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.agent.image.tag) | quote }}
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.agent.image.pullPolicy }}
env:
{{- if .Values.agent.allowDebugEcho }}
- name: ENABLE_DEBUG_ECHO
value: "1"
{{- end }}
- name: HOST_CRICTL_PATH
value: /host/usr/bin/crictl
- name: HOST_RUNTIME_ENDPOINT
value: unix:///host/var/run/dockershim.sock
- name: HOST_IMAGE_ENDPOINT
value: unix:///host/var/run/dockershim.sock
- name: AGENT_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: usr-bin-crictl
mountPath: /host/usr/bin/crictl
- name: var-run-dockershim
mountPath: /host/var/run/dockershim.sock
- name: devices
mountPath: /run/udev
securityContext:
privileged: true
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: device-plugin
hostPath:
path: "{{ .Values.agent.host.kubeletDevicePlugins }}"
- name: usr-bin-crictl
hostPath:
path: "{{ .Values.agent.host.crictl }}"
- name: var-run-dockershim
hostPath:
path: "{{ .Values.agent.host.dockerShimSock }}"
- name: devices
hostPath:
path: "{{ .Values.agent.host.udev }}"
{{- end }}