Files
cozystack/packages/apps/valkey/Makefile
T
Yan Bondarenko 902051e780 fix(redis, valkey, harbor): spread sentinels and data pods over nodes
The RedisFailover charts left placement to the operator's default
preferred pod anti-affinity. A preference only decides where a pod
starts, so a drain or a rollout of the sentinel Deployment can leave
two of the three sentinels on one node, and nothing moves them back.
Losing that node leaves one sentinel, below the quorum of two, so no
failover can happen while it is down. On a node-local StorageClass a
data pod that starts next to another one stays there for good.

Both now get a hostname spread with whenUnsatisfiable DoNotSchedule and
maxSkew 1. An instance with more pods than nodes still starts, because
the skew is counted between the nodes that exist. nodeTaintsPolicy is
Ignore, so a cordoned node still counts and a pod waits for it instead
of starting next to another one. The sentinel constraint also matches
on pod-template-hash, because a rollout adds each new sentinel while
the old ones still run, and counting those would let two new sentinels
share a node once the old ones are gone.

A cluster-wide globalAppTopologySpreadConstraints replaces the default,
as in the other charts that read it.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
2026-10-20 13:31:40 +03:00

14 lines
283 B
Makefile

include ../../../hack/package.mk
.PHONY: test
test:
helm unittest .
generate:
cozyvalues-gen -m 'valkey' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/valkey/types.go
../../../hack/update-crd.sh
update:
hack/update-versions.sh
make generate