openebs / charts

OpenEBS Helm Charts and other utilities
Apache License 2.0
101 stars 96 forks source link

unable to change localprovisioner path #203

Open Sam-Lin-MillersLab opened 3 years ago

Sam-Lin-MillersLab commented 3 years ago

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

shovanmaity commented 3 years ago

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.

  1. If we pass localprovisioner.basePath in helm values it reflects in the storage class.
  2. 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
shovanmaity commented 3 years ago

I have tested this in 2.9.0 openebs version. @Sam-Lin-MillersLab PTAL if this solves your use case.

kmova commented 3 years ago

Hi @shovanmaity -- is it possible to install the same chart with a modified value?

shovanmaity commented 3 years ago

Yes it is possible, like point 1 in the comment. This value is used in 2 places.

kmova commented 3 years ago

@Sam-Lin-MillersLab - do you still need a fix for this one?

Sam-Lin-MillersLab commented 3 years ago

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.

D1StrX commented 8 months ago

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

Also tried a fresh install with;

defaultStorageConfig:
  enabled: "false"

Anything else to check?