-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,6 +421,7 @@ spec: | |
enum: | ||
- Free | ||
- Paid | ||
- Standard | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Also modified TestDefaultingWebhook to cover webhook SKU tier update. |
||
type: string | ||
required: | ||
- tier | ||
|
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.
I think what Cecile was referring to here was to include this message in the
admission.Warnings
returned byValidateCreate
. 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.