support default storageclass
Is your feature request related to a problem? Please describe.
There already have a default storageclass in my kubernetes cluster
$ kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
openebs-hostpath (default) openebs.io/local Delete WaitForFirstConsumer false 31d
i want use the default storageclass with helm install rainbond, how can i do that?
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context rainbond使用的存储好混乱,要求安装NFS 客户端,自己创建了2个存储类manual和rainbondvolumerwx,还是用rwx和rwo两种存储类型。
大多数helm chart的存储设计这样比较简单合理:
persistence:
## @param persistence.enabled Enable persistence
##
enabled: true
## @param persistence.storageClass PVC Storage Class for Tomcat volume
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: ""
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: support default storageclass
nfs 客户端其实不是必须安装的,只是默认情况下,Rainbond 会自动为你安装一个 nfs 存储。如果你自己集群已经有默认的存储类了,那么你在使用 Helm 安装时只需要指定 RWX 和 RWO 的 storageClass 即可。
也就是说当你有这个 openebs-hostpath storageClass 类时,你按照上方指定以后,那么不会生成 rainbondvolumerwx,也不需要你有 nfs 客户端。只是把同一个 storageClass 设置两次的体验确实不太好,这部分可以优化下 Chart 包
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
The nfs client is actually not required to be installed, but by default, Rainbond will automatically install an nfs storage for you. If your own cluster already has a default storage class, then you only need to specify [RWX] when using Helm installation And the storageClass of RWO is enough.
That is to say, when you have this openebs-hostpath storageClass class, you will not generate rainbowvolumerwx after you specify it as above, and you do not need to have an nfs client. It’s just that the experience of setting the same storageClass twice is not very good. This part can be optimized in the Chart package
同一个 storageClass 需要设置两次是rainbond必须使用两种存储类型rwx 和rwo导致的,是否可以简化为一种?
否则如果只有openebs hostpath或者只有cephrbd,就必须提供两种storageclass,导致默认storageclass也无法支持no storageClassName spec is set, choosing the default provisioner,增加部署复杂度,无法自动化部署。
另外rbd-db-rbd-db-0和rbd-etcd-rbd-etcd-0 依然使用本地存储,存储类型太分散了,这个可以配置吗
# kubectl -n rbd-system get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data Bound pvc-be13276d-4948-466e-9df6-6f56c3062c52 20Gi RWO openebs-hostpath 24m
data-rbd-monitor-0 Bound pvc-1a35e6b9-45a6-4c21-9e4a-ff6e5a97731e 20Gi RWO openebs-hostpath 25m
rbd-api Bound pvc-4436a9ae-f85e-4b37-ac73-1123514dd3d1 1Gi RWX openebs-kernel-nfs 23m
rbd-app-ui Bound pvc-6d1591d0-c3dc-42a0-91dd-b34c155a419e 10Gi RWX openebs-kernel-nfs 22m
rbd-chaos-cache Bound pvc-cd7d1dcc-fea9-4b7b-bf6b-afcc53905788 10Gi RWX openebs-kernel-nfs 23m
rbd-cpt-grdata Bound pvc-f59fa5d4-32bb-4b80-98b1-0704d2bf255f 20Gi RWX openebs-kernel-nfs 25m
rbd-db-rbd-db-0 Bound rbd-db 1Gi RWO manual 24m
rbd-etcd-rbd-etcd-0 Bound rbd-etcd 1Gi RWO manual 25m
rbd-hub Bound pvc-5571e2cb-ad56-4f40-9235-7e408c73e1a7 10Gi RWX openebs-kernel-nfs 25m
rbd-db 和 rbd-etcd 主要是出于性能考虑使用的本地存储。如果你使用外部数据库,复用K8s 集群的etcd ,那么就不会有这两个存储。
rwx 和rwo后续确实可以简化为一种,减少配置。你现在这两种都使用 openebs-hostpath 是不可用的吗?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
rbd-db and rbd-etcd are primarily local storage for performance reasons. If you use an external database and reuse the etcd of the K8s cluster, then these two storages will not exist.
The subsequent rwx and rwo can indeed be simplified into one, reducing configuration. Is it unavailable for you to use openebs-hostpath for both?
yes, Openebs hostpath does not provide RWX capabilities, rwx PVC will pendding
root@node1:~# kubectl -n rbd-system get pods
NAME READY STATUS RESTARTS AGE
dashboard-metrics-scraper-6948f9475-sxdfv 1/1 Running 0 52s
kubernetes-dashboard-cd594bb64-b9w9l 1/1 Running 0 41s
metrics-server-56df97f57-rxdnb 1/1 Running 0 50s
rainbond-operator-85bb988bb8-vddkq 1/1 Running 0 97s
rbd-api-5c78d4f76c-4vq2r 0/1 Pending 0 13s
rbd-db-0 2/2 Running 0 25s
rbd-etcd-0 1/1 Running 0 96s
rbd-eventlog-0 0/1 Pending 0 11s
rbd-gateway-hnt8k 1/1 Running 0 65s
rbd-gateway-zx7vm 1/1 Running 0 65s
rbd-hub-868ccb6645-bbdp8 0/1 Pending 0 89s
rbd-monitor-0 1/1 Running 0 56s
rbd-mq-5c766bf9cf-2cnvj 1/1 Running 0 47s
rbd-node-2xfqf 0/1 Pending 0 95s
rbd-node-n59g9 0/1 Pending 0 95s
rbd-node-q87p5 0/1 Pending 0 95s
rbd-resource-proxy-947f9fc96-cqcdc 1/1 Running 0 54s
rbd-webcli-6b785c49b5-dp6jv 1/1 Running 0 44s
root@node1:~# kubectl -n rbd-system get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data Bound pvc-d3607dfa-d7b0-401d-9cf2-62452e35b362 20Gi RWO openebs-hostpath 56s
data-rbd-monitor-0 Bound pvc-6796ae8f-6a9d-4f0c-b1af-ce4190abccc0 20Gi RWO openebs-hostpath 58s
rbd-api Pending openebs-hostpath 21s
rbd-chaos-cache Pending openebs-hostpath 1s
rbd-cpt-grdata Pending openebs-hostpath 99s
rbd-db-rbd-db-0 Bound rbd-db 1Gi RWO manual 27s
rbd-etcd-rbd-etcd-0 Bound rbd-etcd 1Gi RWO manual 98s
rbd-hub Pending openebs-hostpath 91s
root@node1:~# kubectl -n rbd-system describe pvc rbd-api
Name: rbd-api
Namespace: rbd-system
StorageClass: openebs-hostpath
Status: Pending
Volume:
Labels: belongTo=rainbond-operator
creator=Rainbond
name=rbd-api
Annotations: volume.beta.kubernetes.io/storage-provisioner: openebs.io/local
volume.kubernetes.io/selected-node: node1
volume.kubernetes.io/storage-provisioner: openebs.io/local
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: rbd-api-5c78d4f76c-4vq2r
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal WaitForFirstConsumer 31s persistentvolume-controller waiting for first consumer to be created before binding
Normal Provisioning 10s (x2 over 25s) openebs.io/local_openebs-localpv-provisioner-57f8fc8b9c-gjnzh_aae0f452-c1df-4754-8650-3bce2f03026f External provisioner is provisioning volume for claim "rbd-system/rbd-api"
Warning ProvisioningFailed 10s (x2 over 25s) openebs.io/local_openebs-localpv-provisioner-57f8fc8b9c-gjnzh_aae0f452-c1df-4754-8650-3bce2f03026f failed to provision volume with StorageClass "openebs-hostpath": Only support ReadWriteOnce access mode
Normal ExternalProvisioning 5s (x3 over 25s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "openebs.io/local" or manually created by system administrator
root@node1:~#