[feat:gwapi] Add context-aware TargetGroupConfiguration and LoadBalancerConfiguration CRDs for Gateway API #4096
+2,698
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit implements a new context-aware TargetGroupConfiguration mechanism for the Gateway API. We are introducing a new Namespace scoped TargetGroupConfiguration CRD which will give more granular control over Target group properties for the tgs provisioned for Gateway API resources. It adds a
RouteConfiguration
map to the TargetGroupConfiguration CRD, enabling users to define Target Group properties specific to individual routes. Users can use the same map to define the default configuration for the routes using "::" as route name to provide fallback configuration. A longest-prefix matching algorithm will be implemented to resolve the correct TargetGroupDefinition based on the route name (KIND:NAME:NAMESPACE).This change addresses limitations in the previous approach taken by the controller in Ingress/Service resources, enhancing service reusability and providing granular control over Target Group properties.
Example CRD looks like this
Notes: All the target groups provisioned for the routes in
example-ns
namespace for the service specified intargetReference
will by default have vpcID, IpAddressType, Tags and TargetGroupAttributes values specified in route section named "::example-ns". The specific tg properties will be applied to specific tgs provisioned for Routes defined in CRD.As this feature is currently under development, this PR also adds this new CRD to separate directory to keep our existing IngressClassParams and TargetGroupBinding CRDs segregated.
The LoadBalancerConfiguration CRD is added for configuration load balancer config at a granular level for both GatewayClass and Gateways.
Example:
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