feat: expose the SSH port-forward shadow (#546) - #56
Draft
matbun wants to merge 2 commits into
Draft
Conversation
This was referenced Jul 29, 2026
matbun
force-pushed
the
feat/ssh-shadow-tunnel
branch
4 times, most recently
from
July 31, 2026 14:38
7878a71 to
84e1e2e
Compare
Surfaces the virtual kubelet's ssh shadow mode through values, so an
air-gapped HPC site can be reached without hand-writing a shadow template:
virtualNode:
network:
enableTunnel: true
shadowMode: ssh
ssh:
loginHost: login.hpc.example.org
user: alice
keySecret: hpc-ssh-key # or keytabSecret + principal
loginHost and user are required when shadowMode is ssh and fail rendering
if missing; everything else falls through to the virtual kubelet's own
defaults rather than being pinned here twice.
The wstunnel template ConfigMap is no longer rendered or mounted in ssh
mode. The virtual kubelet prefers a template file over its built-in ones,
so mounting it would silently override the ssh shadow with an nginx
wstunnel Deployment - the kind of failure that costs an afternoon. An
explicit customTemplate still wins in either mode.
Secrets gain create/update/patch only when credential replication is on,
since that grant is cluster-wide.
Rendering with the existing test values is byte-identical to before.
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
interLink gained Network.SSH.ForwardMode for login nodes that refuse TCP forwarding, where ssh -L is answered with "administratively prohibited". Surface it, and the command the exec mode relays through, so a site does not have to drop to a hand-written virtual kubelet config to use it. Both are omitted when unset, so the rendered config is unchanged for every existing values file. Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
matbun
force-pushed
the
feat/ssh-shadow-tunnel
branch
from
July 31, 2026 15:03
84e1e2e to
93a640a
Compare
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.
Closes interlink-hq/interLink#546. Chart side of interlink-hq/interLink#550. Part of interlink-hq/interLink#545.
Surfaces the virtual kubelet's SSH port-forward shadow through values, so an air-gapped HPC site can be reached without hand-writing a shadow template. Needs a virtual kubelet with interlink-hq/interLink#550 in it — before that,
shadowModeis a knob that renders config the VK ignores.Usage
enableTunnelturns on shadow pods for offloaded pods with exposed ports;shadowModepicks which shadow is rendered. Both are needed.Full deployment in
interlink/examples/ssh_tunnel.yaml.What's in it
network.shadowMode—""(default, wstunnel) or"ssh". Only emitted into the VK config when set, so the default render is untouched.network.ssh.*—loginHost,user,port,image,auth,keySecret/keySecretKey,keytabSecret/keytabSecretKey,principal,krb5ConfigMap,knownHostsConfigMap,replicateCredentials,nodeWaitTimeout,extraOptions.loginHostanduseruserequiredand fail rendering whenshadowMode: ssh:Everything else is only emitted when set, so defaults live in the VK rather than being pinned in two places that can drift.
The wstunnel template ConfigMap is no longer rendered or mounted in ssh mode. This is the part worth reviewing. The chart sets
WstunnelTemplatePathand mounts an nginx/traefik wstunnel template wheneverenableTunnelis on — and the VK prefers a template file over its built-in ones. In ssh mode that silently produces an nginx wstunnel Deployment instead of the SSH shadow, which is the kind of failure that costs an afternoon. New helperinterlink.useWstunnelTemplateFilegates the ConfigMap, the volume, the mount, andWstunnelTemplatePathon one condition. An explicitcustomTemplatestill wins in either mode.RBAC. Secrets gain
create/update/patch, but only whenshadowMode: sshandssh.replicateCredentialsis on, since that grant is cluster-wide.network.ssh.forwardMode — portforward (default, ssh -L) or exec, for login nodes that set AllowTcpForwarding no and answer every channel with administratively prohibited. execConnectCommand (default nc) is the relay command run on the login node in that mode. Both omitted when unset.
Security note
ssh.replicateCredentialsdefaults totrue, matching the VK default. It copies the SSH key or keytab Secret into each shadow's namespace, which makes it readable by anyone who can read Secrets there. It defaults on because shadows follow the offloaded pod into per-user namespaces (interlink.eu/shadow-same-ns) and multi-tenant setups are unusable otherwise — but it is a real tradeoff. Set it tofalseand provision the Secret yourself if that isn't acceptable, and the cluster-wide Secret write grant goes away with it.Compatibility
helm templatewith both existing test values files produces output byte-identical tomain:helm lintclean.