What to build
k8e sandbox expose <session-id> <port> returns a signed, limited, revocable preview URL routed via K8s Service + Ingress to the session pod. From KIP-12 (Part A). Consumes the ingress-class + host-pattern config from #484.
API contract (from KIP-12):
rpc ExposePort(ExposePortRequest) returns (ExposePortResponse);
message ExposePortRequest { string session_id = 1; int32 port = 2; int32 ttl_seconds = 3; }
message ExposePortResponse { string url = 1; int64 expires_at = 2; }
Flow: gateway labels the session pod k8e.sandbox/session=<sid> at claim time → creates a Service (selector on that label) + Ingress (/p/<sid>/<port>/ prefix) → mints an HMAC-signed token (payload: sid, port, exp; signed with server key) → Ingress external-auth calls gateway /preview/verify to validate token + session-active. Route cleaned up on DestroySession. Requires gateway RBAC for create/delete Services + Ingresses.
Acceptance criteria
Blocked by
What to build
k8e sandbox expose <session-id> <port>returns a signed, limited, revocable preview URL routed via K8s Service + Ingress to the session pod. From KIP-12 (Part A). Consumes the ingress-class + host-pattern config from #484.API contract (from KIP-12):
Flow: gateway labels the session pod
k8e.sandbox/session=<sid>at claim time → creates a Service (selector on that label) + Ingress (/p/<sid>/<port>/prefix) → mints an HMAC-signed token (payload: sid, port, exp; signed with server key) → Ingressexternal-authcalls gateway/preview/verifyto validate token + session-active. Route cleaned up onDestroySession. Requires gateway RBAC for create/delete Services + Ingresses.Acceptance criteria
k8e.sandbox/session=<sid>label at claim timeexpose <sid> 8080returns a preview URL; a server listening on 8080 in-sandbox is reachable through it with a valid tokendestroyremoves the Service + IngressBlocked by