Skip to content

configure the field owner for the toolchainclusterresources controller that now uses SSA#1215

Merged
metlos merged 6 commits intocodeready-toolchain:masterfrom
metlos:use-ssa-client-in-toolchaincluster-resources-controller
Nov 27, 2025
Merged

configure the field owner for the toolchainclusterresources controller that now uses SSA#1215
metlos merged 6 commits intocodeready-toolchain:masterfrom
metlos:use-ssa-client-in-toolchaincluster-resources-controller

Conversation

@metlos
Copy link
Copy Markdown
Contributor

@metlos metlos commented Nov 11, 2025

The replacement in the go.mod is only temporary until the PR in toolchain-common is merged.

Related PRs:

Summary by CodeRabbit

  • Configuration

    • Added Nvidia GPU quota entries (set to 0) to select cluster and namespace templates for relevant tiers.
  • Chores

    • Bumped an internal module dependency.
    • Updated CI workflow checkout action versions across multiple workflows.
    • Adjusted reconciliation setup to include a designated field manager.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 11, 2025

Walkthrough

Added a FieldManager setting to the ToolchainClusterResources reconciler in cmd/main.go, bumped toolchain-common module version in go.mod, updated GitHub Actions actions/checkout references to v6, and added NVIDIA GPU quota entries to two namespace template ResourceQuotas.

Changes

Cohort / File(s) Summary
Reconciler config
cmd/main.go
Added FieldManager field to deploy.ToolchainClusterResources.Reconciler and initialized it with constants.HostOperatorFieldManager; imported constants.
Go module
go.mod
Updated required version of github.com/codeready-toolchain/toolchain-common to v0.0.0-20251125180949-6ed5aeed75e4.
CI workflows (checkout bump)
.github/workflows/...
Replaced actions/checkout@v5 with actions/checkout@v6 across multiple workflows (ci-check-gomod, ci-golang-sbom, govulncheck, operator-cd, publish-operators-for-e2e-tests, test-with-coverage).
Namespace templates (GPU quotas)
deploy/templates/nstemplatetiers/base/cluster.yaml, deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml
Added GPU quota entries (limits.nvidia.com/gpu: 0 and requests.nvidia.com/gpu: 0) to ResourceQuota definitions in cluster and ns_dev templates.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Main as cmd/main.go
    participant Manager as Controller Manager
    participant Reconciler as ToolchainClusterResources.Reconciler
    note right of Main `#DDEEFF`: during manager setup
    Main->>Manager: create manager
    Manager->>Reconciler: instantiate reconciler config
    Reconciler-->>Manager: config includes FieldManager = constants.HostOperatorFieldManager
    note right of Reconciler `#E6F7E6`: reconciler will use FieldManager when applying resources
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to cmd/main.go reconciler initialization: ensure FieldManager is wired where the reconciler performs server-side apply or manages object ownership.
  • Verify constants.HostOperatorFieldManager exists and has the intended value.
  • Confirm go.mod dependency update is intentional and compatible.
  • Check template changes for correct syntax and desired GPU quota semantics.

Possibly related PRs

Suggested reviewers

  • alexeykazakov
  • MatousJobanek

Poem

🐰 I nibble code where fields now grow,
FieldManager set, the reconciler knows,
Workflows updated, modules aligned,
GPUs listed, quotas defined,
Hoppity hop — the deployer flows. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: configuring the field owner (FieldManager) for the ToolchainClusterResources controller to support Server-Side Apply (SSA).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@metlos metlos requested a review from MatousJobanek November 12, 2025 11:56
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd left a comment

Choose a reason for hiding this comment

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

🚀

@metlos
Copy link
Copy Markdown
Contributor Author

metlos commented Nov 17, 2025

/retest

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Nov 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fbm3307, MatousJobanek, metlos, rsoaresd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [MatousJobanek,fbm3307,metlos,rsoaresd]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@MatousJobanek
Copy link
Copy Markdown
Contributor

rajivnathan and others added 4 commits November 19, 2025 22:07
* Update RQ for base1ns namespace

* Add limits and update base template too
)

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@metlos metlos merged commit 0f25598 into codeready-toolchain:master Nov 27, 2025
13 of 16 checks passed
@metlos metlos deleted the use-ssa-client-in-toolchaincluster-resources-controller branch November 27, 2025 14:16
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.11%. Comparing base (410b521) to head (4832ea7).
⚠️ Report is 3 commits behind head on master.

❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1215      +/-   ##
==========================================
- Coverage   70.12%   70.11%   -0.02%     
==========================================
  Files          84       84              
  Lines        6561     6561              
==========================================
- Hits         4601     4600       -1     
- Misses       1748     1749       +1     
  Partials      212      212              

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants