-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add EKS (aws) ProviderCluster implementation #24
base: main
Are you sure you want to change the base?
Conversation
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 need to fix the ClusterID
bits, we can return nothing here if we can't find something.
|
||
var err error | ||
clusters, clusterID := []*providers.ProviderCluster{}, "" | ||
logger := log.FromContext(ctx).WithValues("name", cd.Name, "type", cd.Spec.Type) |
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.
add ns here too
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.
Its already included, rm name
tokenPrefix = "k8s-aws-v1." | ||
tokenAgeMins = 15 | ||
clusterNameHeader = "x-k8s-aws-id" | ||
) |
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.
Lift these to the top of the file or keep here?
return azure.NewAzureProvider(acd.Spec.AKS.SubscriptionID), nil | ||
} else if acd.Spec.Type == "eks" { | ||
return aws.NewAWSProvider(acd.Spec.EKS.Region), 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.
Be more defensive here to avoid a panic in case spec.EKS/spec.AKS is not present
100a572
to
d8c855f
Compare
2de16ca
to
df699dd
Compare
This adds support for validating that the configuration for EKS and AKS clusters is provided when the type is selected.
This PR adds support for AWS EKS. That includes:
ListClusters
: Retrieve EKS clusters and kubeconfigs.ClusterID
: Returns unique cluster ID given its name.