stillfox-lee opened a new issue, #1424:
URL: https://github.com/apache/apisix-ingress-controller/issues/1424

   ### Issue description
   
   create GatewayClass resource like:
   ```yaml
   apiVersion: gateway.networking.k8s.io/v1alpha2
   kind: GatewayClass
   metadata:
     namespace: ingress-apisix-e2e-tests-default-624859000
     name: test-gateway-class
   spec:
     controllerName: apisix.apache.org/gateway-controller
   ```
   
   GatewayClass Status still be "Waiting for controller":
   
   ```bash
   ❯ kubectl get gatewayclass -n ingress-apisix-e2e-tests-default-624859000 -o 
yaml
   apiVersion: v1
   items:
   - apiVersion: gateway.networking.k8s.io/v1alpha2
     kind: GatewayClass
     metadata:
       annotations:
         kubectl.kubernetes.io/last-applied-configuration: |
           
{"apiVersion":"gateway.networking.k8s.io/v1alpha2","kind":"GatewayClass","metadata":{"annotations":{},"name":"test-gateway-class"},"spec":{"controllerName":"apisix.apache.org/gateway-controller"}}
       creationTimestamp: "2022-11-01T07:23:37Z"
       generation: 1
       name: test-gateway-class
       resourceVersion: "5288"
       uid: 4eec3b01-632b-46c3-9376-5e0864d486cd
     spec:
       controllerName: apisix.apache.org/gateway-controller
     status:
       conditions:
       - lastTransitionTime: "1970-01-01T00:00:00Z"
         message: Waiting for controller
         reason: Waiting
         status: Unknown
         type: Accepted
   kind: List
   metadata:
     resourceVersion: ""
   ```
   As we can see, `Namespace` field didn't show in the Gatewayclass resource. 
But event handler 
https://github.com/apache/apisix-ingress-controller/blob/6b38e806b0862b98e7565934b47143230d23bad8/pkg/providers/gateway/gateway_class.go#L206-L208
 will check namespace.
   May be we should just use `controllerName` to filter GatewayClass resource.
   
   ### Environment
   
   - your apisix-ingress-controller version (output of 
apisix-ingress-controller version --long): master branch
   - your Kubernetes cluster version (output of kubectl version): v1.21.1
   - if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (uname -a): kind
   
   
   ### Minimal test code / Steps to reproduce
   
   like description
   
   ### Actual result
   
   no
   
   ### Error log
   
   no
   
   ### Expected result
   
   GatewayClass Status should be updated.


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