additionalVolumeClaimTemplates: is "fixed at creation" a permanent constraint, or could additions be allowed?
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- clickhouse, go, kubernetes
- Ambito
- databases, infrastructure
Direzione di ricerca
Inizia da internal/webhook/v1alpha1/common.go intorno alla riga 125 e da internal/controller/resourcemanager.go intorno alla riga 269 per tracciare la validazione e la riconciliazione di additionalVolumeClaimTemplates. Esamina quindi come l’operatore esegue il provisioning e fa riferimento ai PVC di StatefulSet per i cluster esistenti. Il lavoro è completo quando le aggiunte possono essere applicate a un cluster esistente contenente dati senza essere rifiutate o scartate, preservando al contempo il comportamento previsto di PVC e StatefulSet.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Company or project name
No response
Use case
Two situations, both on clusters that already exist and hold data:
-
Growing capacity. Adding a disk is the natural way to extend a cluster that's filling up. Today that's only available to clusters whose authors anticipated it at creation time; everyone else has to recreate.
-
Per-tenant storage isolation. We need a dedicated volume encrypted with a specific customer's managed KMS key, holding exactly one tenant's table and nothing else. This requirement arrives well after the cluster is built — it comes from a contract, not from capacity planning — and the key doesn't exist until the customer creates it. Recreating a multi-terabyte production cluster to attach it isn't practical.
Describe the solution you'd like
Allow additions to additionalVolumeClaimTemplates after cluster creation.
Note the restriction is currently enforced in two places, so the webhook alone isn't the whole change:
// internal/webhook/v1alpha1/common.go:125 — rejects the spec change
if len(oldTemplates) != len(newTemplates) {
return errors.New("additionalVolumeClaimTemplates cannot be added or removed after cluster creation")
}
// internal/controller/resourcemanager.go:269 — discards it on reconcile
statefulSet.Spec.VolumeClaimTemplates = input.Existing.STS.Spec.VolumeClaimTemplates
One mechanism that avoids the immutability problem entirely: volumeClaimTemplates are only used for provisioning, and a StatefulSet uses a PVC that already exists under the name it expects. So the operator can create the PVC directly per replica and reference it from the pod template — which is mutable — leaving volumeClaimTemplates untouched.
Describe alternatives you've considered
- Declare spare disks at creation time. Doesn't fit either use case: you'd pay for idle volumes indefinitely, and you cannot pre-declare a StorageClass for a customer KMS key that doesn't exist yet.
- Declare the disk via settings.extraConfig without a claim. This appears to work and silently doesn't. With no PVC, the disk's path is just a directory on the main data volume — ClickHouse registers the disk, system.disks shows it, a storage policy over it works, and parts report landing on it. For an encryption-isolation requirement that's the worst failure mode available: every signal says success while the data sits on the wrong volume under the wrong key. The tell is total_space matching the main volume.
- Recreate the ClickHouseCluster CR against the existing PVCs. Plausible, but it means deliberate downtime on a production cluster and depends on adoption behaving exactly as hoped.
- Recreate the StatefulSet with orphaned PVCs. Also viable and possibly what you'd prefer — more invasive, but keeps volumeClaimTemplates authoritative.
- A downstream patch. What we do today. We'd rather not carry it, which is why we're asking here.
Additional context
No response
- Lingua principale
- Go
- Stelle
- 313
- Fork
- 48
- Merge medio
- 1g 15h
- PR unite (30g)
- 21
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ClickHouse/clickhouse-operator
-
feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
ClickHouse/clickhouse-operator#365 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Write migration paths/helper tools to the operator from bitnami helmchart/Altinity operatorForse di nuovo libera @GrigoryPervakov l’ha presa 74 giorni fa e non c’è nessuna pull request aperta. Apertafeature
ClickHouse/clickhouse-operator#272 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(controller): Allow for a configurable listen_host in network.yamlForse già presa @arekborucki l’ha presa 123 giorni fa. Apertafeature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
ClickHouse/clickhouse-operator#217 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
ClickHouse/clickhouse-operator#196 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
ClickHouse/clickhouse-operator#144 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ClickHouse/clickhouse-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
shukiv/jabali-panel#2423 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area/docs good first issue help wanted kind/docs priority/p2 triage/accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mattabate/life-distributable#158 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
router-for-me/CLIProxyAPI#7330 ·
I maintainer di solito rispondono entro 1 giorno