You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/selenium-grid/CONFIGURATION.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -423,10 +423,10 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
423
423
| chromeNode.scaledOptions | string |`nil`| Override the scaled options for chrome nodes |
424
424
| chromeNode.scaledJobOptions | string |`nil`| Override the scaledJobOptions for chrome nodes |
425
425
| chromeNode.scaledObjectOptions | string |`nil`| Override the scaledObjectOptions for chrome nodes |
426
-
| chromeNode.hpa.browserName | string |`"chrome"`| browserName from the capability |
426
+
| chromeNode.hpa.browserName | string |`"chrome"`| browserName should match with Node stereotype and request capability is scaled by this scaler|
427
427
| chromeNode.hpa.sessionBrowserName | string |`"chrome"`| sessionBrowserName if the browserName is different from the sessionBrowserName |
428
-
| chromeNode.hpa.browserVersion | string |`""`| browserVersion from the capability |
429
-
| chromeNode.hpa.platformName | string |`"Linux"`| platformName from the capability |
428
+
| chromeNode.hpa.browserVersion | string |`""`| browserVersion should match with Node stereotype and request capability is scaled by this scaler|
429
+
| chromeNode.hpa.platformName | string |`""`| platformName should match with Node stereotype and request capability is scaled by this scaler|
430
430
| chromeNode.hpa.unsafeSsl | string |`"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"`| Skip check SSL when connecting to the Graphql endpoint |
431
431
| chromeNode.initContainers | list |`[]`| It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option |
432
432
| chromeNode.sidecars | list |`[]`| It is used to add 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 |
@@ -475,10 +475,10 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
475
475
| firefoxNode.scaledOptions | string |`nil`| Override the scaled options for firefox nodes |
476
476
| firefoxNode.scaledJobOptions | string |`nil`| Override the scaledJobOptions for firefox nodes |
477
477
| firefoxNode.scaledObjectOptions | string |`nil`| Override the scaledObjectOptions for firefox nodes |
478
-
| firefoxNode.hpa.browserName | string |`"firefox"`| browserName from the capability |
478
+
| firefoxNode.hpa.browserName | string |`"firefox"`| browserName should match with Node stereotype and request capability is scaled by this scaler|
479
479
| firefoxNode.hpa.sessionBrowserName | string |`"firefox"`| sessionBrowserName if the browserName is different from the sessionBrowserName |
480
-
| firefoxNode.hpa.browserVersion | string |`""`| browserVersion from the capability |
481
-
| firefoxNode.hpa.platformName | string |`"Linux"`| platformName from the capability |
480
+
| firefoxNode.hpa.browserVersion | string |`""`| browserVersion should match with Node stereotype and request capability is scaled by this scaler|
481
+
| firefoxNode.hpa.platformName | string |`""`| platformName should match with Node stereotype and request capability is scaled by this scaler|
482
482
| firefoxNode.hpa.unsafeSsl | string |`"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"`| Skip check SSL when connecting to the Graphql endpoint |
483
483
| firefoxNode.initContainers | list |`[]`| It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option |
484
484
| firefoxNode.sidecars | list |`[]`| It is used to add 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 |
@@ -527,10 +527,10 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
527
527
| edgeNode.scaledOptions | string |`nil`| Override the scaled options for edge nodes |
528
528
| edgeNode.scaledJobOptions | string |`nil`| Override the scaledJobOptions for edge nodes |
529
529
| edgeNode.scaledObjectOptions | string |`nil`| Override the scaledObjectOptions for edge nodes |
530
-
| edgeNode.hpa.browserName | string |`"MicrosoftEdge"`| browserName from the capability |
530
+
| edgeNode.hpa.browserName | string |`"MicrosoftEdge"`| browserName should match with Node stereotype and request capability is scaled by this scaler|
531
531
| edgeNode.hpa.sessionBrowserName | string |`"msedge"`| sessionBrowserName if the browserName is different from the sessionBrowserName |
532
-
| edgeNode.hpa.browserVersion | string |`""`| browserVersion from the capability |
533
-
| edgeNode.hpa.platformName | string |`"Linux"`| platformName from the capability |
532
+
| edgeNode.hpa.browserVersion | string |`""`| browserVersion should match with Node stereotype and request capability is scaled by this scaler|
533
+
| edgeNode.hpa.platformName | string |`""`| platformName should match with Node stereotype and request capability is scaled by this scaler|
534
534
| edgeNode.hpa.unsafeSsl | string |`"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"`| Skip check SSL when connecting to the Graphql endpoint |
535
535
| edgeNode.initContainers | list |`[]`| It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option |
536
536
| edgeNode.sidecars | list |`[]`| It is used to add 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 |
@@ -579,10 +579,10 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
579
579
| relayNode.scaledOptions | string |`nil`| Override the scaled options for relay nodes |
580
580
| relayNode.scaledJobOptions | string |`nil`| Override the scaledJobOptions for relay nodes |
581
581
| relayNode.scaledObjectOptions | string |`nil`| Override the scaledObjectOptions for relay nodes |
582
-
| relayNode.hpa.browserName | string |`"chrome"`| browserName from the capability |
582
+
| relayNode.hpa.browserName | string |`"chrome"`| browserName should match with Node stereotype and request capability is scaled by this scaler|
583
583
| relayNode.hpa.sessionBrowserName | string |`""`| sessionBrowserName if the browserName is different from the sessionBrowserName |
584
-
| relayNode.hpa.platformName| string |`"Android"`|platformName from the capability |
585
-
| relayNode.hpa.browserVersion| string |`""`|browserVersion from the capability |
584
+
| relayNode.hpa.browserVersion| string |`""`|browserVersion should match with Node stereotype and request capability is scaled by this scaler|
585
+
| relayNode.hpa.platformName| string |`"Android"`|platformName should match with Node stereotype and request capability is scaled by this scaler|
586
586
| relayNode.hpa.unsafeSsl | string |`"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"`| Skip check SSL when connecting to the Graphql endpoint |
587
587
| relayNode.initContainers | list |`[]`| It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option |
588
588
| relayNode.sidecars | list |`[]`| It is used to add 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 |
*[Settings fixed-sized thread pool for the Distributor to create new sessions](#settings-fixed-sized-thread-pool-for-the-distributor-to-create-new-sessions)
Settings that KEDA [ScaledJob spec](https://keda.sh/docs/latest/concepts/scaling-jobs/#scaledjob-spec) supports can be set via `autoscaling.scaledJobOptions`.
212
213
214
+
Expected that with default configuration in KEDA resource, autoscaling behavior should be correct. Hence, in chart values, we keep the config key `autoscaling.scaledJobOptions.scalingStrategy.strategy` is `default`.
215
+
216
+
### Scaler trigger configuration
217
+
218
+
From KEDA core `v2.16.1+`, the trigger metadata `browserVersion`, `platformName` is recommended to be set explicitly to have the correct scaling behavior (especially when your Grid includes autoscaling Nodes, non-autoscaling Nodes, relay Nodes, etc.). Besides that, in client binding, it is also recommended to set the `browserVersion`, `platformName` to align with the trigger metadata. Please see below examples for more details.
219
+
220
+
Understand list trigger parameters
221
+
222
+
- `url`- Graphql url of your Selenium Grid. If endpoint requires authentication, you can use `TriggerAuthentication` to provide the credentials instead of embedding in the URL.
223
+
- `browserName` - browserName should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)
224
+
- `sessionBrowserName` - sessionBrowserName if the browserName is different from the sessionBrowserName. (Default: ``, Optional)
225
+
- `browserVersion` - browserVersion should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)
226
+
- `platformName` - platformName should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)
227
+
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Default: `false`, Optional)
228
+
- `activationThreshold`- Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Default: `0`, Optional)
229
+
- `nodeMaxSessions` - Number of maximum sessions that can run in parallel on a Node. Update this parameter align with node config `--max-sessions` (`SE_NODE_MAX_SESSIONS`) to have the correct scaling behavior. (Default: `1`, Optional).
230
+
231
+
Understand list trigger authentication
232
+
233
+
- `username`- Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
234
+
- `password`- Password for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
235
+
- `authType`- Type of authentication to be used. This can be set to `Bearer` or `OAuth2` in case Selenium Grid behind an Ingress proxy with other authentication types. (Optional)
236
+
- `accessToken`- Access token. This is required when `authType` is set a value. (Optional)
237
+
238
+
In each Node, trigger parameters value will be set under config key `hpa`. In template, those will be added spec of ScaledObject/ScaledJob.
239
+
240
+
In chart values, by default, `browserName`, `sessionBrowserName` are set for corresponding node browser. Parameters `browserVersion`, `platformName` are not set, leave them as empty by default. The default scaler metadata looks like
241
+
242
+
```yaml
243
+
triggers:
244
+
- type: selenium-grid
245
+
metadata:
246
+
url: 'http://selenium-hub:4444/graphql'
247
+
browserName: 'chrome'
248
+
browserVersion: ''
249
+
platformName: ''
250
+
```
251
+
252
+
In this case, the scaler will be triggered by below request (example in Python client, common use case that most users get started)
In Node deployment spec, there is environment variable `SE_NODE_BROWSER_VERSION` which is able to unset `browserVersion` in Node stereotypes (it is setting short browser build number by default e.g `131.0`) or any custom value is up to you, which is expected to match with the request capabilities in queue and scaler trigger metadata.
314
+
Similarly, `SE_NODE_PLATFORM_NAME` is used to unset the `platformName` in Node stereotypes if needed. Noted, update to newer image tag if these 2 env variables doesn't take effect for you.
315
+
316
+
For another example, where your Grid with multiple scalers have different metadata, one of them looks like
317
+
318
+
```yaml
319
+
triggers:
320
+
- type: selenium-grid
321
+
metadata:
322
+
url: 'http://selenium-hub:4444/graphql'
323
+
browserName: 'chrome'
324
+
browserVersion: '131.0'
325
+
platformName: 'Linux'
326
+
```
327
+
328
+
329
+
The request to trigger this corresponds to the following Python script
### Define multiple scalers with different trigger parameters.
339
+
When deploying the chart, you can define multiple scalers with different trigger parameters to scale up different Node stereotypes against different request capabilities.
340
+
341
+
Under config key `crossBrowsers`, in corresponding browser node, you can define array of item with structure same as that node, via `nameOverride` to set unique name for each scaler to avoid resources collision.
342
+
343
+
For example [multiple-nodes-platform.yaml](./multiple-nodes-platform.yaml) file, it defines 2 scalers per browser node to scale against requests with and without `platformName` capability.
344
+
345
+
For example [multiple-nodes-platform-version.yaml](./multiple-nodes-platform-version.yaml) file, it defines multiple scalers with `platformName: 'Linux'` and last few previous stable versions per browser node to scale against requests with `browserVersion` and `platformName` capabilities.
346
+
347
+
While deploying the chart, you can quickly use these extra values files by passing the file via `--values` flag to apply.
348
+
213
349
### Settings fixed-sized thread pool for the Distributor to create new sessions
214
350
215
351
When enabling autoscaling, the Distributor might be under a high workload with parallelism tests, which are many requests incoming and nodes scaling up simultaneously. (Refer to: [SeleniumHQ/selenium#13723](https://github.com/SeleniumHQ/selenium/issues/13723)).
0 commit comments