Skip to content

fix: cluster tools - #414

Merged
sabinem merged 8 commits into
mainfrom
fix/cluster-tools
Nov 6, 2026
Merged

sabinem merged 8 commits into
mainfrom
fix/cluster-tools

Conversation

@sabinem

@sabinem sabinem commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Load test data into the new dev and staging instances

Hackagon now runs two test instances in one cluster: dev (hackagon-dev.sck-sit-dev.dscompute.ch) follows main, and staging (hackagon-staging.sck-sit-dev.dscompute.ch) runs the latest release. Whoever looks after them wants both filled with the standard test data, so they can try the app with realistic hackathons and users. They now run just cluster::reseed dev or just cluster::reseed staging.

Before this change, the cluster tooling knew only one dev instance, in a namespace and at a domain that no longer exist. The new dev URL was refused, and there was no way to aim at staging. Seeding staging properly would also have needed the release branch checked out. But the recipes come from the checkout, and the release branch's recipes predate staging.

What changed

  • The cluster recipes take dev or staging instead of a kube context. Any other name, prod included, is refused. Each recipe also checks that the namespace's ingress serves that instance's host, and confirming a wipe means typing the namespace back.
  • kubectl uses the kubeconfig at ~/.config/kube/sck-sit-dev, which HACKAGON_KUBECONFIG overrides.
  • reseed builds the seed in a temporary git worktree, from the code the instance serves: origin/main for dev, the newest origin/release/* branch for staging. It no longer matters what you have checked out, so staging can be reseeded from main.
  • Backups are now named hackagon--.sql.
  • RELEASING.md, CLAUDE.md, the seed README and the backend-seeding skill now describe three instances.

Deliberately left out

  • No changelog entry: nobody using the platform sees this change.
  • The old hackagon namespace is no longer supported; it's expected to be removed.
  • reseed staging builds from the release branch's latest commit, not from the release tag staging actually runs. If a hotfix is merged but not yet released, the seed comes from slightly newer code than staging serves.
  • The docs say staging is installed by the same GitOps setup and picks up each new release, but don't say how.

@sabinem sabinem changed the title Fix/cluster tools fix: cluster tools Nov 5, 2026
@sabinem
sabinem requested review from marftn and removed request for marftn November 5, 2026 10:43
@sabinem sabinem assigned marftn and sabinem and unassigned marftn Nov 5, 2026
Both instances live in the cluster behind ~/.config/kube/sck-sit-dev, so
the recipes take that file (override with HACKAGON_KUBECONFIG) instead of
a context argument: `just cluster::reseed staging`.
reseed builds cmd/seed in a temporary worktree at origin/main for dev and
the newest origin/release/* for staging, so staging can be reseeded from a
main checkout whose recipes know about it, and no checkout state matters.
Dev (hackagon-dev) follows main, staging (hackagon-staging) runs the
latest release; both share one cluster. Describe the three instances,
how dev and staging get test data, and the new cluster:: arguments.
@sabinem
sabinem requested a review from marftn November 5, 2026 12:15

@marftn marftn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I only have a suggestion about the Deployment section. If you prefer to handle this in another PR, you can make a ticket and merge as is.

Comment thread tools/just/cluster.just Resolved
Comment thread RELEASING.md Outdated
Comment on lines +45 to +102
@@ -64,7 +74,8 @@ A restart is not always something you chose: an eviction or a node drain
restarts the container too. To restart it on purpose:

```bash
kubectl rollout restart deploy/hackagon-frontend
kubectl --kubeconfig "$HACKAGON_KUBECONFIG" -n hackagon-dev \
rollout restart deploy/hackagon-frontend
```

To see which build it is serving, read the version at the bottom of the page.
@@ -84,6 +95,11 @@ overwritten; those never do, so a specific build can be pinned:

`skopeo list-tags docker://<repository>` shows which tags exist.

### staging runs the latest release

Staging runs the newest release, hotfixes included: it is there to test hotfixes
before they go to prod.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in #400, I'm wondering whether a deployment section really makes sense in this file. I find the mix of public-facing docs and internal details (cloud-infra) a bit strange. I think we should be careful to separate audiences in our docs. I suggest moving these sections to a docs/operations or docs/internal/operations folder in this repo.

If you prefer to make a ticket and do it in another PR it's fine for me. Or if you have other suggestions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marftn As this repo is public. I think we should remove the internals overall and not just move them to another folder. But that would also mean to move the cluster reseeding there. I did minimal changes now and will make a ticket to revisit this topic and solve it in a better more consistent way.

@sabinem
sabinem merged commit 5406b4c into main Nov 6, 2026
4 checks passed
@sabinem
sabinem deleted the fix/cluster-tools branch November 6, 2026 08:54
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.

2 participants