Skip to content

Commit

Permalink
Merge branch 'trunk' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol authored Sep 11, 2023
2 parents e0cc617 + fc21bef commit 592e8db
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 3 deletions.
17 changes: 14 additions & 3 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ Once you have a new chart version, you can update your selenium-grid running:
helm upgrade selenium-grid docker-selenium/selenium-grid
```

If needed, you can add sidecars for your browser nodes by running:

```bash
helm upgrade selenium-grid docker-selenium/selenium-grid --set 'firefoxNode.enabled=true' --set-json 'firefoxNode.sidecars=[{"name":"my-sidecar","image":"my-sidecar:latest","imagePullPolicy":"IfNotPresent","ports":[{"containerPort":8080, "protocol":"TCP"}],"resources":{"limits":{"memory": "128Mi"},"requests":{"cpu": "100m"}}}]'
```

Note: the parameter used for --set-json is just an example, please refer to [Container Spec](https://www.devspace.sh/component-chart/docs/configuration/containers) for an overview of usable parameters.

## Uninstalling Selenium Grid release

To uninstall:
Expand Down Expand Up @@ -106,7 +114,7 @@ This table contains the configuration parameters of the chart and their default
| `autoscaling.deregisterLifecycle` | See `values.yaml` | Lifecycle applied to pods of deployments controlled by KEDA. Makes the node deregister from selenium hub |
| `chromeNode.enabled` | `true` | Enable chrome nodes |
| `chromeNode.deploymentEnabled` | `true` | Enable creation of Deployment for chrome nodes |
| `chromeNode.replicas` | `1` | Number of chrome nodes |
| `chromeNode.replicas` | `1` | Number of chrome nodes. Disabled if autoscaling is enabled. |
| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes |
| `chromeNode.imageTag` | `4.12.1-20230904` | Image of chrome nodes |
| `chromeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) |
Expand Down Expand Up @@ -139,9 +147,10 @@ This table contains the configuration parameters of the chart and their default
| `chromeNode.hpa.browserName` | `chrome` | BrowserName from the capability |
| `chromeNode.hpa.browserVersion` | `` | BrowserVersion from the capability |
| `chromeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to |
| `chromeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running |
| `firefoxNode.enabled` | `true` | Enable firefox nodes |
| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes |
| `firefoxNode.replicas` | `1` | Number of firefox nodes |
| `firefoxNode.replicas` | `1` | Number of firefox nodes. Disabled if autoscaling is enabled. |
| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes |
| `firefoxNode.imageTag` | `4.12.1-20230904` | Image of firefox nodes |
| `firefoxNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) |
Expand Down Expand Up @@ -174,9 +183,10 @@ This table contains the configuration parameters of the chart and their default
| `firefoxNode.hpa.browserName` | `firefox` | BrowserName from the capability |
| `firefoxNode.hpa.browserVersion` | `` | BrowserVersion from the capability |
| `firefoxNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to |
| `firefoxNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running |
| `edgeNode.enabled` | `true` | Enable edge nodes |
| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes |
| `edgeNode.replicas` | `1` | Number of edge nodes |
| `edgeNode.replicas` | `1` | Number of edge nodes. Disabled if autoscaling is enabled. |
| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes |
| `edgeNode.imageTag` | `4.12.1-20230904` | Image of edge nodes |
| `edgeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) |
Expand Down Expand Up @@ -209,6 +219,7 @@ This table contains the configuration parameters of the chart and their default
| `edgeNode.hpa.browserName` | `edge` | BrowserName from the capability |
| `edgeNode.hpa.browserVersion` | `` | BrowserVersion from the capability |
| `edgeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to |
| `edgeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running |
| `customLabels` | `{}` | Custom labels for k8s resources |
| `customLabels` | `{}` | Custom labels for k8s resources |

Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ template:
{{- with .node.livenessProbe }}
livenessProbe: {{- toYaml . | nindent 10 }}
{{- end }}
{{- if .node.sidecars }}
{{- toYaml .node.sidecars | nindent 6 }}
{{- end }}
{{- if or .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }}
imagePullSecrets:
- name: {{ default .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }}
Expand Down
2 changes: 2 additions & 0 deletions charts/selenium-grid/templates/chrome-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }}
replicas: {{ .Values.chromeNode.replicas }}
{{end}}
selector:
matchLabels:
app: selenium-chrome-node
Expand Down
1 change: 1 addition & 0 deletions charts/selenium-grid/templates/chrome-node-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
deploymentName: {{ template "seleniumGrid.chromeNode.fullname" . }}
spec:
maxReplicaCount: {{ .Values.chromeNode.maxReplicaCount }}
minReplicaCount: {{ .Values.chromeNode.minReplicaCount }}
scaleTargetRef:
name: {{ template "seleniumGrid.chromeNode.fullname" . }}
triggers:
Expand Down
2 changes: 2 additions & 0 deletions charts/selenium-grid/templates/edge-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }}
replicas: {{ .Values.edgeNode.replicas }}
{{end}}
selector:
matchLabels:
app: selenium-edge-node
Expand Down
1 change: 1 addition & 0 deletions charts/selenium-grid/templates/edge-node-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
deploymentName: {{ template "seleniumGrid.edgeNode.fullname" . }}
spec:
maxReplicaCount: {{ .Values.edgeNode.maxReplicaCount }}
minReplicaCount: {{ .Values.edgeNode.minReplicaCount }}
scaleTargetRef:
name: {{ template "seleniumGrid.edgeNode.fullname" . }}
triggers:
Expand Down
2 changes: 2 additions & 0 deletions charts/selenium-grid/templates/firefox-node-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }}
replicas: {{ .Values.firefoxNode.replicas }}
{{end}}
selector:
matchLabels:
app: selenium-firefox-node
Expand Down
1 change: 1 addition & 0 deletions charts/selenium-grid/templates/firefox-node-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
deploymentName: {{ template "seleniumGrid.firefoxNode.fullname" . }}
spec:
maxReplicaCount: {{ .Values.firefoxNode.maxReplicaCount }}
minReplicaCount: {{ .Values.firefoxNode.minReplicaCount }}
scaleTargetRef:
name: {{ template "seleniumGrid.firefoxNode.fullname" . }}
triggers:
Expand Down
19 changes: 19 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,19 @@ chromeNode:
# claimName: my-pv-claim

