AlinsRan commented on code in PR #2543:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2543#discussion_r2324673231
##########
internal/controller/apisixglobalrule_controller.go:
##########
@@ -84,11 +82,15 @@ func (r *ApisixGlobalRuleReconciler) Reconcile(ctx
context.Context, req ctrl.Req
tctx := provider.NewDefaultTranslateContext(ctx)
// get the ingress class
- ingressClass, err := GetIngressClass(tctx, r.Client, r.Log,
globalRule.Spec.IngressClassName)
+ ingressClass, err := FindMatchingIngressClass(tctx, r.Client, r.Log,
&globalRule)
if err != nil {
Review Comment:
https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/client/client.go#L343-L362
The behavior here is to query the local cache.
IngressClass is our main watch resource, so there won't be any network
issues.
--
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]