Skip to content

Missing tolerations for keda patched jobs #2911 #2912

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

Merged
merged 2 commits into from
Aug 1, 2025

Conversation

anwaramoon
Copy link
Contributor

@anwaramoon anwaramoon commented Jul 30, 2025

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

Fixes #2911

Motivation and Context

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.

PR Type

Bug fix


Description

  • Add missing tolerations support for KEDA patched jobs

  • Enable pod scheduling on tainted nodes for cleanup operations


Diagram Walkthrough

flowchart LR
  A["KEDA Jobs"] --> B["Add Tolerations"]
  B --> C["Pod Scheduling"]
  C --> D["Tainted Nodes"]
Loading

File Walkthrough

Relevant files
Bug fix
delete-keda-objects-job.yaml
Add tolerations to delete job                                                       

charts/selenium-grid/templates/patch-keda/delete-keda-objects-job.yaml

  • Add tolerations configuration block for delete job
  • Enable pod scheduling on nodes with taints
+3/-0     
patch-keda-objects-job.yaml
Add tolerations to patch job                                                         

charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml

  • Add tolerations configuration block for patch job
  • Enable pod scheduling on nodes with taints
+3/-0     

@CLAassistant
Copy link

CLAassistant commented Jul 30, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Indentation Issue

The tolerations block is incorrectly indented and placed inside the containers section instead of at the pod spec level. This will cause YAML parsing errors and prevent the tolerations from being applied correctly.

{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations  }}
  tolerations : {{ toYaml . | nindent 12 }}
{{- end }}
Indentation Issue

The tolerations block is incorrectly indented and placed inside the containers section instead of at the pod spec level. This will cause YAML parsing errors and prevent the tolerations from being applied correctly.

{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations  }}
  tolerations : {{ toYaml . | nindent 12 }}
{{- end }}

Copy link
Contributor

qodo-merge-pro bot commented Jul 30, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix tolerations placement in pod spec
Suggestion Impact:The suggestion partially impacted the commit - the indentation was changed from 12 to 8 spaces as suggested, but the tolerations block was not moved to the correct pod spec level position

code diff:

-          tolerations : {{ toYaml . | nindent 12 }}
+          tolerations : {{ toYaml . | nindent 8 }}

The tolerations field should be at the pod spec level, not under the container.
Move it to be a sibling of containers and volumes for proper Kubernetes pod
scheduling.

charts/selenium-grid/templates/patch-keda/delete-keda-objects-job.yaml [39-41]

-{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations  }}
-  tolerations : {{ toYaml . | nindent 12 }}
+{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations }}
+  tolerations: {{ toYaml . | nindent 8 }}
 {{- end }}

[Suggestion processed]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the tolerations block is incorrectly placed within the container definition, which would cause the Kubernetes job to fail, and provides the correct fix.

High
  • Update

@VietND96 VietND96 merged commit a1418e4 into SeleniumHQ:trunk Aug 1, 2025
77 of 82 checks passed
@VietND96
Copy link
Member

VietND96 commented Aug 1, 2025

@anwaramoon, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Missing tolerations for keda patched jobs
3 participants