AlinsRan commented on code in PR #2583:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2583#discussion_r2386470567


##########
internal/webhook/v1/ingress_webhook.go:
##########
@@ -126,12 +140,13 @@ func (v *IngressCustomValidator) ValidateCreate(_ 
context.Context, obj runtime.O
 
        // Check for unsupported annotations and generate warnings
        warnings := checkUnsupportedAnnotations(ingress)
+       warnings = append(warnings, v.collectReferenceWarnings(ctx, ingress)...)
 
        return warnings, nil
 }
 
 // ValidateUpdate implements webhook.CustomValidator so a webhook will be 
registered for the type Ingress.
-func (v *IngressCustomValidator) ValidateUpdate(_ context.Context, oldObj, 
newObj runtime.Object) (admission.Warnings, error) {
+func (v *IngressCustomValidator) ValidateUpdate(ctx context.Context, oldObj, 
newObj runtime.Object) (admission.Warnings, error) {

Review Comment:
   I’ve noticed that many resources don’t check whether they are managed by the 
current controller. For example, regarding annotations, different controllers 
may have different implementations.



-- 
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]

Reply via email to