Skip to content

Conversation

robinsla-deshaw
Copy link

@robinsla-deshaw robinsla-deshaw commented Aug 20, 2025

Implements #340

  • Extended the Dragonfly resource with a persistentVolumeClaimRetentionPolicy field using the struct from appsv1
  • Added the conditional in the primary GenerateDragonflyResource function to set it in the StatefulSet if present

I've added tests but I've not used this testing harness before so sorry if I've not done it right/put it in the wrong place.

I've tested locally and things work as I'd expect:

  • If the policy isn't set it defaults to Retain
  • If set, the STS reflects it

This would only work on Kubernetes clusters running 1.27+ where StatefulSetAutoDeletePVC went into BETA (GA as of 1.32). That feels like a good enough number of versions/time that we don't need to lock this behind a feature gate/flag, but let me know if you'd want me to add that so this doesn't break on older clusters.

Signed-off-by: Laurence Robinson <[email protected]>
@Abhra303
Copy link
Contributor

Hi @robinsla-deshaw, e2e tests are failing, can you please fix those first?

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.

2 participants