Open virtuman opened 6 years ago
If I understand correctly, you'd like to use the local-storage
provisioner as deployed (optionally) by Kubespray, and let this be used by the services deployed by MetalK8s instead of using LVM?
This should be possible: anything Kubespray does can be configured/set up in your inventory. Then the question becomes how to disable LVM provisioning and setup of the related StorageClass
. This may be possible already by skipping tags during playbook executions. Otherwise, we may need to add a configuration flag to disable the related steps. PR welcome.
However, it is a goal of MetalK8s to 'work out of the box' and result in a production-grade cluster, so the defaults will remain as-is.
Maybe another alternative you could consider is to use MetalK8s' support to use pre-existing LVM VGs (this needs to be documented though), which would allow to share VGs across multiple installations (though, granted, you may run into LV naming conflicts... not sure how to fix that :thinking: ), and could even use thin/sparse provisioning of LVM.
Actually, everything is already almost working correctly.
Current behavior is to to the follow:
Currently, to solve the "stuck" in deployment services (elastic + prometheus):
Solution for solving this:
There's already a variable called metalk8s_default_storageclass
, which should be processed independently of all other LVM / VG tasks - prior to deploying services.yml. Currently it is processed at the time of storage-class creation here: https://github.com/scality/metalk8s/blob/5330d94115f6517f807743ae9160cdf830b019f8/roles/kube_lvm_storageclass/templates/local-storageclass.yml.j2#L6 , but should be a separate task, probably similar to this:
"storageclass.kubernetes.io/is-default-class":"false"
on all existing StorageClasses (just in case)kubectl patch storageclass {{ metalk8s_default_storageclass }} -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
In most of our DEV clusters we try to give as much space to elasticsearch stack as possible to allow for better logging during the development process.
Here's a small list of reasons why I think this is a very viable option for both DEV and PROD use-cases:
those are primarily main reasons that make clustered services + local-storage use case a lot more desirable.
I understand that expandable LVM-based volumes is a features that is currently in progress, but still, it doesn't replace the need and ease of local provisioner for many use-cases, and should be up to the user to choose to use or not to use local-storage (local provisioner) over or along with LVM-managed volumes.
What are you thoughts on this?
Besides, it was mentioned in #1 from the very beginning of the planning, so you already considered the need for it from the very first discussions?