Skip to content

Raising Atlas Operator replica count above 1 doesn't enable leader election despite the app supporting it #3694

@tspearconquest

Description

@tspearconquest

Hi,

We recently installed Atlas Operator for a POC and we found that the app supports using leader election but it doesn't appear to make use of it when setting the replicas above 1.

This was highlighted by CodeRabbit scanning:

Set replicaCount: 1 or enable leader election before scaling to multiple replicas.

Atlas Operator supports Kubernetes leader election via the --leader-elect flag, but it's disabled by default. The Helm chart does not expose a values knob to enable this flag in container arguments. Running replicaCount: 2 without leader election enabled is unsafe—multiple replicas will perform concurrent reconciliations and migrations without coordination, risking conflicts and data corruption.

Choose one approach: 1. Reduce replicaCount to 1 (safest default) 2. If HA is required, first patch the chart to inject --leader-elect=true into the operator's container args, then set replicaCount: 2

Please add logic to the chart to make use of the --leader-elect flag when replicaCount is greater than 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions