Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

unable to change localprovisioner path #203

Open
Sam-Lin-MillersLab opened this issue Mar 19, 2021 · 7 comments
Open

unable to change localprovisioner path #203

Sam-Lin-MillersLab opened this issue Mar 19, 2021 · 7 comments
Assignees

Comments

@Sam-Lin-MillersLab
Copy link

Sam-Lin-MillersLab commented Mar 19, 2021

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
Copy link
Member

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
Copy link
Member

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

@kmova
Copy link
Member

kmova commented Jun 16, 2021

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

@shovanmaity
Copy link
Member

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.

@kmova
Copy link
Member

kmova commented Aug 18, 2021

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

@Sam-Lin-MillersLab
Copy link
Author

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
Copy link

D1StrX commented Mar 16, 2024

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants