-
Notifications
You must be signed in to change notification settings - Fork 10
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
AWS BYOK #312
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: David van der Spek <[email protected]>
Signed-off-by: David van der Spek <[email protected]>
Signed-off-by: David van der Spek <[email protected]>
Signed-off-by: David van der Spek <[email protected]>
Signed-off-by: David van der Spek <[email protected]>
} | ||
|
||
input := &eks.ListClustersInput{} | ||
clusters, err3 := eksClient.ListClusters(ctx, input) |
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 should factor this into a separate method probably to keep this one less sprawling
@@ -213,6 +271,16 @@ func (aws *AWSProvider) Context() map[string]interface{} { | |||
return map[string]interface{}{} | |||
} | |||
|
|||
func (aws *AWSProvider) Byok() map[string]interface{} { |
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 there a reason we can't just use the struct as the return val here?
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.
That is what I was trying to do first which also didn't need this function, but for some reason only the values were being returned during templating. But this is indeed something that I think should be cleaned up.
@@ -14,3 +14,13 @@ func Pluralize(one, many string, count int) string { | |||
func ToString(val interface{}) string { | |||
return fmt.Sprintf("%v", val) | |||
} | |||
|
|||
func TruncString(s string, c int) string { |
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 might be nice to move these to the polly lib at some point, but not crucial
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 was actually wanting something more advanced than a simple truncate but couldn't find something better.
} | ||
|
||
var createCluster bool | ||
if err = survey.AskOne(&survey.Confirm{Message: "Do you want to create a new cluster?", Default: true}, &createCluster); 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.
We should also add to this note that if they don't create a cluster, they should only chose a newly created, fresh cluster
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 can add the note, but I'm not sure how strictly necessary this is since clashing applications can be disabled. I didn't add it in the artifact (yet), but I think the only one left is cert-manager. External DNS is limited to the subdomain set in the workspace so might not clash, but potentially could so we can add a way to disable that as well.
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'm thinking more if you have the zalando postgres operator or nginx ingress controller already installed
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.
Same w/ cert manager tbh
Summary
This PR expands the AWS provider so that it allows for people to bring existing cluster and use them with Plural. If a user wants to use an existing cluster they will be able to select a cluster from the region they have choses. Along with this, the max length for cluster names has been expanded to what the providers actually support and this is truncated for the bucket names.
Test Plan
Build CLI locally and test with new and existing clusters that are created by us as well as existing byok clusters.
Checklist