-
Notifications
You must be signed in to change notification settings - Fork 430
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
Replace Paid SKU tier with Standard #4045
Conversation
/kind api-change cancel |
@maciaszczykm: The label(s) In response to this:
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. |
/remove-kind api-change |
As pull-cluster-api-provider-azure-apidiff failed should I update just the variable value and not the name? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4045 +/- ##
==========================================
+ Coverage 56.63% 56.65% +0.02%
==========================================
Files 187 187
Lines 19131 19143 +12
==========================================
+ Hits 10834 10846 +12
Misses 7668 7668
Partials 629 629
☔ View full report in Codecov by Sentry. |
/test pull-cluster-api-provider-azure-e2e |
@@ -420,7 +420,7 @@ spec: | |||
description: Tier - Tier of an AKS cluster. | |||
enum: | |||
- Free | |||
- Paid | |||
- Standard |
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.
@CecileRobertMichon Would it make sense here for the API to accept all of Free, Standard, and Paid and translate Paid to Standard under the hood? That way other users wouldn't have to immediately 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.
+1
We can even use a webhook warning to warn the user that "Paid" is deprecated and has been replaced by "Standard" now that those are available
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.
Done. Updated validation and webhook. Added deprecation comment to PaidManagedControlPlaneTier.
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.
Also modified TestDefaultingWebhook to cover webhook SKU tier update.
b5124f4
to
fa80059
Compare
fa80059
to
74251b1
Compare
// PaidManagedControlPlaneTier has been replaced with StandardManagedControlPlaneTier since v2023-02-01. | ||
if m.Spec.SKU != nil && m.Spec.SKU.Tier == PaidManagedControlPlaneTier { | ||
m.Spec.SKU.Tier = StandardManagedControlPlaneTier | ||
ctrl.Log.WithName("AzureManagedControlPlaneWebHookLogger").Info("Paid SKU tier is deprecated and has been replaced by Standard") |
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.
We can even use a webhook warning to warn the user that "Paid" is deprecated and has been replaced by "Standard" now that those are available
I think what Cecile was referring to here was to include this message in the admission.Warnings
returned by ValidateCreate
. It looks like controller-runtime doesn't allow us to return those warnings from the defaulting webhook.
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.
That's right. However, if we're changing the value in the defaulting webhook, we'll never print the warning since the validation webhook runs after defaulting (so by the time we reach ValidateCreate
we would have already changed the value).
I think the way it's implemented now is probably good enough, wdyt @nojnhuh ?
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.
It seems like it wouldn't be too messy to do the validation in the webhook and the Paid->Standard translation further down the road, but I agree keeping everything in the defaulting webhook works just as well.
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: d12f64a5d3a0487b48f8bf21c39788284e67d465
|
should we backport this? |
Yes, I would like to use it ASAP. |
/cherry-pick release-1.11 I'm assuming this doesn't need to get cherry-picked to release-1.10 since only 1.11 has the SDK changes |
@CecileRobertMichon: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you. In response to this:
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. |
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: 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 |
@CecileRobertMichon: new pull request created: #4050 In response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it: Current SKU tiers seem to be not compatible with the API.
When trying to create Azure managed cluster with SKU tier set to
Paid
I got:Setting it to
Standard
is not allowed at the moment:It makes the field unusable.
This PR updates Paid SKU tier to Standard.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Special notes for your reviewer:
TODOs:
Release note: