Skip to content

Conversation

@karnzx
Copy link

@karnzx karnzx commented Oct 5, 2025

Problem

When both ClickHouse Installation (CHI) and ClickHouse Keeper (CHK) resources are deployed in the same namespace with the same name, their PodDisruptionBudgets (PDBs) will have identical names, causing one PDB to be replaced by the other. This results in only one PDB being created instead of two separate PDBs for each resource type.

Root Cause

The current implementation creates PDB names using only the custom resource name without any prefix:

  ObjectMeta: meta.ObjectMeta{
   Name:            c.nm.Name(interfaces.NameClusterPDB, cluster),
   ...
  },

Solution

Add the chi- and chk- prefix to custom resource PDB names to match the existing pattern used in PDB creation and ensure unique naming across resource types.

Impact Assessment

  • Very Low Risk: This is a non-breaking change that only affects PDB naming
  • No Breaking Changes: Existing deployments will continue to work; only new PDBs will have the prefix
  • Backward Compatibility: Existing PDBs with and without prefixes will continue to function normally
  • Consistency: Aligns PDB naming with the existing naming pattern

Example

Before the fix:

  • CHI resource named "my-cluster" → PDB name: "my-cluster"
  • CHK resource named "my-cluster" → PDB name: "my-cluster" (conflict!)

After the fix:

  • CHI resource named "my-cluster" → PDB name: "chi-my-cluster-"
  • CHK resource named "my-cluster" → PDB name: "chk-my-cluster" (no conflict!)

This ensures both PDBs can coexist in the same namespace without naming conflicts.

@Slach Slach requested a review from sunsingerus October 6, 2025 04:53
@alex-zaitsev
Copy link
Member

@karnzx , that has been fixed in 0.25.3. Are you using the latest version? The naming patterns for PDBs is the following now:
[chk|chi]-{name}-{cluster}

@sunsingerus
Copy link
Collaborator

fixed in release 0.25.3

@sunsingerus sunsingerus closed this Oct 6, 2025
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.

3 participants