-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
K8s: Add default values for multiple nodes platform and version #2543
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
CI Failure Feedback 🧐(Checks updated until commit 95a493c)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
1aa020c
to
42a1466
Compare
Signed-off-by: Viet Nguyen Duc <[email protected]>
42a1466
to
95a493c
Compare
User description
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
Scaler trigger configuration
From KEDA core
v2.16.1+
, the trigger metadatabrowserVersion
,platformName
is recommended to be set explicitly to have the correct scaling behavior (especially when your Grid includes autoscaling Nodes, non-autoscaling Nodes, relay Nodes, etc.). Besides that, in client binding, it is also recommended to set thebrowserVersion
,platformName
to align with the trigger metadata. Please see below examples for more details.Understand list trigger parameters
url
- Graphql url of your Selenium Grid. If endpoint requires authentication, you can useTriggerAuthentication
to provide the credentials instead of embedding in the URL.browserName
- browserName should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)sessionBrowserName
- sessionBrowserName if the browserName is different from the sessionBrowserName. (Default: ``, Optional)browserVersion
- browserVersion should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)platformName
- platformName should match with Node stereotype and request capability is scaled by this scaler. (Default: ``, Optional)unsafeSsl
- Skip certificate validation when connecting over HTTPS. (Default:false
, Optional)activationThreshold
- Target value for activating the scaler. Learn more about activation here. (Default:0
, Optional)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).Understand list trigger authentication
username
- Username for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)password
- Password for basic authentication in GraphQL endpoint instead of embedding in the URL. (Optional)authType
- Type of authentication to be used. This can be set toBearer
orOAuth2
in case Selenium Grid behind an Ingress proxy with other authentication types. (Optional)accessToken
- Access token. This is required whenauthType
is set a value. (Optional)In each Node, trigger parameters value will be set under config key
hpa
. In template, those will be added spec of ScaledObject/ScaledJob.In chart values, by default,
browserName
,sessionBrowserName
are set for corresponding node browser. ParametersbrowserVersion
,platformName
are not set, leave them as empty by default. The default scaler metadata looks likeIn this case, the scaler will be triggered by below request (example in Python client, common use case that most users get started)
With above script, the request is sent to Grid. Via GraphQL response, it looks like
Scaler will trigger to scale up the Node with stereotypes matched to pick up the request in the queue. Via GraphQL response, it looks like
In Node deployment spec, there is environment variable
SE_NODE_BROWSER_VERSION
which is able to unsetbrowserVersion
in Node stereotypes (it is setting short browser build number by default e.g131.0
) or any custom value is up to you, which is expected to match with the request capabilities in queue and scaler trigger metadata.Similarly,
SE_NODE_PLATFORM_NAME
is used to unset theplatformName
in Node stereotypes if needed. Noted, update to newer image tag if these 2 env variables doesn't take effect for you.For another example, where your Grid with multiple scalers have different metadata, one of them looks like
The request to trigger this corresponds to the following Python script
Define multiple scalers with different trigger parameters.
When deploying the chart, you can define multiple scalers with different trigger parameters to scale up different Node stereotypes against different request capabilities.
Under config key
crossBrowsers
, in corresponding browser node, you can define array of item with structure same as that node, vianameOverride
to set unique name for each scaler to avoid resources collision.For example multiple-nodes-platform.yaml file, it defines 2 scalers per browser node to scale against requests with and without
platformName
capability.For example multiple-nodes-platform-version.yaml file, it defines multiple scalers with
platformName: 'Linux'
and last few previous stable versions per browser node to scale against requests withbrowserVersion
andplatformName
capabilities.While deploying the chart, you can quickly use these extra values files by passing the file via
--values
flag to apply.Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Documentation
Description
This PR enhances the Selenium Grid's platform and version handling capabilities with the following changes:
multiple-nodes-platform.yaml
for platform-specific node settingsmultiple-nodes-platform-version.yaml
with explicit platform configurationsChanges walkthrough 📝
4 files
bootstrap.sh
Update values file reference in bootstrap script
tests/charts/bootstrap.sh
multiple-nodes-platform-version.yaml
Makefile
Add multiple platforms flag to test targets
Makefile
multiple-nodes-platform-version.yaml
Add platform configuration for multiple nodes
charts/selenium-grid/multiple-nodes-platform-version.yaml
values.yaml
Update values file with platform configuration changes
charts/selenium-grid/values.yaml
3 files
chart_test.sh
Add multiple platforms testing support
tests/charts/make/chart_test.sh
__init__.py
Add multiple platforms support in Selenium tests
tests/SeleniumTests/init.py
multiple-nodes-platform.yaml
Add new platform-specific node configuration file
charts/selenium-grid/multiple-nodes-platform.yaml
platform settings
2 files
CONFIGURATION.md
Update configuration documentation for platform settings
charts/selenium-grid/CONFIGURATION.md
platformName parameters
README.md
Add documentation for scaler trigger configuration
charts/selenium-grid/README.md
settings