Current Web Terminal includes some CLI tools like oc, odo, kubectl, kn, tkn etc...Those tools are included at build time. When the Web Terminal container image is built.
This approach has 3 problems:
- the versions of the CLI tools may not match the version of OpenShift where the container is running (for example oc 4.8 on ocp 4.5)
- the web terminal may include tools that are useless in the cluster where it's run (for example kn in a cluster without serverless)
- the list of tools that that we are able to maintain in the web terminal is limited
One way to address the problem is letting admins replacing the web terminal default image with a custom one. This is fine but assume that require some effort and knowledge.
A proper solution requires a mechanism (i.e. a new WebTerminalTool CRD) that would allow to extend the list of tools included in the Web Terminal of a given cluster.
Here are some ideas about how to inject a tool:
- download it from an endpoint exposed by an operator
- copy it from a container image
- run it from within a sidecar container (pod exec)
And the tools can be copied/downloaded:
- inside the web terminal container at every web terminal startup
- in PVs belonging to the users at web terminal first startup
- in one common PV attached to the web terminal controller and rsync'ed with users web terminals
- blocks
-
ODC-5274 Improve CLI support in Web Terminal
- To Do
- links to