Skip to content

Commit

Permalink
[grid][chart] Allows users to turn of Deployment creation for Nodes
Browse files Browse the repository at this point in the history
This change introduces a new value called `deploymentEnabled` for each of the node browsers,
if the value is set to `true` Deployments will be created for each of the respective nodes however if `false` no Deployments will be created.

This will allow users to turn of creation of the default deployments and to use other resource types instead such as jobs.

Fixes SeleniumHQ#1708
  • Loading branch information
mhnaeem committed Oct 27, 2022
1 parent 398ba55 commit 42d8b91
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
3 changes: 3 additions & 0 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ This table contains the configuration parameters of the chart and their default
| `ingress.tls` | `[]` | TLS backend configuration for ingress resource |
| `busConfigMap.annotations` | `{}` | Custom annotations for configmap |
| `chromeNode.enabled` | `true` | Enable chrome nodes |
| `chromeNode.deploymentEnabled` | `true` | Enable creation of Deployment for chrome nodes |
| `chromeNode.replicas` | `1` | Number of chrome nodes |
| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes |
| `chromeNode.imageTag` | `4.5.3-20221024` | Image of chrome nodes |
Expand Down Expand Up @@ -95,6 +96,7 @@ This table contains the configuration parameters of the chart and their default
| `chromeNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod |
| `chromeNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) |
| `firefoxNode.enabled` | `true` | Enable firefox nodes |
| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes |
| `firefoxNode.replicas` | `1` | Number of firefox nodes |
| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes |
| `firefoxNode.imageTag` | `4.5.3-20221024` | Image of firefox nodes |
Expand Down Expand Up @@ -122,6 +124,7 @@ This table contains the configuration parameters of the chart and their default
| `firefoxNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod |
| `firefoxNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) |
| `edgeNode.enabled` | `true` | Enable edge nodes |
| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes |
| `edgeNode.replicas` | `1` | Number of edge nodes |
| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes |
| `edgeNode.imageTag` | `4.5.3-20221024` | Image of edge nodes |
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/chrome-node-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.chromeNode.enabled }}
{{- if and .Values.chromeNode.enabled .Values.chromeNode.deploymentEnabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/edge-node-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.edgeNode.enabled }}
{{- if and .Values.edgeNode.enabled .Values.edgeNode.deploymentEnabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.firefoxNode.enabled }}
{{- if and .Values.firefoxNode.enabled .Values.firefoxNode.deploymentEnabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
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 @@ -290,6 +290,12 @@ hub:
chromeNode:
# Enable chrome nodes
enabled: true

# Enable creation of Deployment
# true (default) - if you want long living pods
# false - for provisioning your own custom type such as Jobs
deploymentEnabled: true

# Number of chrome nodes
replicas: 1
# Image of chrome nodes
Expand Down Expand Up @@ -396,6 +402,12 @@ chromeNode:
firefoxNode:
# Enable firefox nodes
enabled: true

# Enable creation of Deployment
# true (default) - if you want long living pods
# false - for provisioning your own custom type such as Jobs
deploymentEnabled: true

# Number of firefox nodes
replicas: 1
# Image of firefox nodes
Expand Down Expand Up @@ -502,6 +514,12 @@ firefoxNode:
edgeNode:
# Enable edge nodes
enabled: true

# Enable creation of Deployment
# true (default) - if you want long living pods
# false - for provisioning your own custom type such as Jobs
deploymentEnabled: true

# Number of edge nodes
replicas: 1
# Image of edge nodes
Expand Down

0 comments on commit 42d8b91

Please sign in to comment.