-
Notifications
You must be signed in to change notification settings - Fork 603
✨ Support EKS upgrade policy #5471
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
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 |
Welcome @phuhung273! |
Hi @phuhung273. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
70e3003
to
fd458b2
Compare
Hi @richardcase, can you please help me review this PR if you have time |
/ok-to-test |
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.
Thanks for this @phuhung273 .
Feel free to ping me on the issue or in slack if you want a hand with anything.
// The default value is EXTENDED. Use STANDARD to disable extended support. | ||
// +kubebuilder:validation:Enum=EXTENDED;STANDARD | ||
// +optional | ||
UpgradePolicy *string `json:"upgradePolicy,omitempty"` |
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 generally use a string type alias for something like this and then variables defined for each supported value. Like this: https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/controlplane/eks/api/v1beta2/types.go#L147-L157.
Also, the actual string values are normally lowercase so extended
instead of EXTENDED
. This does mean that when creating the AWS request that some conversion is done, like this for addons: https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/eks/addons.go#L212
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.
Thank you, I didn't know this. Updated to use string type alias.
pkg/cloud/services/eks/cluster.go
Outdated
} | ||
|
||
if err := wait.WaitForWithRetryable(wait.NewBackoff(), func() (bool, error) { | ||
if _, err := s.EKSClient.UpdateClusterConfig(input); err != 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.
There is already a UpdateClusterConfig call in the reconciler, it would be better to use this instead of having a new separate update. https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/eks/cluster.go#L543
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.
Sure, updated to use current UpdateClusterConfig call
24f8b66
to
353e345
Compare
What type of PR is this?
/kind feature
What this PR does / why we need it:
Support EKS upgrade 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):Fixes #5183
Special notes for your reviewer:
Checklist:
Release note: