Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] (no subject)

Hello, I am from Deploy Team and I am working on issue[1] and I would like to discuss it.

User asks for implementing for chectl an ability to configurŠµ Eclipse Che host volume paths.

Why do we need this change?
 
User can deploy Eclipse Che on the minikube locally(without virtual machine, it is an option "minikube start ...options... --vm-driver=none"). Also user can deploy Eclipse Che on the LXD container with pre-installed minikube(without VM too, because LXD container it is a light alternative VM). Minikube has hard-coded host volume path to the /tmp/hostpath-provisioner folder. So if application(like Eclipse Che) doesn't create own persisted volume, then minikube provide volumes from `tmp` folder. When user restart computer or lxd container, Eclipse Che loses all volume data with postgres DB and workspaces source code, because system clean up `/tmp` folder. 

Options to solve user's issue:
1. It seems to be not really Che issue but minikube since Kubernetes declares that persistent volumes must keep data even after Deployment or Cluster restart. So, quite logical proposal here could be provide an ability for minikube to configure root folder for PVs, now it's hard-coded to /tmp/hostpath-provisioner[2]. But it's more long term solution since it needs participation of minikube team and minikube release then.

2. As an alternative solution (it's even more workaround) - implement the option user asks for: Che could try to manage host paths manually instead of relying on default minikube hostpath-provisioner.
I've already created pull request[3] to the che-operator to fix this issue for Postgres DB where Che Operator creates Persisted Volume with non /tmp path and then reference it from Persistent Volume Claim for postgres.
But more difficult part here is Che Server part, Che Server itself doesn't need persisted volumes, but they're needed by Workspaces. 
So Che Server can create persistent volume(PV) per workspace/per user and bind Persistent Volume Claim to pre-created PV by class name.
And questions here:
- then Che Server would need cluster-admin rights, now for K8s platform it has but I heard willing that we want to get rid of it;
- then Che Server would do additional logic with managing PV, except preparing we should also think about cleaning them up after workspace removing.
So, do we really need such quite fast but dirty solution to workaround platform issue? It seems it costs for us quite much to implement it and later support.

Before creating an issue for minikube and initing such discussion there I would like to hear opinions

[1] https://github.com/eclipse/che/issues/15157
[2] https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go#L50
[3] https://github.com/eclipse/che-operator/pull/144

Back to the top