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
Besides that, you also can use image tag `latest` or `nightly`.
@@ -27,15 +27,15 @@ If you are deploying KEDA core using their official Helm [chart](https://github.
27
27
keda:
28
28
registry: selenium
29
29
repository: keda
30
-
tag: "2.16.1-selenium-grid-20250202"
30
+
tag: "2.16.1-selenium-grid-20250222"
31
31
metricsApiServer:
32
32
registry: selenium
33
33
repository: keda-metrics-apiserver
34
-
tag: "2.16.1-selenium-grid-20250202"
34
+
tag: "2.16.1-selenium-grid-20250222"
35
35
webhooks:
36
36
registry: selenium
37
37
repository: keda-admission-webhooks
38
-
tag: "2.16.1-selenium-grid-20250202"
38
+
tag: "2.16.1-selenium-grid-20250222"
39
39
```
40
40
41
41
If you are deployment Selenium Grid chart with `autoscaling.enabled` is `true` (implies installing KEDA sub-chart), KEDA images registry and tag already set in the `values.yaml`. Refer to list [configuration](../charts/selenium-grid/CONFIGURATION.md).
Copy file name to clipboardexpand all lines: .keda/scalers/selenium-grid-scaler.md
+102-55
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ triggers:
25
25
platformName: ''# Optional.
26
26
unsafeSsl: 'false'# Optional.
27
27
activationThreshold: 0# Optional.
28
+
nodeMaxSessions: 1# Optional.
29
+
capabilities: ''# Optional.
28
30
```
29
31
30
32
**Parameter list:**
@@ -37,7 +39,7 @@ triggers:
37
39
- `activationThreshold`- Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Default: `0`, Optional)
38
40
- `platformName`- Name of the browser platform. Refer to the [Selenium Grid's](https://www.selenium.dev/documentation/en/getting_started_with_webdriver/browsers/) and [WebdriverIO's](https://webdriver.io/docs/options/#capabilities) documentation for more info. (Optional)
39
41
- `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).
40
-
- `capabilities`- Add more custom capabilities for matching specific Nodes. (Optional)
42
+
- `capabilities`- Add more custom capabilities for matching specific Nodes. It should be in JSON string, see [example](https://www.selenium.dev/documentation/grid/configuration/toml_options/#setting-custom-capabilities-for-matching-specific-nodes) (Optional)
41
43
42
44
**Trigger Authentication**
43
45
- `username`- Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
@@ -47,6 +49,9 @@ triggers:
47
49
48
50
### Example
49
51
52
+
---
53
+
#### Selenium Grid scaler trigger metadata for Chrome browser with `platformNane` and empty `browserVersion`
54
+
50
55
Here is a full example of scaled object definition using Selenium Grid trigger:
51
56
52
57
```yaml
@@ -125,7 +130,7 @@ With above script, the request is sent to Grid. Via GraphQL response, it looks l
125
130
}
126
131
```
127
132
128
-
In Node deployment spec, there is environment variable `SE_NODE_BROWSER_VERSION` which is set to empty. This is used to unset `browserVersion` in Node stereotypes (it is in project [docker-selenium](https://github.com/SeleniumHQ/docker-selenium) setting short browser build number by default), which is expected to match with the request capabilities in queue and scaler trigger metadata.
133
+
In Node deployment spec, there is environment variable `SE_NODE_BROWSER_VERSION` which can be set to empty. This is used to unset `browserVersion` in Node stereotypes (it is in project [docker-selenium](https://github.com/SeleniumHQ/docker-selenium) setting short browser build number by default), which is expected to match with the request capabilities in queue and scaler trigger metadata.
129
134
130
135
When the request capabilities match with scaler trigger metadata, the scaler will create a new Node and connect to the Hub. Now the GraphQL response looks like
131
136
@@ -161,6 +166,9 @@ When the request capabilities match with scaler trigger metadata, the scaler wil
161
166
162
167
Now, the request can be picked up by the Node and the session is created. Session queue will be cleared and the scaler will not create a new Node until the next request comes in.
163
168
169
+
---
170
+
#### Selenium Grid scaler trigger metadata for Chrome browser with `browserVersion` and `platformName`
171
+
164
172
Moreover, at the same time, you can create one more scaled object for Chrome browser request with specific `browserVersion`. For example
#### Selenium Grid scaler trigger metadata for Chrome browser with `nodeMaxSessions`
406
+
340
407
In case you want to scale from 0 (`minReplicaCount: 0`), and browser nodes are configured different `--max-sessions` greater than 1, you can set `nodeMaxSessions` for scaler align with number of slots available per node to have the correct scaling behavior.
341
408
342
409
```yaml
343
-
apiVersion: keda.sh/v1alpha1
344
-
kind: ScaledObject
410
+
kind: Deployment
345
411
metadata:
346
-
name: selenium-grid-chrome-scaledobject
347
-
namespace: keda
412
+
name: selenium-node-chrome
348
413
labels:
349
414
deploymentName: selenium-node-chrome
350
415
spec:
351
-
maxReplicaCount: 8
352
-
scaleTargetRef:
353
-
name: selenium-node-chrome
354
-
triggers:
355
-
- type: selenium-grid
356
-
metadata:
357
-
url: 'http://selenium-hub:4444/graphql'
358
-
browserName: 'chrome'
359
-
platformName: 'Linux'
360
-
nodeMaxSessions: 4
361
-
unsafeSsl: 'true'
362
-
```
363
-
364
-
If you are supporting multiple versions of browser capability in your Selenium Grid, You should create one scaler for every browser version and pass the `browserVersion` in the metadata.
0 commit comments