Description
Summary
Argocd cannot handle sync'ing of pvc changes in statefulsets, because k8s cannot.
There is a solution for this (recreate statefulset without cascade delete) - but as I understand it - recreate is unfortunately done WITH cascade=true (default) as far as I can see.. (the docs here does not even mention recreate option though: https://github.com/argoproj/argo-cd/blob/master/docs/user-guide/sync-options.md
I propose recreate option either be changed to have cascade=false by default - or a new cascade - without cascade be added.
Motivation
I have a statefulset with a defined pvc size of 500GB.
I want to resize the resulting PVCs WITHOUT disrupting my service.
Unfortunately k8s does NOT allow for editing that part of the statefulset definition (yet - kubernetes/kubernetes#68737 and ).
The solution I have found so far, is do to this:
kubectl delete sts --cascade=false <statefulset>
and then the normal "sync" procedure will work - as it would recreate the statefulset - and my pods would NOT be down'ed.
Proposal
Argocd should have a sync option called:
"recreate - without cascade" or the current "recreate" sync option should be with cascade=false (which IMHO is the safer default)
p.s. and the current sync options are already plentiful and dificult to figure out WHEN to use - so there should be a "popup" guide on when to "tick which box" on sync options. And possibly some sync options could atleast be automaticly "recommended" for a sync operation - to help the users "do the right thing" - based on a check of "resources in sync and their state" ? should not be too difficult once the cases are documented - to also start automating a "recommender of options" - per sync - which in the end could turn into something making automatic sync much less dangerous :)