yuvipanda / jupyterhub-ssh

SSH Access to JupyterHubs
BSD 3-Clause "New" or "Revised" License
93 stars 29 forks source link

Automatically seed the SSH key needed if unspecified #38

Closed consideRatio closed 3 years ago

consideRatio commented 3 years ago

http://masterminds.github.io/sprig/crypto.html describes how sprig, a library exposing functions that helm can use, includes genPrivateKey that allows us to generate a private key.

I suggest that like the z2jh helm chat does, this Helm chart generates such private key unless explicitly passed and saves it into a k8s Secret and relies on the lookup function to catch it during helm template rendering. In other words, that we seed the SSH key for users that doesn't specify it, and we make sure to reuse a previously seeded SSH key.

For some reference examples on doing this, see:

yuvipanda commented 3 years ago

Wow this would be pretty fucking awesome!