-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra option --PersistentVolumeName and --HostPathSource to CheCTL #15157
Comments
Hello. I started discussion about current issue in the che-dev mail list.
After that I found that minikube has pr to configure host volume path. So I temporary stop work on this issue and I am tracking minikube pr's: kubernetes/minikube#6156 -> pvc folder path readability Will see, Maybe we can help somehow with upstream minikube pr's |
@AndrienkoAleksandr this is an issue that affects and will affect many current and future cloud-native approaches around che. Even though your patch to chectl and operator give a workaround to the situation, I think there is still a chance to fix this witout doing double work for when this new features come to minikube (and other cloud solutions that emulate minikube's behauvoir). In this case I think the best solution to both postgres data and workspaces data is to be able to choose a PersistentVolumeClaimName cr (and configmap) be it for postgress or single-pvc-strategy workspace data. And I will explain why I think this is the best way to do it: first minikube will give an option to choose the "default" location for non-specified new persistent volumes. This is too generic and can be solved in a sanest way using the mentioned approach. PersistentVolumeClaimName option for postgres data or workspaces: PersistentVolume is the object that specifies the hostPath source property which is the main subject of this discussion. instead of --PersistentVolumeName and --HostPathSource to CheCTL it can be workspacesPVCName and postgresPVCName, the rest can be hardcoded to the PVC itself (volume name, storage class, hostPathSource). |
@gattytto Hello, I think we can use storage class names instead of PVC names. User(administrator Che installation) could provision persisted volumes with storage class names. Then user(administrator) can start new che installation with class names and Che PVC(s) will be bind to created persisted volumes. I tested such Che configuration and it works without che-server and che-operator modification. I prepared new pr for chectl che-incubator/chectl#461 Also I prepared doc: I believe these pr's it is technical minimum to resolve issue with host volume path without awaiting on minikube enhancements. @sleshchenko thanks a lot for consultation about PVC configuration Eclipse Che. |
that's even better, thank you. I didn't know it could be done this way and it sounds even better |
Is your enhancement related to a problem? Please describe.
yes, it is related to this issue #15065 in which the first layer of che (postgres data) loses its data when running inside a minikube node.
Describe the solution you'd like
as far as I can see the problem, there is no "PersistentVolume" reference to pass as an argument when issuing the chectl server:start command to start the che server deployment in a minikube server. Neither there is a property in cr.yaml to specify a PersistentVolume name or a specific path in the host.
This leads to PersistentVolumeClaim(s) created by che letting minikube choose the path for the files (both first layer postgres data and 2nd layer workspaces data), which for the time of making this issue is a folder in /tmp/hostpath-provisioner that gets emptied when kubelet service starts.
Describe alternatives you've considered
for the main postgres instance called postgres-data I have made source changes for a proof of concept that implements the creation of a PersistentVolume using the HostPath type to specify a non-tmp location for the data. The source changes are present in the issue conversation of #15065
as for the workspaces portion, there seems to be a PersistentVolumeClaims strategy property with options to choose from, that creates a single persistent volume claim for each workspace or a common one for all of them so I don't know maybe there could be an extra option for the single-persistent-volume strategy to make sure it uses a custom persitent volume and an extra option to specify the hostPath source (final directory in the node filesystem).
Additional context
there are screenshots posted in the issue mentioned above showing the behauvoir of che when a custom persistent volume is used for the general che postgres data (to have it persisted after a minikube node reboot) and how workspaces are unable to be brought back up when the node gets restarted, even tho the info about them in postgres is persisted, because the workspaces folders in filesystem get deleted from /tmp.
The text was updated successfully, but these errors were encountered: