-
Notifications
You must be signed in to change notification settings - Fork 11
WIP: feat: add support for EKS service on AWS #472
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
Beyond code, can you squash your commits?, also consider a message in format as:
|
pkg/provider/aws/action/eks/eks.go
Outdated
} | ||
} | ||
// Create a Security Group that we can use to actually connect to our cluster | ||
clusterSg, err := ec2.NewSecurityGroup(ctx, "cluster-sg", &ec2.SecurityGroupArgs{ |
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.
You can use the sg utility in the code to reduce this content:
https://github.com/redhat-developer/mapt/blob/main/pkg/provider/aws/action/fedora/fedora.go#L308
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.
Ok, I incorporated it, but I have issues with the networking and subnets. See the below comment
pkg/provider/aws/action/eks/eks.go
Outdated
func (r *EKSRequest) deployer(ctx *pulumi.Context) error { | ||
// Read back the default VPC and public subnets, which we will use. | ||
t := true | ||
vpc, err := ec2.LookupVpc(ctx, &ec2.LookupVpcArgs{Default: &t}) |
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.
You can use https://github.com/redhat-developer/mapt/blob/main/pkg/provider/aws/action/fedora/fedora.go#L192 to create the networking, typically each action create its own stack of networking as that will not increase cost and it will allow to isolate the service
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 tried to use it now, but I encountered an issue where the EKS cluster requires at least two subnets in two availability zones, but the current implementation of networking uses only one. I tried to extend it, but I got stuck on this as it became increasingly complex. I created the network_extended/network_extended.go
based on network.go
for trying to implement it (because editing network.go
kept breaking other things that use it).
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.
From this: https://github.com/redhat-developer/mapt/pull/472/files#diff-4593130eb8793764853fb6763e38a250579d0ca6a8a3f3b7c6681782cdd5b842R85-R88 I always get only one subnet 🤔
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.
With the networking, I figured out that I need to define multiple CIDRs, but now I'm not sure how to attach the subnets to the VPC (error: * updating EKS Cluster (eks-cluster-5370d02) VPC configuration: operation error EKS: UpdateClusterConfig, https response error StatusCode: 400, RequestID: 591ad7dc-961f-46b9-804b-21498734fb05, InvalidRequestException: Subnets specified must belong to the VPC: vpc-03ae06bf486414612
)
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.
you can use this one to get 3 Azs..2 Public Subnet...Privates and Intra...if you just need 3 Public or whatever you can use that https://github.com/redhat-developer/mapt/blob/main/pkg/provider/aws/modules/network/standard/standard.go#L46 network request with your expected values...i.e only the PublicSubnet blocks...the create and that should do the trick
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.
Ah, yes, this works great 😄 Thank you! I got it working using that with ease. It should've caught my eye 😓
f424b4a
to
ebf9b89
Compare
Review - securityGroups Review - use Network, still only one subnet (required 2+) Define multiple CIDRs Remove unused Use standard networking az
Hi, I resolved the issues with networking, and I added an option to install AWS Load Balancer Controller (following the AWS docs), as we require this to be installed for RHDH testing. |
Add support to create AWS EKS clusters, currently without spot instances.
I might need to add support for configuring AWS extensions to allow RHDH deployments for testing.
#357, https://issues.redhat.com/browse/RHIDP-6637
Main content of this PR:
Smaller fixes and improvements
contants
->constants
(incmd/mapt/cmd/aws/constants/
)