Skip to content

Regenerate apply configurations with controller-gen v0.21.0#332

Merged
notandy merged 2 commits into
mainfrom
upgrade-controller-gen
Jul 9, 2026
Merged

Regenerate apply configurations with controller-gen v0.21.0#332
notandy merged 2 commits into
mainfrom
upgrade-controller-gen

Conversation

@fwiesel

@fwiesel fwiesel commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

CI installs controller-gen@latest which is now v0.21.0. The new version correctly omits the namespace parameter from apply configuration constructors for cluster-scoped resources (Hypervisor, Eviction).

Without this regeneration, CI's generate step produces a 1-arg Eviction() / Hypervisor() signature while the committed code has the stale 2-arg version from v0.19.0. This causes build failures on any branch that calls these constructors (e.g. ssa, rework-onboarding).

This PR only contains regenerated output — no hand-written code changes.

Summary by CodeRabbit

  • New Features

    • Added support for extracting applied configuration from existing hypervisor and eviction resources.
    • Expanded declarative configuration to include aggregate metadata and additional domain capability features.
  • Documentation

    • Improved API and CRD descriptions for hypervisor, eviction, instance, capacity, and operating system fields.
    • Clarified several resource examples and status descriptions for easier understanding.
  • Chores

    • Regenerated resource schemas and CRDs to align with the latest generation tooling.

@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: 71957b7f-9c7e-4ae9-93d7-e442af658cec

📥 Commits

Reviewing files that changed from the base of the PR and between d08ce62 and 2ac42de.

📒 Files selected for processing (20)
  • api/v1/hypervisor_types.go
  • applyconfigurations/api/v1/aggregate.go
  • applyconfigurations/api/v1/aggregategroup.go
  • applyconfigurations/api/v1/capabilities.go
  • applyconfigurations/api/v1/cell.go
  • applyconfigurations/api/v1/domaincapabilities.go
  • applyconfigurations/api/v1/eviction.go
  • applyconfigurations/api/v1/evictionspec.go
  • applyconfigurations/api/v1/evictionstatus.go
  • applyconfigurations/api/v1/group.go
  • applyconfigurations/api/v1/hypervisor.go
  • applyconfigurations/api/v1/hypervisorspec.go
  • applyconfigurations/api/v1/hypervisorstatus.go
  • applyconfigurations/api/v1/hypervisorupdatestatus.go
  • applyconfigurations/api/v1/instance.go
  • applyconfigurations/api/v1/operatingsystemstatus.go
  • applyconfigurations/api/v1/traitgroup.go
  • applyconfigurations/internal/internal.go
  • charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_evictions.yaml
  • charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_hypervisors.yaml

📝 Walkthrough

Walkthrough

This PR regenerates controller-gen apply-configurations and CRDs. It adds a Metadata field to AggregateApplyConfiguration, a SupportedFeatures field to DomainCapabilitiesApplyConfiguration, new Extract* helper functions for Eviction and Hypervisor, changes their constructors to drop the namespace parameter, regenerates the internal schema parser, and updates doc comments/CRD descriptions throughout.

Changes

Generated apply-configuration and CRD updates

Layer / File(s) Summary
Aggregate metadata field
applyconfigurations/api/v1/aggregate.go, applyconfigurations/api/v1/aggregategroup.go
AggregateApplyConfiguration gains a Metadata map[string]string field with omitempty tag and expanded docs.
DomainCapabilities SupportedFeatures field
applyconfigurations/api/v1/domaincapabilities.go, api/v1/hypervisor_types.go, charts/.../kvm.cloud.sap_hypervisors.yaml
DomainCapabilitiesApplyConfiguration gains a SupportedFeatures []string field; related type comments and CRD example descriptions are reworded.
Eviction extraction helpers and constructor change
applyconfigurations/api/v1/eviction.go, applyconfigurations/api/v1/evictionspec.go, applyconfigurations/api/v1/evictionstatus.go, charts/.../kvm.cloud.sap_evictions.yaml
Eviction(name, namespace) becomes Eviction(name); new ExtractEvictionFrom, ExtractEviction, and ExtractEvictionStatus functions use managedfields.ExtractInto; CRD generator version bumped.
Hypervisor extraction helpers and constructor change
applyconfigurations/api/v1/hypervisor.go
Hypervisor(name, namespace) becomes Hypervisor(name); new ExtractHypervisorFrom, ExtractHypervisor, and ExtractHypervisorStatus functions added using managedfields.ExtractInto.
Schema parser regeneration
applyconfigurations/internal/internal.go
The schemaYAML constant is regenerated to reflect the updated field-management schema for all API types plus referenced Kubernetes types.
Documentation and comment updates
applyconfigurations/api/v1/capabilities.go, cell.go, group.go, traitgroup.go, hypervisorspec.go, hypervisorstatus.go, hypervisorupdatestatus.go, instance.go, operatingsystemstatus.go, api/v1/hypervisor_types.go, charts/.../kvm.cloud.sap_hypervisors.yaml
Doc comments and CRD field descriptions are reworded/expanded across multiple types without functional changes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: mchristianl

🚥 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 is concise and accurately summarizes the main change: regenerating apply configurations with controller-gen v0.21.0.
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 upgrade-controller-gen

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Regenerates CRDs and server-side apply configuration code with controller-gen v0.21.0 to match CI output, including updated apply-configuration constructor signatures for cluster-scoped resources.

