vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
63 stars 14 forks source link

Remove vcluster dependence on kapp-controller. #458

Closed GrahamDumpleton closed 2 days ago

GrahamDumpleton commented 1 week ago

Is your feature request related to a problem? Please describe.

When using vcluster support and you opt to have a Contour instance deployed into the virtual cluster, installation of Contour is dependent on having kapp-controller available in the underlying host cluster. With the new CLI installer not requiring kapp-controller and it now being optional, then one looses the ability to enable Contour for a virtual cluster if kapp-controller is not installed.

Describe the solution you'd like

Not use kapp-controller to install Contour into a virtual cluster.

Describe alternatives you've considered

No response

Additional information

No response

jorgemoralespou commented 3 days ago

What's the strategy we want to follow here?

Relevant code is at https://github.com/vmware-tanzu-labs/educates-training-platform/blob/develop/session-manager/handlers/application_vcluster.py#L782-L829

GrahamDumpleton commented 3 days ago

Couple of options.

First vendir in files into sub directory of session-manager. The Python code of session-manager will load the YAML and convert to Python objects, fix up what it needs to and then stuffs them into vcluster config file as set of resources to create once cluster starts.

Second is use ability of vcluster config to take a helm package to install it.

The first wouldn't work for disconnected install unless do image reference fixups.

The second would never work for disconnected install, but may be easier.

GrahamDumpleton commented 3 days ago

Docs about helm chart install by vcluster.

GrahamDumpleton commented 3 days ago

Note that currently was not exposing ability of vluster to accept set of helm packages to install as kapp-controller was working and was doing that before they allowed helm install.

GrahamDumpleton commented 3 days ago

If use helm based method we could always install nginx controller instead as may be more lightweight.

GrahamDumpleton commented 3 days ago

The helm based method seems to be dependent on the virtual cluster being created by the vcluster command. So cluster is created, and then it seems to extract helm chart information from the configuration and applies it from the vcluster command. IOW, not installed by the vcluster pod. Thus doesn't appear to be of use to us.