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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Move experimental API v1beta1 webhooks to separate package #9417

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

Ankitasw
Copy link
Member

What this PR does / why we need it:

To work towards #9011, we need to remove the reliance on controller-runtime from the API packages.
This updates the webhooks to use the CustomDefaulter and CustomValidator pattern and moves them to match the Cluster and ClusterClass webhooks. This Is a more major lift but removes quite a bit of the code from the API package itself, making it's reliance on controller-runtime a lot smaller.

Which issue(s) this PR fixes (optional, in fixes #(, 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. do-not-merge/needs-area PR is missing an area label labels Sep 13, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 13, 2023
@Ankitasw Ankitasw changed the title Move experimental API v1beta1 webhooks to separate package [WIP] Move experimental API v1beta1 webhooks to separate package Sep 13, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 13, 2023
webhooks/alias.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 14, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 14, 2023
@Ankitasw Ankitasw force-pushed the move-exp-api-webhooks branch 3 times, most recently from 466443d to 811d176 Compare September 14, 2023 07:18
@Ankitasw Ankitasw changed the title [WIP] Move experimental API v1beta1 webhooks to separate package Move experimental API v1beta1 webhooks to separate package Sep 14, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@Ankitasw Ankitasw changed the title Move experimental API v1beta1 webhooks to separate package [WIP] Move experimental API v1beta1 webhooks to separate package Sep 14, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@Ankitasw Ankitasw force-pushed the move-exp-api-webhooks branch 5 times, most recently from 7b5c727 to 065fb3a Compare September 14, 2023 09:49
@Ankitasw Ankitasw changed the title [WIP] Move experimental API v1beta1 webhooks to separate package [WIP] 🌱 Move experimental API v1beta1 webhooks to separate package Sep 14, 2023
@Ankitasw
Copy link
Member Author

/test ?

@k8s-ci-robot
Copy link
Contributor

@Ankitasw: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-e2e-full-dualstack-and-ipv6-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-e2e-mink8s-main
  • /test pull-cluster-api-e2e-workload-upgrade-1-28-latest-main
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-test-mink8s-main
  • /test pull-cluster-api-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-e2e-scale-main-experimental

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-apidiff-main
  • pull-cluster-api-build-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-test-main
  • pull-cluster-api-verify-main

In response to this:

/test ?

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.

@Ankitasw
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

@Ankitasw Ankitasw changed the title [WIP] 🌱 Move experimental API v1beta1 webhooks to separate package 🌱 Move experimental API v1beta1 webhooks to separate package Sep 14, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@Ankitasw
Copy link
Member Author

/area api

@k8s-ci-robot k8s-ci-robot added area/api Issues or PRs related to the APIs and removed do-not-merge/needs-area PR is missing an area label labels Sep 14, 2023
@Ankitasw
Copy link
Member Author

/test pull-cluster-api-test-main

@Ankitasw
Copy link
Member Author

PR is up for review.

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Thank you!

Just two nits

exp/internal/webhooks/machinepool_test.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

@Ankitasw: 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 b700a99 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.

@sbueringer
Copy link
Member

Thx!

/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 Sep 15, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: dea91274250790496729f11113c7bedbe7ec0220

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 Sep 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit ebd0312 into kubernetes-sigs:main Sep 15, 2023
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Sep 15, 2023
@Ankitasw Ankitasw deleted the move-exp-api-webhooks branch September 15, 2023 11:04
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/api Issues or PRs related to the APIs 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants