Skip to content

Commit 6d9c939

Browse files
authored
Make deployment securityContext configurable via values.yaml (#1845)
1 parent 356765f commit 6d9c939

11 files changed

+242
-188
lines changed

charts/selenium-grid/README.md

Lines changed: 197 additions & 188 deletions
Large diffs are not rendered by default.

charts/selenium-grid/templates/chrome-node-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ spec:
6262
{{- with .Values.chromeNode.resources }}
6363
resources: {{- toYaml . | nindent 12 }}
6464
{{- end }}
65+
{{- with .Values.chromeNode.securityContext }}
66+
securityContext: {{- toYaml . | nindent 12 }}
67+
{{- end }}
6568
{{- with .Values.chromeNode.lifecycle }}
6669
lifecycle: {{- toYaml . | nindent 12 }}
6770
{{- end }}

charts/selenium-grid/templates/distributor-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ spec:
5353
{{- with .Values.components.distributor.resources }}
5454
resources: {{- toYaml . | nindent 12 }}
5555
{{- end }}
56+
{{- with .Values.components.distributor.securityContext }}
57+
securityContext: {{- toYaml . | nindent 12 }}
58+
{{- end }}
5659
{{- if or .Values.global.seleniumGrid.imagePullSecret .Values.components.distributor.imagePullSecret }}
5760
imagePullSecrets:
5861
- name: {{ default .Values.global.seleniumGrid.imagePullSecret .Values.components.distributor.imagePullSecret }}

charts/selenium-grid/templates/edge-node-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ spec:
6262
{{- with .Values.edgeNode.resources }}
6363
resources: {{- toYaml . | nindent 12 }}
6464
{{- end }}
65+
{{- with .Values.edgeNode.securityContext }}
66+
securityContext: {{- toYaml . | nindent 12 }}
67+
{{- end }}
6568
{{- with .Values.edgeNode.lifecycle }}
6669
lifecycle: {{- toYaml . | nindent 12 }}
6770
{{- end }}

charts/selenium-grid/templates/event-bus-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ spec:
4646
{{- with .Values.components.eventBus.resources }}
4747
resources: {{- toYaml . | nindent 12 }}
4848
{{- end }}
49+
{{- with .Values.components.eventBus.securityContext }}
50+
securityContext: {{- toYaml . | nindent 12 }}
51+
{{- end }}
4952
{{- with .Values.components.eventBus.nodeSelector }}
5053
nodeSelector: {{- toYaml . | nindent 8 }}
5154
{{- end }}

charts/selenium-grid/templates/firefox-node-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ spec:
6262
{{- with .Values.firefoxNode.resources }}
6363
resources: {{- toYaml . | nindent 12 }}
6464
{{- end }}
65+
{{- with .Values.firefoxNode.securityContext }}
66+
securityContext: {{- toYaml . | nindent 12 }}
67+
{{- end }}
6568
{{- with .Values.firefoxNode.lifecycle }}
6669
lifecycle: {{- toYaml . | nindent 12 }}
6770
{{- end }}

charts/selenium-grid/templates/hub-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ spec:
7474
{{- with .Values.hub.resources }}
7575
resources: {{- toYaml . | nindent 12 }}
7676
{{- end }}
77+
{{- with .Values.hub.securityContext }}
78+
securityContext: {{- toYaml . | nindent 12 }}
79+
{{- end }}
7780
{{- with .Values.hub.nodeSelector }}
7881
nodeSelector: {{- toYaml . | nindent 8 }}
7982
{{- end }}

charts/selenium-grid/templates/router-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ spec:
7979
{{- with .Values.components.router.resources }}
8080
resources: {{- toYaml . | nindent 12 }}
8181
{{- end }}
82+
{{- with .Values.components.router.securityContext }}
83+
securityContext: {{- toYaml . | nindent 12 }}
84+
{{- end }}
8285
{{- with .Values.components.router.nodeSelector }}
8386
nodeSelector: {{- toYaml . | nindent 8 }}
8487
{{- end }}

charts/selenium-grid/templates/session-map-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ spec:
4444
{{- with .Values.components.sessionMap.resources }}
4545
resources: {{- toYaml . | nindent 12 }}
4646
{{- end }}
47+
{{- with .Values.components.sessionMap.securityContext }}
48+
securityContext: {{- toYaml . | nindent 12 }}
49+
{{- end }}
4750
{{- with .Values.components.sessionMap.nodeSelector }}
4851
nodeSelector: {{- toYaml . | nindent 8 }}
4952
{{- end }}

charts/selenium-grid/templates/session-queuer-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- with .Values.components.sessionQueue.resources }}
4343
resources: {{- toYaml . | nindent 12 }}
4444
{{- end }}
45+
{{- with .Values.components.sessionQueue.securityContext }}
46+
securityContext: {{- toYaml . | nindent 12 }}
47+
{{- end }}
4548
{{- with .Values.components.sessionQueue.nodeSelector }}
4649
nodeSelector: {{- toYaml . | nindent 8 }}
4750
{{- end }}

