pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
221 stars 55 forks source link

ver 1.10.1 operator is not working after update #401

Closed zeenmc closed 11 months ago

zeenmc commented 1 year ago

What happened?

I tried to upgrade pulumi operator to 1.10.1 ver. We used older operator version, 0.5, but didn't work for us, as supposed didn't support Azure DevOps. We are using AKS with pulumi, ArgoCD. I tried to find by myself, but did errors I don't understand.

I0113 15:03:46.589792 1 leaderelection.go:243] attempting to acquire leader lease pulumi/pulumi-kubernetes-operator-lock... I0113 15:04:02.231490 1 leaderelection.go:253] successfully acquired lease pulumi/pulumi-kubernetes-operator-lock {"level":"error","ts":"2023-01-13T15:04:03.136Z","logger":"controller-runtime.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"Program.pulumi.com","error":"no matches for kind \"Program\" in version \"pulumi.com/v1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/source/source.go:128"} {"level":"error","ts":"2023-01-13T15:04:03.136Z","logger":"controller-runtime.manager.controller.stack-controller","msg":"Could not wait for Cache to sync","error":"failed to wait for stack-controller caches to sync: no matches for kind \"Program\" in version \"pulumi.com/v1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:195\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:221\nsigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).startRunnable.func1\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/manager/internal.go:697"} {"level":"error","ts":"2023-01-13T15:04:03.137Z","logger":"cmd","msg":"Manager exited non-zero","error":"failed to wait for stack-controller caches to sync: no matches for kind \"Program\" in version \"pulumi.com/v1\"","stacktrace":"main.main\n\t/home/runner/work/pulumi-kubernetes-operator/pulumi-kubernetes-operator/cmd/manager/main.go:179\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.2/x64/src/runtime/proc.go:250"}

Steps to reproduce

Updated older version with new one.

Expected Behavior

Operator to works.

Actual Behavior

Operator is failing.

Output of pulumi about

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

squaremo commented 1 year ago

Hi! Try installing the new CRD, with (for example):

kubectl apply -f https://raw.githubusercontent.com/pulumi/pulumi-kubernetes-operator/master/deploy/crds/pulumi.com_programs.yaml
EronWright commented 11 months ago

Seems clear that the operator wasn't fully installed. @zeenmc do you have more information to share about how you upgraded the operator? Am closing this for now.