-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathdeployment.yaml
More file actions
38 lines (38 loc) · 1.22 KB
/
deployment.yaml
File metadata and controls
38 lines (38 loc) · 1.22 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "agent.fullname" . }}
labels:
{{- include "agent.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.agent.replicaCount }}
selector:
matchLabels:
{{- include "agent.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "agent.selectorLabels" . | nindent 8 }}
spec:
securityContext:
{{- include "agent.podSecurityContext" . | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
allowPrivilegeEscalation: false
{{- include "agent.image" . | nindent 10 }}
#NB! configMap is created by job.yaml
envFrom:
- configMapRef:
optional: true
name: {{ include "agent.fullname" . }}-config
env:
{{- include "agent.commonEnv" . | nindent 12 }}
- name: USE_CUDA
value: {{ .Values.agent.use_cuda | default "false" | quote }}
{{- range .Values.agent.envVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
resources:
{{- toYaml .Values.agent.resources | nindent 12 }}