AlinsRan commented on code in PR #2543:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2543#discussion_r2328940199
##########
internal/controller/utils.go:
##########
@@ -1368,7 +1339,12 @@ func ProcessIngressClassParameters(tctx
*provider.TranslateContext, c client.Cli
return nil
}
-func GetIngressClass(ctx context.Context, c client.Client, log logr.Logger,
ingressClassName string) (*networkingv1.IngressClass, error) {
+func FindMatchingIngressClass(ctx context.Context, c client.Client, log
logr.Logger, obj client.Object) (*networkingv1.IngressClass, error) {
+ ingressClassName := ExtractIngressClass(obj)
+ return FindMatchingIngressClassByName(ctx, c, log, ingressClassName)
+}
+
+func FindMatchingIngressClassByName(ctx context.Context, c client.Client, log
logr.Logger, ingressClassName string) (*networkingv1.IngressClass, error) {
Review Comment:
IngressClass is the main watch object, and all behavior is based on local
caching, so it does not generate any network calls.
--
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]