Skip to content

🌱 Recover v1.10 util packages for conditions, patch and paused to util/deprecated/v1beta1 for provider migrations #12224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

chrischdi
Copy link
Member

What this PR does / why we need it:

Re-adds the packages:

  • sigs.k8s.io/cluster-api/util/patch as sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch
  • sigs.k8s.io/cluster-api/util/conditions as sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions
  • sigs.k8s.io/cluster-api/util/paused as sigs.k8s.io/cluster-api/util/deprecated/v1beta1/paused

From version v1.10.

This allows providers a smoother and more step-by-step migration to v1beta2.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/area util

@k8s-ci-robot k8s-ci-robot added area/util Issues or PRs related to utils cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 15, 2025
@k8s-ci-robot k8s-ci-robot requested review from enxebre and JoelSpeed May 15, 2025 14:57
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 15, 2025
@chrischdi chrischdi force-pushed the readd-old-conditions-and-patch-utils-for-migration branch from bd68d15 to 295904c Compare May 16, 2025 11:53
@fabriziopandini fabriziopandini added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 16, 2025
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

We are always going miles to help CAPI users!
Thanks!
cc @sbueringer

SetupReconcilers func(ctx context.Context, mgr ctrl.Manager)
SetupEnv func(e *Environment)
MinK8sVersion string
AdditionalSchemeBuilder runtime.SchemeBuilder
Copy link
Member

Choose a reason for hiding this comment

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

nit: should this be

Suggested change
AdditionalSchemeBuilder runtime.SchemeBuilder
AdditionalSchemeBuilders []runtime.SchemeBuilder

(not blocking it is an internal util, we can always iterate in future)

Copy link
Member Author

Choose a reason for hiding this comment

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

runtime.Schemebuilder is already an []func(*Scheme) error which is a collection of AddScheme funcs :-)

@sbueringer
Copy link
Member

/lgtm

/assign @fabriziopandini

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

LGTM label has been added.

Git tree hash: c58d431e44579e7f86fd230915cecead258b6d2d

@fabriziopandini
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 May 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit 1f34e41 into kubernetes-sigs:main May 19, 2025
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone May 19, 2025
sbueringer pushed a commit to sbueringer/cluster-api that referenced this pull request May 19, 2025
…l/deprecated/v1beta1 for provider migrations (kubernetes-sigs#12224)

* Recover v1.10 util/conditions and util/patch to util/deprecated/v1beta1 for providers

* util/deprecated: add package deprecation information to packages

* readd util/deprecated/v1beta1/paused

* util/deprecated: use deprecated packages for paused

* util/deprecated: use clusterv1.Cluster

* fix deprecated tests

* util/deprecated/v1beta1/test add ObservedGeneration to Phase1Obj and generate CRD

* util/test allow to pass in custom crd paths and scheme builders

* envtest: adjust godoc for global scheme

* envtest: review fixes

* deprecated: rename func parameters

* fixup renaming

* fixup linter changes
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/util Issues or PRs related to utils cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants