zalf-rdm / geonode-k8s

A Kubernetes helm chart for the geospacial webapplication Geonode
https://geonode-k8s.readthedocs.io/en/latest/
GNU General Public License v2.0
13 stars 8 forks source link

Bug: Error when updating release #207

Open TheNumenorean opened 2 weeks ago

TheNumenorean commented 2 weeks ago

Bug Description

Getting an error when running

helm upgrade --cleanup-on-fail --install --namespace geonode --create-namespace --values values.yml geonode geonode/geonode-k8s

after first installing geonode.

message:

Error: UPGRADE FAILED: cannot patch "pvc-geonode-geonode" with kind PersistentVolumeClaim: PersistentVolumeClaim "pvc-geonode-geonode" is invalid: spec: Forbidden: spec is immutable after creation except resources.requests and volumeAttributesClassName for bound claims
  core.PersistentVolumeClaimSpec{
        ... // 2 identical fields
        Resources:        {Requests: {s"storage": {i: {...}, s: "10Gi", Format: "BinarySI"}}},
        VolumeName:       "pvc-89d37c7a-7549-423b-ae67-5852edc5cda1",
-       StorageClassName: &"hostpath",
+       StorageClassName: nil,
        VolumeMode:       &"Filesystem",
        DataSource:       nil,
        ... // 2 identical fields
  }

Reproduction Steps

Freshly install geonode with the above helm upgrade command, and then run the command a second time with no changes.

Behavior

Command fails, changes arent made if present.

Additional Information

values:

geonode:
  ingress:
    enabled: false
rabbitmq:
  enabled: false
AlexGacon commented 2 weeks ago

@TheNumenorean , could you precise which K8s provider you are trying to use? To me, such a message is related on how the PV is managed by your cluster. Perhaps you have to change the storage class to use for the PV.

TheNumenorean commented 2 weeks ago

Thats a fair point, I am using docker desktop kubernetes. And adding global:storageClass: hostpath does avoid the problem. To me, it seems odd that it would change the setting value on an update without any external changes,