-
Couldn't load subscription status.
- Fork 1.6k
[gw api] Support literal target group ARNs #4406
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
[gw api] Support literal target group ARNs #4406
Conversation
| allGateways = append(allGateways, k8s.NamespacedName(gw)) | ||
|
|
||
| if gw.Status.Conditions != nil { | ||
| for _, cond := range gw.Status.Conditions { |
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.
This is the fix for not cleaning up TG configs due to an invalid Gateway config.
| rules: | ||
| - backendRefs: | ||
| - group: "" | ||
| kind: TargetGroupName |
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: Do we wanna make it more specific to AWS? Calling it AWSTargetGroupName?
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.
Sorry, I buried the reasoning for not using ARN in the code:
// GW API limits names to 253 characters, while a TG ARN might be 256, so just using the name.
Yeah, that's a good idea to make it AWS specific.
| } | ||
|
|
||
| type LiteralTargetGroupConfig struct { | ||
| // GW API limits names to 253 characters, while a TG ARN might be 256, so just using the name. |
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 got it. NVM my earlier comment.
| var literalTargetGroup *LiteralTargetGroupConfig | ||
| var warn error | ||
| var fatal error | ||
| // We only support references of type 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.
NIT : Leftover comment?
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 |
Description
Add support for literal Target Group ARNs in the Gateway API
Summary
This change adds support for specifying literal Target Groups in Gateway API backend references. It also refactors the backend data structure to allow other backend types (like Gateways for ALB as a Target of NLB).
Details
TargetGroupARNMapperutility to be shared.typeSpecificBackendandGetSectionNameTesting:
Checklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