CrunchyData / postgres-operator-examples

Examples for deploying applications with PGO, the Postgres Operator from Crunchy Data
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
190 stars 4.75k forks source link

Postgres Operator crashes #270

Closed chrkspr closed 5 months ago

chrkspr commented 5 months ago

Postgres Operator crashes when installed with helm.

Used commit: ae452671c32e87d8baf0d6dfdb7fc079c546693f

values.yaml:

singleNamespace: true

Error logs from pgo:

k -n  mynamespace logs -l postgres-operator.crunchydata.com/control-plane=pgo
...
W0610 15:19:38.052551       1 reflector.go:324] k8s.io/client-go@v0.24.2/tools/cache/reflector.go:167: failed to list *v1beta1.CrunchyBridgeCluster: crunchybridgeclusters.postgres-operator.crunchydata.com is forbidden: User "system:serviceaccount:mynamespace:pgo" cannot list resource "crunchybridgeclusters" in API group "postgres-operator.crunchydata.com" in the namespace "mynamespace"
...

"runchybridgeclusters" is missing in kubernetes role pgo (https://github.com/CrunchyData/postgres-operator-examples/blob/main/helm/install/templates/role.yaml).

benjaminjb commented 5 months ago

Hey @chrkspr, thanks, we're looking into this now

dsessler7 commented 5 months ago

This issue has been resolved. Please pull the latest commits in main to fix your issue.

jaitaiwan commented 5 months ago

Has the main chart been updated? I can only see 5.6.0 still in the chart repo?

dsessler7 commented 5 months ago

Yes, the main chart was updated. The 5.6.0 version is the Crunchy Postgres for Kubernetes version, so that will only get bumped when we release a new version of CPK.

jaitaiwan commented 5 months ago

@dsessler7 What I think this means is that for automated GitOps systems like flux is that the OCI Repo won't trigger a reconciliation unless the chart version has been updated.

marvin-w commented 4 months ago

@dsessler7 What I think this means is that for automated GitOps systems like flux is that the OCI Repo won't trigger a reconciliation unless the chart version has been updated.

I have exactly this issue, any hint on how to resolve?

jaitaiwan commented 4 months ago

Seems like the best bet might be to open a new issue referencing this one. I made a PR to allow for custom env vars, that could at least be used to upgrade the chart without an uninstall. It’s not a good solution though.