Skip to content

Add option to skip wait-for-mongodb initContainer #5377

@bmscomp

Description

@bmscomp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions