-
Notifications
You must be signed in to change notification settings - Fork 431
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 ASO pause logic #3788
add ASO pause logic #3788
Conversation
(squash reminder) |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3788 +/- ##
==========================================
+ Coverage 54.73% 54.77% +0.03%
==========================================
Files 187 187
Lines 19051 19098 +47
==========================================
+ Hits 10427 10460 +33
- Misses 8059 8070 +11
- Partials 565 568 +3
☔ View full report in Codecov by Sentry. |
/assign |
/retest |
1 similar comment
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 15ac076de78034c8359b174b18bc6f875e1e916e
|
squashed! |
Pushed one tiny to squash: |
/retest |
@@ -37,6 +37,9 @@ import ( | |||
const ( | |||
// ReconcilePolicyAnnotation is the annotation key for ASO's reconcile policy mechanism. | |||
ReconcilePolicyAnnotation = "serviceoperator.azure.com/reconcile-policy" | |||
// PrePauseReconcilePolicyAnnotation is the annotation key for the value of | |||
// ReconcilePolicyAnnotation that was set before pausing. | |||
PrePauseReconcilePolicyAnnotation = "sigs.k8s.io/cluster-api-provider-azure-pre-pause-reconcile-policy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the naming pattern of the annotation key different for ReconcilePolicyAnnotation
and PrePauseReconcilePolicyAnnotation
i.e serviceoperator.azure.com
vs sigs.k8s.io
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serviceoperator.azure.com/reconcile-policy
is defined and consumed by ASO: https://azure.github.io/azure-service-operator/guide/annotations/#serviceoperatorazurecomreconcile-policy
Whereas sigs.k8s.io/cluster-api-provider-azure-pre-pause-reconcile-policy
is only consumed by CAPZ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
( Just one minor question )
LGTM label has been added. Git tree hash: 989f97ba9b06ec004795da3245109bade7e3334a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mboersma 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 |
squashed! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements logic to pause ASO resources using the plumbing set up by #3735.
Specifically, the
serviceoperator.azure.com/reconcile-policy
annotation on ASO resources will be set toskip
and the previous value will also be stored in a CAPZ-specificsigs.k8s.io/cluster-api-provider-azure-pre-pause-reconcile-policy
annotation. Then when a Cluster is unpaused and reconciliation resumes normally, thepre-pause-reconcile-policy
annotation will be used to restore the value as it was before the Cluster was paused. The reconcile policy cannot unconditionally be changed back tomanage
because ASO representations of BYO Azure resources (like ones created in the portal or CLI) will already be annotated with theskip
reconcile policy.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:
TODOs:
Release note: