Skip to content

Conversation

@damdo
Copy link
Member

@damdo damdo commented Nov 14, 2025

Manual cherry-pick of #5739


/kind regression

This PR addresses a conversion webhook failure introduced in CAPA v2.9.x.

Users upgrading from CAPA v1.x (who have v1beta1 resources like AWSClusterControllerIdentity still stored in etcd) are unable to access these resources after upgrading to v2.9.x.

Any attempt to get these objects fails with an invalid groupVersion error, as the webhook incorrectly returns a v1beta1 object when v1beta2 is expected.

The root cause was identified in our old and custom copy of the upstream conversion-gen tooling.
A change (introduced in PR #5447 ) caused the generator to incorrectly add out.TypeMeta = in.TypeMeta to the generated conversion functions (zz_generated.conversion.go).

This line improperly copies the apiVersion from the v1beta1 input object to the v1beta2 output object, causing the webhook to return an invalid payload.

This pull request resolves the issue by removing the old custom copy of the upstream conversion-gen, in favour of the up-to-date/latest mainline conversion-gen.
It follow that up with a regeneration of the conversion code which removes the problematic TypeMeta assignment.

More details in the Slack thread: https://kubernetes.slack.com/archives/CD6U2V71N/p1762863174053729

fix: CAPA v1beta1 to v1beta2 resources generated conversion webhook

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/regression Categorizes issue or PR as related to a regression from a prior release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 14, 2025
@k8s-ci-robot k8s-ci-robot added needs-priority size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 14, 2025
@damdo
Copy link
Member Author

damdo commented Nov 14, 2025

/assign @richardcase @chrischdi @AndiDog

Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c0c2ebaff8c3f7eefc295ffe2ccc5617e315a548

@richardcase
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2025
@k8s-ci-robot k8s-ci-robot merged commit d88508c into kubernetes-sigs:release-2.9 Nov 14, 2025
19 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants