Skip to content

Fix/scheme builder deprecation#88

Open
notandy wants to merge 2 commits into
mainfrom
fix/scheme-builder-deprecation
Open

Fix/scheme builder deprecation#88
notandy wants to merge 2 commits into
mainfrom
fix/scheme-builder-deprecation

Conversation

@notandy

@notandy notandy commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Include update external dependencies

Summary by CodeRabbit

  • Bug Fixes
    • Improved Kubernetes API scheme registration for migration resources, enhancing consistency when the app lists, watches, and handles these resources.
  • Chores
    • Updated the Go toolchain and refreshed project dependencies.
    • Bumped the node agent chart’s controller-manager PKI directory image to a newer pinned version.

@notandy notandy requested review from fwiesel, mchristianl and toanju July 9, 2026 15:51
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e212d357-03b2-4e55-93ae-293ec7efb3d8

📥 Commits

Reviewing files that changed from the base of the PR and between 6e2db5b and 2509f17.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • api/v1alpha1/groupversion_info.go
  • api/v1alpha1/migration_types.go
  • api/v1alpha1/zz_generated.deepcopy.go
  • charts/kvm-node-agent/values.yaml
  • go.mod
💤 Files with no reviewable changes (1)
  • api/v1alpha1/migration_types.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • api/v1alpha1/zz_generated.deepcopy.go
  • charts/kvm-node-agent/values.yaml
  • api/v1alpha1/groupversion_info.go
  • go.mod

📝 Walkthrough

Walkthrough

Refactors v1alpha1 scheme registration to use runtime.NewSchemeBuilder(addKnownTypes) instead of controller-runtime’s scheme builder, removes the old init-based type registration, normalizes a generated deepcopy import, and updates dependency and chart image versions.

Changes

Scheme registration change

Layer / File(s) Summary
SchemeBuilder migration to runtime.NewSchemeBuilder
api/v1alpha1/groupversion_info.go, api/v1alpha1/migration_types.go
Replaces controller-runtime's scheme.Builder with runtime.NewSchemeBuilder(addKnownTypes), adds addKnownTypes to register Migration/MigrationList and call metav1.AddToGroupVersion, and removes the now-redundant init() registration in migration_types.go.
Deepcopy import cleanup
api/v1alpha1/zz_generated.deepcopy.go
Removes the explicit runtime import alias while retaining runtime.Object usage.

Dependency and chart image updates

Layer / File(s) Summary
Go module dependency bumps
go.mod
Updates the go directive to 1.26.0 and bumps direct dependencies (cert-manager, openstack-hypervisor-operator, ginkgo/gomega, Kubernetes libraries, controller-runtime) plus indirect go-openapi, pprof, grpc-gateway, OpenTelemetry, zap, grpc/protobuf, and gateway-api versions.
Chart image tag update
charts/kvm-node-agent/values.yaml
Updates controllerManager.createPkiDirs.image.tag from 1.37 to 1.38, pinned with a SHA256 digest.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: replacing deprecated scheme.Builder usage with runtime.NewSchemeBuilder.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scheme-builder-deprecation

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.

fwiesel
fwiesel previously approved these changes Jul 9, 2026
renovate Bot and others added 2 commits July 9, 2026 15:25
controller-runtime's scheme.Builder is deprecated in favor of the
apimachinery builder. Register types via an addKnownTypes function
wired into runtime.NewSchemeBuilder, dropping the init()-based
SchemeBuilder.Register call.
@notandy notandy force-pushed the fix/scheme-builder-deprecation branch from 6e2db5b to 2509f17 Compare July 9, 2026 19:26
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/kvm-node-agent/api/v1alpha1 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/kvm-node-agent/api/v1alpha1/groupversion_info.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/kvm-node-agent/api/v1alpha1/migration_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/kvm-node-agent/api/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

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