-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathworker-deployment.yaml
More file actions
89 lines (89 loc) · 3.27 KB
/
worker-deployment.yaml
File metadata and controls
89 lines (89 loc) · 3.27 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
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
83
84
85
86
87
88
89
{{- $_ := set $ "worker" ( ge (.Values.fides.workers.count | int) 1) }}
{{- if $.worker }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "fides.worker.fullname" . }}
labels:
{{- include "fides.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.fides.workers.count | int }}
selector:
matchLabels:
{{- include "fides.worker.selectorLabels" . | nindent 6 }}
strategy:
{{- include "fides.deploymentStrategy" . | nindent 4 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "fides.worker.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "fides.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: fides
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ printf "%s:%s" .Values.fides.image.repository ( include "fides.dockerTag" .)}}
imagePullPolicy: {{ .Values.fides.image.pullPolicy }}
command: ["fides"]
args: ["worker"]
env:
- name: FIDES__CONFIG_PATH
value: {{ printf "%s/fides.toml" (include "fides.configPath" .) }}
{{- include "fides.env" . | nindent 12 }}
{{- include "custom_fides_secrets" . | indent 10 }}
envFrom:
- secretRef:
name: {{ include "fides.fidesSecuritySecretName" . }}
{{- if .Values.fides.configuration.additionalEnvVarsSecret }}
- secretRef:
name: {{ .Values.fides.configuration.additionalEnvVarsSecret }}
{{- end }}
livenessProbe:
exec:
command: [
"bash",
"-c",
"celery --quiet --no-color --app fides.api.tasks inspect ping --destination celery@$HOSTNAME --json"
]
initialDelaySeconds: {{ .Values.fides.startupTimeSeconds | default 30 }}
periodSeconds: 60
timeoutSeconds: {{ .Values.fides.healthCheckTimeoutSeconds | default 5 }}
volumeMounts:
- name: {{ include "fides.configVolume" . }}
mountPath: {{ include "fides.configPath" . }}
- name: {{ include "fides.redisCaVolume" . }}
mountPath: {{ include "fides.redisCaPath" . }}
readOnly: true
resources:
{{- toYaml .Values.fides.workers.resources | nindent 12 }}
volumes:
- name: {{ include "fides.configVolume" . }}
configMap:
name: {{ include "fides.worker.tomlConfigMapName" . }}
- name: {{ include "fides.redisCaVolume" . }}
secret:
secretName: {{ .Values.fides.configuration.redisCaSecretName }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}