Sorry, this is probably very basic but there’s a gap in the documentation between PSMDB Operator, MongoDB and PMM around exactly how to supply authentication secrets to pmm-admin.
tldr: Please could someone tell me the right way to specify PMM_SERVER_PASSWORD, PMM_SERVER_USER and PMM_SERVER_API_KEY in the MongoDB Operator? I’m using terraform if that makes any difference.
I have tried following the basic installation steps, but the operator doesn’t expose any values for the secrets.yml file. Creating those secrets in advance got me some of the way but I remain confused about what the deployed secret name should be. By accessing the pmm-client container I could get pmm-admin to register but I could not add the MongoDB service.
Studying the mongodb helm chart reveals that setting systemUsers
will populate ‘the secret’; this creates a secret called database-name-secrets, but now the operator refuses to start the PMM container because ‘keys don’t exist in the secrets, or secrets and internal secrets are out of sync’.
PMM Server and client are v2.44, operator is latest.
2025-09-03T10:07:41.407Z ERROR secrets {"controller": "psmdb-controller", "controllerGroup": "psmdb.percona.com", "controllerKind": "PerconaServerMongoDB", "PerconaServerMongoDB": {"name":"mdb-production-psmdb","namespace":"mongodb"}, "namespace": "mongodb", "name": "mdb-production-psmdb", "reconcileID": "66d665ca-d1dd-402a-8994-c1fe967efb57", "percona-server-mongodb-users": "internalSecrets", "error": "Can't enable PMM: \"PMM_SERVER_API_KEY\" or \"PMM_SERVER_USER\" with \"PMM_SERVER_PASSWORD\" keys don't exist in the secrets, or secrets and internal secrets are out of sync", "errorVerbose": "Can't enable PMM: \"PMM_SERVER_API_KEY\" or \"PMM_SERVER_USER\" with \"PMM_SERVER_PASSWORD\" keys don't exist in the secrets, or secrets and internal secrets are out of sync\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileUsers\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/users.go:54\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:347\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:334\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:294\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:255\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700"}