Junnplus opened a new issue #293:
URL: https://github.com/apache/apisix-ingress-controller/issues/293
### Issue description
crash when exist v1beta1.Ingress of extensions
### Minimal test code / Steps to reproduce the issue
1. use `ingress_version: "networking/v1beta1"` in config.yaml
2. create a ingress with apiVersion is `extensions/v1beta1`
3. start ingress controller
### What's the actual result? (including assertion message & call stack if
applicable)
```
E0311 22:29:48.969328 29288 runtime.go:76] Observed a panic: invalid
ingress type
goroutine 136 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x232c0a0, 0x278ce00)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:74
+0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:48
+0x89
panic(0x232c0a0, 0x278ce00)
/usr/local/Cellar/go/1.15.5/libexec/src/runtime/panic.go:969 +0x1b9
github.com/apache/apisix-ingress-controller/pkg/kube.MustNewIngress(0x258e8c0,
0xc000036600, 0xe, 0x1)
/Users/Jun/Documents/workspace/apisix-ingress-controller/pkg/kube/ingress.go:145
+0x145
github.com/apache/apisix-ingress-controller/pkg/ingress/controller.(*ingressController).onAdd(0xc00044a0a0,
0x258e8c0, 0xc000036600)
/Users/Jun/Documents/workspace/apisix-ingress-controller/pkg/ingress/controller/ingress.go:225
+0x12f
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd(...)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/tools/cache/controller.go:231
k8s.io/client-go/tools/cache.(*processorListener).run.func1()
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/tools/cache/shared_informer.go:777
+0xc2
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000204760)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155
+0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000635f60, 0x27aa740,
0xc000492180, 0x236dc01, 0xc00063e2a0)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156
+0xad
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000204760, 0x3b9aca00, 0x0,
0x1, 0xc00063e2a0)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133
+0x98
k8s.io/apimachinery/pkg/util/wait.Until(...)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90
k8s.io/client-go/tools/cache.(*processorListener).run(0xc000448080)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/tools/cache/shared_informer.go:771
+0x95
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1(0xc0003bd100,
0xc00033e1a0)
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:73
+0x51
created by k8s.io/apimachinery/pkg/util/wait.(*Group).Start
/Users/Jun/.go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:71
+0x65
panic: invalid ingress type [recovered]
panic: invalid ingress type
```
### What's the expected result?
Support `extensions/v1beta1.Ingress` .
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]