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

AzureManagedMachinePool ValidateDelete Webhook will check AMMP for DeleteForMoveAnnotation annotation #4392

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Dec 15, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:

  • AzureManagedMachinePool will check ammp.annotations for DeleteForMoveAnnotation during clusterctl move --to-kubeconfig operation

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 #4341

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

AzureManagedMachinePool will check its annotations for `DeleteForMoveAnnotation` during clusterctl move operation

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 15, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 15, 2023
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (ad30f63) 61.02% compared to head (cd5ba59) 61.04%.

Files Patch % Lines
api/v1beta1/azuremanagedmachinepool_webhook.go 50.00% 2 Missing ⚠️
...v1beta1/azuremanagedmachinepooltemplate_webhook.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4392      +/-   ##
==========================================
+ Coverage   61.02%   61.04%   +0.01%     
==========================================
  Files         190      190              
  Lines       19029    19029              
==========================================
+ Hits        11613    11616       +3     
+ Misses       6784     6782       -2     
+ Partials      632      631       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nawazkh nawazkh changed the title function signatures AzureManagedMachinePool ValidateDelete Webhook will check AMMP for DeleteForMoveAnnotation annotation Dec 15, 2023
@nawazkh nawazkh force-pushed the update_AzureManagedMachinePool_Webhook branch from 2c72cbe to cd5ba59 Compare December 15, 2023 21:21
@nawazkh nawazkh marked this pull request as ready for review December 15, 2023 21:23
@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 Dec 15, 2023
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 Dec 15, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 045b1e226d2f71279f86192d2c7ab2b1e990fd9b

Copy link
Contributor

@nojnhuh nojnhuh 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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 Dec 15, 2023
@nojnhuh
Copy link
Contributor

nojnhuh commented Dec 15, 2023

@nawazkh Feel free to summon the cherry-pick bot for whichever branches we need.

@nawazkh
Copy link
Member Author

nawazkh commented Dec 15, 2023

/cherry-pick release-1.12

@k8s-infra-cherrypick-robot

@nawazkh: once the present PR merges, I will cherry-pick it on top of release-1.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.12

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.

@nawazkh
Copy link
Member Author

nawazkh commented Dec 15, 2023

@CecileRobertMichon @nojnhuh , I wonder if this PR should also be cherry-picked onto release-1.11 branch as well.

I see that CAPI added DeleteForMoveAnnotation in Release-1.5.
https://github.com/kubernetes-sigs/cluster-api/blob/8c12f985c9fb9ac6955b2c14f6320046bc7e2f37/cmd/clusterctl/api/v1alpha3/annotations.go#L33

And since CAPZ consumes CAPI-1.5 in CAPZ-1.11, I want to cherry-pick this PR onto release-1.11 as well.

sigs.k8s.io/cluster-api v1.5.4

But can someone tell me why the earlier PR (#3426) not added to release-1.11 of CAPZ? Am I missing anything?

@CecileRobertMichon
Copy link
Contributor

AFAIK #3426 wasn't cherry picked because it wasn't technically a "bug fix".

We could cherry-pick this one in release-1.11, although 1.11 doesn't have the regression, even if it's not optimal, it still works.

@k8s-ci-robot k8s-ci-robot merged commit 73b3cf1 into kubernetes-sigs:main Dec 15, 2023
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Dec 15, 2023
@k8s-infra-cherrypick-robot

@nawazkh: new pull request created: #4396

In response to this:

/cherry-pick release-1.12

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.

@nawazkh
Copy link
Member Author

nawazkh commented Dec 15, 2023

#3426 wasn't cherry picked because it wasn't technically a "bug fix".

Hmm.. makes sense. This PR is mostly an "enhancement" than a bug fix. I am ok on not cherry-picking this onto release-1.11.

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/bug Categorizes issue or PR as related to a bug. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Similar issue #2656 (AKS Cluster must have at least one system pool) happens on the latest version of capz.
5 participants