feat(cloudshell): SSH bastion + k3s twin admin surface via cloudshell-fog - #50
Merged
Merged
Conversation
…-fog
turtle-ssh-tunnel (new, 419 lines):
- Reads ~/.config/sourceos/cloudshell.yaml (or env vars: CLOUDSHELL_HOST/USER/PORT/KEY)
- connect: os.execvp ssh → replaces process (true interactive session)
- tunnel [start|stop|status]: ssh -N -L {16443}:{k3s-host}:{6443} in background;
PID → ~/.local/state/sourceos/k3s-tunnel.pid
- proxy [start|stop|status]: SOCKS5 on localhost:1080 via cloudshell-fog;
PID → cloudshell-proxy.pid
- exec <cmd>: non-interactive remote command
- copy <src> <dst>: scp wrapper with cloudshell host expansion
- Emits mesh events on connect + tunnel-start
turtle-shell-init.zsh:
- csh → SSH into cloudshell-fog bastion (interactive)
- ktunnel [start|stop|status] → k3s API tunnel through bastion
- kproxy [start|stop|status] → SOCKS5 proxy through cloudshell
- k3s <args> → kubectl with KUBECONFIG=~/.kube/config-k3s-twin;
warns when tunnel PID is dead
- csh-exec / csh-copy / csh-status convenience wrappers
turtleterm.lua:
- CMD+SHIFT+K → csh (CloudShell SSH)
- Palette: cloudshell_ssh / k3s_tunnel / cloudshell_status
turtle-mesh-serve:
- _k3s_tunnel_alive(): reads k3s-tunnel.pid, sends kill -0 to check liveness
- gather_state(): k3s_tunnel_up bool in returned dict
- Dashboard status bar: k3s badge (green=tunnel up / red=down)
mdheller
force-pushed
the
feat/cloudshell-fog-k3s-twin-surface
branch
from
August 4, 2026 07:55
20cebfe to
84e61fb
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TurtleTerm as first-class integration surface for cloudshell-fog — SSH bastion into the sovereign cloud shell with tunnel through to the k3s twin for cluster admin and DevSecOps.
Shell surface
cshCMD+SHIFT+K)ktunnel startlocalhost:16443 → k3s-twin:6443ktunnel stop/ktunnel statuskproxy startlocalhost:1080via cloudshell for sovereign browsingk3s get pods -n kube-systemkubectlwired to k3s twin — warns if tunnel is downcsh-exec <cmd>csh-copy src dstscpwrapper with cloudshell host expansioncsh-statusConfig
~/.config/sourceos/cloudshell.yaml:Or env vars:
CLOUDSHELL_HOST,CLOUDSHELL_USER,CLOUDSHELL_PORT,CLOUDSHELL_KEY,CLOUDSHELL_K3S_TUNNEL_PORT,CLOUDSHELL_K3S_KUBECONFIG.Mesh dashboard
New k3s badge in the status bar: green when
k3s-tunnel.pidprocess is alive, red otherwise. Consistent with Noetica and SearXNG liveness tiles.Memory mesh integration
csh(connect) → emitscloudshell-connecteventktunnel start→ emitsk3s-tunnel-starteventTest plan
csh-status— shows config + tunnel/proxy statecsh— interactive SSH session opens to cloudshell-fogktunnel start→ k3s badge in dashboard turns greenk3s get nodes— hits k3s twin via tunnelk3s get podswithout tunnel → warning printedktunnel stop→ badge turns redkproxy start→ curl via SOCKS5 workscsh-exec "hostname"— returns cloudshell hostname