Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 CABPK: Remove redundant SetupWebhookWithManager funcs on list types #5725

Merged

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan B眉ringer buringerst@vmware.com

What this PR does / why we need it:
This PR deprecates the redundant SetupWebhookWithManager funcs on the CABPK list types. We don't have them for any other of our *List types. We don't need them because:

  • Those types don't have a validating or defaulting webhook
  • There is only one conversion webhook and it is already registered by other types.

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 #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 24, 2021
@@ -20,6 +20,8 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
)

// SetupWebhookWithManager sets up KubeadmConfigList webhooks.
// Deprecated: This method is going to be removed in a next release.
Copy link
Member

Choose a reason for hiding this comment

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

Q: if I remember well we recently implemented a check to ensure all the webhooks exist; Have checked if this deprecation conflates with this check?

Also given that this is golang code and not API types (CRD), can we queue up this for 1.1?

Copy link
Member Author

Choose a reason for hiding this comment

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

Q: if I remember well we recently implemented a check to ensure all the webhooks exist; Have checked if this deprecation conflates with this check?

The check verifies that the types implement the conversion interface correct (aka they have ConvertTo/ConvertFrom/Hub funcs). So they will still pass after this func is dropped, in fact for all other *List types these functions don't exist right now.

Also given that this is golang code and not API types (CRD), can we queue up this for 1.1?

I think based on our policies it should be okay to deprecate those funcs with v1.1.0 and drop them with v1.2.0. If I got it correctly we have to deprecate with a .0 release (because deprecations are not cherry-pickable) so we can drop them with the next following minor release.

Are you suggesting to deprecating later or removing earlier?

I'm not sure I understood the question correctly.

Copy link
Member

Choose a reason for hiding this comment

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

I'd remove these now given that these are mostly for internal controller management and they don't do much

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine for me. Everyone who might use them can essentially just stop doing it with v1.1 without any downsides.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the PR accordingly

Signed-off-by: Stefan B眉ringer buringerst@vmware.com
@sbueringer sbueringer changed the title 馃悰 CABPK: Deprecate redundant SetupWebhookWithManager funcs on list types 馃悰 CABPK: Remove redundant SetupWebhookWithManager funcs on list types Nov 29, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 29, 2021
@k8s-ci-robot
Copy link
Contributor

@sbueringer: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main df4cfd8 link false /test pull-cluster-api-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

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.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2021
@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 Nov 29, 2021
@k8s-ci-robot k8s-ci-robot merged commit 04e9b32 into kubernetes-sigs:main Nov 29, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 29, 2021
@sbueringer sbueringer deleted the pr-deprecate-list-setup-funcs branch November 29, 2021 13:26
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants