PodDisruptionBudget Not Created for Valkey or Sentinel Pods in Valkey Operator
search cancel

PodDisruptionBudget Not Created for Valkey or Sentinel Pods in Valkey Operator

book

Article ID: 444275

calendar_today

Updated On:

Products

VMware Tanzu Data Suite

Issue/Introduction

Define 'ValkeyReplication' and 'ValkeySentinel' as separate YAML objects. Enable 'podDisruptionBudget' in the configuration. Observe that the PodDisruptionBudget (PDB) is either not created at all or is only created for one set of pods (Valkey) while skipping other (Sentinel).

Environment

  • VMware Tanzu for Valkey
  • Valkey Operator 3.4.1 or earlier
  • Kubernetes (e.g., GKE, TKGi)

Cause

The Valkey Operator reconciliation process for split configurations (where replication and sentinel are separate objects) does not always trigger the creation of all associated PDB resources. This behavior occurs because the operator is optimized for a unified reconciliation flow.

Resolution

Consolidate the configuration into a single 'ValkeySentinel' object. This unified approach ensures the operator correctly identifies and reconciles all dependent resources, including PDBs for both data and sentinel pods.

Follow these steps to update the configuration:

  1. Consolidate Configuration: Move all replication settings from the 'ValkeyReplication' object into the 'ValkeySentinel' specification under the 'spec.valkeyReplicationConfig' section.
  2. Enable PDB: Set 'podDisruptionBudget.enabled' to 'true' at the top level of the 'ValkeySentinel' spec.
  3. Apply Unified YAML: Apply the consolidated YAML to the cluster. The operator automatically reconciles the state and creates the required PDBs.
  4. Verify PDBs: Run the following command to confirm both PDBs exist: 'kubectl get pdb -n '####'

Expected output shows distinct PDBs for the replication master/replica and the sentinel pods.