Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: 通过 ingress controller 配置路由的时候,文档描述有问题 #2331

Closed
wfy-belief opened this issue Dec 1, 2024 · 0 comments

Comments

@wfy-belief
Copy link

wfy-belief commented Dec 1, 2024

Issue description

配置 TCP 四层代理的时候,根据文档来配置 https://apisix.apache.org/docs/ingress-controller/references/apisix_route_v2/
image

根据文档描述,配置 stream 参数的时候,发现这个地方文档是不是有错误

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: mysql-stream-route
spec:
  stream:
    - name: mysql-master
      protocol: TCP
      match:
        ingressPort: 3306
  http:
    - backends:
        - serviceName: mysql
          servicePort: 3306

结果如下:

The ApisixRoute "redis-stream-route" is invalid: 
* <nil>: Invalid value: "": "spec.http[0]" must validate at least one schema (anyOf)
* spec.http[0].name: Required value
* spec.http[0].match: Required value
* spec.stream[0].backend: Required value

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
    使用的最新版 1.8.0
helm upgrade --install apisix apisix/apisix --create-namespace  --namespace apisix --set dashboard.enabled=true --set ingress-controller.enabled=true --set ingress
-controller.config.apisix.serviceNamespace=apisix
  • your Kubernetes cluster version (output of kubectl version):
Client Version: v1.31.2
Kustomize Version: v5.4.2
Server Version: v1.30.5+k3s1
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
    Ubuntu 24.04 LTS 6.8.0-40-generic containerd://1.7.21-k3s2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant