-
Notifications
You must be signed in to change notification settings - Fork 139
/
adhocworker-deployment.yaml
65 lines (65 loc) · 2.17 KB
/
adhocworker-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "redash.adhocWorker.fullname" . }}
labels:
{{- include "redash.labels" . | nindent 4 }}
app.kubernetes.io/component: adhocworker
spec:
replicas: {{ .Values.adhocWorker.replicaCount }}
selector:
matchLabels:
{{- include "redash.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: adhocworker
template:
metadata:
labels:
{{- include "redash.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: adhocworker
{{- if .Values.adhocWorker.podAnnotations }}
annotations:
{{ toYaml .Values.adhocWorker.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "redash.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ include "redash.name" . }}-adhocworker
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh"]
args: ["-c", ". /config/dynamicenv.sh && /app/bin/docker-entrypoint worker"]
volumeMounts:
- name: config
mountPath: /config
env:
{{- include "redash.env" . | nindent 12 }}
{{- range $key, $value := .Values.adhocWorker.env }}
- name: "{{ $key }}"
value: "{{ $value }}"
{{- end }}
envFrom:
{{- include "redash.envFrom" . | nindent 12 }}
resources:
{{ toYaml .Values.adhocWorker.resources | indent 12 }}
volumes:
- name: config
configMap:
name: {{ include "redash.fullname" . }}
{{- if .Values.adhocWorker.nodeSelector }}
nodeSelector:
{{ toYaml .Values.adhocWorker.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.adhocWorker.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.adhocWorker.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}