Failed to sync template - no matches for kind "Ingress" in version "networking.k8s.io/v1beta1" (K8s v1.22.2)
emoyly opened this issue · 1 comments
emoyly commented
Whenever i add an Ingress configuration, the "tyk-operator-controller-manager" keeps spitting out an error, saying it cannot sync the template.
But it also sometimes is possible to reach the ingress prefix path from the browser. But then other times, I just get a 404. I've tried waiting for it to synchronize properly, but it just seems to be kinda random when it works. Honestly I really cannot figure out what's going on. It seems to like half work. Even when it seems to work, it still spits out errors. None of the gateway pods seem to complain.
Expected Behavior
I should be able to reach the path specified from my browser
Current Behavior
I can only sometimes reach the path, and the operator-controller-manager logs are filled with errors.
Steps to Reproduce
- Install Tyk and Tyk Operator exactly as described in docs
- Install the API Definition template from https://github.com/TykTechnologies/tyk-operator/blob/master/docs/ingress.md#sample-template-apidefinition-resource
- Add Ingress from https://github.com/TykTechnologies/tyk-operator/blob/master/docs/ingress.md#sample-template-apidefinition-resource
Logs/Errors
{"level":"info","ts":1632751754.7348652,"logger":"controllers.ApiDefinition","msg":"Reconciling ApiDefinition instance","ApiDefinition":"default/myapideftemplate"}
{"level":"info","ts":1632751754.7349432,"logger":"controllers.ApiDefinition","msg":"Syncing template","ApiDefinition":"default/myapideftemplate","template":"myapideftemplate"}
{"level":"error","ts":1632751755.5880475,"logger":"controllers.ApiDefinition","msg":"Failed to sync template","ApiDefinition":"default/myapideftemplate","error":"no matches for kind \"Ingress\" in version \"networking.k8s.io/v1beta1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214"}
{"level":"error","ts":1632751755.588108,"logger":"controller-runtime.manager.controller.apidefinition","msg":"Reconciler error","reconciler group":"tyk.tyk.io","reconciler kind":"ApiDefinition","name":"myapideftemplate","namespace":"default","error":"no matches for kind \"Ingress\" in version \"networking.k8s.io/v1beta1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214"}
Your Environment
- OS version: Ubuntu 20.04
tyk-operator
version/commit: 142eec7- Kubernetes
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:32:41Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}