Baoyuantop commented on issue #2722:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2722#issuecomment-3956359889

   Hi @kladiv, the controller logic is designed to look for an 
ApisixPluginConfig resource with the specified name within the same namespace 
as your Ingress resource.For the annotation to be interpreted correctly, please 
ensure the following conditions are met:
   
   1. ApisixPluginConfig Exists: You must have an ApisixPluginConfig resource 
created in the same Kubernetes namespace as your Ingress resource. The name of 
this ApisixPluginConfig must exactly match the value you provided in the 
annotation.
   
   ```
   # Must be in the same namespace as your Ingress
   apiVersion: apisix.apache.org/v2
   kind: ApisixPluginConfig
   metadata:
     name: my-plugin # This name must match the annotation value
   spec:
     ingressClassName: apisix
     plugins:
       - name: some-plugin
         enable: true
         config:
           # ... plugin configuration
   ```
   
   2. Matching ingressClassName: If your ApisixPluginConfig specifies an 
ingressClassName in its spec, it must match the ingressClassName of your 
Ingress resource. If the Ingress resource doesn't explicitly define an 
ingressClassName, it will use the default one for the cluster. The controller 
will only apply the plugin configuration if the class names match.
   
   
   Could you please verify that the ApisixPluginConfig resource named my-plugin 
exists in the same namespace as your Ingress and that their ingressClassName 
settings are compatible? If the issue persists after confirming these points, 
could you please provide the YAML manifests for both your Ingress and 
ApisixPluginConfig resources? That would be very helpful for further 
troubleshooting.


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