Skip to content

feat(k8s): add a Helm chart and move the backend to asteria.txpipe.io/api - #146

Merged
scarmuega merged 2 commits into
mainfrom
feat/helm-chart
Oct 31, 2026
Merged

scarmuega merged 2 commits into
mainfrom
feat/helm-chart

Conversation

@scarmuega

@scarmuega scarmuega commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Adds a Helm chart for deploying Asteria and points the frontend at the backend's new public path.

Chart (k8s/chart/)

  • One chart for the backend (GraphQL API) and the frontend (game site), each a Deployment, a Service and an optional Ingress. The frontend is disabled by default.
  • Instance-agnostic: the image tag, the Blockfrost-compatible endpoint (backend.blockfrostBaseUrl) and any ingress host, class, issuer and TLS secret are required values, so a missing one fails at render. Images are pinned by tag plus an optional digest.
  • Hardened backend: non-root (UID 65532), read-only root filesystem, all capabilities dropped, RuntimeDefault seccomp. The frontend image runs as root and writes its Next.js cache, so it keeps a writable root filesystem but drops capabilities and privilege escalation.
  • Shared nodeSelector/tolerations, which each component can override. Both images are linux/amd64 only (noted in k8s/README.md).
  • An optional existingSecret per component, for keys such as DMTR_API_KEY.

Frontend: new backend URL

The mainnet backend moves from its legacy Demeter workload hostname (8000-ethereal-audience-bb83g6.us1.demeter.run) to https://asteria.txpipe.io/api. MAINNET_API_URL in docker/Dockerfile.frontend (inlined at build time) and the how-to-play snippets are updated. The ingress maps /api/graphql to the backend's /graphql; /api/asteria/* stays with the frontend's own routes.

Verification

  • helm lint passes, and helm template renders with both components enabled and with the TxPipe m2 instance values. The rendered objects pass a server-side dry run against the m2 API server.
  • The fc72b06 backend image runs under the chart's security context (--user 65532 --read-only --cap-drop ALL): / answers, and { __typename } resolves over /graphql.

Follow-ups

  • txpipe/asteria-starter-kit's README still names the legacy backend URL, which stops answering once the legacy workload is retired.
  • The preview challenge pages point at a preview backend that no longer exists.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Helm-based deployment options for the backend and optional frontend, with configurable networking, ingress, health checks, security, and scheduling.
    • Added deployment guidance and commands for validating and testing the chart.
    • Updated the frontend’s network requests and examples to use the Asteria API endpoint.

scarmuega and others added 2 commits October 31, 2026 18:15
One chart deploys the GraphQL backend and the game frontend from the
ghcr.io images the workflows publish. Each component is a Deployment,
a Service and an optional Ingress. The frontend is disabled by default.

The chart is instance-agnostic: the image tag, the Blockfrost-compatible
endpoint and any ingress host are required values, so a missing one
fails at render. Images are pinned by tag plus optional digest. The
backend runs as a non-root user on a read-only root filesystem with
all capabilities dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mainnet backend moves from its legacy Demeter workload hostname to
the /api path on the challenge's own host. MAINNET_API_URL, which
next.config.mjs inlines at build time, and the how-to-play snippets now
use https://asteria.txpipe.io/api.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The frontend now uses the Asteria API endpoint for its configuration, GraphQL requests, and examples. The pull request also adds a Helm chart with backend and frontend deployment settings, workload templates, and usage documentation.

Changes: Frontend endpoint update

Layer / File(s) Summary
Frontend API endpoint updates
docker/Dockerfile.frontend, frontend/src/components/how-to-play/create-ship/*, frontend/src/components/how-to-play/gather-fuel/Section.tsx, frontend/src/components/how-to-play/gather-token/Section.tsx, frontend/src/components/how-to-play/mine-asteria/Section.tsx, frontend/src/components/how-to-play/move-ship/Section.tsx, frontend/src/components/how-to-play/quit-game/Section.tsx
The frontend API URL, GraphQL requests, and curl examples now use the Asteria endpoint. Request bodies and response handling remain unchanged.

Kubernetes Helm chart

Layer / File(s) Summary
Chart settings and helpers
k8s/chart/Chart.yaml, k8s/chart/values.yaml, k8s/chart/templates/_helpers.tpl
The chart defines backend and frontend defaults and helpers for names, labels, images, and scheduling placement. The backend is enabled by default; the frontend is disabled by default.
Component workload rendering
k8s/chart/templates/backend.yaml, k8s/chart/templates/frontend.yaml, k8s/chart/templates/_workload.tpl
Enabled component templates pass their settings to a shared template. It renders Deployments and Services, and renders Ingress resources when ingress is enabled.
Chart usage and output
k8s/README.md, k8s/chart/templates/NOTES.txt
The README documents chart configuration and Helm commands. Chart notes display enabled component endpoints and backend smoke-test commands.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Possibly related PRs

  • txpipe/asteria#139: Introduces the backend BLOCKFROST_BASE_URL configuration that the chart sets.
  • txpipe/asteria#141: Configures HTTPS support for the backend image deployed by the chart.

Suggested reviewers: eehmauro

Merge Risk: Moderate · up to 3edb3

Fix component naming before merging: a supported override can prevent both workloads from deploying together. The frontend-only smoke-test instructions also need to reflect the services actually installed.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.5.15)
frontend/src/components/how-to-play/create-ship/Section.tsx

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

frontend/src/components/how-to-play/gather-fuel/Section.tsx

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

frontend/src/components/how-to-play/gather-token/Section.tsx

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

  • 3 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@scarmuega
scarmuega merged commit 2ff394c into main Oct 31, 2026
1 check passed
@scarmuega
scarmuega deleted the feat/helm-chart branch October 31, 2026 21:29
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