maxReplicaCount: 8
minReplicaCount: 1
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: chrome
# browserVersion: '91.0' # Optional. Only required when supporting multiple versions of browser in your Selenium Grid.
unsafeSsl : 'true' # Optional

# It is used to add a sidecars proxy in the same pod of the browser node.
# It means it will add a new container to the deployment itself.
# It should be set using the --set-json option
sidecars: []


# Configuration for firefox nodes
firefoxNode:
# Enable firefox nodes
Expand Down Expand Up @@ -587,10 +594,16 @@ firefoxNode:
# persistentVolumeClaim:
# claimName: my-pv-claim
maxReplicaCount: 8
minReplicaCount: 1
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: firefox

# It is used to add a sidecars proxy in the same pod of the browser node.
# It means it will add a new container to the deployment itself.
# It should be set using the --set-json option
sidecars: []

# Configuration for edge nodes
edgeNode:
# Enable edge nodes
Expand Down Expand Up @@ -700,10 +713,16 @@ edgeNode:
# persistentVolumeClaim:
# claimName: my-pv-claim
maxReplicaCount: 8
minReplicaCount: 1
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: MicrosoftEdge
sessionBrowserName: 'msedge'

# It is used to add a sidecars proxy in the same pod of the browser node.
# It means it will add a new container to the deployment itself.
# It should be set using the --set-json option
sidecars: []

# Custom labels for k8s resources
customLabels: {}

0 comments on commit 592e8db

Please sign in to comment.