apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

request help: apisix-ingress-controller create stream_route

Open jhon-ye opened this issue 3 years ago • 1 comments

Issue description

i use apisix-ingress-controller to create stream-route. the below is CRD

apiVersion: apisix.apache.org/v2beta3 kind: ApisixRoute metadata: name: tcp-route spec: stream: - name: tcp-route-rule1 protocol: TCP match: ingressPort: backend: serviceName: test servicePort: 9000

read the source code , usually crate upstream and stream-route, but i see the log it just create upstream.

  • the ApisixRoute event log

2022-08-09T17:53:04+08:00`` debug ingress/apisix_route.go:341 ApisixRoute add event arrived {"object": {"metadata":{"name":"tcp-route","namespace":"default","uid":"65b0fa75-fb58-4f40-ade5-e92ca5198372","resourceVersion":"16316650","generation":1,"creationTimestamp":"2022-08-09T09:53:04Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{"apiVersion":"apisix.apache.org/v2beta3","kind":"ApisixRoute","metadata":{"annotations":{},"name":"tcp-route","namespace":"default"},"spec":{"stream":[{"backend":{"serviceName":"mysql","servicePort":3306},"match":{"ingressPort":8848},"name":"tcp-route-rule1","protocol":"TCP"}]}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"apisix.apache.org/v2beta3","time":"2022-08-09T09:53:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:stream":{}}}}]},"spec":{"stream":[{"name":"tcp-route-rule1","protocol":"TCP","match":{"ingressPort":8848},"backend":{"serviceName":"mysql","servicePort":3306}}]},"status":{}}}

  • translated ApisixRoute log

2022-08-09T17:53:04+08:00 debug ingress/apisix_route.go:182 translated ApisixRoute {"routes": null, "upstreams": [{"id":"aa4ab360","name":"default_mysql_3306","desc":"Created by apisix-ingress-controller, DO NOT modify it manually","labels":{"managed-by":"apisix-ingress-controller"},"type":"roundrobin","nodes":[{"host":"10.244.1.59","port":3306,"weight":100}],"scheme":"http"}], "apisix_route": {}, "pluginConfigs": null}

  • create upstream log

2022-08-09T17:53:04+08:00 debug apisix/upstream.go:136 try to create upstream {"name": "default_mysql_3306", "url": "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams", "cluster": "default"}

2022-08-09T17:53:04+08:00 debug apisix/upstream.go:151 creating upstream {"body": "{"id":"aa4ab360","name":"default_mysql_3306","desc":"Created by apisix-ingress-controller, DO NOT modify it manually","labels":{"managed-by":"apisix-ingress-controller"},"type":"roundrobin","nodes":[{"host":"10.244.1.59","port":3306,"weight":100}],"scheme":"http"}", "url": "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/aa4ab360"}

2022-08-09T17:53:04+08:00` debug apisix/resource.go:123 got upstream: {"pass_host":"pass","hash_on":"vars","nodes":[{"host":"10.244.1.59","weight":100,"port":3306,"priority":0}],"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","type":"roundrobin","create_time":1660038784,"name":"default_mysql_3306","id":"aa4ab360","labels":{"managed-by":"apisix-ingress-controller"},"scheme":"http","update_time":1660038784}

2022-08-09T17:53:04+08:00 debug ingress/apisix_route.go:370 ApisixRoute update event arrived {"new object": {}, "old object": {}}

2022-08-09T17:53:04+08:00 debug ingress/apisix_route.go:182 translated ApisixRoute {"routes": null, "upstreams": [{"id":"aa4ab360","name":"default_mysql_3306","desc":"Created by apisix-ingress-controller, DO NOT modify it manually","labels":{"managed-by":"apisix-ingress-controller"},"type":"roundrobin","nodes":[{"host":"10.244.1.59","port":3306,"weight":100}],"scheme":"http"}], "apisix_route": {}, "pluginConfigs": null}`

Environment

  • apisix-ingress-controller version (1.4.1)
  • apisix version(2.15.0-alpine)

jhon-ye avatar Aug 09 '22 09:08 jhon-ye

Please format the description.

And I didn't see any errors from what you provided. Please provide more clarification

tao12345666333 avatar Aug 10 '22 17:08 tao12345666333

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Nov 24 '22 01:11 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Dec 25 '22 01:12 github-actions[bot]