chart: proactive to set browser args via container env var #2308
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.
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
Change in Docker image
SE_BROWSER_ARGS_* Add arguments for launching browser
Instead of adding arguments via the browser options from language bindings, for example:
You also can proactive to force applying arguments directly from (node, standalone or node-docker) container environment variables. Define the environment variable with name starts with
SE_BROWSER_ARGS_
and following by config key is up to you (ensure those are unique when you define multiple arguments). For example:List chromium command-line arguments for your reference.
Note: Currently, this is applicable for node browsers Chrome/Chromium, Edge.
Change in Helm chart
Configuration of shm size limit for browser nodes
By default, node browsers (Chrome/Chromium, Edge) leave the config key
dshmVolumeSizeLimit
as empty. It means the/dev/shm
volume mount is disabled, and argument--disable-dev-shm-usage
is passed to the browser via container environment variable (get motivation from this post). You can set another valid value to enable it back. For example:For Firefox node, the default value is kept as
2Gi
. You can override it viafirefoxNode.dshmVolumeSizeLimit
.Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Documentation
Description
SE_BROWSER_ARGS_
for Chrome, Chromium, and Edge.dshm
volume mounts and setSE_BROWSER_ARGS_DISABLE_DSHM
ifdshmVolumeSizeLimit
is empty.SE_BROWSER_ARGS_*
environment variables and configuringdshmVolumeSizeLimit
.values.yaml
.Changes walkthrough 📝
_helpers.tpl
Conditional Configuration for Browser Arguments and Volume Mounts
charts/selenium-grid/templates/_helpers.tpl
SE_BROWSER_ARGS_DISABLE_DSHM
environment variable.
/dev/shm
.dshm
volume.wrap_chrome_binary
Capture and Apply Browser Arguments from Environment Variables
NodeChrome/wrap_chrome_binary
SE_BROWSER_ARGS_
.wrap_chromium_binary
Capture and Apply Browser Arguments from Environment Variables
NodeChromium/wrap_chromium_binary
SE_BROWSER_ARGS_
.wrap_edge_binary
Capture and Apply Browser Arguments from Environment Variables
NodeEdge/wrap_edge_binary
SE_BROWSER_ARGS_
.values.yaml
Update Default Memory Limits and shm Size Configuration
charts/selenium-grid/values.yaml
dshmVolumeSizeLimit
to be empty by default for Chrome andEdge nodes.
README.md
Document Browser Argument Environment Variables
README.md
SE_BROWSER_ARGS_*
environment variables.README.md
Document Configuration of shm Size Limit for Browser Nodes
charts/selenium-grid/README.md
dshmVolumeSizeLimit
for browsernodes.
dshmVolumeSizeLimit
.