feat: allow setting PersistentVolumeClaimRetentionPolicy#252
Conversation
|
Hi @ed-marks thanks for the PR. Dont worry about the |
1fa4608 to
2e3d46f
Compare
Nice one thank you - I've made the rename, I'll see about manually testing it this week to make sure i've not missed anything |
…ional, reverting policy from delete to retain fails akyriako#252
akyriako
left a comment
There was a problem hiding this comment.
BUG 1: reverting from delete/delete to retain/retain seems to jam the Statefulset update. the PersistentVolumeClaims keep on getting deleted. (this derives from my changes)
BUG 2: (that's a crazy one, that I cannot recreate in main or in any other branch for that matter) create a cluster with 3 nodes, increase to 5 and then to 7. decrease to 3. nothing happens! the Statefulset remains with 7 replicas!!!
Adds support for configuring StatefulSet PVC retention via
spec.storage.persistentVolumeClaimRetentionPolicyonTypesenseCluster.This lets you control what happens to PVCs on scale-down or cluster deletion (Retain/Delete) by wiring the CRD field through to the generated StatefulSet. I've added to the base sample what that looks like.
The main use case for me is short-lived test clusters, where PVCs should be cleaned up automatically when clusters are torn down, while still leaving production-like defaults.
I also noticed the local kind cluster was named incorrectly and there was a suspect OR condition flagged by
go vetwhich always evaluated to true. I believe it was mean to be "whencondition.Reasonis neitherConditionReasonQuorumDowngradedorConditionReasonQuorumQueuedWrites" which is what i've amended it to.Also mostly FYI but running
make helmoverwrote a ton of stuff, almost all of which were out of scope of this PR. I've cherry-picked the bits of that this PR cares about.