-
Notifications
You must be signed in to change notification settings - Fork 421
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
delete AKS extensions when they are removed from spec #5139
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @willie-yao |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5139 +/- ##
==========================================
- Coverage 51.25% 51.24% -0.01%
==========================================
Files 273 273
Lines 24651 24656 +5
==========================================
+ Hits 12634 12636 +2
- Misses 11231 11234 +3
Partials 786 786 ☔ View full report in Codecov by Sentry. |
svc.Specs = scope.AKSExtensionSpecs() | ||
svc.ConditionType = infrav1.AKSExtensionsReadyCondition | ||
return &Service{ | ||
Scope: scope, | ||
Service: svc, | ||
} | ||
} | ||
|
||
func list(ctx context.Context, client client.Client, opts ...client.ListOption) ([]*asokubernetesconfigurationv1.Extension, error) { |
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.
nit: Can you name this to something more descriptive like listAKSExtensions
?
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.
Does the signature and this existing in the aksextensions
package make that clear? I've been trying to optimize these for copy-paste-ability since it's pretty much the same between all the ASO services so adding the type again here would be one more place to change.
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.
sounds good to me!
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: fa04ebf3c6227bd3404783a1effbf5de28ff7ae3
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
Lately our AKS e2e test has been flakily timing out when deleting the cluster. The cause according to #5120 is that the traefik extension is failing to delete, which seems to only happen when the extension's Pod is running on a Windows Node. Even though the e2e test creates a taint on the Windows nodepool to prevent this, the taint is removed before the k8s version upgrades take place which recycles all the nodes and causes pods to be rescheduled.
This change makes it possible to remove elements from an AzureManagedControlPlane's
spec.extensions
and the removed extensions will be deleted from the AKS cluster. This enables the e2e test to remove the extensions it adds before dropping the taint on the Windows nodepool to ensure traefik is never running on a Windows Node.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:
TODOs:
Release note: