yuvipanda / kubessh

SSH into a kubernetes pod per user
Apache License 2.0
48 stars 11 forks source link

Support profiles #14

Open yuvipanda opened 4 years ago

yuvipanda commented 4 years ago

We want a single user to be able to have multiple running pods of different config active at the same time. Multiple images, different amounts of RAM, GPUs, etc.

The issue is one of UX - how do we let users choose which profile? This is reasonably easy with an interactive session - you can just ask! However, since we want to support non-interactive use as well (for #8 and similar), we can't rely on having a working TTY. And for similar reasons, we shouldn't hijack how commands get interpreted either - most remoting tools expect that to not change either.

Possible options:

  1. Use the 'username' part of the ssh command. We pick a character that we consider a separator, escape it otherwise, and use that to pass options. For example, you could ssh as 'yuvipanda+profile-1@host'. Need to see what the restrictions on usernames are in the SSH protocol, and if there are length limitations
  2. Pass an environment variable. SSH lets the client pass a whitelisted set of environment variables through to the server. We could use this to pass profile info through
  3. ???