Skip to content

ClusterSync target-uri secret missing slash #2521

Description

@belfhi

Report

I deployed a ClusterSync CR (via the db helm chart) and the secret which was created for the sync included a URI that could not be used by the sync pod:

More about the problem

The cluster sync pod's logs:

2026-08-20 11:42:13.377 FTL error="new server: connect to target cluster: parse and validate MongoDB URI: error parsing uri: must have a / before the query ?"
Error: new server: connect to target cluster: parse and validate MongoDB URI: error parsing uri: must have a / before the query ?

the secret looks like this:

"target-uri": "mongodb://clustersync-dbname-sync:syncpassword@dbname-rs0.namespace.svc.cluster.local:27017?replicaSet=rs0"

So it seems it should be :27015/?replicaSet=rs0, the slash is missing.

Steps to reproduce

  1. Deploy ClusterSync CR
  2. Secret for target is created
  3. sync pod fails and goes into crashloopbackoff

Versions

  1. Kubernetes 1.35.7
  2. Operator 1.23.0
  3. Database percona/percona-server-mongodb:8.0.26-11

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions