When deploying Valkey using the Valkey Operator, users may observe that affinity and tolerations defined in the ValkeySentinel resource are applied only to the Sentinel StatefulSet, but not to the ValkeyReplication (data) StatefulSet.
As a result:
This behavior can lead to issues in environments with:
Additionally, there is currently no option available in ValkeySentinel.spec.valkeyReplicationConfig to configure affinity and tolerations for ValkeyReplication pods directly through the ValkeySentinel resource.
This behavior is by design.
The Valkey Operator treats Sentinel and ValkeyReplication pods differently because:
To avoid unintended resource contention or suboptimal scheduling, the operator does not automatically propagate affinity and tolerations from Sentinel to replication pods.
Workaround:
Option 1: Define affinity and tolerations directly in the ValkeyReplication resource.
Option 2: Create ValkeyReplication Separately:
ValkeyReplication resource with the required affinity and tolerations.ValkeySentinel.This approach allows full control over scheduling of Valkey data pods.
Permanent Fix:
R&D had added support for configuring affinity and tolerations under ValkeySentinel.spec.valkeyReplicationConfig v3.4.0.