Changes:

  • Regenerated CRDs with updated controller-gen version annotation (v0.21.0).
  • Regenerated applyconfigurations, updating Eviction() / Hypervisor() constructors to omit namespace for cluster-scoped resources.
  • Added/updated generated apply/extract helpers and schema metadata used for managed-fields extraction.

Reviewed changes

Copilot reviewed 2 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_hypervisors.yaml Regenerated Hypervisor CRD metadata with controller-gen v0.21.0 output.
charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_evictions.yaml Regenerated Eviction CRD metadata with controller-gen v0.21.0 output.
applyconfigurations/internal/internal.go Updated structured-merge-diff schema used by managed-fields extraction for generated apply configs.
applyconfigurations/api/v1/hypervisor.go Updated Hypervisor apply constructor signature (cluster-scoped) and added extract helpers.
applyconfigurations/api/v1/eviction.go Updated Eviction apply constructor signature (cluster-scoped) and added extract helpers.
applyconfigurations/api/v1/hypervisorspec.go Regenerated spec apply config; includes expanded doc comments.
applyconfigurations/api/v1/hypervisorstatus.go Regenerated status apply config; includes expanded doc comments.
applyconfigurations/api/v1/hypervisorupdatestatus.go Regenerated update status apply config with doc comments.
applyconfigurations/api/v1/operatingsystemstatus.go Regenerated OS status apply config with doc comments.
applyconfigurations/api/v1/domaincapabilities.go Regenerated domain capabilities apply config with doc comments.
applyconfigurations/api/v1/capabilities.go Regenerated capabilities apply config with doc comments.
applyconfigurations/api/v1/cell.go Regenerated cell apply config with doc comments.
applyconfigurations/api/v1/instance.go Regenerated instance apply config with doc comments.
applyconfigurations/api/v1/group.go Regenerated group apply config with doc comments.
applyconfigurations/api/v1/traitgroup.go Regenerated trait group apply config with doc comments.
applyconfigurations/api/v1/aggregategroup.go Regenerated aggregate group apply config with doc comments.
applyconfigurations/api/v1/aggregate.go Regenerated aggregate apply config with doc comments.
applyconfigurations/api/v1/evictionspec.go Regenerated eviction spec apply config with doc comments.
applyconfigurations/api/v1/evictionstatus.go Regenerated eviction status apply config with doc comments.
Files not reviewed (17)
  • applyconfigurations/api/v1/aggregate.go: Generated file
  • applyconfigurations/api/v1/aggregategroup.go: Generated file
  • applyconfigurations/api/v1/capabilities.go: Generated file
  • applyconfigurations/api/v1/cell.go: Generated file
  • applyconfigurations/api/v1/domaincapabilities.go: Generated file
  • applyconfigurations/api/v1/eviction.go: Generated file
  • applyconfigurations/api/v1/evictionspec.go: Generated file
  • applyconfigurations/api/v1/evictionstatus.go: Generated file
  • applyconfigurations/api/v1/group.go: Generated file
  • applyconfigurations/api/v1/hypervisor.go: Generated file
  • applyconfigurations/api/v1/hypervisorspec.go: Generated file
  • applyconfigurations/api/v1/hypervisorstatus.go: Generated file
  • applyconfigurations/api/v1/hypervisorupdatestatus.go: Generated file
  • applyconfigurations/api/v1/instance.go: Generated file
  • applyconfigurations/api/v1/operatingsystemstatus.go: Generated file
  • applyconfigurations/api/v1/traitgroup.go: Generated file
  • applyconfigurations/internal/internal.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread applyconfigurations/api/v1/hypervisorspec.go
Comment thread applyconfigurations/api/v1/hypervisorspec.go Outdated
Comment thread applyconfigurations/api/v1/hypervisorstatus.go Outdated
Comment thread applyconfigurations/api/v1/domaincapabilities.go Outdated
Comment thread applyconfigurations/api/v1/domaincapabilities.go
CI installs controller-gen@latest which is now v0.21.0. The new version
correctly omits the namespace parameter from apply configuration
constructors for cluster-scoped resources (Hypervisor, Eviction).

Also fixes grammatical errors in API type comments that propagate into
CRD schema descriptions:
- "request an reboot" -> "requests a reboot"
- "request an evacuation" -> "requests an evacuation"
- "Require to issue" -> "Requires issuing"
- "enable the installations" -> "enable the installation"
- "the take the following" -> "take the following"
- "Represent the num of instances" -> "Represents the number of instances"
@fwiesel fwiesel force-pushed the upgrade-controller-gen branch from 450cea6 to 80fdf46 Compare July 9, 2026 08:39
'request an reboot/evacuation' -> 'requests a reboot/an evacuation';
'Require to issue...' -> clearer imperative phrasing;
'enable the installations...' -> 'enables installation...'.

These strings propagate into CRD schema descriptions, so regen follows.
@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/openstack-hypervisor-operator/api/v1 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/internal 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1/hypervisor_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/aggregate.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/aggregategroup.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/capabilities.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/cell.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/domaincapabilities.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/eviction.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/evictionspec.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/evictionstatus.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/group.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/hypervisor.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/hypervisorspec.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/hypervisorstatus.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/hypervisorupdatestatus.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/instance.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/operatingsystemstatus.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/api/v1/traitgroup.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/applyconfigurations/internal/internal.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.

@notandy notandy merged commit 0fc5652 into main Jul 9, 2026
7 checks passed
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.

3 participants