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

standardize AzureManagedCluster webhooks #2626

Merged

Conversation

jackfrancis
Copy link
Contributor

@jackfrancis jackfrancis commented Sep 2, 2022

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / why we need it:

This PR updates AzureManagedCluster webhooks to prefer the approach from this PR: #2376

This adds CRD feature-gate validation as part of the webhook validation, so that users get a clear message when attempting to create a resource currently behind a feature flag (e.g., AzureManagedCluster).

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 #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

standardize AzureManagedCluster webhooks

@jackfrancis jackfrancis added the area/managedclusters Issues related to managed AKS clusters created through the CAPZ ManagedCluster Type label Sep 2, 2022
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Sep 2, 2022
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 2, 2022
@k8s-ci-robot k8s-ci-robot requested a review from Jont828 September 2, 2022 23:13
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 2, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch 2 times, most recently from 56bde89 to e1aa39e Compare September 2, 2022 23:39
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 2, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from e1aa39e to 2edd756 Compare September 3, 2022 17:01
exp/api/v1beta1/azuremachinepool_webhook.go Outdated Show resolved Hide resolved
exp/api/v1beta1/azuremanagedcluster_webhook.go Outdated Show resolved Hide resolved
exp/api/v1beta1/azuremanagedmachinepool_webhook.go Outdated Show resolved Hide resolved
exp/api/v1beta1/azuremachinepool_webhook.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2022
main.go Outdated Show resolved Hide resolved
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch 2 times, most recently from 2a13c99 to b4bc35a Compare September 26, 2022 22:00
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 11, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from b4bc35a to 7315412 Compare October 14, 2022 18:44
@jackfrancis jackfrancis changed the title fix missing AzureManagedMachinePool webhooks, standardize standardize AzureManagedCluster webhooks Oct 14, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from 7315412 to 72287e7 Compare October 14, 2022 18:49
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 14, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from 72287e7 to a9d16ef Compare October 14, 2022 21:40
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2022
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon 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 Oct 14, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 Oct 14, 2022
@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from a9d16ef to 1f4aad9 Compare October 14, 2022 22:36
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2022
@jackfrancis
Copy link
Contributor Author

@CecileRobertMichon sorry, I didn't run lint prior to pushing up changes :( fixed

@CecileRobertMichon
Copy link
Contributor

/lgtm

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

/retest

@jackfrancis
Copy link
Contributor Author

I don't know how to get this merged without a rebase. 1-2-3 here we go!

@jackfrancis jackfrancis force-pushed the azuremanaged-webhooks branch from 1f4aad9 to 81f657a Compare October 15, 2022 00:35
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2022
@jackfrancis
Copy link
Contributor Author

/test ls

@k8s-ci-robot
Copy link
Contributor

@jackfrancis: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-azure-build
  • /test pull-cluster-api-provider-azure-ci-entrypoint
  • /test pull-cluster-api-provider-azure-e2e
  • /test pull-cluster-api-provider-azure-test
  • /test pull-cluster-api-provider-azure-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-azure-apidiff
  • /test pull-cluster-api-provider-azure-apiversion-upgrade
  • /test pull-cluster-api-provider-azure-capi-e2e
  • /test pull-cluster-api-provider-azure-conformance
  • /test pull-cluster-api-provider-azure-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-azure-e2e-csi-migration
  • /test pull-cluster-api-provider-azure-e2e-exp
  • /test pull-cluster-api-provider-azure-e2e-optional
  • /test pull-cluster-api-provider-azure-e2e-workload-upgrade
  • /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts
  • /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts-serial-slow

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

  • pull-cluster-api-provider-azure-apidiff
  • pull-cluster-api-provider-azure-build
  • pull-cluster-api-provider-azure-ci-entrypoint
  • pull-cluster-api-provider-azure-e2e
  • pull-cluster-api-provider-azure-e2e-exp
  • pull-cluster-api-provider-azure-test
  • pull-cluster-api-provider-azure-verify

In response to this:

/test ls

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.

@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-capi-e2e
/test pull-cluster-api-provider-azure-e2e-optional
/test pull-cluster-api-provider-azure-e2e-workload-upgrade
/test pull-cluster-api-provider-azure-conformance-with-ci-artifacts

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon 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 Oct 20, 2022
@CecileRobertMichon
Copy link
Contributor

/hold

@jackfrancis since this is classified as a bug, can you please make the release note a bit more specific? "standardize" is a bit vague, users might wonder what is this fixing? Or maybe it would be better classified as a "cleanup" if it's not actually fixing any functional behavior

Feel free to unhold when you're done

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 2022
@CecileRobertMichon
Copy link
Contributor

/test pull-cluster-api-provider-azure-capi-e2e

@jackfrancis
Copy link
Contributor Author

@CecileRobertMichon thanks for the review! I don't think this is a bug, I'll reclassify.

@jackfrancis jackfrancis removed the kind/bug Categorizes issue or PR as related to a bug. label Oct 20, 2022
@jackfrancis
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 2022
@k8s-ci-robot k8s-ci-robot merged commit eebfe5d into kubernetes-sigs:main Oct 20, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Oct 20, 2022
@jackfrancis jackfrancis deleted the azuremanaged-webhooks branch December 9, 2022 22:32
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/managedclusters Issues related to managed AKS clusters created through the CAPZ ManagedCluster Type cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

4 participants