-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override _id of replicaSet in automation config (complementary to additionalMongodConfig replication.replSetName) #1650
Comments
What do you think about adding a new mongodb-kubernetes-operator/api/v1/mongodbcommunity_types.go Lines 330 to 334 in 85086f7
So that this would work: spec:
automationConfig:
replicaSet:
id: rs0 |
This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days. |
Still affecting us, the solution in the PR is working nicely. |
What did you do to encounter the bug?
Steps to reproduce the behavior:
--replSet=rs0
in a StatefulSet namedmongodb
What did you expect?
I expected the agent to receive
rs0
as _id of the replicaSet when additionalMongodConfigreplication.replSetName
is used.Alternatively there could be an override for the replicaSetName under
spec
directly, so it is used both for the replicaSets._id (agent) and replication.replSetName (mongod).What happened instead?
It receives
mongodb
instead.Screenshots
Additional context
We are looking to migrate 100+ clusters to the operator and this is the last piece in the puzzle.
I confirmed this by stopping the operator and manually changing the _id to
rs0
insecret mongodb-config
and then seeing the agent become ready.After starting the operator again, it then undos the changes to the secret, of course.
I had a thorough look through the relevant sources and didn't find a way to fix this with the current implementation.
The automation config builder name is set to the
mdb.Name
here:mongodb-kubernetes-operator/controllers/replica_set_controller.go
Line 522 in 85086f7
and then
Id
is set tob.name
here:mongodb-kubernetes-operator/pkg/automationconfig/automation_config_builder.go
Line 380 in 85086f7
b.name
is also used to setreplication.replSetName
here:mongodb-kubernetes-operator/pkg/automationconfig/automation_config_builder.go
Line 325 in 85086f7
Did I miss something?
If I could contribute a fix for this, what should I look out for in my implementation to make it acceptable?
Also seen previously:
The text was updated successfully, but these errors were encountered: