Closed
Description
In a conversation with @php-coder today he brought an excellent question and idea:
Why does the pod running the replica set initiation code starts as a PRIMARY member, and then it steps down and triggers an election among the other members?
It would be much simpler if the post-deployment-hook pod simply pick one of the deployed pods and make it the primary, run all the initialization steps, add the other pods to the replica set, and quit. The hook pod don't need to run mongod
.
This idea could simplify matters greatly, reduce the startup time, and reduce the surface area for bugs.