l7mp / stunner-gateway-operator

STUNner Kubernetes Gateway Operator
Apache License 2.0
15 stars 6 forks source link

The stunner-gateway-operator-controller-manager is failing to start due to the Dataplane CRD not being installed before the controller starts. #39

Closed FLM210 closed 1 year ago

FLM210 commented 1 year ago

I installed the dev version of stunner-gateway-operator using helm(Chart version stunner-gateway-operator-dev-0.15.0 ) , and now stunner-gateway-operator exited abnormally Here's my logs 2023-08-17T10:29:57.997819374Z ERROR ctrl-runtime.controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "Dataplane.stunner.l7mp.io", "error": "no matches for kind \"Dataplane\" in version \"stunner.l7mp.io/v1alpha1\""} sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/source/kind.go:63 k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1 /go/pkg/mod/k8s.io/apimachinery@v0.27.2/pkg/util/wait/loop.go:62 k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext /go/pkg/mod/k8s.io/apimachinery@v0.27.2/pkg/util/wait/loop.go:63 k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel /go/pkg/mod/k8s.io/apimachinery@v0.27.2/pkg/util/wait/poll.go:33 sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/source/kind.go:56 2023-08-17T10:30:07.988854671Z ERROR ctrl-runtime Could not wait for Cache to sync {"controller": "dataplane", "error": "failed to wait for dataplane caches to sync: timed out waiting for cache to be synced for Kind *v1alpha1.Dataplane"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.1 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:202 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:207 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:233 sigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/manager/runnable_group.go:219 2023-08-17T10:30:07.988926582Z INFO ctrl-runtime Stopping and waiting for non leader election runnables 2023-08-17T10:30:07.988983143Z INFO ctrl-runtime shutting down server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"} 2023-08-17T10:30:07.989002223Z INFO ctrl-runtime Stopping and waiting for leader election runnables 2023-08-17T10:30:07.989015373Z INFO ctrl-runtime Shutdown signal received, waiting for all workers to finish {"controller": "udproute"} 2023-08-17T10:30:07.989020444Z INFO ctrl-runtime Shutdown signal received, waiting for all workers to finish {"controller": "gateway"} 2023-08-17T10:30:07.989024744Z INFO ctrl-runtime Shutdown signal received, waiting for all workers to finish {"controller": "node"} 2023-08-17T10:30:07.989028694Z INFO ctrl-runtime Shutdown signal received, waiting for all workers to finish {"controller": "gatewayconfig"} 2023-08-17T10:30:07.989053724Z INFO ctrl-runtime All workers finished {"controller": "gateway"} 2023-08-17T10:30:07.989058654Z INFO ctrl-runtime All workers finished {"controller": "udproute"} 2023-08-17T10:30:07.989062284Z INFO ctrl-runtime All workers finished {"controller": "gatewayconfig"} 2023-08-17T10:30:07.989066294Z INFO ctrl-runtime All workers finished {"controller": "node"} 2023-08-17T10:30:07.989070174Z INFO ctrl-runtime Stopping and waiting for caches 2023-08-17T10:30:07.989671422Z INFO ctrl-runtime Stopping and waiting for webhooks 2023-08-17T10:30:07.989691322Z INFO ctrl-runtime Wait completed, proceeding to shutdown the manager 2023-08-17T10:30:07.989718533Z ERROR setup problem running manager {"error": "failed to wait for dataplane caches to sync: timed out waiting for cache to be synced for Kind *v1alpha1.Dataplane"} main.main /workspace/main.go:179 runtime.main /usr/local/go/src/runtime/proc.go:250

So what the Dataplane crd is 🤔

rg0now commented 1 year ago

CC: @davidkornel

Thanks for the report. I'm afraid this is a known issue: the dev Helm chart does not install the recently introduced Dataplane CRD. Until we sort this out, you can work around the problem by cloning the repo and issuing make install deploy in the root dir. But I hope we can settle this ASAP.

FLM210 commented 1 year ago

Okay ~

davidkornel commented 1 year ago

hey @FLM210 the missing CRD was added a few days ago so the stunner-gateway-operator-dev chart should work now. Closing, feel free to reopen if got any more issues