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 2021/10/24 03:33:55 UTC

[GitHub] [apisix-ingress-controller] xiongyunhua-star opened a new issue #720: ingress-controller v1.3 Cannot create route with apisix

xiongyunhua-star opened a new issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720


   ### Issue description
   
   pod err log:
   021-10-23T17:07:15+08:00       error   translation/apisix_route.go:184 failed to get service port in backend   {"backend": {"serviceName":"","servicePort":0,"weight":null}, "apisix_route": {"metadata":{"name":"xyhapisix","namespace":"default","selfLink":"/apis/apisix.apache.org/v2beta1/namespaces/default/apisixroutes/xyhapisix","uid":"b2a9e6c2-02ca-4a16-ade8-667df6951ca4","resourceVersion":"16701058","generation":1,"creationTimestamp":"2021-10-23T09:07:14Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v2beta1\",\"kind\":\"ApisixRoute\",\"metadata\":{\"annotations\":{},\"name\":\"xyhapisix\",\"namespace\":\"default\"},\"spec\":{\"http\":[{\"backend\":{\"serviceName\":\"nginx\",\"servicePort\":80},\"match\":{\"hosts\":[\"nginx.xyh.com\"],\"paths\":[\"/*\"]},\"name\":\"http\"}]}}\n"}},"spec":{"http":[{"name":"http","match":{"paths":["/*"],"hosts":["nginx.xyh.com"]},"backend":{"serviceName":"","servicePort":0,"weight":null},"we
 bsocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{}}, "error": "service \"\" not found"}
   2021-10-23T17:07:15+08:00       error   ingress/apisix_route.go:170     failed to translate ApisixRoute v2beta1 {"error": "service \"\" not found", "object": {}}
   2021-10-23T17:07:15+08:00       warn    ingress/apisix_route.go:292     sync ApisixRoute failed, will retry     {"object": {"Type":1,"Object":{"Key":"default/xyhapisix","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null}, "error": "service \"\" not found"}
   2021-10-23T17:07:15+08:00       info    ingress/controller.go:542       service kube-system/data.external.public-elb-cce not found
   2021-10-23T17:07:15+08:00       error   ingress/status.go:108   failed to record status change for ApisixRoute  {"error": "ApisixRoute.apisix.apache.org \"xyhapisix\" is invalid: [: Invalid value: \"\": \"spec.http\" must validate one and only one schema (oneOf). Found none valid, spec.http.backend: Required value]", "name": "xyhapisi
   
   
   
   
   helm chart:
   [root@xyh-az-test-cce-15195-hog4q xyh]# helm ls -n ingress-apisix
   NAME                            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                           APP VERSION
   apisix                          ingress-apisix  1               2021-10-23 16:43:28.679434665 +0800 CST deployed        apisix-0.7.0                    2.10.0     
   apisix-ingress-controller       ingress-apisix  1               2021-10-23 16:44:41.054536479 +0800 CST deployed        apisix-ingress-controller-0.8.0 1.3.0     
   
   
   
   my application:
   [root@xyh-az-test-cce-15195-hog4q xyh]# kubectl get svc nginx
   NAME    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
   nginx   ClusterIP   172.16.114.204   <none>        80/TCP    23h
   [root@xyh-az-test-cce-15195-hog4q xyh]# kubectl get ep  nginx
   NAME    ENDPOINTS                   AGE
   nginx   10.0.0.90:80,10.0.0.99:80   23h
   
   
   my apisixroute.yaml
   apiVersion: apisix.apache.org/v2beta1
   kind: ApisixRoute
   metadata:
     name: xyhapisix
   spec:
     http:
     - name: http
       match:
         hosts:
         - nginx.xyh.com
         paths:
         - "/*"
       backend:
        serviceName: nginx
        servicePort: 80
   
   
   
   
   my configmap:
   1. apisix-ingress-controller-configmap
   apiVersion: v1
   data:
     config.yaml: |
       # log options
       log_level: "info"
       log_output: "stderr"
       http_listen: ":8080"
       enable_profiling: true
       kubernetes:
         kubeconfig: ""
         resync_interval: "6h"
         app_namespaces:
         - "*"
         ingress_class: "apisix"
         ingress_version: "networking/v1"
         apisix_route_version: "apisix.apache.org/v2beta1"
       apisix:
         base_url: http://apisix-admin.ingress-apisix.svc.cluster.local:9180/apisix/admin
         admin_key: "edd1c9f034335f136f87ad84b625c8f1"
   2. apisix
    allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
           - 0.0.0.0/0
    router:
           http: 'radixtree_host_uri'         # radixtree_uri: match route by uri(base on radixtree)
    ssl:
           enable: true
           enable_http2: true
           listen_port: 9443
           ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.10
   - OS (cmd: `uname -a`):centos7
   
   


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



[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950255540


   please using v2beta2 api version of ApisixRoute resource


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



[GitHub] [apisix-ingress-controller] tokers edited a comment on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950253991


   The error logs indicated that the backends field is empty. What's the version of you apisix-ingress-controller?
   
   @tao12345666333 It seems that we don't add a constraint of `backends` that there has to contain at least one element in it.


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



[GitHub] [apisix-ingress-controller] xiongyunhua-star closed issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
xiongyunhua-star closed issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720


   


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



[GitHub] [apisix-ingress-controller] xiongyunhua-star commented on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
xiongyunhua-star commented on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950612678


   > The backend field in ApisixRoute resource is deprecated. Please use backends instead.
   
   resolved


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



[GitHub] [apisix-ingress-controller] gxthrj commented on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950257153


   The backend field in ApisixRoute resource is deprecated. Please use backends instead. 


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



[GitHub] [apisix-ingress-controller] xiongyunhua-star commented on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
xiongyunhua-star commented on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950254962


   > The error logs indicated that the backends field is empty. What's the version of you apisix-ingress-controller?
   > 
   > @tao12345666333 It seems that we don't add a constraint of `backends` that there has to contain at least one element in it.
   
   
   
   > The error logs indicated that the backends field is empty. What's the version of you apisix-ingress-controller?
   > 
   > @tao12345666333 It seems that we don't add a constraint of `backends` that there has to contain at least one element in it.
   
   my apisix-ingress-controller version is v1.3 ,and helm chart version is 0.8.0


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



[GitHub] [apisix-ingress-controller] tokers commented on issue #720: ingress-controller v1.3 Cannot create route with apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #720:
URL: https://github.com/apache/apisix-ingress-controller/issues/720#issuecomment-950253991


   The error logs indicated that the backends field is empty. What's the version of you apisix-ingress-controller?
   
   @tao12345666333 It seems that we don't add a constraint of `backends` that there is at least one element in it.


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