When configuring PodDisruptionBudget (PDB) for ValkeyReplication using ValkeySentinel.spec.valkeyReplicationConfig.podDisruptionBudget.maxUnavailable, users may observe that the operator fails to create the PDB resource and logs an error similar to:
ERROR operator.controllers.ValkeyReplication failed to create the pod disruption budget for master pod
{"error": "PodDisruptionBudget.policy \"<instance-name>-master\" is invalid:
spec: Invalid value: policy.PodDisruptionBudgetSpec{
MinAvailable:1,
Selector:{...},
MaxUnavailable:1
}: minAvailable and maxUnavailable cannot be both set"}maxUnavailable is explicitly defined in the ValkeySentinel specification.As a result:
maxUnavailableThis issue occurs because:
minAvailable by default for master podsmaxUnavailable, both values are present in the final PDB specificationminAvailable and maxUnavailable to be set simultaneouslyThis results in a validation failure when creating the PodDisruptionBudget.
Workaround:
maxUnavailable from the PDB configuration if you have set it and allow the operator to manage the default minAvailable settingPermanent Fix: