diff --git a/.keda/README.md b/.keda/README.md index ff0e80fc68..a435674920 100644 --- a/.keda/README.md +++ b/.keda/README.md @@ -13,9 +13,9 @@ The stable implementation will be merged to the upstream KEDA repository frequen Replace the image registry and tag of these KEDA components with the patched image tag: ```bash -docker pull selenium/keda:2.17.2-selenium-grid-20250717 -docker pull selenium/keda-metrics-apiserver:2.17.2-selenium-grid-20250717 -docker pull selenium/keda-admission-webhooks:2.17.2-selenium-grid-20250717 +docker pull selenium/keda:2.17.2-selenium-grid-20250721 +docker pull selenium/keda-metrics-apiserver:2.17.2-selenium-grid-20250721 +docker pull selenium/keda-admission-webhooks:2.17.2-selenium-grid-20250721 ``` 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. keda: registry: selenium repository: keda - tag: "2.17.2-selenium-grid-20250717" + tag: "2.17.2-selenium-grid-20250721" metricsApiServer: registry: selenium repository: keda-metrics-apiserver - tag: "2.17.2-selenium-grid-20250717" + tag: "2.17.2-selenium-grid-20250721" webhooks: registry: selenium repository: keda-admission-webhooks - tag: "2.17.2-selenium-grid-20250717" + tag: "2.17.2-selenium-grid-20250721" ``` 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). @@ -49,6 +49,8 @@ You can involve to review and discuss the pull requests to help us early detect [kedacore/keda](https://github.com/kedacore/keda) +- https://github.com/kedacore/keda/pull/6920 (planned, v2.18.0) + - ~~https://github.com/kedacore/keda/pull/6772 (merged, v2.17.1)~~ - ~~https://github.com/kedacore/keda/pull/6684 (merged, v2.17.0)~~ diff --git a/.keda/scalers/selenium-grid-scaler.md b/.keda/scalers/selenium-grid-scaler.md index 71a7c6335f..70312f2955 100644 --- a/.keda/scalers/selenium-grid-scaler.md +++ b/.keda/scalers/selenium-grid-scaler.md @@ -28,6 +28,7 @@ triggers: nodeMaxSessions: 1 # Optional. enableManagedDownloads: true # Optional. capabilities: '' # Optional. + overProvisionRatio: '' # Optional. ``` **Parameter list:** @@ -42,6 +43,7 @@ triggers: - `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). - `enableManagedDownloads`- Set this for Node enabled to auto manage files downloaded for a given session on the Node. When the client requests enabling this feature, it can only be assigned to the Node that also enabled it. Otherwise, the request will wait until it timed out. (Default: `true`, Optional). - `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) +- `overProvisionRatio` - The number of overprovisioning ratio to scale more than the actual number of requests. For example, if there are 20 requests for the browser instead of scaling to 20 Nodes, it is able to scale 20% more than the requested, in this case is 24, in this case input value is `0.2` (Optional) **Trigger Authentication** - `username` - Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional) @@ -49,6 +51,8 @@ triggers: - `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) - `accessToken` - Access token. This is required when `authType` is set a value. (Optional) +Noted that trigger authentication parameters are able to set in either trigger metadata or trigger authentication. However, if both are set, the trigger authentication will take precedence. + ### Example --- diff --git a/.keda/scalers/selenium_grid_scaler.go b/.keda/scalers/selenium_grid_scaler.go index 02091d0535..f89ec27048 100644 --- a/.keda/scalers/selenium_grid_scaler.go +++ b/.keda/scalers/selenium_grid_scaler.go @@ -28,22 +28,22 @@ type seleniumGridScaler struct { type seleniumGridScalerMetadata struct { triggerIndex int - URL string `keda:"name=url, order=authParams;triggerMetadata"` - AuthType string `keda:"name=authType, order=authParams;resolvedEnv, optional"` - Username string `keda:"name=username, order=authParams;resolvedEnv, optional"` - Password string `keda:"name=password, order=authParams;resolvedEnv, optional"` - AccessToken string `keda:"name=accessToken, order=authParams;resolvedEnv, optional"` - BrowserName string `keda:"name=browserName, order=triggerMetadata, optional"` - SessionBrowserName string `keda:"name=sessionBrowserName, order=triggerMetadata, optional"` - BrowserVersion string `keda:"name=browserVersion, order=triggerMetadata, optional"` - PlatformName string `keda:"name=platformName, order=triggerMetadata, optional"` - ActivationThreshold int64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` - UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, default=false"` - NodeMaxSessions int64 `keda:"name=nodeMaxSessions, order=triggerMetadata, default=1"` - EnableManagedDownloads bool `keda:"name=enableManagedDownloads, order=triggerMetadata, default=true"` - Capabilities string `keda:"name=capabilities, order=triggerMetadata, optional"` - - TargetValue int64 + URL string `keda:"name=url, order=authParams;triggerMetadata;resolvedEnv"` + AuthType string `keda:"name=authType, order=authParams;triggerMetadata;resolvedEnv, optional"` + Username string `keda:"name=username, order=authParams;triggerMetadata;resolvedEnv, optional"` + Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv, optional"` + AccessToken string `keda:"name=accessToken, order=authParams;triggerMetadata;resolvedEnv, optional"` + BrowserName string `keda:"name=browserName, order=triggerMetadata, optional"` + SessionBrowserName string `keda:"name=sessionBrowserName, order=triggerMetadata, optional"` + BrowserVersion string `keda:"name=browserVersion, order=triggerMetadata, optional"` + PlatformName string `keda:"name=platformName, order=triggerMetadata, optional"` + NodeMaxSessions int64 `keda:"name=nodeMaxSessions, order=triggerMetadata, default=1"` + EnableManagedDownloads bool `keda:"name=enableManagedDownloads, order=triggerMetadata, default=true"` + Capabilities string `keda:"name=capabilities, order=triggerMetadata, optional"` + OverProvisionRatio float64 `keda:"name=overProvisionRatio, order=triggerMetadata, optional"` + UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` + TargetValue int64 `keda:"name=targetValue, order=triggerMetadata, default=1"` + ActivationThreshold float64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` } type Platform struct { @@ -173,12 +173,10 @@ func parseCapabilitiesToMap(_capabilities string) (map[string]interface{}, error } func parseSeleniumGridScalerMetadata(config *scalersconfig.ScalerConfig) (*seleniumGridScalerMetadata, error) { - meta := &seleniumGridScalerMetadata{ - TargetValue: 1, - } + meta := &seleniumGridScalerMetadata{} if err := config.TypedConfig(meta); err != nil { - return nil, fmt.Errorf("error parsing prometheus metadata: %w", err) + return nil, fmt.Errorf("error parsing Selenium Grid GraphQL response: %w", err) } meta.triggerIndex = config.TriggerIndex @@ -204,9 +202,19 @@ func (s *seleniumGridScaler) GetMetricsAndActivity(ctx context.Context, metricNa return []external_metrics.ExternalMetricValue{}, false, fmt.Errorf("error requesting selenium grid endpoint: %w", err) } - metric := GenerateMetricInMili(metricName, float64(newRequestNodes+onGoingSessions)) + scaledCount := getScaledCount(newRequestNodes, onGoingSessions, s.metadata.OverProvisionRatio) + metric := GenerateMetricInMili(metricName, scaledCount) + + return []external_metrics.ExternalMetricValue{metric}, scaledCount > s.metadata.ActivationThreshold, nil +} - return []external_metrics.ExternalMetricValue{metric}, (newRequestNodes + onGoingSessions) > s.metadata.ActivationThreshold, nil +func getScaledCount(newRequestNodes int64, onGoingSession int64, overProvisionRatio float64) float64 { + scaledCount := float64(newRequestNodes + onGoingSession) + if overProvisionRatio > 0 { + // Apply over-provision ratio to the scaled count + scaledCount += scaledCount * overProvisionRatio + } + return scaledCount } func buildSeleniumGridMetricName(meta *seleniumGridScalerMetadata) string { diff --git a/.keda/scalers/selenium_grid_scaler_test.go b/.keda/scalers/selenium_grid_scaler_test.go index 5a095ec004..e1ab102fcb 100644 --- a/.keda/scalers/selenium_grid_scaler_test.go +++ b/.keda/scalers/selenium_grid_scaler_test.go @@ -19,12 +19,14 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { nodeMaxSessions int64 enableManagedDownloads bool capabilities string + overProvisionRatio float64 } tests := []struct { name string args args wantNewRequestNodes int64 wantOnGoingSessions int64 + wantOverProvisioned float64 wantErr bool }{ { @@ -437,6 +439,57 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { wantOnGoingSessions: 0, wantErr: false, }, + { + name: "Scaled_number_when_set_param_over_provisioned", + args: args{ + b: []byte(`{ + "data": { + "grid": { + "sessionCount": 0, + "maxSession": 0, + "totalSlots": 0 + }, + "nodesInfo": { + "nodes": [ + { + "id": "node-1", + "status": "UP", + "sessionCount": 0, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\"}}]", + "sessions": [] + }, + { + "id": "node-2", + "status": "UP", + "sessionCount": 0, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"Windows 11\"}}]", + "sessions": [] + } + ] + }, + "sessionsInfo": { + "sessionQueueRequests": [ + "{\"browserName\": \"chrome\", \"platformName\": \"linux\"}", + "{\"browserName\": \"chrome\", \"platformName\": \"linux\"}" + ] + } + } + }`), + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + platformName: "linux", + overProvisionRatio: 1.2, + }, + wantNewRequestNodes: 1, + wantOnGoingSessions: 0, + wantOverProvisioned: 2.2, + wantErr: false, + }, { name: "scaler_browserVersion_is_latest,_5_sessionQueueRequests_wihtout_browserVersion_also_1_different_platformName,_1_available_nodeStereotypes_with_3_slots_Linux_and_1_node_Windows,_should_return_count_as_1", args: args{ @@ -1048,7 +1101,7 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { wantErr: false, }, { - name: "1 queue request without platformName and scaler metadata without platfromName should return 1 new node and 1 ongoing session", + name: "1 queue request without platformName and scaler metadata without platformName should return 1 new node and 1 ongoing session", args: args{ b: []byte(`{ "data": { @@ -3154,6 +3207,7 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { newRequestNodes, onGoingSessions, err := getCountFromSeleniumResponse(tt.args.b, tt.args.browserName, tt.args.browserVersion, tt.args.sessionBrowserName, tt.args.platformName, tt.args.nodeMaxSessions, tt.args.enableManagedDownloads, tt.args.capabilities, logr.Discard()) + scaledCount := getScaledCount(newRequestNodes, onGoingSessions, tt.args.overProvisionRatio) if (err != nil) != tt.wantErr { t.Errorf("getCountFromSeleniumResponse() error = %v, wantErr %v", err, tt.wantErr) return @@ -3161,6 +3215,9 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { if !reflect.DeepEqual(newRequestNodes, tt.wantNewRequestNodes) || !reflect.DeepEqual(onGoingSessions, tt.wantOnGoingSessions) { t.Errorf("getCountFromSeleniumResponse() = [%v, %v], want [%v, %v]", newRequestNodes, onGoingSessions, tt.wantNewRequestNodes, tt.wantOnGoingSessions) } + if tt.args.overProvisionRatio > 0 && !reflect.DeepEqual(scaledCount, tt.wantOverProvisioned) { + t.Errorf("getCountFromSeleniumResponse() = %v, want over-provisioned %v", scaledCount, tt.wantOverProvisioned) + } }) } } diff --git a/Makefile b/Makefile index 0440d86e4d..0ff17b35e1 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,8 @@ KEDA_TAG_PREV_VERSION := $(or $(KEDA_TAG_PREV_VERSION),$(KEDA_TAG_PREV_VERSION), KEDA_CORE_VERSION := $(or $(KEDA_CORE_VERSION),$(KEDA_CORE_VERSION),2.17.2) KEDA_TAG_VERSION := $(or $(KEDA_TAG_VERSION),$(KEDA_TAG_VERSION),2.17.2-selenium-grid) KEDA_BASED_NAME := $(or $(KEDA_BASED_NAME),$(KEDA_BASED_NAME),ndviet) -KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.17.2-selenium-grid-20250705) -TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),false) +KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.17.2-selenium-grid-20250721) +TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),true) all: hub \ distributor \ @@ -284,7 +284,7 @@ fetch_grid_scaler_resources: && cd ./.keda/scalers \ && curl -L https://raw.githubusercontent.com/$(KEDA_BASED_NAME)/keda/v$(KEDA_BASED_TAG)/pkg/scalers/selenium_grid_scaler.go -o selenium_grid_scaler.go \ && curl -L https://raw.githubusercontent.com/$(KEDA_BASED_NAME)/keda/v$(KEDA_BASED_TAG)/pkg/scalers/selenium_grid_scaler_test.go -o selenium_grid_scaler_test.go \ - && curl -L https://raw.githubusercontent.com/$(KEDA_BASED_NAME)/keda-docs/main/content/docs/2.17/scalers/selenium-grid-scaler.md -o selenium-grid-scaler.md + && curl -L https://raw.githubusercontent.com/$(KEDA_BASED_NAME)/keda-docs/main/content/docs/2.18/scalers/selenium-grid-scaler.md -o selenium-grid-scaler.md fetch_grid_scaler_images: docker pull --platform linux/amd64 --platform linux/arm64 $(KEDA_BASED_NAME)/keda:$(KEDA_BASED_TAG) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 836a5b800f..f162bcbf34 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -482,6 +482,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | chromeNode.hpa.browserVersion | string | `""` | browserVersion should match with Node stereotype and request capability is scaled by this scaler | | chromeNode.hpa.platformName | string | `""` | platformName should match with Node stereotype and request capability is scaled by this scaler | | chromeNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | +| chromeNode.hpa.overProvisionRatio | string | `""` | The number of overprovisioning ratio to scale more than the actual number of requests. For example, over over-provisioning ratio `0.2` means 20% more than the actual requests | | 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 | | 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 | | chromeNode.videoRecorder | object | `{}` | Override specific video recording settings for chrome node | @@ -541,6 +542,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | firefoxNode.hpa.browserVersion | string | `""` | browserVersion should match with Node stereotype and request capability is scaled by this scaler | | firefoxNode.hpa.platformName | string | `""` | platformName should match with Node stereotype and request capability is scaled by this scaler | | firefoxNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | +| firefoxNode.hpa.overProvisionRatio | string | `""` | The number of overprovisioning ratio to scale more than the actual number of requests. For example, over over-provisioning ratio `0.2` means 20% more than the actual requests | | 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 | | 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 | | firefoxNode.videoRecorder | object | `{}` | Override specific video recording settings for firefox node | @@ -600,6 +602,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | edgeNode.hpa.browserVersion | string | `""` | browserVersion should match with Node stereotype and request capability is scaled by this scaler | | edgeNode.hpa.platformName | string | `""` | platformName should match with Node stereotype and request capability is scaled by this scaler | | edgeNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | +| edgeNode.hpa.overProvisionRatio | string | `""` | The number of overprovisioning ratio to scale more than the actual number of requests. For example, over over-provisioning ratio `0.2` means 20% more than the actual requests | | 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 | | 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 | | edgeNode.videoRecorder | object | `{}` | Override specific video recording settings for edge node | @@ -660,6 +663,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | relayNode.hpa.browserVersion | string | `""` | browserVersion should match with Node stereotype and request capability is scaled by this scaler | | relayNode.hpa.platformName | string | `""` | platformName should match with Node stereotype and request capability is scaled by this scaler | | relayNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | +| relayNode.hpa.overProvisionRatio | string | `""` | The number of overprovisioning ratio to scale more than the actual number of requests. For example, over over-provisioning ratio `0.2` means 20% more than the actual requests | | 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 | | 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 | | relayNode.videoRecorder | object | `{}` | Override specific video recording settings for edge node | @@ -732,6 +736,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | videoManager.priorityClassName | string | `""` | Priority class name for router pods | | videoManager.extraVolumeMounts | list | `[]` | | | videoManager.extraVolumes | list | `[]` | Extra volumes for video recorder pod | +| keda.image | object | `{"keda":{"registry":"selenium","repository":"keda","tag":"2.17.2-selenium-grid-20250721"},"metricsApiServer":{"registry":"selenium","repository":"keda-metrics-apiserver","tag":"2.17.2-selenium-grid-20250721"},"webhooks":{"registry":"selenium","repository":"keda-admission-webhooks","tag":"2.17.2-selenium-grid-20250721"}}` | Specify image for KEDA components | | keda.additionalAnnotations | string | `nil` | Annotations for KEDA resources | | keda.http.timeout | int | `60000` | | | keda.webhooks | object | `{"enabled":false}` | Enable KEDA admission webhooks component | diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index 474e419e25..0072d22021 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -254,7 +254,9 @@ triggers: - type: selenium-grid metadata: {{- with .node.hpa }} - {{- tpl (toYaml .) $ | nindent 6 }} + {{- range $key, $value := . }} + {{ $key }}: {{ tpl ($value | toString) $ | quote }} + {{- end }} {{- if not .nodeMaxSessions }} nodeMaxSessions: {{ $nodeMaxSessions | quote }} {{- end }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 3c736e9126..2ac663663e 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1322,6 +1322,9 @@ chromeNode: platformName: "" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional + # -- The number of overprovisioning ratio to scale more than the actual number of requests. + # For example, over over-provisioning ratio `0.2` means 20% more than the actual requests + overProvisionRatio: "" # -- It is used to add initContainers in the same pod of the browser node. # It should be set using the --set-json option @@ -1520,6 +1523,9 @@ firefoxNode: platformName: "" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional + # -- The number of overprovisioning ratio to scale more than the actual number of requests. + # For example, over over-provisioning ratio `0.2` means 20% more than the actual requests + overProvisionRatio: "" # -- It is used to add initContainers in the same pod of the browser node. # It should be set using the --set-json option @@ -1718,6 +1724,9 @@ edgeNode: platformName: "" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional + # -- The number of overprovisioning ratio to scale more than the actual number of requests. + # For example, over over-provisioning ratio `0.2` means 20% more than the actual requests + overProvisionRatio: "" # -- It is used to add initContainers in the same pod of the browser node. # It should be set using the --set-json option @@ -1917,6 +1926,9 @@ relayNode: platformName: "" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional + # -- The number of overprovisioning ratio to scale more than the actual number of requests. + # For example, over over-provisioning ratio `0.2` means 20% more than the actual requests + overProvisionRatio: "" # -- It is used to add initContainers in the same pod of the browser node. # It should be set using the --set-json option @@ -2165,19 +2177,19 @@ videoManager: keda: # enabled: false # -- Specify image for KEDA components -# image: -# keda: -# registry: selenium -# repository: keda -# tag: "2.17.2-selenium-grid-20250717" -# metricsApiServer: -# registry: selenium -# repository: keda-metrics-apiserver -# tag: "2.17.2-selenium-grid-20250717" -# webhooks: -# registry: selenium -# repository: keda-admission-webhooks -# tag: "2.17.2-selenium-grid-20250717" + image: + keda: + registry: selenium + repository: keda + tag: "2.17.2-selenium-grid-20250721" + metricsApiServer: + registry: selenium + repository: keda-metrics-apiserver + tag: "2.17.2-selenium-grid-20250721" + webhooks: + registry: selenium + repository: keda-admission-webhooks + tag: "2.17.2-selenium-grid-20250721" # -- Annotations for KEDA resources additionalAnnotations: http: diff --git a/tests/charts/ci/DeploymentAutoscaling-values.yaml b/tests/charts/ci/DeploymentAutoscaling-values.yaml index d9f1949f50..ec02c6f14a 100644 --- a/tests/charts/ci/DeploymentAutoscaling-values.yaml +++ b/tests/charts/ci/DeploymentAutoscaling-values.yaml @@ -65,6 +65,8 @@ chromeNode: - name: logs persistentVolumeClaim: claimName: selenium-grid-pvc-local + hpa: + overProvisionRatio: 0.1 # Configuration for edge nodes edgeNode: @@ -100,6 +102,8 @@ firefoxNode: enabled: *livenessProbe extraVolumeMounts: *extraVolumeMounts extraVolumes: *extraVolumes + hpa: + overProvisionRatio: 0.2 # Configuration for relay nodes relayNode: diff --git a/tests/charts/templates/render/dummy.yaml b/tests/charts/templates/render/dummy.yaml index f0e9f30865..d52aec7340 100644 --- a/tests/charts/templates/render/dummy.yaml +++ b/tests/charts/templates/render/dummy.yaml @@ -145,6 +145,8 @@ chromeNode: terminationGracePeriodSeconds: 7200 service: enabled: true + hpa: + overProvisionRatio: 0.2 firefoxNode: nodeMaxSessions: 1 @@ -154,6 +156,8 @@ firefoxNode: terminationGracePeriodSeconds: 720 service: enabled: true + hpa: + overProvisionRatio: 0.2 edgeNode: annotations: @@ -163,9 +167,13 @@ edgeNode: videoRecorder: uploader: enabled: false + hpa: + overProvisionRatio: 0.2 relayNode: enabled: true + hpa: + overProvisionRatio: 0.2 videoRecorder: enabled: true diff --git a/tests/charts/templates/render/dummy_solution.yaml b/tests/charts/templates/render/dummy_solution.yaml index efa88eeb5a..d8f3abdc66 100644 --- a/tests/charts/templates/render/dummy_solution.yaml +++ b/tests/charts/templates/render/dummy_solution.yaml @@ -136,6 +136,8 @@ selenium-grid: terminationGracePeriodSeconds: 7200 service: enabled: true + hpa: + overProvisionRatio: 0.2 firefoxNode: nodeMaxSessions: 1 @@ -144,6 +146,8 @@ selenium-grid: terminationGracePeriodSeconds: 720 service: enabled: true + hpa: + overProvisionRatio: 0.2 edgeNode: affinity: *affinity @@ -152,9 +156,13 @@ selenium-grid: videoRecorder: uploader: enabled: false + hpa: + overProvisionRatio: 0.2 relayNode: enabled: true + hpa: + overProvisionRatio: 0.2 videoRecorder: enabled: true