feat(chart): Unified parameters to set scaled options for browser nodes #1989
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
feat(autoscaling): Unified parameters to set scaled options for browser nodes
Motivation and Context
Currently, autoscaling is already implemented in the chart template with support scalingType both KEDA
job
anddeployment
. However, the list of parameters to set scaled options for these 2 resources are not unified.For example:
When
autoscaling.scalingType
isdeployment
. ConfigminReplicaCount
andmaxReplicaCount
are getting from the same key underchromeNode
.However, when
autoscaling.scalingType
isjob
, theminReplicaCount
and other options are getting fromautoscaling.scaledJobOptions
, meanwhilemaxReplicaCount
is still getting from the key underchromeNode
.Moreover, in KEDA docs for the spec of ScaledObject and ScaledJob, there are more options that the user can add or configure. But in the template, few of the configs are static. It would be difficult for users to customize further.
To enable the unified control from chart
values.yaml
, I created another template in_helpers.tpl
for autoscalingTemplate. It would fetch the values from these keys:autoscaling.scaledOptions
: to keep common options used for both ScaledJob and ScaledObject, such asminReplicaCount
,maxReplicaCount
,pollingInterval
,triggers
.autoscaling.scaledJobOptions
: to keep specific options forScaledJob
.autoscaling.scaledObjectOptions
: to keep specific options forScaledObject
.The new template also enables the capability for the use case that the user would like to set different scaled options for individual browser nodes.
The same 3 keys
scaledOptions
,scaledJobOptions
, andscaledObjectOptions
under each browser nodechromeNode
,firefoxNode
, andedgeNode
. It would take higher precedence to override the same key underautoscaling.
Update chart README for the list of parameters and their description / default values
Add default
autoscaling.scaledJobOptions.successfulJobsHistoryLimit: 0
to clear all Completed jobs - which resolves a concern in [🐛 Bug]: chrome-node-scaledjobs.yaml don't apply ttlSecondsAfterFinished and minReplicaCount #1906Add default
autoscaling.scaledOptions.minReplicaCount: 0
, applicable for all nodes in both scalingTypejob
anddeployment
- which resolves a concern in [🐛 Bug]: minReplicaCount not available in the xxx-node-scaledjobs.yaml files, which prevents downscaling of pods when done #1956Add default
autoscaling.scaledJobOptions.failedJobsHistoryLimit: 100
, same as default of KEDA, to retain Failed pod for debugging pod logs if have any.Finally, I had a local test with the below simplex env to ensure the basic setup working on top of this change
Types of changes
Checklist