Skip to content

Conversation

@oleginishev
Copy link

  • Clear nodeSelector from root agent before merge to prevent inheritance
  • Ensure nodeSelector is properly set for current cloud configuration
  • Fixes issue where nodeSelector from root agent was incorrectly inherited by additional clouds

Resolves: nodeSelector configuration conflicts in multi-cloud setups

What does this PR do?

This PR fixes a critical bug in the Jenkins Helm chart where the nodeSelector configuration from the root agent was being incorrectly inherited by additional clouds during the merge process. This caused configuration conflicts in multi-cloud Jenkins setups where different clouds should have different node selectors.

Background:
When using multiple Jenkins clouds (additional clouds), each cloud should be able to specify its own nodeSelector configuration independently. However, the current implementation was inheriting the nodeSelector from the root agent configuration, causing conflicts and preventing proper node selection for different clouds.

The fix:

  1. Clears the nodeSelector from the root agent before merging with additional cloud configurations
  2. Ensures each additional cloud properly sets its own nodeSelector configuration
  3. Prevents inheritance of nodeSelector between different cloud configurations

This change is backward compatible and doesn't break existing functionality.

  • Fixes # (if there's an issue number, add it here)

If you modified files in the ./charts/jenkins/ directory, please also include the following:

### Submitter checklist
- [x] I bumped the "version" key in `./charts/jenkins/Chart.yaml`.
- [x] I added a new changelog entry to `./charts/jenkins/CHANGELOG.md`.
- [x] I followed the [technical requirements](https://github.com/jenkinsci/helm-charts/blob/main/CONTRIBUTING.md#technical-requirements).
- [x] I ran `.github/helm-docs.sh` from the project root.

Special notes for your reviewer

This is a bug fix that prevents configuration conflicts in multi-cloud Jenkins setups. The change is backward compatible and doesn't break existing functionality. All unit tests pass successfully (26 test suites, 180 tests).

Testing:

  • All existing unit tests continue to pass
  • The fix specifically addresses nodeSelector inheritance issues
  • No breaking changes to existing configurations

- Clear nodeSelector from root agent before merge to prevent inheritance
- Ensure nodeSelector is properly set for current cloud configuration
- Fixes issue where nodeSelector from root agent was incorrectly inherited by additional clouds

Resolves: nodeSelector configuration conflicts in multi-cloud setups
@oleginishev oleginishev requested a review from a team as a code owner September 19, 2025 13:05
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants