-
Notifications
You must be signed in to change notification settings - Fork 623
✨ Add ability to control "EKS Auto Mode" for EKS clusters #5642
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 @CharlieR-o-o-t! |
Hi @CharlieR-o-o-t. 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. |
/ok-to-test |
/retest-required |
/retest-required |
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 @CharlieR-o-o-t for working on this, I added some initial thoughts.
// EKSAutoMode indicates the EKS Auto Mode state for control-plane. | ||
// If you set this value to false, the following params will be disabled for EKS: | ||
// AWS::EKS::Cluster KubernetesNetworkConfig ElasticLoadBalancing Enabled -> false. | ||
// AWS::EKS::Cluster StorageConfig blockStorage Enabled -> false. | ||
// AWS::EKS::Cluster ComputeConfig Enabled -> false. | ||
// +kubebuilder:default=true | ||
EKSAutoMode *bool `json:"eksAutoMode"` |
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.
Can we name the field autoMode
instead of eksAutoMode
?
Also, IMO, this should not default to true and field should be optional as upstream EKS service does not default to AutoMode.
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.
yes, my bad. For some reason though it's default feature.
pkg/cloud/services/eks/cluster.go
Outdated
} else { | ||
netConfig.ElasticLoadBalancing = &ekstypes.ElasticLoadBalancing{Enabled: aws.Bool(false)} | ||
} |
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 we don't need this else as the field should be unset if autoMode is disabled.
ComputeConfig: &ekstypes.ComputeConfigRequest{Enabled: aws.Bool(false)}, | ||
StorageConfig: &ekstypes.StorageConfigRequest{BlockStorage: &ekstypes.BlockStorage{Enabled: aws.Bool(false)}}, |
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.
Let's keep the ComputeConfig
and StorageConfig
unset when autoMode disabled.
pkg/cloud/services/eks/cluster.go
Outdated
if s.scope.EKSAutoMode() { | ||
input.ComputeConfig = &ekstypes.ComputeConfigRequest{Enabled: aws.Bool(true)} | ||
input.StorageConfig = &ekstypes.StorageConfigRequest{BlockStorage: &ekstypes.BlockStorage{Enabled: aws.Bool(true)}} |
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.
The computeConfig
has nodepools
and if this is provided, it should also have nodeRoleArn
. This is crucial if user wants to use default nodepools (general-purpose and system). When this is not specified, the user will need to create own nodepools.
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.
good point, will handle nodepools/nodeRoleArn + validation
Signed-off-by: Siarhei Rasiukevich <[email protected]>
@CharlieR-o-o-t: The following tests 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. |
// Set default value for AutoMode | ||
if r.Spec.AutoMode == nil { | ||
r.Spec.AutoMode = aws.Bool(false) | ||
} |
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.
shouldn't the default be true considering this was always on by default in previous versions? a change like this could be breaking for users
Thanks for review, will add new version soon. |
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it
This PR introduces support for controlling EKS Auto Mode for EKS clusters managed with AWSManagedControlPlane CRD.
Previously, the EKSAutoMode was always enabled by default, for someone it's not needed.
With this change, users can explicitly set the spec.eksAutoMode field in the AWSManagedControlPlane resource to true or false based on their needs.
Special notes for your reviewer:
Includes extra fix:
AWSManagedControlPlane.spec.bootstrapSelfManagedAddons was always defaulted to true by webhook.
Checklist:
Release note: