Skip to content

feat(stage): expose vm-console via gateway#136

Open
ValeryAntopol wants to merge 2 commits intomainfrom
vm-console-stage-route
Open

feat(stage): expose vm-console via gateway#136
ValeryAntopol wants to merge 2 commits intomainfrom
vm-console-stage-route

Conversation

@ValeryAntopol
Copy link
Copy Markdown
Contributor

Summary

  • New HTTPRoute crd-operator-vm-consolewss://vm-console.stage-cloudless.cloudless.dev → backend crd-operator-vm-console:8444 (plain WS).
  • Mirrors the crd-api-open pattern — gateway terminates TLS via the existing wildcard cert; no SecurityPolicy because the one-shot URL token (issued by crd-api) is the auth.
  • Sets api.console.publicUrl so issued token URLs point at the new hostname.

Goes with fluencelabs/lightmare#TBD which moves vm-console out of crd-controller into its own binary serving plain HTTP/WS on :8444.

Test plan

  • After merge, flux reconciles on stage and the HTTPRoute becomes Accepted.
  • DNS for vm-console.stage-cloudless.cloudless.dev resolves to the eg-gw LoadBalancer IP.
  • curl https://vm-console.stage-cloudless.cloudless.dev/healthz returns 200 ok.
  • POST /api/v1/workspaces/{ws}/vms/{vm}/console on crd-api-open.stage-cloudless.cloudless.dev returns a URL on the new hostname; opening it with a WS client streams the VM serial console.
  • Replaying the same token returns 401.

🤖 Generated with Claude Code

Add an HTTPRoute for the new crd-vm-console Service so external clients
can reach `wss://vm-console.stage-cloudless.cloudless.dev`. Modeled
after the existing crd-api-open route — gateway terminates TLS via the
wildcard cert and forwards plain WS to the backend on :8444. Auth is
the one-shot URL token issued by crd-api, so no SecurityPolicy is
attached.

Wire crd-api's console.publicUrl to the new hostname so token URLs
point at the gateway hostname rather than the legacy in-pod TLS port.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move the vm-console HTTPRoute and api console publicUrl from the stage
overlay into base, templated with ${NETWORK}-${PROVIDER} like the
existing crd-operator-api route — so testnet and mainnet get the same
exposure shape without per-overlay duplication. Stage overlay keeps only
its stage-specific crd-operator-api-open route.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant