From 5fc485f3245bacb20fbd0a543c80434352066a37 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Tue, 20 Oct 2026 07:44:11 +0700 Subject: [PATCH] [chart] Require KEDA >=2.21.0 so the built-in scaler honors includeOngoingSessions KEDA kedacore/keda#8107 (merged, shipped in KEDA 2.21.0) added includeOngoingSessions to the built-in selenium-grid scaler - the exact same trigger param, default, and calculation this chart's _helpers.tpl and this project's external scaler have carried since fixing #3167. Below KEDA 2.21.0 the built-in scaler ignores the parameter entirely, so this chart's default scalingStrategy (accurate) + the built-in scaler (autoscaling.externalScaler.enabled: false) still hits the runaway Job creation #3167 describes, even though the chart has been setting includeOngoingSessions correctly in the trigger metadata all along. Bump the keda subchart dependency floor from ^2.20.0 to ^2.21.0 so a chart-bundled KEDA install always gets the fix. Document the one case this can't reach: autoscaling.enableWithExistingKEDA with the built-in scaler brings the user's own KEDA, whose version this chart has no control over - call out the >=2.21.0 requirement there explicitly. Also fixed an adjacent stale claim that the built-in scaler is still the default; it's been externalScaler.enabled: true for a while. The external scaler itself needs no change - compared line by line against the upstream diff, it already matches exactly: same trigger metadata key (includeOngoingSessions), same default (true), and the same metric/activation-threshold calculation (.keda-external-scaler/internal/gridscaler/server.go:97-113). Verified: `helm dependency update` now locks keda to 2.21.0, `helm lint` passes, and `helm template ... --set autoscaling.externalScaler.enabled=false` still renders includeOngoingSessions correctly on the built-in-scaler trigger. Co-Authored-By: Claude Sonnet 5 --- charts/selenium-grid/CONFIGURATION.md | 4 ++-- charts/selenium-grid/Chart.yaml | 11 +++++++++-- charts/selenium-grid/README.md | 27 +++++++++++++++++++++------ 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 2f7d159a5..ba3a7e316 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -1,6 +1,6 @@ # selenium-grid -![Version: 0.62.0](https://img.shields.io/badge/Version-0.62.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.51.0-20261010](https://img.shields.io/badge/AppVersion-4.51.0--20261010-informational?style=flat-square) +![Version: 0.62.2](https://img.shields.io/badge/Version-0.62.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.51.0-20261010](https://img.shields.io/badge/AppVersion-4.51.0--20261010-informational?style=flat-square) A Helm chart for creating a Selenium Grid Server in Kubernetes @@ -21,7 +21,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | https://cloudpirates-io.github.io/helm-charts | postgresql(postgres) | ^0.21.0 | | https://cloudpirates-io.github.io/helm-charts | redis | ^0.37.0 | | https://jaegertracing.github.io/helm-charts | jaeger | ^4.0.0 | -| https://kedacore.github.io/charts | keda | ^2.20.0 | +| https://kedacore.github.io/charts | keda | ^2.21.0 | | https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | ^92.0.0 | | https://traefik.github.io/charts | traefik | ^42.0.0 | diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index 0bb5ada74..bf71b9da2 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -2,12 +2,19 @@ apiVersion: v2 name: selenium-grid description: A Helm chart for creating a Selenium Grid Server in Kubernetes type: application -version: 0.62.1 +version: 0.62.2 appVersion: 4.51.0-20261010 icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png dependencies: - repository: https://kedacore.github.io/charts - version: ^2.20.0 + # 2.21.0 is the first release carrying the built-in selenium-grid scaler's + # includeOngoingSessions trigger param (kedacore/keda#8107); below that, the + # scalingStrategy.strategy=accurate/eager default this chart ships causes + # the runaway Job creation in #3167 whenever the built-in scaler + # (autoscaling.externalScaler.enabled=false) is used instead of this + # project's external scaler, which has carried the fix on its own since + # before this param existed upstream, regardless of the KEDA version. + version: ^2.21.0 name: keda condition: autoscaling.enabled, keda.enabled - repository: https://traefik.github.io/charts diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index f35ca418c..1d4bf4dde 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -142,6 +142,18 @@ To do this [KEDA](https://keda.sh/docs/latest/scalers/selenium-grid-scaler/) is autoscaling using `autoscaling.enabling` KEDA is installed automatically. To instead use an existing installation of KEDA you can enable autoscaling with `autoscaling.enableWithExistingKEDA` instead. +**With an existing KEDA installation and the built-in `selenium-grid` scaler** +(`autoscaling.externalScaler.enabled: false`), make sure it's **KEDA ≥ 2.21.0**. +This chart's default `scalingType: job` strategy (`accurate`) relies on the +built-in scaler honouring the `includeOngoingSessions` trigger parameter this +chart sets automatically; older KEDA versions silently ignore it and hit the +runaway Job creation in +[#3167](https://github.com/SeleniumHQ/docker-selenium/issues/3167). The chart's +own bundled KEDA subchart dependency already requires `^2.21.0` for this +reason; this only matters when bringing your own installation. The default +[external scaler](#use-the-standalone-selenium-grid-external-scaler) isn't +affected by the KEDA version at all, since it carries this fix itself. + KEDA can scale either with [deployments](https://keda.sh/docs/latest/concepts/scaling-deployments/#scaling-of-deployments-and-statefulsets) or [jobs](https://keda.sh/docs/latest/concepts/scaling-jobs/) and the charts support both types. This @@ -154,13 +166,16 @@ Refer to [README](../../.keda/README.md) ### Use the standalone Selenium Grid external scaler -By default the chart uses KEDA's built-in `selenium-grid` scaler, which is released -on KEDA's cadence. The chart can instead deploy the standalone -[Selenium Grid KEDA external scaler](../../.keda-external-scaler/README.md), a gRPC -scaler owned by this project, so scaling fixes ship with docker-selenium releases. -Scaling behaviour is identical; only the trigger wiring changes. +By default (`autoscaling.externalScaler.enabled: true`) the chart deploys the +standalone [Selenium Grid KEDA external scaler](../../.keda-external-scaler/README.md), +a gRPC scaler owned by this project, so scaling fixes ship with docker-selenium +releases instead of waiting on KEDA's own release cadence. Set +`autoscaling.externalScaler.enabled: false` to use KEDA's built-in +`selenium-grid` scaler instead - scaling behaviour is identical; only the +trigger wiring changes. -Enable it with: +The external scaler is already enabled by default; the example below is for +reference, or to re-enable it after having set it to `false`: ```yaml autoscaling: