Skip to content

skat runs on the platform from its attested private image, routed by Traefik #122

Closed
7 of 7 issues completed
Closed

Description

@FlexOr2

skat runs on the platform from its attested private image, routed by Traefik

Caller: overnightworks/skat#6 (S2, "Skat is live"). That slice serves the operator's ruling of 07.11.2026 that Skat is its own fleet app. overnightworks/skat is a public app repository built the way hopin is.

Facts from skat's head (08.11.2026, from skat's code and its release)

  • Port 8080; GET/HEAD /health answers {"status":"ok"}, public, unlimited, checking nothing; it serves readiness and liveness for now.
  • skat serve exits unless its database is exactly at the image's migration head; skat migrate (Alembic, under a Postgres advisory lock) needs only the database settings and runs before the server, as an init container of the same image. An older image refuses a newer schema.
  • Settings (prefix SKAT_): OIDC_ISSUER, OIDC_CLIENT_SECRET_FILE, SESSION_SECRET_FILE, PUBLIC_ORIGIN (sets the allowed Host and the redirect <origin>/auth/callback), optional OIDC_CLIENT_ID (skat) and TRUSTED_PROXIES. From skat's next release, DATABASE_URL without a password (on the PC postgresql://skat@postgres:5432/skat) plus DATABASE_PASSWORD_FILE; skat refuses a URL that carries a password.
  • uid 1001, no runtime writes (read-only root, an emptyDir at /tmp); egress to its Postgres and the issuer's token and certs endpoints; Keycloak's back-channel logout posts to it; sign-in 40 per 10 minutes per client address, read from TRUSTED_PROXIES; cookies always Secure; server-sent events with a 15-second heartbeat.

Decided by the head (08.11.2026; the plan is in this item's journal)

Invariants every slice keeps

  • One password owner; no URL holds a password.
  • The Namespace exists before its Secrets, the Secrets before the Deployment that mounts them; every new Kustomization has wait: true, a timeout and depends on admission, platform-secrets and storage.
  • hopin's and speech-runtime's rendered objects stay byte-identical; hal is never touched.
  • Pods pass Pod Security restricted and admission; skat's image is a full app ref that passes images; no new vendor.
  • The host goes public only through Skat's catalog entry: its platform host and its legal block hal#1148, after the realm holds skat's client.
  • No secret in this tree or a log.

Slices

  1. P1 Namespace skat (restricted, prune disabled) in the namespaces layer. Landed as 2d9f0d2 (P1: Namespace skat #142); on the PC skat exists, enforcing restricted, prune disabled.
  2. P2 skat's Postgres in the Kustomization skat over apps/skat, after Every app reconciles through its own Flux Kustomization named like its namespace #145. Landed as 63f0884 (P2: skat's Postgres in the Kustomization skat #150, PR skat's Postgres runs in the Kustomization skat over apps/skat #153); on the PC skat is Ready, its Postgres runs as uid 70 on a Retain claim and pg_isready passes.
    • apps/skat/kustomization.yaml includes the Postgres base with namespace skat and skat's key-tables tables chairs receipts (skat's head, 08.11.2026: all of skat's schema today; a later history table joins on its word).
    • clusters/pc/apps.yaml gains skat, with wait: true and a timeout, depending on admission, platform-secrets and storage.
    • The cluster job's Postgres-Secret loop (ci.yml, "no layer under infrastructure/ includes") covers every layer that includes the base, those under apps/ included.
    • AGENTS.md (infrastructure/postgres/, the CI Secret text, clusters/pc/apps.yaml), docs/app.md where it names an app's database, and the comments naming "keycloak and litellm include" follow.
    • CI proves:
      • skat's Postgres is Ready as uid 70 on a Retain claim;
      • skat's inventory holds the StatefulSet, Service, NetworkPolicy and ConfigMap of namespace skat, and no other Kustomization holds an object of that namespace but the Secrets platform-secrets serves;
      • skat depends on admission, platform-secrets and storage.
    • On the PC pg_isready passes, which needs overnightworks/platform-secrets#18's Postgres password.
  3. P3 skat runs: Deployment and Service at its release that reads the password file, the init container skat migrate, read-only root, /health probes; CI proves it Available at the full ref with its Secrets before it, and its Deployment carries kustomize.toolkit.fluxcd.io/name=skat. The cluster job's app list (APP_MANIFESTS) and its dummy Secrets gain skat with skat's own keys, since the step writes hopin's keys today. Needs overnightworks/platform-secrets#18 and skat's release.
  4. P4 skat's Ingress for skat.hallucinai.de, its NetworkPolicy admitting only traefik on 8080, SKAT_TRUSTED_PROXIES at the pod CIDR, and its tunnel line; CI proves /health 200 through Traefik from namespace cloudflared and no answer from elsewhere; on the PC /health 200 through Traefik, which frees hal#1148.

Named risks

Done when

skat's pod runs on the PC from its attested image pinned by tag and digest, on its own Postgres, routed and isolated like hopin, and answers /health 200 through Traefik on the node; its tunnel line for skat.hallucinai.de is on main.

version = 1
now = "P4 landed on 09.11.2026 (#273, PR #276, 0bf0c46): skat's Ingress, NetworkPolicy, trusted proxies and tunnel line are on main, and on the PC /health answers 200 through Traefik for skat.hallucinai.de; skat's legal texts joined the pages the same day (#274, #275)."
next = "hal#1148 points skat.hallucinai.de's record at the platform's tunnel; then the public name answers."
done_when = "skat's pod runs on the PC from its attested image on its own Postgres, routed and isolated like hopin, answers /health 200 through Traefik on the node, and its tunnel line is on main."

size = "L"

slice = []

Activity

  1. added theissue type on Nov 7, 2026
  2. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Pulled 08.11.2026. Plan (phase planner, Opus high): P1 Namespace, P2 Postgres in Kustomization skat over apps/skat, P3 Deployment with skat migrate as init container, P4 route, isolation and tunnel line; #123 keeps backup and drill after #116's P7d. URL: skat reads a password file from Secret postgres (skat's head chose it; options rejected: a URL secret with a second copy, an init container composing the URL). Risks as listed in the body.

  3. changed the issue type fromtoon Nov 8, 2026
  4. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Plan review of the Kustomization boundary (Opus plan-reviewer, 08.11.2026): REVISE.

    The boundary holds. db:load-dump suspends the Kustomization named like the namespace, scales its Deployments to 0 and deletes its labelled Jobs (mise.toml 465-479). A Deployment in apps would be scaled back up mid-load.

    Alternatives weighed:

    • infrastructure/skat: breaks docs/app.md's rule that an app's manifests live under apps/<app>/.
    • One Kustomization per app with apps dropped: the target.
    • db:load-dump suspending a named Kustomization: rejected, since it would also suspend hopin and speech-runtime.
    • Reading the owner label instead: rejected for the same reason.

    Blocking findings:

    1. The cluster job's Postgres-Secret loop (ci.yml 439-449) covers only infrastructure/*/kustomization.yaml that include ../postgres, so in CI skat would get no Secret postgres.
    2. apps is a predecessor without an exit.
    3. AGENTS.md, docs/app.md and the comments "keycloak and litellm include" would turn false.
    4. Missing cells: skat's inventory as the only owner of namespace skat's objects; skat's dependsOn platform-secrets and storage; from P3 on, skat's Deployment carrying kustomize.toolkit.fluxcd.io/name=skat.

    Also: apps has no kustomization.yaml, so Flux's generated one would also apply apps/skat, and two Kustomizations would own the same objects.

    Follow-ups: skat's key-tables; P2's PC pg_isready needs platform-secrets#18's Postgres password.

    Head's answer. All four blocking findings go into the body. apps' exit becomes #145 (one Kustomization per app, apps gone), ordered before P2. The review's interim list in apps/kustomization.yaml would be a stopgap that #145 replaces, and skat's users can wait for it. skat's key-tables go to skat's head. platform-secrets#18 now carries the Postgres password, put by an agent. A delta re-check of #145 and of this body follows.

  5. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Delta re-check (same Opus reviewer, 08.11.2026): APPROVE. All four blocking findings are resolved, and #145's two-step hand-off is sound under Flux: deleting a Kustomization whose live spec has prune off skips garbage collection, the same field manager adopts the objects by server-side apply, and pod templates do not change. Every site that names apps is covered. Follow-ups, now in the bodies: #145 S2's way back (prune off on the new Kustomizations before a revert) and P3's APP_MANIFESTS and dummy Secrets for skat.

  6. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    skat's head, 08.11.2026: skat#35 has landed as 4bc0811 on skat's main.

    • skat reads SKAT_DATABASE_URL without a password, plus SKAT_DATABASE_PASSWORD_FILE: an absolute path to a file holding only the password, where a trailing newline is fine.
    • The URL is postgresql:// and names a host, a user and a database. It carries no password and no query parameter, so TLS options reach libpq only through PG* variables.
    • No release carries this yet. The operator starts skat's release workflow in the morning, and P3 waits for that version.
  7. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Journal, 08.11.2026, from skat's head:

    • skat#54 (the deal at the table) adds a table hand_cards and a column tables.dealer, through migration 0003. When the release that carries it is named, hand_cards joins skat's key-tables, by skat's word.
    • P3's release, 2026.11.08.N, comes from main once the operator has started skat's release workflow. Starting it is refused in skat's head's permission mode. skat's head sends the tag and digest once the release is attested.
  8. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Journal, 08.11.2026, agreed with skat's head (skat#61, S10.1):

    • skat refuses to start unless SKAT_PUBLIC_ORIGIN is written as a browser writes an origin: https, a lowercase host, no trailing dot, no :443, no path, query or trailing slash.
    • P3 sets it to exactly https://skat.hallucinai.de.
    • SKAT_CALL_ORIGIN (hopin's origin, which may frame skat) stays unset, so nothing frames skat. skat's head names the value once hopin's stage ships.
  9. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    P3 (#166, PR #168, tip 2d8336d): review Sonnet/medium APPROVE, no blocking finding. Two follow-ups for P4 and the head:

    • P4: AGENTS.md's apps/skat/ sentence "It has no route, NetworkPolicy or tunnel line yet" misleads, since namespace skat holds the base's NetworkPolicy postgres, and "yet" is plan narrative. P4 rewrites that sentence anyway.
    • Head, after the landing: P3's sentence that the Deployment carries kustomize.toolkit.fluxcd.io/name=skat. No CI cell asserts the label directly. The head reads it on the PC after the landing and journals it here. db:load-dump depends on that label to scale the Deployment.
  10. FlexOr2 commented on Nov 8, 2026

    @FlexOr2
    MemberAuthor

    Journal, 08.11.2026, PR #168 (P3, #166) at 2d8336d: images and cluster are red for one cause. images reports MANIFEST_UNKNOWN for ghcr.io/overnightworks/skat@sha256:677fe5eb…, and cluster shows ErrImagePull for the same ref. The digest and the attestation are right: GitHub's attestation API holds one provenance for that digest, subject ghcr.io/overnightworks/skat, built from 43153b9, the commit of tag v2026.11.08.1. The job's token cannot read the package, because platform has no Read under skat's package's Manage Actions access, the step O8 was for hopin and O1 for speech-runtime. It is a web-only setting and the operator's. Skat's public step stays held by skat's head (skat#5's line 10); P3 and P4 go on.

  11. FlexOr2 commented on Nov 9, 2026

    @FlexOr2
    MemberAuthor

    Journal, 09.11.2026: skat answers live through the platform. hal's head checked after the operator's hal update, hal setup and hal apply (hal at e9cfd360; ~/srv/skat at v2026.11.08.1, the checkout hal#1148 needs):

    hal#1148 closes once the operator's hal check hosts exits 0.

  12. FlexOr2 commented on Nov 9, 2026

    @FlexOr2
    MemberAuthor

    A follow-up from PR #292's review: skat's release is set twice, at apps/skat/skat.yaml:33 (the init container migrate) and :54 (serve), and tests/legal/app_texts_equal_their_release.sh:31 reads only the first one, with head -n 1.

    That was already so before #292. A bump that moved only one ref would pass the legal check against the wrong release. The images job judges both refs, but no check holds the two equal. The owner is this item: a check that both refs are one, or a kustomize images: entry that sets both.

  13. FlexOr2 commented on Nov 9, 2026

    @FlexOr2
    MemberAuthor

    Done when is met: skat's pod runs on the PC from its attested image on its own Postgres, its Ingress, NetworkPolicy and tunnel line are on main (#273, PR #276, 0bf0c46), and after overnightworks/hal#1148 closed the public name answers: GET https://skat.hallucinai.de/health returns 200 (read again on 09.11.2026). The follow-up from PR #292's review is closed by 7ba3a15 (#342): tests/legal/app_texts_equal_their_release.sh reads every image ref of an app and fails when they name more than one version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions