-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[feat:gwapi] Add context-aware TargetGroupConfiguration and LoadBalancerConfiguration CRDs for Gateway API #4096
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
Conversation
…es to map Gateway API routes
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shraddhabang 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 |
// | ||
// Defaults to "Service" when not specified. | ||
// | ||
// ExternalName services can refer to CNAME DNS records that may live |
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.
Probably should drop the ExternalName blurb as it's not applicable to our use-case. We just want the CRD to attach to a 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.
Done.
…rConfiguration CRDs for Gateway API
/lgtm |
// +optional | ||
TargetType *TargetType `json:"targetType,omitempty"` | ||
|
||
// protocolVersion [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC , HTTP1 and HTTP2 |
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.
note for later: this should be added to the kubebuilder validation
Value string `json:"value"` | ||
} | ||
|
||
// TODO -- these can be used to set what generation the gateway is currently on to track progress on reconcile. |
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 realized that it might be tricky to track this status when the config is shared among many gateways :x lets think about this some more
New changes are detected. LGTM label has been removed. |
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?! 🤯