You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/04 08:08:18 UTC

[GitHub] [apisix-ingress-controller] LivesMountain commented on issue #987: bug: update apisixroute.yaml spec.http.name from a981a76 to api,Sometimes two routes are generated

LivesMountain commented on issue #987:
URL: https://github.com/apache/apisix-ingress-controller/issues/987#issuecomment-1117035954

   I did not modify metadata.name  ,I changed spec.http.name。
   apisixroute1.yaml
   `apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: nginx
     namespace: default
   spec:
     http:
     - name: a981a76
       match:
         hosts:
         - "test.apisixroute.com"
         paths:
         - "/*"
       backends:
       - serviceName: nginx
         servicePort: 80`
   
   kubectl apply -f apisixroute1.yaml
   kubectl describe ar nginx
   ![image](https://user-images.githubusercontent.com/19382017/166641734-fdc9dc26-0f35-4c42-a937-fb5cbb755c20.png)
   dashboard
   <img width="1117" alt="1651650709" src="https://user-images.githubusercontent.com/19382017/166641821-9af69be8-5bd2-4710-814d-a636a03f6570.png">
   
   apisixroute2.yaml
   `apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: nginx
     namespace: default
   spec:
     http:
     - name: api
       match:
         hosts:
         - "test.apisixroute.com"
         paths:
         - "/*"
       backends:
       - serviceName: nginx
         servicePort: 80`
   
   kubectl apply -f apisixroute2.yaml
   kubectl describe ar nginx
   ![image](https://user-images.githubusercontent.com/19382017/166642139-59ec7e93-9f00-44a8-af7a-20e2540a6a10.png)
   dashboard
   ![image](https://user-images.githubusercontent.com/19382017/166642194-b5c0af17-15ba-4630-b053-8e44c5c9b2a8.png)
   **The above is normal**
   **In practice, however,in some cases,apisixRoute update will result in two route records in etcd,It looks like a new route record was created instead of updating the old route.  **


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org