-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Subnet Discovery for Gateway API #4137
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
Subnet Discovery for Gateway API #4137
Conversation
6cd5f05
to
8189323
Compare
} | ||
|
||
for i, elbSubnet := range elbSubnets { | ||
fmt.Println("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.
Nit: leftover log
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.
Will fix
return nil | ||
} | ||
|
||
if len(elbSubnets) != len(subnetConfig) { |
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.
As this is common error among all the mutators, lets check this once before starting the mutators for each config to avoid duplicate code.
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.
Nice catch. I did this on purpose because I wanted the mutators to be agnostic of each other. This was to future proof these mutators where we might run a subset of them in the future.
/lgtm |
3441e11
to
d87084c
Compare
d87084c
to
3c6f92a
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shraddhabang, zac-nixon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue
Description
This PR introduces subnet discovery for the Gateway API. It sets up some of the basic model builders to resolve the information needed to construct the ELB Subnets, such as the LB scheme and IP Address Type.
The goal here is to make re-usable logic for both NLB and ALB subnet creation; essentially adding, merging, and refactoring the existing subnet logic from the service and ingress packages.
https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/service/model_build_load_balancer.go#L323
https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_load_balancer.go#L200
The goal I have in mind is to prevent one big builder object like the Ingress and Service models currently have. Instead, I'd like to strive more granular pieces of the model builder.
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