-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
session-queuer-deployment.yaml
86 lines (86 loc) · 3.84 KB
/
session-queuer-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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{{- if .Values.isolateComponents }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "seleniumGrid.sessionQueue.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: &session_queue_labels
app: {{ template "seleniumGrid.sessionQueue.fullname" . }}
app.kubernetes.io/name: {{ template "seleniumGrid.sessionQueue.fullname" . }}
{{- include "seleniumGrid.commonLabels" . | nindent 4 }}
{{- with .Values.customLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "seleniumGrid.sessionQueue.fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels: *session_queue_labels
{{- with .Values.components.sessionQueue.annotations }}
annotations: {{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }}
serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }}
containers:
- name: {{ template "seleniumGrid.sessionQueue.fullname" . }}
{{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.sessionQueue.imageTag }}
{{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.sessionQueue.imageRegistry }}
image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.sessionQueue.imageName $imageTag }}
imagePullPolicy: {{ .Values.components.sessionQueue.imagePullPolicy }}
{{- with .Values.components.extraEnvironmentVariables }}
env: {{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ tpl .Values.loggingConfigMap.name $ }}
- configMapRef:
name: {{ tpl .Values.serverConfigMap.name $ }}
- secretRef:
name: {{ include "seleniumGrid.common.secrets" $ | quote }}
{{- with .Values.components.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.tls.enabled }}
- name: {{ include "seleniumGrid.tls.fullname" . | quote }}
mountPath: {{ .Values.serverConfigMap.certVolumeMountPath | quote }}
readOnly: true
{{- end }}
ports:
- containerPort: {{ .Values.components.sessionQueue.port }}
protocol: TCP
{{- with .Values.components.sessionQueue.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.sessionQueue.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.sessionQueue.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.global.seleniumGrid.affinity .Values.components.sessionQueue.affinity }}
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.sessionQueue.affinity }}
affinity: {{- toYaml $affinityYaml | nindent 8 }}
{{- end }}
{{- with .Values.components.sessionQueue.tolerations }}
tolerations: {{ toYaml . | nindent 6 }}
{{- end }}
{{- if or .Values.global.seleniumGrid.imagePullSecret .Values.components.sessionQueue.imagePullSecret }}
imagePullSecrets:
- name: {{ default .Values.global.seleniumGrid.imagePullSecret .Values.components.sessionQueue.imagePullSecret }}
{{- end }}
{{- with .Values.components.sessionQueue.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
volumes:
{{- if .Values.tls.enabled }}
- name: {{ include "seleniumGrid.tls.fullname" . | quote }}
secret:
secretName: {{ include "seleniumGrid.tls.fullname" . | quote }}
{{- end }}
{{- end }}