mongodb / helm-charts

Apache License 2.0
99 stars 92 forks source link

StatefulSet not starting when watchNamespace is * and the MongoDb Resource is in another namespace #136

Closed paul-mesnilgrente closed 2 years ago

paul-mesnilgrente commented 2 years ago

This issue is copy paste of https://github.com/mongodb/helm-charts/issues/104. The PR https://github.com/mongodb/helm-charts/pull/102 mentioned was deployed in the version 0.7.3 of the helm chart but we still get the issue.

I'm not sure if this is a problem with the chart or with the operator but I've installed the community-operator to the "operators" namespace via chart with watchNamespace set to "*" and created a MongoDB resource in the "test" namespace.

The mongodb statefulset is created but isn't starting with the following error message: create Pod mongodb-0 in StatefulSet mongodb failed error: pods "mongodb-0" is forbidden: error looking up service account test/mongodb-database: serviceaccount "mongodb-database" not found

paul-mesnilgrente commented 2 years ago

I tried to just copy paste the service account in the other namespace with its related secret and it kinda works. But then the mongodb-agent container doesn't become ready because of this error in the readiness probe:

panic: open /var/lib/automation/config/acVersion/version