From 57e071326762f8fe394b4c02e218ea860f0bc19b Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Thu, 14 Aug 2025 09:27:08 +0700 Subject: [PATCH 1/6] K8s: Update overProvisionRatio to use scalingModifiers instead scaler trigger param Signed-off-by: Viet Nguyen Duc --- Makefile | 2 +- charts/selenium-grid/CONFIGURATION.md | 19 +++--- charts/selenium-grid/templates/_helpers.tpl | 51 +++++++++++----- .../templates/chrome-node-scaledjobs.yaml | 2 +- .../templates/edge-node-scaledjob.yaml | 2 +- .../templates/firefox-node-scaledjob.yaml | 2 +- .../templates/relay-node-scaledjobs.yaml | 2 +- charts/selenium-grid/values.yaml | 60 ++++++++++--------- tests/charts/bootstrap.sh | 7 +++ .../ci/DeploymentAutoscaling-values.yaml | 6 +- tests/charts/templates/render/dummy.yaml | 56 ++++++++++++++--- .../templates/render/dummy_solution.yaml | 12 ++-- 12 files changed, 148 insertions(+), 73 deletions(-) diff --git a/Makefile b/Makefile index 2ed32da380..63daf12851 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ 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-20250721) -TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),true) +TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),false) all: hub \ distributor \ diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index a584ac0ced..170200a1bf 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -412,15 +412,21 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | autoscaling.patchObjectFinalizers.resources | object | `{"limits":{"cpu":"200m","memory":"500Mi"},"requests":{"cpu":"100m","memory":"200Mi"}}` | Define resources for container in patch job | | autoscaling.patchObjectFinalizers.nodeSelector | object | `{}` | Node selector for the patch job | | autoscaling.patchObjectFinalizers.tolerations | list | `[]` | Tolerations for the patch job | -| autoscaling.scaledOptions | object | `{"maxReplicaCount":24,"minReplicaCount":0,"pollingInterval":20}` | Options for KEDA scaled resources (keep only common options used for both ScaledJob and ScaledObject) | +| autoscaling.defaultTriggerType | string | `"selenium-grid"` | Default type of trigger to use (`selenium-grid` is build-in scaler in KEDA) | +| autoscaling.defaultTriggerName | string | `"seleniumGrid"` | Default alias name of trigger type (which is used in formula if you want to add scalingModifiers to advanced spec) | +| autoscaling.scaledOptions | object | `{"maxReplicaCount":24,"minReplicaCount":0,"pollingInterval":20,"triggers":[]}` | Options for KEDA scaled resources (keep only common options used for both ScaledJob and ScaledObject) | | autoscaling.scaledOptions.minReplicaCount | int | `0` | Minimum number of replicas | | autoscaling.scaledOptions.maxReplicaCount | int | `24` | Maximum number of replicas | | autoscaling.scaledOptions.pollingInterval | int | `20` | Polling interval in seconds | +| autoscaling.scaledOptions.triggers | list | `[]` | List of triggers. Be careful, the default trigger of `selenium-grid` will be overwritten if you specify this | | autoscaling.scaledJobOptions.scalingStrategy.strategy | string | `"default"` | Scaling strategy for KEDA ScaledJob - https://keda.sh/docs/latest/reference/scaledjob-spec/#scalingstrategy | | autoscaling.scaledJobOptions.successfulJobsHistoryLimit | int | `0` | Number of Completed jobs should be kept | | autoscaling.scaledJobOptions.failedJobsHistoryLimit | int | `0` | Number of Failed jobs should be kept (for troubleshooting purposes) | -| autoscaling.scaledJobOptions.jobTargetRef | object | `{"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | +| autoscaling.scaledJobOptions.jobTargetRef | object | `{"activeDeadlineSeconds":0,"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | +| autoscaling.scaledJobOptions.jobTargetRef.activeDeadlineSeconds | int | `0` | Duration in seconds that job may be active before the system tries to terminate it. Default is 0 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated | +| autoscaling.scaledObjectOptions.advanced.restoreToOriginalReplicaCount | bool | `true` | | | autoscaling.scaledObjectOptions.scaleTargetRef.kind | string | `"Deployment"` | Target reference for KEDA ScaledObject | +| autoscaling.scaledOverProvisionRatio | string | `""` | | | autoscaling.terminationGracePeriodSeconds | int | `3600` | Define terminationGracePeriodSeconds for scalingType "deployment". Period for `deregisterLifecycle` to gracefully shut down the node before force terminating it | | autoscaling.deregisterLifecycle | string | `nil` | Define preStop command to shut down the node gracefully when scalingType is set to "deployment" | | crossBrowsers.chromeNode | list | `[{"nameOverride":null}]` | Additional chrome nodes, array of objects with the same structure as `chromeNode` | @@ -478,12 +484,12 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | chromeNode.scaledOptions | string | `nil` | Override the scaled options for chrome nodes | | chromeNode.scaledJobOptions | string | `nil` | Override the scaledJobOptions for chrome nodes | | chromeNode.scaledObjectOptions | string | `nil` | Override the scaledObjectOptions for chrome nodes | +| chromeNode.scaledOverProvisionRatio | string | `""` | | | chromeNode.hpa.browserName | string | `"chrome"` | browserName should match with Node stereotype and request capability is scaled by this scaler | | chromeNode.hpa.sessionBrowserName | string | `"chrome"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | 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 | @@ -538,12 +544,12 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | firefoxNode.scaledOptions | string | `nil` | Override the scaled options for firefox nodes | | firefoxNode.scaledJobOptions | string | `nil` | Override the scaledJobOptions for firefox nodes | | firefoxNode.scaledObjectOptions | string | `nil` | Override the scaledObjectOptions for firefox nodes | +| firefoxNode.scaledOverProvisionRatio | string | `""` | | | firefoxNode.hpa.browserName | string | `"firefox"` | browserName should match with Node stereotype and request capability is scaled by this scaler | | firefoxNode.hpa.sessionBrowserName | string | `"firefox"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | 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 | @@ -598,12 +604,12 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | edgeNode.scaledOptions | string | `nil` | Override the scaled options for edge nodes | | edgeNode.scaledJobOptions | string | `nil` | Override the scaledJobOptions for edge nodes | | edgeNode.scaledObjectOptions | string | `nil` | Override the scaledObjectOptions for edge nodes | +| edgeNode.scaledOverProvisionRatio | string | `""` | | | edgeNode.hpa.browserName | string | `"MicrosoftEdge"` | browserName should match with Node stereotype and request capability is scaled by this scaler | | edgeNode.hpa.sessionBrowserName | string | `"msedge"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | 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 | @@ -659,12 +665,12 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | relayNode.scaledOptions | string | `nil` | Override the scaled options for relay nodes | | relayNode.scaledJobOptions | string | `nil` | Override the scaledJobOptions for relay nodes | | relayNode.scaledObjectOptions | string | `nil` | Override the scaledObjectOptions for relay nodes | +| relayNode.scaledOverProvisionRatio | string | `""` | | | relayNode.hpa.browserName | string | `""` | browserName should match with Node stereotype and request capability is scaled by this scaler | | relayNode.hpa.sessionBrowserName | string | `""` | sessionBrowserName if the browserName is different from the sessionBrowserName | | 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 | @@ -737,7 +743,6 @@ 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 0072d22021..fe81d027fa 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -213,45 +213,68 @@ based on sum of maxReplicaCount of all enabled Nodes in autoscaling {{- $slotSelector -}} {{- end -}} +{{/* +Apply scaledOverProvisionRatio to scalingModifiers. Link with autoscaling template +*/}} +{{- define "seleniumGrid.autoscaling.scaledOverProvisionRatio" -}} +{{- $scalingModifier := (dict) -}} +{{- $value := default $.Values.autoscaling.scaledOverProvisionRatio .node.scaledOverProvisionRatio | float64 -}} +{{- $triggerName := $.Values.autoscaling.defaultTriggerName -}} +{{- if gt $value (1.0 | float64) -}} + {{- $scalingModifier = mergeOverwrite ($scalingModifier) (dict "advanced" (dict "scalingModifiers" (dict "formula" (printf "float(%s * %.2f)" $triggerName $value) "target" "1"))) -}} +{{- end -}} +{{- toYaml $scalingModifier -}} +{{- end -}} + {{/* Common autoscaling spec template */}} {{- define "seleniumGrid.autoscalingTemplate" -}} -{{- $spec := toYaml (dict) -}} +{{- $spec := (dict) -}} {{- $nodeMaxSessions := default $.Values.global.seleniumGrid.nodeMaxSessions .node.nodeMaxSessions | int64 -}} {{- $nodeEnableManagedDownloads := default $.Values.global.seleniumGrid.nodeEnableManagedDownloads .node.nodeEnableManagedDownloads -}} {{- $nodeCustomCapabilities := default $.Values.global.seleniumGrid.nodeCustomCapabilities .node.nodeCustomCapabilities -}} {{/* Merge with precedence from right to left */}} {{- with $.Values.autoscaling.scaledOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} {{- with .node.scaledOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} {{- if eq $.Values.autoscaling.scalingType "deployment" -}} + {{- $advanced := (dict "scaleTargetRef" (dict "name" .name) "advanced" (dict "horizontalPodAutoscalerConfig" (dict "name" .name))) -}} + {{- $advanced = mergeOverwrite $advanced (include "seleniumGrid.autoscaling.scaledOverProvisionRatio" . | fromYaml) }} + {{- $spec = mergeOverwrite ($spec) $advanced -}} {{- with $.Values.autoscaling.scaledObjectOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} {{- with .node.scaledObjectOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} - {{- $advanced := (dict "scaleTargetRef" (dict "name" .name) "advanced" (dict "horizontalPodAutoscalerConfig" (dict "name" .name) "restoreToOriginalReplicaCount" true)) -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) $advanced | toYaml -}} {{- else if eq $.Values.autoscaling.scalingType "job" -}} + {{- $spec = mergeOverwrite ($spec) (dict "jobTargetRef" .podTemplate) -}} {{- with $.Values.autoscaling.scaledJobOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} {{- with .node.scaledJobOptions -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- $spec = mergeOverwrite ($spec) . -}} {{- end -}} - {{- $spec = mergeOverwrite ($spec | fromYaml) (dict "jobTargetRef" .podTemplate) | toYaml -}} {{- end -}} -{{- if and $spec (ne $spec "{}") -}} - {{ tpl $spec $ }} +{{- if and $spec (not (empty $spec)) -}} + {{- $cleanSpec := dict -}} + {{- range $key, $value := $spec -}} + {{- if not (empty $value) -}} + {{- $cleanSpec = set $cleanSpec $key $value -}} + {{- end -}} + {{- end -}} + {{- if not (empty $cleanSpec) -}} + {{- toYaml $cleanSpec | nindent 0 | trim -}} + {{- end -}} {{- end -}} {{- if not $.Values.autoscaling.scaledOptions.triggers }} triggers: - - type: selenium-grid + - type: {{ $.Values.autoscaling.defaultTriggerType }} + name: {{ $.Values.autoscaling.defaultTriggerName }} metadata: {{- with .node.hpa }} {{- range $key, $value := . }} @@ -276,7 +299,7 @@ triggers: {{- if and (eq $.Values.autoscaling.scalingType "deployment") $.Values.autoscaling.metricType }} metricType: {{ $.Values.autoscaling.metricType }} {{- end }} -{{- end }} +{{- end -}} {{- end -}} {{/* diff --git a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml index 1ce9acf9b8..49b6341f30 100644 --- a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml +++ b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/templates/edge-node-scaledjob.yaml b/charts/selenium-grid/templates/edge-node-scaledjob.yaml index 2c65af9087..df37db8af2 100644 --- a/charts/selenium-grid/templates/edge-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/edge-node-scaledjob.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml index fcee311327..c9d41a9d54 100644 --- a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/templates/relay-node-scaledjobs.yaml b/charts/selenium-grid/templates/relay-node-scaledjobs.yaml index 0a40acb1ac..f1ef39d5ad 100644 --- a/charts/selenium-grid/templates/relay-node-scaledjobs.yaml +++ b/charts/selenium-grid/templates/relay-node-scaledjobs.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index dc370ba3a1..33c9196e1e 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1082,6 +1082,10 @@ autoscaling: nodeSelector: {} # -- Tolerations for the patch job tolerations: [] + # -- Default type of trigger to use (`selenium-grid` is build-in scaler in KEDA) + defaultTriggerType: "selenium-grid" + # -- Default alias name of trigger type (which is used in formula if you want to add scalingModifiers to advanced spec) + defaultTriggerName: "seleniumGrid" # -- Options for KEDA scaled resources (keep only common options used for both ScaledJob and ScaledObject) scaledOptions: # Don't define `triggers` config here, it will apply the same to all node types. Instead, define it under `scaledOptions` of different node type @@ -1091,8 +1095,8 @@ autoscaling: maxReplicaCount: 24 # -- Polling interval in seconds pollingInterval: 20 - # List of triggers. Be careful, the default trigger of selenium-grid will be overwritten if you specify this - # triggers: + # -- List of triggers. Be careful, the default trigger of `selenium-grid` will be overwritten if you specify this + triggers: [] # Options for KEDA ScaledJobs (only used when scalingType is set to "job"). See https://keda.sh/docs/latest/concepts/scaling-jobs/#scaledjob-spec scaledJobOptions: scalingStrategy: @@ -1107,11 +1111,17 @@ autoscaling: parallelism: 1 completions: 1 backoffLimit: 0 + # -- Duration in seconds that job may be active before the system tries to terminate it. Default is 0 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated + activeDeadlineSeconds: 0 # Options for KEDA ScaledObjects (only used when scalingType is set to "deployment"). See https://keda.sh/docs/latest/concepts/scaling-deployments/#scaledobject-spec scaledObjectOptions: + advanced: + restoreToOriginalReplicaCount: true scaleTargetRef: # -- Target reference for KEDA ScaledObject kind: Deployment + # For example, over over-provisioning ratio `1.2` means 20% more than the actual requests + scaledOverProvisionRatio: "" # -- Define terminationGracePeriodSeconds for scalingType "deployment". Period for `deregisterLifecycle` to gracefully shut down the node before force terminating it terminationGracePeriodSeconds: 3600 # -- Define preStop command to shut down the node gracefully when scalingType is set to "deployment" @@ -1313,6 +1323,8 @@ chromeNode: scaledJobOptions: # -- Override the scaledObjectOptions for chrome nodes scaledObjectOptions: + # For example, over over-provisioning ratio `1.2` means 20% more than the actual requests + scaledOverProvisionRatio: "" hpa: # -- browserName should match with Node stereotype and request capability is scaled by this scaler browserName: "chrome" @@ -1324,9 +1336,6 @@ 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 @@ -1514,6 +1523,8 @@ firefoxNode: scaledJobOptions: # -- Override the scaledObjectOptions for firefox nodes scaledObjectOptions: + # For example, over over-provisioning ratio `1.2` means 20% more than the actual requests + scaledOverProvisionRatio: "" hpa: # -- browserName should match with Node stereotype and request capability is scaled by this scaler browserName: "firefox" @@ -1525,9 +1536,6 @@ 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 @@ -1715,6 +1723,8 @@ edgeNode: scaledJobOptions: # -- Override the scaledObjectOptions for edge nodes scaledObjectOptions: + # For example, over over-provisioning ratio `1.2` means 20% more than the actual requests + scaledOverProvisionRatio: "" hpa: # -- browserName should match with Node stereotype and request capability is scaled by this scaler browserName: "MicrosoftEdge" @@ -1726,9 +1736,6 @@ 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 +1924,8 @@ relayNode: scaledJobOptions: # -- Override the scaledObjectOptions for relay nodes scaledObjectOptions: + # For example, over over-provisioning ratio `1.2` means 20% more than the actual requests + scaledOverProvisionRatio: "" hpa: # -- browserName should match with Node stereotype and request capability is scaled by this scaler browserName: "" @@ -1928,9 +1937,6 @@ 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 @@ -2179,19 +2185,19 @@ videoManager: keda: # enabled: false # -- Specify image for KEDA components - 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" +# 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/bootstrap.sh b/tests/charts/bootstrap.sh index 34bff4f317..947250c26b 100755 --- a/tests/charts/bootstrap.sh +++ b/tests/charts/bootstrap.sh @@ -16,6 +16,13 @@ helm package charts/selenium-grid --version 1.0.0-SNAPSHOT -d tests/tests RELEASE_NAME="selenium" +helm template --debug ${RELEASE_NAME} --values tests/charts/templates/render/dummy.yaml \ + --set autoscaling.scalingType=job \ + --set-file 'nodeConfigMap.extraScripts.setFromCommand\.sh=tests/charts/templates/render/dummy_external.sh' \ + --set-file 'recorderConfigMap.extraScripts.setFromCommand\.sh=tests/charts/templates/render/dummy_external.sh' \ + --set-file 'uploaderConfigMap.extraScripts.setFromCommand\.sh=tests/charts/templates/render/dummy_external.sh' \ + tests/tests/selenium-grid-1.0.0-SNAPSHOT.tgz > ./tests/tests/dummy_job_template_manifests.yaml + helm template --debug ${RELEASE_NAME} --values tests/charts/templates/render/dummy.yaml \ --set-file 'nodeConfigMap.extraScripts.setFromCommand\.sh=tests/charts/templates/render/dummy_external.sh' \ --set-file 'recorderConfigMap.extraScripts.setFromCommand\.sh=tests/charts/templates/render/dummy_external.sh' \ diff --git a/tests/charts/ci/DeploymentAutoscaling-values.yaml b/tests/charts/ci/DeploymentAutoscaling-values.yaml index ec02c6f14a..b64ce125c5 100644 --- a/tests/charts/ci/DeploymentAutoscaling-values.yaml +++ b/tests/charts/ci/DeploymentAutoscaling-values.yaml @@ -65,8 +65,7 @@ chromeNode: - name: logs persistentVolumeClaim: claimName: selenium-grid-pvc-local - hpa: - overProvisionRatio: 0.1 + scaledOverProvisionRatio: 1.1 # Configuration for edge nodes edgeNode: @@ -102,8 +101,7 @@ firefoxNode: enabled: *livenessProbe extraVolumeMounts: *extraVolumeMounts extraVolumes: *extraVolumes - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 # Configuration for relay nodes relayNode: diff --git a/tests/charts/templates/render/dummy.yaml b/tests/charts/templates/render/dummy.yaml index d52aec7340..438c9b192c 100644 --- a/tests/charts/templates/render/dummy.yaml +++ b/tests/charts/templates/render/dummy.yaml @@ -45,6 +45,50 @@ monitoring: autoscaling: enableWithExistingKEDA: true scalingType: deployment + scaledObjectOptions: + pollingInterval: 30 + initialCooldownPeriod: 0 + cooldownPeriod: 300 + idleReplicaCount: 0 + minReplicaCount: 1 + maxReplicaCount: 100 + fallback: + failureThreshold: 3 + replicas: 6 + advanced: + restoreToOriginalReplicaCount: true + horizontalPodAutoscalerConfig: + behavior: + scaleDown: + stabilizationWindowSeconds: 300 + policies: + - type: Percent + value: 100 + periodSeconds: 15 + scaledJobOptions: + jobTargetRef: + parallelism: 1 + completions: 1 + activeDeadlineSeconds: 600 + backoffLimit: 6 + template: + pollingInterval: 30 + successfulJobsHistoryLimit: 5 + failedJobsHistoryLimit: 5 + minReplicaCount: 10 + maxReplicaCount: 100 + rolloutStrategy: gradual + rollout: + strategy: gradual + propagationPolicy: foreground + scalingStrategy: + customScalingQueueLengthDeduction: 1 + customScalingRunningJobPercentage: "0.5" + pendingPodConditions: + - "Ready" + - "PodScheduled" + - "AnyOtherCustomPodCondition" + multipleScalersCalculation: "max" basicAuth: create: false @@ -145,8 +189,7 @@ chromeNode: terminationGracePeriodSeconds: 7200 service: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 firefoxNode: nodeMaxSessions: 1 @@ -156,8 +199,7 @@ firefoxNode: terminationGracePeriodSeconds: 720 service: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 edgeNode: annotations: @@ -167,13 +209,11 @@ edgeNode: videoRecorder: uploader: enabled: false - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 relayNode: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 videoRecorder: enabled: true diff --git a/tests/charts/templates/render/dummy_solution.yaml b/tests/charts/templates/render/dummy_solution.yaml index d8f3abdc66..244776106b 100644 --- a/tests/charts/templates/render/dummy_solution.yaml +++ b/tests/charts/templates/render/dummy_solution.yaml @@ -136,8 +136,7 @@ selenium-grid: terminationGracePeriodSeconds: 7200 service: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 firefoxNode: nodeMaxSessions: 1 @@ -146,8 +145,7 @@ selenium-grid: terminationGracePeriodSeconds: 720 service: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 edgeNode: affinity: *affinity @@ -156,13 +154,11 @@ selenium-grid: videoRecorder: uploader: enabled: false - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 relayNode: enabled: true - hpa: - overProvisionRatio: 0.2 + scaledOverProvisionRatio: 1.2 videoRecorder: enabled: true From 57fe2601f758894a634db7e7db8a1289fc30e6a4 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 15 Aug 2025 10:03:37 +0700 Subject: [PATCH 2/6] Update relay-node-scaledjobs.yaml --- charts/selenium-grid/templates/relay-node-scaledjobs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/selenium-grid/templates/relay-node-scaledjobs.yaml b/charts/selenium-grid/templates/relay-node-scaledjobs.yaml index f1ef39d5ad..0a40acb1ac 100644 --- a/charts/selenium-grid/templates/relay-node-scaledjobs.yaml +++ b/charts/selenium-grid/templates/relay-node-scaledjobs.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} From e1a960ce4bd2cb0315ca8ad4cb871d40e820d3f0 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 15 Aug 2025 10:04:52 +0700 Subject: [PATCH 3/6] Update firefox-node-scaledjob.yaml --- charts/selenium-grid/templates/firefox-node-scaledjob.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml index c9d41a9d54..fcee311327 100644 --- a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} From 8fd237ef2edcfdcc927d4d91022af0f61350c875 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 15 Aug 2025 10:05:38 +0700 Subject: [PATCH 4/6] Update edge-node-scaledjob.yaml --- charts/selenium-grid/CONFIGURATION.md | 4 ++-- charts/selenium-grid/templates/_helpers.tpl | 4 ++-- charts/selenium-grid/templates/chrome-node-scaledjobs.yaml | 2 +- charts/selenium-grid/templates/edge-node-scaledjob.yaml | 2 +- charts/selenium-grid/values.yaml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 170200a1bf..b19ef59419 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -422,8 +422,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | autoscaling.scaledJobOptions.scalingStrategy.strategy | string | `"default"` | Scaling strategy for KEDA ScaledJob - https://keda.sh/docs/latest/reference/scaledjob-spec/#scalingstrategy | | autoscaling.scaledJobOptions.successfulJobsHistoryLimit | int | `0` | Number of Completed jobs should be kept | | autoscaling.scaledJobOptions.failedJobsHistoryLimit | int | `0` | Number of Failed jobs should be kept (for troubleshooting purposes) | -| autoscaling.scaledJobOptions.jobTargetRef | object | `{"activeDeadlineSeconds":0,"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | -| autoscaling.scaledJobOptions.jobTargetRef.activeDeadlineSeconds | int | `0` | Duration in seconds that job may be active before the system tries to terminate it. Default is 0 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated | +| autoscaling.scaledJobOptions.jobTargetRef | object | `{"activeDeadlineSeconds":-1,"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | +| autoscaling.scaledJobOptions.jobTargetRef.activeDeadlineSeconds | int | `-1` | Duration in seconds that job may be active before the system tries to terminate it. Default is -1 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated | | autoscaling.scaledObjectOptions.advanced.restoreToOriginalReplicaCount | bool | `true` | | | autoscaling.scaledObjectOptions.scaleTargetRef.kind | string | `"Deployment"` | Target reference for KEDA ScaledObject | | autoscaling.scaledOverProvisionRatio | string | `""` | | diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index fe81d027fa..db4d444bbb 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -268,7 +268,7 @@ Common autoscaling spec template {{- end -}} {{- end -}} {{- if not (empty $cleanSpec) -}} - {{- toYaml $cleanSpec | nindent 0 | trim -}} + {{ tpl (toYaml $cleanSpec) $ | nindent 0 }} {{- end -}} {{- end -}} {{- if not $.Values.autoscaling.scaledOptions.triggers }} @@ -299,7 +299,7 @@ triggers: {{- if and (eq $.Values.autoscaling.scalingType "deployment") $.Values.autoscaling.metricType }} metricType: {{ $.Values.autoscaling.metricType }} {{- end }} -{{- end -}} +{{- end }} {{- end -}} {{/* diff --git a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml index 49b6341f30..1ce9acf9b8 100644 --- a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml +++ b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/templates/edge-node-scaledjob.yaml b/charts/selenium-grid/templates/edge-node-scaledjob.yaml index df37db8af2..2c65af9087 100644 --- a/charts/selenium-grid/templates/edge-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/edge-node-scaledjob.yaml @@ -26,7 +26,7 @@ spec: {{- $_ = set $podScope "node" $nodeConfig -}} {{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} {{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} - {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} --- {{- end }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 33c9196e1e..1f912ca520 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1111,8 +1111,8 @@ autoscaling: parallelism: 1 completions: 1 backoffLimit: 0 - # -- Duration in seconds that job may be active before the system tries to terminate it. Default is 0 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated - activeDeadlineSeconds: 0 + # -- Duration in seconds that job may be active before the system tries to terminate it. Default is -1 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated + activeDeadlineSeconds: -1 # Options for KEDA ScaledObjects (only used when scalingType is set to "deployment"). See https://keda.sh/docs/latest/concepts/scaling-deployments/#scaledobject-spec scaledObjectOptions: advanced: From 787b5ce26bc962cbe7ee2f05bb31781d49fa4dab Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 15 Aug 2025 13:59:44 +0700 Subject: [PATCH 5/6] Update values.yaml --- charts/selenium-grid/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 1f912ca520..421c4d60ca 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1111,8 +1111,6 @@ autoscaling: parallelism: 1 completions: 1 backoffLimit: 0 - # -- Duration in seconds that job may be active before the system tries to terminate it. Default is -1 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated - activeDeadlineSeconds: -1 # Options for KEDA ScaledObjects (only used when scalingType is set to "deployment"). See https://keda.sh/docs/latest/concepts/scaling-deployments/#scaledobject-spec scaledObjectOptions: advanced: From e543a120a6f82521b9224ea327901bde9b1a5de0 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 15 Aug 2025 14:01:35 +0700 Subject: [PATCH 6/6] Update CONFIGURATION.md --- charts/selenium-grid/CONFIGURATION.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index b19ef59419..6ccc6cb6d1 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -422,8 +422,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | autoscaling.scaledJobOptions.scalingStrategy.strategy | string | `"default"` | Scaling strategy for KEDA ScaledJob - https://keda.sh/docs/latest/reference/scaledjob-spec/#scalingstrategy | | autoscaling.scaledJobOptions.successfulJobsHistoryLimit | int | `0` | Number of Completed jobs should be kept | | autoscaling.scaledJobOptions.failedJobsHistoryLimit | int | `0` | Number of Failed jobs should be kept (for troubleshooting purposes) | -| autoscaling.scaledJobOptions.jobTargetRef | object | `{"activeDeadlineSeconds":-1,"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | -| autoscaling.scaledJobOptions.jobTargetRef.activeDeadlineSeconds | int | `-1` | Duration in seconds that job may be active before the system tries to terminate it. Default is -1 means never terminate until it completes naturally (reach nodeDrainAfterSessionCount) or is explicitly terminated | +| autoscaling.scaledJobOptions.jobTargetRef | object | `{"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob | | autoscaling.scaledObjectOptions.advanced.restoreToOriginalReplicaCount | bool | `true` | | | autoscaling.scaledObjectOptions.scaleTargetRef.kind | string | `"Deployment"` | Target reference for KEDA ScaledObject | | autoscaling.scaledOverProvisionRatio | string | `""` | |