guerzon / vaultwarden

Helm chart for Vaultwarden, the (unofficial) Bitwarden-compatible server written in Rust, formerly known as bitwarden_rs
MIT License
117 stars 60 forks source link

Latest update to chart V0.17.0 breaks upgrade process #58

Closed groundhog2k closed 4 months ago

groundhog2k commented 7 months ago

When trying to upgrade an existing vaultwarden deployment based on chart version 0.16.1 to chart 0.17.0 the helm deployment fails with:

Error: UPGRADE FAILED: cannot patch "vault-vaultwarden" with kind StatefulSet: StatefulSet.apps "vault-vaultwarden" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

I guess this is related to changes made in the volumeMounts: section.

Supporterino commented 6 months ago

Phasing the same problem when upgrading the helm chart from version 0.17.0 to 0.18.0. With the help of argo-cd I could track the error further down. Since the Statefulset is responsible for handling the PersistentVolumeClaim the persistentVolumeClaimRetentionPolicy key is added to the Statefulset in the helm templates. But k8s doesn't allow the adjustment of this field. At the moment I haven't found a workaround yet. Only option I see is recreating the Statefulset which could lead to a loss of the PersistentVolumeClaim Screenshot 2023-12-15 at 20 50 24