-
Notifications
You must be signed in to change notification settings - Fork 627
✨ 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
Open
CharlieR-o-o-t
wants to merge
1
commit into
kubernetes-sigs:main
Choose a base branch
from
CharlieR-o-o-t:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,12 @@ type AWSManagedControlPlaneSpec struct { //nolint: maligned | |
// +optional | ||
IAMAuthenticatorConfig *IAMAuthenticatorConfig `json:"iamAuthenticatorConfig,omitempty"` | ||
|
||
// AccessConfig specifies the EKS cluster access configuration. | ||
// It defines the authentication mode and whether to bootstrap the cluster creator | ||
// as a cluster-admin. | ||
// +optional | ||
AccessConfig AccessConfig `json:"accessConfig,omitempty"` | ||
|
||
// Endpoints specifies access to this cluster's control plane endpoints | ||
// +optional | ||
EndpointAccess EndpointAccess `json:"endpointAccess,omitempty"` | ||
|
@@ -200,7 +206,10 @@ type AWSManagedControlPlaneSpec struct { //nolint: maligned | |
// bare EKS cluster without EKS default networking addons | ||
// If you set this value to false when creating a cluster, the default networking add-ons will not be installed | ||
// +kubebuilder:default=true | ||
BootstrapSelfManagedAddons bool `json:"bootstrapSelfManagedAddons,omitempty"` | ||
BootstrapSelfManagedAddons *bool `json:"bootstrapSelfManagedAddons,omitempty"` | ||
|
||
// +optional | ||
AutoMode *AutoMode `json:"autoMode,omitempty"` | ||
|
||
// RestrictPrivateSubnets indicates that the EKS control plane should only use private subnets. | ||
// +kubebuilder:default=false | ||
|
@@ -221,6 +230,42 @@ type KubeProxy struct { | |
Disable bool `json:"disable,omitempty"` | ||
} | ||
|
||
// AccessConfig is the access configuration for the cluster. | ||
type AccessConfig struct { | ||
// AuthenticationMode mode controls how Kubernetes API authentication is performed: | ||
// - CONFIG_MAP — uses only the aws-auth ConfigMap (legacy mode). | ||
// - API — uses only EKS Access Entries (aws-auth is ignored). | ||
// - API_AND_CONFIG_MAP — enables both Access Entries and aws-auth. | ||
AuthenticationMode *string `json:"authenticationMode,omitempty"` | ||
|
||
// BootstrapAdminPermissions specifies whether or not the cluster creator IAM principal was set as a cluster | ||
// admin access entry during cluster creation time. | ||
// +optional | ||
BootstrapAdminPermissions *bool `json:"bootstrapAdminPermissions,omitempty"` | ||
} | ||
|
||
// AutoMode is the EKS Auto Mode. | ||
// allows to create cluster with aws compute, ebs, elb capabilities. | ||
type AutoMode struct { | ||
// Enabled will enable EKS Auto Mode. | ||
// +kubebuilder:default=false | ||
Enabled bool `json:"enabled,omitempty"` | ||
// Compute capability configuration for EKS Auto Mode. | ||
// +optional | ||
Compute Compute `json:"compute,omitempty"` | ||
} | ||
|
||
// Compute allows to run compute capability with EKS AutoMode. | ||
type Compute struct { | ||
NodePools []string `json:"nodePools,omitempty"` | ||
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. needs a comment describing the field. |
||
// NodeRoleArn the ARN of the IAM Role EKS will assign to EC2 Managed Instances in your EKS | ||
// Auto Mode cluster. This value cannot be changed after the compute capability of | ||
// EKS Auto Mode is enabled. For more information, see the IAM Reference in the | ||
// Amazon EKS User Guide. | ||
// +optional | ||
NodeRoleArn *string `json:"nodeRoleArn,omitempty"` | ||
} | ||
|
||
// VpcCni specifies configuration related to the VPC CNI. | ||
type VpcCni struct { | ||
// Disable indicates that the Amazon VPC CNI should be disabled. With EKS clusters the | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is it possible to rebase your changes off https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/5578/files -- we're implementing the same changes there.
Rebasing your changes off that would make the PR much smaller and less work down the line -- considering that has a lot of reviews already
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, will do