Summary
Add default preferred pod anti-affinity for noobaa-core pods so the two Core HA replicas are preferentially scheduled onto different nodes.
Rationale
Core HA runs a leader and standby pod. Without an anti-affinity rule, both pods may be scheduled on the same node, leaving the deployment vulnerable to a single-node failure. The anti-affinity must remain preferred, rather than required, so single-node clusters and constrained environments remain schedulable.
Affected areas
deploy/internal/statefulset-core.yaml
- Generated/embedded deployment bundle artifacts, if applicable
- Reconciliation logic that composes the default pod affinity with any affinity provided through the NooBaa custom resource
Required changes
Add a preferred pod anti-affinity term to the core StatefulSet pod template:
- Select pods labeled
noobaa-core: noobaa.
- Use a node-level topology key (for example,
kubernetes.io/hostname) to prefer separate nodes.
- Preserve compatibility with single-node clusters.
- Ensure the default rule is applied together with, and does not unintentionally replace, CR-provided affinity.
Acceptance criteria
- In a multi-node cluster, the scheduler prefers placing the two
noobaa-core replicas on different nodes.
- In a single-node cluster, both replicas can still be scheduled.
- Existing CR-scoped affinity behavior remains functional.
- Generated bundle artifacts are updated when required.
Backlinks
Summary
Add default preferred pod anti-affinity for
noobaa-corepods so the two Core HA replicas are preferentially scheduled onto different nodes.Rationale
Core HA runs a leader and standby pod. Without an anti-affinity rule, both pods may be scheduled on the same node, leaving the deployment vulnerable to a single-node failure. The anti-affinity must remain preferred, rather than required, so single-node clusters and constrained environments remain schedulable.
Affected areas
deploy/internal/statefulset-core.yamlRequired changes
Add a preferred pod anti-affinity term to the core StatefulSet pod template:
noobaa-core: noobaa.kubernetes.io/hostname) to prefer separate nodes.Acceptance criteria
noobaa-corereplicas on different nodes.Backlinks