Skip to content

CNTRLPLANE-3600: Bump k8s to v0.36.2, controller-runtime to v0.24.1, CAPI to v1.12.8 - #8695

Merged
openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
bryan-cox:k8s-bump
Jul 29, 2026
Merged

CNTRLPLANE-3600: Bump k8s to v0.36.2, controller-runtime to v0.24.1, CAPI to v1.12.8#8695
openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
bryan-cox:k8s-bump

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Jun 8, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Bumps core Kubernetes and controller-runtime dependencies to support k8s 1.36:

  • k8s.io/* v0.36.2
  • sigs.k8s.io/controller-runtime v0.24.1
  • sigs.k8s.io/cluster-api v1.12.8
  • sigs.k8s.io/cluster-api-provider-azure v1.23.2
  • sigs.k8s.io/cluster-api-provider-ibmcloud v0.13.1
  • sigs.k8s.io/cluster-api-provider-gcp v1.12.0
  • github.com/openshift/api latest
  • github.com/openshift/library-go latest
  • github.com/openshift/client-go latest
  • Go 1.26.0 (builder images and go.mod)

Breaking changes addressed

  • controller-runtime v0.24 generic webhook API: NewWebhookManagedBy(mgr).For(&obj{}) removed; migrated to NewWebhookManagedBy(mgr, &obj{}) with typed Validator/Defaulter interfaces
  • conversion.NewWebhookHandler: now requires a Registry parameter
  • k8s 1.36 scheduler extension points: placementGenerate and placementScore added (test fixtures regenerated)

Temporary vendor patches

Vendored NTO webhook files still use the old ctrl.NewWebhookManagedBy(mgr).For(r) pattern incompatible with controller-runtime v0.24. HyperShift never calls these functions. Temporary replace directives are included for NTO and karpenter k8s 1.36 compatibility. These are intended to be dropped once upstream releases compatible versions.

Commit structure

  1. chore(api): bump k8s deps to v0.36.2
  2. chore(api): regenerate CRDs, vendor for k8s v0.36.2 and controller-runtime v0.24.1
  3. build(hypershift-operator): k8s v0.36.2, Go 1.26, controller-runtime v0.24.1
  4. chore(control-plane-operator): update testdata fixtures for k8s v0.36.2

Which issue(s) this PR fixes:

Fixes https://issues.redhat.com/browse/CNTRLPLANE-3600

Special notes for your reviewer:

CAPA stays at v2.10.0 — no CAPI v1.12-compatible CAPA release exists yet. A follow-up PR can bump CAPI to v1.13.x when ready.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 8, 2026
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot

openshift-ci-robot commented Jun 8, 2026

Copy link
Copy Markdown

@bryan-cox: This pull request references CNTRLPLANE-3600 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it:

Bumps core Kubernetes and controller-runtime dependencies to support k8s 1.36:

  • k8s.io/* v0.36.1
  • sigs.k8s.io/controller-runtime v0.24.1
  • sigs.k8s.io/cluster-api v1.12.8
  • sigs.k8s.io/cluster-api-provider-azure v1.23.2
  • sigs.k8s.io/cluster-api-provider-ibmcloud v0.13.1
  • sigs.k8s.io/cluster-api-provider-gcp v1.12.0
  • github.com/openshift/api latest
  • github.com/openshift/library-go latest
  • github.com/openshift/client-go latest
  • Go 1.26.0

Breaking changes addressed

  • controller-runtime v0.24 generic webhook API: NewWebhookManagedBy(mgr).For(&obj{}) removed; migrated to NewWebhookManagedBy(mgr, &obj{}) with typed Validator/Defaulter interfaces
  • conversion.NewWebhookHandler: now requires a Registry parameter
  • k8s 1.36 scheduler extension points: placementGenerate and placementScore added (test fixtures regenerated)

Temporary vendor patches (commit 3/4)

Vendored CAPA (v2.10.0) and NTO webhook files are stubbed because they use the old ctrl.NewWebhookManagedBy(mgr).For(r) pattern incompatible with controller-runtime v0.24. HyperShift never calls these functions. Library-go fakeSharedIndexInformer is patched to implement HasSyncedChecker() (from openshift/library-go#2171). This commit is intended to be dropped on rebase once upstream releases compatible versions.

Status

  • make build passes
  • go build ./... passes
  • go vet ./... passes
  • make test passes
  • make lint — blocked on OCPSTRAT-3036: Rebase 1.36.2 library-go#2171 merging (golangci-lint reads from module cache, not vendor)
  • make verify — same blocker

Which issue(s) this PR fixes:

Fixes https://issues.redhat.com/browse/CNTRLPLANE-3600

Special notes for your reviewer:

Commit 3 (chore(api): temporary vendor patches for controller-runtime v0.24) is intentionally separate so it drops cleanly on rebase once upstream dependencies release controller-runtime v0.24 compatible versions.

CAPA stays at v2.10.0 — no CAPI v1.12-compatible CAPA release exists yet. A follow-up PR can bump CAPI to v1.13.x when ready.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates Go toolchain targets and refreshes dependency versions in go.mod and api/go.mod, including Kubernetes, OpenShift, IBM Cloud SDK, OpenTelemetry, protobuf, and related modules. It also changes HostedCluster and NodePool webhook code to use typed admission objects, updates webhook registration, and adjusts conversion webhook construction. .golangci.yml adds new staticcheck exclusion rules.

Sequence Diagram(s)

sequenceDiagram
  participant Manager as ctrl.NewWebhookManagedBy
  participant Setup as SetupWebhookWithManager
  participant Conversion as conversion.NewWebhookHandler
  participant Validator as hostedClusterValidator/nodePoolValidator
  Manager->>Setup: register typed webhooks
  Setup->>Conversion: create handler with NewRegistry()
  Setup->>Validator: attach typed Default/Validate methods
  Validator->>Validator: process *hyperv1.HostedCluster and *hyperv1.NodePool
Loading
🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The commit changes no *_test.go files, so it introduces no test titles to destabilize.
Test Structure And Quality ✅ Passed No Ginkgo test code changed; the PR only updates regenerated scheduler fixture YAMLs, so the test-structure checklist is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed No topology-sensitive scheduling logic was added: changes are webhook API refactors and scheduler test fixtures only, with no nodeSelector, affinity, spread, or replica rules.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new e2e/Ginkgo test files were added; the PR changes webhook/config/vendor/CRD code only.
No-Weak-Crypto ✅ Passed Changed files add no weak-crypto algorithms or secret comparisons; only webhook API wiring, dependency bumps, and lint suppressions.
Container-Privileges ✅ Passed No added privileged/hostNetwork/hostPID/hostIPC/allowPrivilegeEscalation or SYS_ADMIN settings appear in the changed manifests; PR is dependency/CRD updates only.
No-Sensitive-Data-In-Logs ✅ Passed No new log output exposes passwords, tokens, API keys, PII, session IDs, hostnames, or customer data; added logs only print object/cipher names or reformat an existing error message.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main dependency bump theme, especially k8s, controller-runtime, and CAPI updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added area/api Indicates the PR includes changes for the API area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Jun 8, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.62%. Comparing base (76220f1) to head (e253341).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8695      +/-   ##
==========================================
+ Coverage   44.61%   44.62%   +0.01%     
==========================================
  Files         774      774              
  Lines       97098    97078      -20     
==========================================
+ Hits        43317    43324       +7     
+ Misses      50785    50766      -19     
+ Partials     2996     2988       -8     
Files with missing lines Coverage Δ
...rconfigoperator/controllers/resources/resources.go 57.83% <ø> (+0.02%) ⬆️
...controllers/hostedcluster/hostedcluster_webhook.go 56.89% <ø> (+5.70%) ⬆️
.../capabilities/hosted_control_plane_capabilities.go 64.70% <ø> (+8.34%) ⬆️
Flag Coverage Δ
cmd-support 38.41% <ø> (+0.02%) ⬆️
cpo-hostedcontrolplane 47.22% <ø> (ø)
cpo-other 45.25% <ø> (+<0.01%) ⬆️
hypershift-operator 54.59% <ø> (+0.04%) ⬆️
other 33.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@openshift-ci openshift-ci Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. area/platform/azure PR/issue for Azure (AzurePlatform) platform area/platform/gcp PR/issue for GCP (GCPPlatform) platform area/testing Indicates the PR includes changes for e2e testing labels Jun 8, 2026
@bryan-cox
bryan-cox force-pushed the k8s-bump branch 2 times, most recently from 4aff56b to 909422a Compare July 6, 2026 14:21
@openshift-ci openshift-ci Bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/platform/aws PR/issue for AWS (AWSPlatform) platform area/platform/ibmcloud PR/issue for IBMCloud (IBMCloudPlatform) platform area/platform/kubevirt PR/issue for KubeVirt (KubevirtPlatform) platform area/platform/powervs PR/issue for PowerVS (PowerVSPlatform) platform and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.golangci.yml (1)

89-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Broaden regex may mask unrelated Apply deprecations.

The pattern SA1019: (.*)\.Apply is deprecated matches any receiver's .Apply deprecation, not just client.Apply. This risks silently suppressing unrelated future SA1019 warnings for other Apply-named symbols in the ecosystem, beyond the stated controller-runtime migration scope in the comment.

♻️ Proposed tighter regex
-      - linters:
-          - staticcheck
-        text: 'SA1019: (.*)\.Apply is deprecated'
+      - linters:
+          - staticcheck
+        text: 'SA1019: (.*)client\.Apply is deprecated'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.golangci.yml around lines 89 - 92, Tighten the staticcheck suppression in
the .golangci.yml exclude rule so it only matches the controller-runtime client
Apply deprecation, not any `.Apply` symbol. Update the regex near the existing
`client.Apply` comment to anchor on the specific receiver or package name used
by the deprecated API, and keep the scope limited to the `staticcheck` SA1019
entry so unrelated future Apply deprecations are not hidden.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.golangci.yml:
- Around line 89-92: Tighten the staticcheck suppression in the .golangci.yml
exclude rule so it only matches the controller-runtime client Apply deprecation,
not any `.Apply` symbol. Update the regex near the existing `client.Apply`
comment to anchor on the specific receiver or package name used by the
deprecated API, and keep the scope limited to the `staticcheck` SA1019 entry so
unrelated future Apply deprecations are not hidden.

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@bryan-cox bryan-cox closed this Jul 6, 2026
@bryan-cox bryan-cox reopened this Jul 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by e2e tests passing.

Details

In response to this:

/verified by e2e tests passing

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

bryan-cox and others added 5 commits July 28, 2026 10:49
- Update api/go.mod k8s dependencies to v0.36.2
- Update api/vendor for k8s v0.36.2 and controller-runtime v0.24.1
- Includes updated openshift/api with ClusterAPI and
  CompatibilityRequirements capabilities in vCurrent

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
…ntime v0.24.1

- Regenerate vendor/ for k8s v0.36.2, controller-runtime v0.24.1,
  CAPI v1.12.8
- Includes updated openshift/api, CAPA, and NTO vendored dependencies

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
- Update cluster-api-provider CRDs for AWS, Azure, GCP, IBM Cloud,
  and KubeVirt under cmd/install/assets/crds/

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
…runtime v0.24.1

- Update go.mod/go.sum for k8s v0.36.2, controller-runtime v0.24.1,
  CAPI v1.12.8, NTO, and CAPA with temporary replace directives
- Update Containerfiles and Dockerfiles to Go 1.26
- Add .gitignore negation for vendor .envrc files
- Migrate webhooks to controller-runtime v0.24 generic API
- Add FilterByKnownCapabilities to handle version skew between
  management operator's vendored openshift/api and guest CVO

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
…ap ClusterVersion

Filter the ClusterVersion capabilities by the guest CVO's known set
to avoid applying capabilities the guest CRD doesn't recognize yet.
Exclude ClusterAPI and CompatibilityRequirements from the enabled set,
as these are not supported in HyperShift guest clusters.

Use baselineCapabilitySet None with explicit additionalEnabledCapabilities
from CalculateEnabledCapabilities() in the bootstrap ClusterVersion,
matching what HCCO reconciles, so the CVO never enables capabilities
the HostedCluster explicitly disables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryan-cox

Copy link
Copy Markdown
Member Author

/verified by e2e tests passing

@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by e2e tests passing.

Details

In response to this:

/verified by e2e tests passing

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke
/test unit
/test verify

@jparrill

Copy link
Copy Markdown
Contributor

/lgtm

1 similar comment
@jparrill

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@bryan-cox

Copy link
Copy Markdown
Member Author

/test e2e-aks

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 4b22cfd and 2 for PR HEAD e253341 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 770ebed and 1 for PR HEAD e253341 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD e079f30 and 0 for PR HEAD e253341 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/hold

Revision e253341 was retested 3 times: holding

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@bryan-cox

Copy link
Copy Markdown
Member Author

/hold cancel

@bryan-cox

Copy link
Copy Markdown
Member Author

@csrwng

csrwng commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

/override ci/prow/e2e-aws

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@csrwng: Overrode contexts on behalf of csrwng: ci/prow/e2e-aws

Details

In response to this:

/override ci/prow/e2e-aws

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: Overrode contexts on behalf of bryan-cox: ci/prow/e2e-aws

Details

In response to this:

/override "ci/prow/e2e-aws"

See https://redhat-internal.slack.com/archives/G01QS0P2F6W/p1785335636533809?thread_ts=1784630519.440369&cid=G01QS0P2F6W for details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api Indicates the PR includes changes for the API area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/platform/aws PR/issue for AWS (AWSPlatform) platform area/platform/azure PR/issue for Azure (AzurePlatform) platform area/platform/gcp PR/issue for GCP (GCPPlatform) platform area/platform/ibmcloud PR/issue for IBMCloud (IBMCloudPlatform) platform area/platform/kubevirt PR/issue for KubeVirt (KubevirtPlatform) platform area/platform/powervs PR/issue for PowerVS (PowerVSPlatform) platform area/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants