-
Notifications
You must be signed in to change notification settings - Fork 9
CLOUDP-323997: Refactor replicaset controller #185
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
base: master
Are you sure you want to change the base?
Conversation
Move reconcile hostname override cm Move reconciling of k8s resources
@@ -65,36 +63,7 @@ func PrepareScaleDownFromMap(omClient om.Connection, rsMembers map[string][]stri | |||
log.Debugw("Marked replica set members as non-voting", "replica set with members", rsMembers) | |||
} | |||
|
|||
// TODO practice shows that automation agents can get stuck on setting db to "disabled" also it seems that this process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment dated from 2021
return r.updateStatus(ctx, rs, status, log) | ||
} | ||
|
||
if scale.ReplicasThisReconciliation(rs) < rs.Status.Members { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed anymore
Related Jira ticket (from 2017): https://jira.mongodb.org/browse/HELP-3818
From the ticket, this step was necessary to scale a replica set to a single member.
We have a test covering that case
mongodb-kubernetes/docker/mongodb-kubernetes-tests/tests/replicaset/replica_set.py
Line 336 in f29ac63
def test_replica_set_can_be_scaled_to_single_member(replica_set: MongoDB): |
Note that the multi cluster replica set controller does not perform an equivalent step.
Summary
Some refactoring work done in the MongoDB Replica Set controller to bring it closer to the structure of the multi cluster controller.
The aim is to break down the large reconcile loop into smaller parts
Proof of Work
We must observe no regression in E2E tests