Altinity / Altinity/clickhouse-operator
Changing reclaimPolicy on existing volumeClaimTemplate from Retain to Delete has no effect
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
In my ClickHouseInstallation I have the following
defaults:
storageManagement:
reclaimPolicy: Retain
provisioner: Operator
templates:
volumeClaimTemplates:
- name: data-1-volume
provisioner: Operator
spec:
storageClassName: clickhouse-data-v1
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
If I add reclaimPolicy: Delete
templates:
volumeClaimTemplates:
- name: data-1-volume
provisioner: Operator
reclaimPolicy: Delete
spec:
storageClassName: clickhouse-data-v1
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
The operator seems to process it successfully (and the CHI status goes to InProgress and then Completed); however, the underlying/relevant PV's reclaimPolicy is never updated (and remains as Retain)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the ClickHouseInstallation YAML shown and inspect the relevant PersistentVolume's reclaimPolicy before and after changing the volumeClaimTemplate. Trace the operator path that processes volumeClaimTemplates and verify the change is reflected on the underlying PV, with a regression test covering Retain-to-Delete updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100