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

Do not udpate forbidden fields for statefulset #75

Closed dolohow closed 4 months ago

dolohow commented 4 months ago

Every time I upgrade this helm chart I got this error

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

Lets not put all the labels from helper, because they contain also chart version which changes on every upgrade

    volumeClaimTemplates:                                                                                            
      - metadata:                                         
          name: vaultwarden-data                          
          labels:                                         
-             helm.sh/chart: vaultwarden-0.20.0
+             helm.sh/chart: vaultwarden-0.22.1           
              app.kubernetes.io/name: vaultwarden         
              app.kubernetes.io/instance: vaultwarden
-             app.kubernetes.io/version: "1.30.1"      
+             app.kubernetes.io/version: "1.30.3"
              app.kubernetes.io/managed-by: Helm

Fixes: https://github.com/guerzon/vaultwarden/issues/58

dolohow commented 4 months ago

I applied your suggestion. Please when merging, squash commits.

Thanks

santiagon610 commented 4 months ago

I'm just another contributor on this repo like yourself, but I believe that @guerzon has the default behavior set to Squash and merge, as was my experience on the PR that I just raised a couple days ago.

guerzon commented 4 months ago

Thanks for the PR @dolohow and the input @santiagon610!