Skip to content

Commit

Permalink
Make deployment securityContext configurable via values.yaml (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
uluzox authored May 16, 2023
1 parent 356765f commit 6d9c939
Show file tree
Hide file tree
Showing 11 changed files with 242 additions and 188 deletions.
385 changes: 197 additions & 188 deletions charts/selenium-grid/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/chrome-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
{{- with .Values.chromeNode.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.chromeNode.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.chromeNode.lifecycle }}
lifecycle: {{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/distributor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
{{- with .Values.components.distributor.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.distributor.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.global.seleniumGrid.imagePullSecret .Values.components.distributor.imagePullSecret }}
imagePullSecrets:
- name: {{ default .Values.global.seleniumGrid.imagePullSecret .Values.components.distributor.imagePullSecret }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/edge-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
{{- with .Values.edgeNode.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.edgeNode.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.edgeNode.lifecycle }}
lifecycle: {{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/event-bus-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ spec:
{{- with .Values.components.eventBus.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.eventBus.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.eventBus.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/firefox-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
{{- with .Values.firefoxNode.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.firefoxNode.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.firefoxNode.lifecycle }}
lifecycle: {{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/hub-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
{{- with .Values.hub.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.hub.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.hub.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/router-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ spec:
{{- with .Values.components.router.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.router.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.router.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/session-map-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
{{- with .Values.components.sessionMap.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.sessionMap.securityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.components.sessionMap.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/session-queuer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
{{- 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 }}
Expand Down
18 changes: 18 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ components:
successThreshold: 1
# Resources for router container
resources: {}
# SecurityContext for router container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
Expand Down Expand Up @@ -102,6 +104,8 @@ components:
port: 5553
# Resources for Distributor container
resources: {}
# SecurityContext for Distributor container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Custom annotations for Distributor service
Expand Down Expand Up @@ -135,6 +139,8 @@ components:
subscribePort: 4443
# Resources for event-bus container
resources: {}
# SecurityContext for event-bus container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Custom annotations for Event Bus service
Expand Down Expand Up @@ -163,6 +169,8 @@ components:
port: 5556
# Resources for Session Map container
resources: {}
# SecurityContext for Session Map container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Custom annotations for Session Map service
Expand Down Expand Up @@ -191,6 +199,8 @@ components:
port: 5559
# Resources for Session Queue container
resources: {}
# SecurityContext for Session Queue container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Custom annotations for Session Queue service
Expand Down Expand Up @@ -280,6 +290,8 @@ hub:
# name: mysecret
# Resources for selenium-hub container
resources: {}
# SecurityContext for selenium-hub container
securityContext: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
Expand Down Expand Up @@ -333,6 +345,8 @@ chromeNode:
limits:
memory: "1Gi"
cpu: "1"
# SecurityContext for chrome-node container
securityContext: {}
# Tolerations for chrome-node pods
tolerations: []
# Node selector for chrome-node pods
Expand Down Expand Up @@ -449,6 +463,8 @@ firefoxNode:
limits:
memory: "1Gi"
cpu: "1"
# SecurityContext for firefox-node container
securityContext: {}
# Custom host aliases for firefox nodes
hostAliases:
# - ip: "198.51.100.0"
Expand Down Expand Up @@ -560,6 +576,8 @@ edgeNode:
limits:
memory: "1Gi"
cpu: "1"
# SecurityContext for edge-node container
securityContext: {}
# Custom host aliases for edge nodes
hostAliases:
# - ip: "198.51.100.0"
Expand Down

0 comments on commit 6d9c939

Please sign in to comment.