Skip to content

fix(high-availability): size master workloads by schedulable nodes - #219

Open
mary-ppv wants to merge 1 commit into
mainfrom
fix/ha-replicas-by-schedulable-master
Open

mary-ppv wants to merge 1 commit into
mainfrom
fix/ha-replicas-by-schedulable-master

Conversation

@mary-ppv

Copy link
Copy Markdown
Contributor

The on-master HA helpers took spec.replicas straight from
global.discovery.clusterMasterCount, which counts control-plane nodes by
label and ignores cordon. These workloads place one replica per node, so
a cluster with two of five masters cordoned asked for five replicas with
three placeable nodes and never reached full readiness. The release
tracker waits for readyReplicas == spec.replicas, so the module install
timed out and blocked every task queued behind it.

Add helm_lib_master_replicas_count, which caps the master count by
global.discovery.clusterSchedulableMasterCount, and use it for both
spec.replicas and the maxUnavailable threshold in the two on-master
helpers. The threshold has to follow the same number: left on the raw
master count, five masters with three schedulable would render replicas:
3 alongside maxUnavailable: 2, leaving one live replica during a rollout.

Nothing changes on a cluster that does not publish the new value. It is
read through hasKey because an absent key and a legitimate zero both read
as 0 after int, and treating the absent key as zero would collapse
those clusters to a single replica. The floor of 1 keeps a fully cordoned
control plane from rendering replicas: 0 and dropping the workload.

Signed-off-by: Maria Popova <mary_ppv@mail.ru>
@mary-ppv
mary-ppv force-pushed the fix/ha-replicas-by-schedulable-master branch from cb1ce71 to 937204d Compare September 24, 2026 07:58
@mary-ppv
mary-ppv requested a review from borg-z September 24, 2026 08:52
@mary-ppv
mary-ppv marked this pull request as ready for review September 24, 2026 08:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant