percona / percona-helm-charts

Collection of Helm charts for Percona Kubernetes Operators.
https://www.percona.com/software/percona-kubernetes-operators
Other
110 stars 149 forks source link

crds in pg-operator 2.4.0 chart #344

Open pasztorl opened 3 days ago

pasztorl commented 3 days ago

I've just updated pg-operator from 2.3.4 to 2.4.0 then i see there is missing crds after installation. Operator logs:

2024-07-02T21:52:43.128Z ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "PGAdmin.postgres-operator.crunchydata.com", "error": "no matches for kind \"PGAdmin\" in version \"postgres-operator.crunchydata.com/v1beta1\""} k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1 /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:53 k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:54 k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel /go/pkg/mod/k8s.io/apimachinery@v0.30.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.18.4/pkg/internal/source/kind.go:64 2024-07-02T21:52:43.129Z ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "PerconaPGUpgrade.pgv2.percona.com", "error": "no matches for kind \"PerconaPGUpgrade\" in version \"pgv2.percona.com/v2\""} k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1 /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:53 k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:54 k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel /go/pkg/mod/k8s.io/apimachinery@v0.30.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.18.4/pkg/internal/source/kind.go:64 2024-07-02T21:52:43.227Z ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "PGUpgrade.postgres-operator.crunchydata.com", "error": "no matches for kind \"PGUpgrade\" in version \"postgres-operator.crunchydata.com/v1beta1\""} k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1 /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:53 k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext /go/pkg/mod/k8s.io/apimachinery@v0.30.2/pkg/util/wait/loop.go:54 k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel /go/pkg/mod/k8s.io/apimachinery@v0.30.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.18.4/pkg/internal/source/kind.go:64

Am I miss something with upgrading? Where is an upgrade guide located? Thanks

pasztorl commented 3 days ago

another error message after upgrade:

2024-07-02T22:01:43.848Z ERROR get latest commit timestamp {"controller": "perconapgcluster", "controllerGroup": "pgv2.percona.com", "controllerKind": "PerconaPGCluster", "PerconaPGCluster": {"name":"retool","namespace":"example-retool"}, "namespace": "example-retool", "name": "retool", "reconcileID": "c5d5d8e6-815e-4aaa-ba23-f676d9f4bacb", "error": "get backup start timestamp: backup not found in pgbackrest info", "errorVerbose": "backup not found in pgbackrest info\ngithub.com/percona/percona-postgresql-operator/percona/watcher.getBackupStartTimestamp\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/watcher/wal.go:216\ngithub.com/percona/percona-postgresql-operator/percona/watcher.GetLatestCommitTimestamp\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/watcher/wal.go:161\ngithub.com/percona/percona-postgresql-operator/percona/watcher.WatchCommitTimestamps\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/watcher/wal.go:71\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1695\nget backup start timestamp\ngithub.com/percona/percona-postgresql-operator/percona/watcher.GetLatestCommitTimestamp\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/watcher/wal.go:163\ngithub.com/percona/percona-postgresql-operator/percona/watcher.WatchCommitTimestamps\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/watcher/wal.go:71\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1695"} runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1695

pasztorl commented 3 days ago

so I applied the crds from chart by hand and created manual full backup, it seems it solved the problem, but how the clean operator upgrade looks like?

tplavcic commented 3 days ago

Hi @pasztorl ! Helm by design handles crds only on installation and not on upgrade, so on upgrade new crds need to be applied manually. I see now that we are missing the doc page on helm upgrade so I'll open a ticket about it.

pasztorl commented 3 days ago

ahh, sorry I missed that. Thanks!