-
Notifications
You must be signed in to change notification settings - Fork 581
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
✨ Support setting maxHealthyPercentage to configure ASG instance refresh #5140
✨ Support setting maxHealthyPercentage to configure ASG instance refresh #5140
Conversation
ee5f9ee
to
5022162
Compare
5022162
to
a649112
Compare
a649112
to
7ef2f81
Compare
@@ -171,7 +171,20 @@ type RefreshPreferences struct { | |||
// The amount of capacity as a percentage in ASG that must remain healthy | |||
// during an instance refresh. The default is 90. | |||
// +optional | |||
// +kubebuilder:validation:Minimum=0 |
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.
Adding new validations to an existing field may break some users.
Just to confirm, if a user is specifying 101 as the value for this prior to this change would AWS be returning an error? (i assume so but want to check).
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 haven't tested it, but I'd assume so, according to AWS docs. I could leave this out of this PR if you prefer.
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 may be safer...unless we explicitly test it.
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 just removed it, can you take a look again?
return allErrs | ||
} | ||
|
||
if r.Spec.RefreshPreferences.MaxHealthyPercentage != nil && r.Spec.RefreshPreferences.MinHealthyPercentage == nil { |
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 could also consider using CEL instead of new validation webhook checks.
However, we don't have any CEL at present so its fine to be consistent.
7ef2f81
to
e0b119c
Compare
Until the e2e pass: /hold But from my side: /lgtm |
/test ? |
@richardcase: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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-sigs/prow repository. |
/test pull-cluster-api-provider-aws-e2e |
/test pull-cluster-api-provider-aws-e2e |
The e2e is failing because the AMIs are no longer available 😢 We have 2 options:
Personally, i'd lean towards 2). But would be good to get others view on this? @nrb @dlipovetsky @AndiDog any thoughts? |
/test pull-cluster-api-provider-aws-e2e |
I don't think this PR will break the e2e tests since it's adding a new field. Having said that, waiting 1 week for this to get merged is fine by 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
/test pull-cluster-api-provider-aws-e2e
No need to block this PR, IMO, since it's scoped and a very low-risk change.
e0b119c
to
9a7ec73
Compare
/test pull-cluster-api-provider-aws-e2e |
@fiunchinho: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
We have two other approvals, and I agree that we should not gate this on fixing the AMIs. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb, richardcase 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
It allows to configure the
MaxHealthyPercentage
setting of the ASGs instance refresh, to better control how instances are added and terminated.Special notes for your reviewer:
This is adding a new field to the AWSMachinePool CRD, and it's not a breaking change.
Checklist:
Release note: