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.15.1-selenium-grid-20241010"
30
+
tag: "2.15.1-selenium-grid-20241024"
31
31
metricsApiServer:
32
32
registry: selenium
33
33
repository: keda-metrics-apiserver
34
-
tag: "2.15.1-selenium-grid-20241010"
34
+
tag: "2.15.1-selenium-grid-20241024"
35
35
webhooks:
36
36
registry: selenium
37
37
repository: keda-admission-webhooks
38
-
tag: "2.15.1-selenium-grid-20241010"
38
+
tag: "2.15.1-selenium-grid-20241024"
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
+30-4
Original file line number
Diff line number
Diff line change
@@ -29,17 +29,21 @@ triggers:
29
29
30
30
**Parameter list:**
31
31
32
-
- `url` - Graphql url of your Selenium Grid. Refer to the Selenium Grid's documentation [here](https://www.selenium.dev/documentation/en/grid/grid_4/graphql_support/) to for more info.
33
-
- `username`- Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
34
-
- `password`- Password for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
35
-
- `browserName`- Name of browser that usually gets passed in the browser capability. 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.
32
+
- `url` - Graphql url of your Selenium Grid (Required). Refer to the Selenium Grid's documentation [here](https://www.selenium.dev/documentation/en/grid/grid_4/graphql_support/) to for more info. If endpoint requires authentication, you can use `TriggerAuthentication` to provide the credentials instead of embedding in the URL.
33
+
- `browserName`- Name of browser that usually gets passed in the browser capability (Required). 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.
36
34
- `sessionBrowserName`- Name of the browser when it is an active session, only set if `BrowserName` changes between the queue and the active session. See the Edge example below for further detail. (Optional)
37
35
- `browserVersion`- Version of browser that usually gets passed in the browser capability. 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)
38
36
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)
39
37
- `activationThreshold`- Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Default: `0`, Optional)
40
38
- `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. (Default: `Linux`, Optional)
41
39
- `nodeMaxSessions` - Number of maximum sessions that can run in parallel on a Node. (Default: `1`, Optional). Update this parameter align with node config `--max-sessions` (`SE_NODE_MAX_SESSIONS`) to have the correct scaling behavior.
42
40
41
+
**Trigger Authentication**
42
+
- `username`- Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
43
+
- `password`- Password for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)
44
+
- `authType`- Type of authentication to be used. (Optional). This can be set to `Bearer` or `OAuth2` in case Selenium Grid behind an Ingress proxy with other authentication types.
45
+
- `accessToken`- Access token (Optional). This is required when `authType` is set a value.
46
+
43
47
### Example
44
48
45
49
Here is a full example of scaled object definition using Selenium Grid trigger:
@@ -108,6 +112,28 @@ spec:
108
112
sessionBrowserName: 'msedge'
109
113
```
110
114
115
+
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.
116
+
117
+
```yaml
118
+
apiVersion: keda.sh/v1alpha1
119
+
kind: ScaledObject
120
+
metadata:
121
+
name: selenium-grid-chrome-scaledobject
122
+
namespace: keda
123
+
labels:
124
+
deploymentName: selenium-chrome-node
125
+
spec:
126
+
maxReplicaCount: 8
127
+
scaleTargetRef:
128
+
name: selenium-chrome-node
129
+
triggers:
130
+
- type: selenium-grid
131
+
metadata:
132
+
url: 'http://selenium-hub:4444/graphql'
133
+
browserName: 'chrome'
134
+
nodeMaxSessions: 4
135
+
```
136
+
111
137
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.
// Tests from PR: https://github.com/kedacore/keda/pull/6055
1530
+
{
1531
+
name: "sessions requests with matching browsername and platformName when setSessionsFromHub turned on and node with 1 slots matches should return count as 0",
name: "4 sessions requests with matching browsername and platformName when setSessionsFromHub turned on and node with 2 slots matches should return count as 2",
name: "4 sessions requests with matching browsername and platformName when setSessionsFromHub turned on, no nodes and sessionsPerNode=2 matches should return count as 2",
0 commit comments