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

add pause handling for AzureMachine, AzureManagedMachinePool, AzureMachinePool #3808

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Aug 7, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:

This PR follows up from #3735 and #3783 to set up the remaining controllers to handle pausing ASO resources when the parent Cluster is paused. These changes aren't strictly necessary until more services are re-implemented to use ASO, but I figured it would be worth merging ahead of time so we don't have to remember to do that later.

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

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 7, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 7, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Aug 8, 2023

(squash reminder)
/hold

@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 Aug 8, 2023
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 79.24% and project coverage change: +0.32% 🎉

Comparison is base (a0dcdea) 54.86% compared to head (fb83d3d) 55.18%.
Report is 4 commits behind head on main.

❗ Current head fb83d3d differs from pull request most recent head 22fa554. Consider uploading reports for the commit 22fa554 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3808      +/-   ##
==========================================
+ Coverage   54.86%   55.18%   +0.32%     
==========================================
  Files         188      188              
  Lines       19348    19427      +79     
==========================================
+ Hits        10615    10721     +106     
+ Misses       8151     8111      -40     
- Partials      582      595      +13     
Files Changed Coverage Δ
controllers/azuremanagedmachinepool_controller.go 55.00% <71.42%> (+2.08%) ⬆️
exp/controllers/azuremachinepool_controller.go 43.65% <72.72%> (+13.10%) ⬆️
controllers/azuremanagedmachinepool_reconciler.go 55.31% <75.00%> (+2.88%) ⬆️
controllers/azuremachine_reconciler.go 51.61% <80.00%> (+6.71%) ⬆️
controllers/azuremachine_controller.go 79.04% <80.95%> (-0.50%) ⬇️
controllers/azuremanagedcontrolplane_controller.go 40.66% <100.00%> (ø)
controllers/helpers.go 56.44% <100.00%> (+2.20%) ⬆️
exp/controllers/azuremachinepool_reconciler.go 88.00% <100.00%> (+3.78%) ⬆️

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

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 9, 2023
@mboersma mboersma added this to the v1.11 milestone Aug 9, 2023
@mboersma
Copy link
Contributor

/assign

controllers/azuremachine_reconciler.go Outdated Show resolved Hide resolved
controllers/helpers.go Show resolved Hide resolved
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Aug 10, 2023

/retest

1 similar comment
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Aug 11, 2023

/retest

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -1310,3 +1311,214 @@ func Test_ManagedMachinePoolToInfrastructureMapFunc(t *testing.T) {
})
}
}

func TestClusterPauseChangeAndInfrastructureReady(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

💚

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

LGTM label has been added.

Git tree hash: 277b94ccf39f98172f28bcd856a01b4d130669d1

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
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 Aug 11, 2023
@nojnhuh nojnhuh force-pushed the aso-pause-controllers branch from fb83d3d to 22fa554 Compare August 13, 2023 17:45
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Aug 13, 2023

squashed!
/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 Aug 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit 5b048e8 into kubernetes-sigs:main Aug 13, 2023
@nojnhuh nojnhuh deleted the aso-pause-controllers branch August 13, 2023 20:20
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants