charts
charts copied to clipboard
unable to change localprovisioner path
So if you set it wrong in the first time, you can't change it. Not even uninstall the chart and reinstall it
I am using 2.7.0
I hope this query is related to openebs hostpath volume.
By default /var/openebs/local
is the path in the host where data is saved for the volumes. This information is present in the annotation of storage class.
kubectl get sc openebs-hostpath -o jsonpath='{.metadata.annotations.cas\.openebs\.io\/config}'
- name: StorageType
value: "hostpath"
- name: BasePath
value: /var/openebs/local
There are 2 options if we want to save the data in some other place in the host.
- If we pass
localprovisioner.basePath
in helm values it reflects in the storage class. - We can create a new storageclass and consume that for our application.
Here is one sample storageclass
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: updated-openebs-hostpath
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
- name: StorageType
value: "hostpath"
- name: BasePath
value: "/var/openebs/local"
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
I have tested this in 2.9.0
openebs version. @Sam-Lin-MillersLab PTAL if this solves your use case.
Hi @shovanmaity -- is it possible to install the same chart with a modified value?
Yes it is possible, like point 1 in the comment. This value is used in 2 places.
- In default storage class.
- As env in
localpv-provisioner
. This is useful when base path is not present in sc. If we helm upgrade of existing installation, storageclass will not be updated but env will be updated.
@Sam-Lin-MillersLab - do you still need a fix for this one?
well, sorry, I haven't had a chance to test it. you can close it if you want. i will report if it doesn't work.
Fresh installation here. I tried to define an alternative basepath in the values.yaml. But in my case the entire values.yaml is ignored.
helm install openebs-test -n open-ebs openebs/openebs -f values.yaml
- The
kubectl get sc openebs-hostpath -o jsonpath='{.metadata.annotations.cas\.openebs\.io\/config}'
shows the default path. - When changing the SC name of the openebs-hostpath, it doesn't deploy the SC with the specified name. - When disabling the openebs-device SC, it ignores this and still deploys. (Tried both deprecated and new definition)
enableDeviceClass: false
...
deviceClass:
# Name of default device StorageClass.
name: openebs-device
Also tried a fresh install with;
defaultStorageConfig:
enabled: "false"
Anything else to check?