-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Add a configuration option to skip the wait-for-mongodb`` initContainer in the auth-server and graphql-server deployments when using an external MongoDB that is already running and accessible.
Problem Statement
Currently, when deploying the Litmus ChaosCenter Helm chart, both the
auth-server-deployment.yaml and server-deployment.yaml templates include an initContainer named wait-for-mongodb that:
-
Always runs regardless of whether MongoDB is deployed by the chart or provided externally
-
Requires pulling a MongoDB image (mongo:6) even when mongodb.enabled=false
-
Adds unnecessary startup delay when connecting to an already-running external MongoDB
Current Behavior
initContainers:
- name: wait-for-mongodb
image: litmuschaos.docker.scarf.sh/litmuschaos/mongo:6
... always included, no conditional
Issues This Causes
| Unnecessary image pull | Slower deployments, increased bandwidth usage |
|---|---|
| Fails in air-gapped environments | Cannot pull mongo:6 image in restricted networks |
| Startup delay | 5-30+ seconds added to pod startup even when MongoDB is ready |
| Uses rs.status() check | Fails for standalone MongoDB instances (non-ReplicaSet) |
Proposed Solution
Add a new configuration option portal.server.waitForMongodb.enabled that allows users to skip the wait-for-mongodb initContainer entirely.