Closed Belyenochi closed 2 years ago
Can you check the commit id?
Can you check the commit id?
75098d1
I found a fact that the CR I created is v2beta1, but can be obtained from the List method of ApisixV2Beta3, maybe the incompatible Beta1 and Beta3 CRD formats are causing the problem.
Maybe we should update this document.
spec.http[].backend
has been removed. we should use spec.http[].backends
.
Here's a configuration that determines how to handle CRs. The CR version you are using needs to be the same as here.
Maybe we should update this document.
Sure, I have created an issue, it is suitable for newbies to get involved in this project https://github.com/apache/apisix-ingress-controller/issues/915
I think we can close this one.
v2beta1
will be removed soon, xref: #820
Issue description
apisix ingress controller start panic
Environment
Minimal test code / Steps to reproduce
Actual result
local apisix-ingress-controller panic
Error log
2022-03-10T12:14:32+08:00 warn api/server.go:75 failed to load x509 key pair, will not start admission server {"Error": "open /etc/webhook/certs/cert.pem: no such file or directory", "CertFilePath": "/etc/webhook/certs/cert.pem", "KeyFilePath": "/etc/webhook/certs/key.pem"} I0310 12:14:32.866418 19515 leaderelection.go:248] attempting to acquire leader lease default/ingress-apisix-leader... 2022-03-10T12:14:35+08:00 info ingress/controller.go:320 LeaderElection {"message": " became leader", "event_type": "Normal"} I0310 12:14:35.634105 19515 leaderelection.go:258] successfully acquired lease default/ingress-apisix-leader 2022-03-10T12:14:35+08:00 info ingress/controller.go:406 controller tries to leading ... {"namespace": "default", "pod": ""} 2022-03-10T12:14:37+08:00 warn apisix/cluster.go:332 waiting cluster default to ready, it may takes a while 2022-03-10T12:14:37+08:00 info apisix/cluster.go:160 syncing cache {"cluster": "default"} 2022-03-10T12:14:37+08:00 info apisix/cluster.go:372 syncing schema {"cluster": "default"} 2022-03-10T12:14:40+08:00 info apisix/cluster.go:164 cache synced {"cost_time": "3.733667121s", "cluster": "default"} 2022-03-10T12:14:40+08:00 warn apisix/cluster.go:343 cluster default now is ready, cost time 3.733716272s 2022-03-10T12:14:41+08:00 info ingress/namespace.go:70 label selector watching namespaces {"namespaces": ["allns-r7sel9-0", "apisix", "cattle-prometheus", "cattle-system", "chaos-testing", "chaosblade", "default", "elastic-system", "ingress-apisix-e2e-tests-default-760463000", "ingress-apisix-e2e-tests-default-825238000", "ingress-nginx", "kafka", "kruise-system", "kube-node-lease", "kube-public", "kube-system", "leaf", "local-path-storage", "logging", "mcloud-cat", "middleware-paas", "minio", "monitoring", "nacos", "nacos-2", "nacos-3", "nacos-4", "nacos-5", "nacos-6", "nacos-test", "pvc-exporter", "pxc1", "redis", "security-scan", "syu-t", "syu-t2", "thrift", "xxl-job", "xxl-job1", "xxl-job2", "zookeeper"]} I0310 12:14:42.501579 19515 request.go:665] Waited for 1.000136347s due to client-side throttling, not priority and fairness, request: GET:https://mke.my.myorg/k8s/clusters/c-dx6gd/apis/apisix.apache.org/v2beta3/namespaces/nacos-4/apisixroutes panic: runtime error: index out of range [0] with length 0
goroutine 157 [running]: github.com/apache/apisix-ingress-controller/pkg/kube/translation.(translator).translateHTTPRouteV2beta3NotStrictly(0x0, 0xc00092c200, 0xc0008771e0) /Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/kube/translation/apisix_route.go:936 +0x899 github.com/apache/apisix-ingress-controller/pkg/kube/translation.(translator).TranslateRouteV2beta3NotStrictly(0x0, 0x0) /Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/kube/translation/apisix_route.go:314 +0x72 github.com/apache/apisix-ingress-controller/pkg/ingress.(Controller).CompareResources.func1.1({0xc000417b24, 0x7}) /Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/ingress/compare.go:78 +0x852 created by github.com/apache/apisix-ingress-controller/pkg/ingress.(Controller).CompareResources.func1 /Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/ingress/compare.go:68 +0x248
Expected result
No response