ronething commented on code in PR #2564:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2564#discussion_r2367065546
##########
internal/controller/indexer/indexer.go:
##########
@@ -499,6 +534,24 @@ func HTTPRouteServiceIndexFunc(rawObj client.Object)
[]string {
return keys
}
+func TCPPRouteServiceIndexFunc(rawObj client.Object) []string {
+ hr := rawObj.(*gatewayv1alpha2.TCPRoute)
+ keys := make([]string, 0, len(hr.Spec.Rules))
+ for _, rule := range hr.Spec.Rules {
+ for _, backend := range rule.BackendRefs {
+ namespace := hr.GetNamespace()
+ if backend.Kind != nil && *backend.Kind != "Service" {
Review Comment:
use internaltypes.KindService instead of hard code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]