Skip to content

fix(chart): honor terminationGracePeriodSeconds when scalingType is job - #3333

Open
TOMASEZARATE wants to merge 1 commit into
SeleniumHQ:trunkfrom
TOMASEZARATE:fix-job-termination-grace-period
Open

TOMASEZARATE wants to merge 1 commit into
SeleniumHQ:trunkfrom
TOMASEZARATE:fix-job-termination-grace-period

Conversation

@TOMASEZARATE

Copy link
Copy Markdown

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Description

Fixes #3213

seleniumGrid.node.terminationGracePeriodSeconds in _helpers.tpl returned a hardcoded 30 when autoscaling.scalingType is job, so neither autoscaling.terminationGracePeriodSeconds nor the per-node value was applied. Jobs now use the same rule as deployments: the larger of the global and the node value.

helm template output for the Chrome node:

Case Before After
job + chromeNode.terminationGracePeriodSeconds=7200 30 7200
job + autoscaling.terminationGracePeriodSeconds=7200 30 7200
job with chart defaults 30 3600
deployment (any of the above) unchanged unchanged

Note that with the default values a job now gets 3600 instead of 30, the same as a deployment, because the global value is applied now. CONFIGURATION.md was regenerated with helm-docs.

Motivation and Context

Users running KEDA with scalingType: job couldn't extend the grace period for long-running sessions, while the same config worked with deployment.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I used an AI assistant (Cursor Agent with Grok 4.7) while writing this change. I reviewed the code myself, and the commit has an Assisted-by trailer.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@CLAassistant

CLAassistant commented Nov 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: terminationGracePeriodSeconds is hardcoded to 30 for scalingType job, ignoring both configured values

2 participants