sivagao / temp-articles

0 stars 0 forks source link

Design for exec in dashbaord #19

Open sivagao opened 6 years ago

sivagao commented 6 years ago

Purpose:

planning on working on "exec into Pod" functionality. debugging is the main use case for exec into pod.

User Case:

"I want to debug a pod. First I start with ps aux. I notice bad stuff. Then I open bash and type some more commands. Then I finish the session".

Tech:

Choices of terminal client library

use something like websockets or whatever transport the client side library supports for terminal events. The server side will use the exec endpoint from the Kubernetes API for connecting to the actual pod.

xterm.js seems like the best based on a cursory look. It's a fairly active project and is used as part of Microsoft Visual Studio Code for their integrated terminal.

hterm (https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm) This is what Google's Secure Shell extension for Chrome uses, IIRC.

using hterm. So copy-paste, colors, mouse, etc.

prototypes with different libraries so others can try them out but xterm is the easiest to integrate with websockets AFAICT.

Transport of exec api and workaround

The exec API is not usable through kubectl proxy due to it not being upgrade aware build the dashboard into a binary and run the binary with a local kubeconfig file for auth so that it connects to the API directly.(run gulp build and run the dashboard binary out of the dist/amd64 directory with a local kubeconfig for auth with the API because kubectl proxy doesn't work with websockets. )

Design:

affect the UI and how users discover the feature. pop-out-able card or a window by default.

openshift ui

Task list: