loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.92k stars 427 forks source link

Add Multiple Vcluster support for hostpath mapping daemonset #831

Open brandonrjacobs opened 2 years ago

brandonrjacobs commented 2 years ago

Is your feature request related to a problem?

Yes, currently when running the hostpath mapper it creates a daemonset with each vcluster install. This means if we are running multiple vclusters against the same set of physical nodes we are duplicating the number of daemonsets we are installing. For environments with high numbers of tenants or customers using vcluster, this creates overhead on the physical nodes that could be unnecessary.

Which solution do you suggest?

Suggestion is to modify the logic in the hostpath mapping code to support multiple vclusters, and allow for a single deployment on physical nodes. This allows you to deploy hostpath mapper once, and many vclusters without having to re-deploy.

Which alternative solutions exist?

Not that I am aware of.

Additional context

As per discussion with @ishankhare07 , this seems like a nice enhancement.

matskiv commented 2 years ago

I like the idea of optimizing the host path mapper, so +1 from me, but I am not sure when exactly we can get around to implementing this.

Technical thoughts: I think this will need to be a separate helm chart and a separate command on the vcluster binary, to keep the current behavior without change. We could make this work without the need to connect each host-path-mapper pod to the vcluster API servers. We would need to add the "vcluster.loft.sh/uid" annotation to the synced pods, similar to how we have "vcluster.loft.sh/name" and "vcluster.loft.sh/namespace", but for the pods only. But this would mean that the new "global" host-path-mapper will not be backward compatible with previous vcluster versions.

brandonrjacobs commented 2 years ago

I think myself and my organization (CoreWeave) would love to help support this depending on how busy you guys are. We are quite interested in this so would love to collaborate on the implementation with approved support from you guys.

brandonrjacobs commented 1 year ago

Is this feature being removed from consideration or implemented in the Loft Product?

salanki commented 1 year ago

Was this completed? Don't see a PR?

FabianKramm commented 1 year ago

@brandonrjacobs @salanki sorry, closing this was a mistake in our automated pipeline, we are still internally debating how we would approach this the best way.

vicaya commented 3 months ago

The feature appears to be implemented in "pro" version. IMO, this is a basic feature that should be part of the open source edition.