charts/selenium-grid/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ components:
7171
successThreshold: 1
7272
# Resources for router container
7373
resources: {}
74+
# SecurityContext for router container
75+
securityContext: {}
7476
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
7577
serviceType: ClusterIP
7678
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
@@ -102,6 +104,8 @@ components:
102104
port: 5553
103105
# Resources for Distributor container
104106
resources: {}
107+
# SecurityContext for Distributor container
108+
securityContext: {}
105109
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
106110
serviceType: ClusterIP
107111
# Custom annotations for Distributor service
@@ -135,6 +139,8 @@ components:
135139
subscribePort: 4443
136140
# Resources for event-bus container
137141
resources: {}
142+
# SecurityContext for event-bus container
143+
securityContext: {}
138144
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
139145
serviceType: ClusterIP
140146
# Custom annotations for Event Bus service
@@ -163,6 +169,8 @@ components:
163169
port: 5556
164170
# Resources for Session Map container
165171
resources: {}
172+
# SecurityContext for Session Map container
173+
securityContext: {}
166174
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
167175
serviceType: ClusterIP
168176
# Custom annotations for Session Map service
@@ -191,6 +199,8 @@ components:
191199
port: 5559
192200
# Resources for Session Queue container
193201
resources: {}
202+
# SecurityContext for Session Queue container
203+
securityContext: {}
194204
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
195205
serviceType: ClusterIP
196206
# Custom annotations for Session Queue service
@@ -280,6 +290,8 @@ hub:
280290
# name: mysecret
281291
# Resources for selenium-hub container
282292
resources: {}
293+
# SecurityContext for selenium-hub container
294+
securityContext: {}
283295
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
284296
serviceType: ClusterIP
285297
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
@@ -333,6 +345,8 @@ chromeNode:
333345
limits:
334346
memory: "1Gi"
335347
cpu: "1"
348+
# SecurityContext for chrome-node container
349+
securityContext: {}
336350
# Tolerations for chrome-node pods
337351
tolerations: []
338352
# Node selector for chrome-node pods
@@ -449,6 +463,8 @@ firefoxNode:
449463
limits:
450464
memory: "1Gi"
451465
cpu: "1"
466+
# SecurityContext for firefox-node container
467+
securityContext: {}
452468
# Custom host aliases for firefox nodes
453469
hostAliases:
454470
# - ip: "198.51.100.0"
@@ -560,6 +576,8 @@ edgeNode:
560576
limits:
561577
memory: "1Gi"
562578
cpu: "1"
579+
# SecurityContext for edge-node container
580+
securityContext: {}
563581
# Custom host aliases for edge nodes
564582
hostAliases:
565583
# - ip: "198.51.100.0"

0 commit comments

Comments
 (0)