Problem: the k8s-mongodb-initiator should only run if the replset has not been initiated before.
Currently when a CR is deleted and recreated without deleting PVC data, k8s-mongodb-initiator tries to run and exits with exit-code 1 instead of 0 because the replset initiation has already happened:
Fix needed: cleanly exit the initiator at line 83 of initiator.go ("Got mongodb auth error, server appears to be initiated already. Skipping") instead of continuing initiation.
- Start up latest 'master' with clean PVCs. It should initiate and start successfully with 3 x nodes in the replset.
- Delete the CR but don't delete PVCs.
- Create the CR again. The k8s-mongodb-initiator should fail with exit code 1.