Skip to content

The install chart answers a platform engineer's review: neutral ingress, in-cluster databases, own Secrets, node selectors, hardened pods - #4901

Merged
gedaiu merged 5 commits into
mainfrom
install-production-grade
Nov 18, 2026
Merged

gedaiu merged 5 commits into
mainfrom
install-production-grade

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

A client's platform engineer read lore-install 1.0.5 and declined to apply it. His points were fair: the guide assumed ingress-nginx (retired upstream), the chart read as if it needed External Secrets and Google, storage classes and database passwords had to be supplied, and no pod could be placed on a node pool. A security read of the rendered chart then found more, including one blocker: off GKE the lore-ui ServiceAccount was never rendered, so its pods could not be created.

This PR is the chart half of the answer. The tutorials that replace docs/INSTALL.md follow in a PR of their own.

What an installer gets

  • Only GitHub is mandatory. A new values.minimal.example.yaml holds a GitHub App, a GitHub OAuth app, hostnames and one model key. Utopia is off by default; tracing, embeddings, cost syncs and Dgraph telemetry make no outbound call unless configured. A check renders that file and fails on any Google, Azure or Slack host.
  • Any ingress controller. No annotation is required. The webhook rewrite is gone: GitHub posts to https://<api host>/api/webhook/github, so an install needs three hostnames, not four. cert-manager, external-dns and the ingress class are rendered only when set.
  • Databases in the cluster. New chart deploy/databases (lore-databases): two CloudNativePG clusters, for Lore (with pgvector) and for the floor, no cloud assumption, optional backup to any object store. It generates the passwords and writes the Secrets the install reads. A managed Postgres still works by setting the host and password.
  • Your own Secrets, or none to think about. Per credential group: set the values and the chart writes the Secret, or leave them empty and create the Secret yourself, and the chart leaves it alone. Tokens nobody needs to choose are generated once and survive upgrades. A leftover CHANGE-ME or a token under 32 characters stops the install. deploy/install/README.md lists every Secret with its namespace and keys.
  • Scheduling and identity through plain values. global.nodeSelector and global.tolerations reach every workload of all bundled charts. podLabels, podAnnotations and serviceAccount.annotations on every workload replace the Google-specific wiring, so Azure Workload Identity and GKE Workload Identity are both just values.
  • One identity-provider block. global.oidc and secrets.oidc, generic OpenID Connect, used by Utopia today. The AKS example shows Microsoft Entra.
  • Hardened by default in the install. Non-root, read-only root filesystem, no privilege escalation, all capabilities dropped, no mounted ServiceAccount token, images pinned by digest, NetworkPolicies per namespace, Pod Security restricted on the Lore namespaces. The MCP gateway gets its own inbound token, so agent pods no longer hold the admin ingest token.
  • Example values for AKS, GKE, a local trial and the minimal case. Pins: floor 0.5.6, Utopia re.37.

What changes on our own cluster when this merges

Argo CD applies deploy/chart. Hardening that could stop one of our pods is opt-in and stays off for us (hardened, NetworkPolicies, Pod Security labels). What does change, from a render of internal-cluster.values.yaml before and after:

  • The four PodDisruptionBudgets stay: specs/1-lore-platform requires Dgraph's, because a restart can strand its disk on the old node. The client install switches them off by value, since a budget of minAvailable: 1 on one replica makes a node drain wait forever.
  • New ServiceAccounts for the MCP gateway, Dgraph, the courier CronJobs and the migrate Job; automountServiceAccountToken: false on every pod but the ownership reconciler.
  • imagePullPolicy goes from Always to IfNotPresent.
  • Dgraph runs non-root with a read-only root (checked against the real image locally); its schema Job uses a pinned curl image instead of alpine plus apk add as root.
  • Courier CronJobs: curl 8.11.1 → 8.23.0, with seccomp. The migrate Job's Postgres client image is pinned by digest.
  • The Workload Identity annotations are now set in our values file; the rendered ServiceAccounts are unchanged.

Every pod template changes, so every workload restarts once, Dgraph included.

How it was checked

  • Render assertions in scripts/check-lore-platform-render.sh, scripts/check-charts.sh and scripts/ci/package-install-chart.sh, on helm v3.19.0 and v4.2.2.
  • Installed twice on a three-node kind cluster with CloudNativePG and Traefik. All pods ready and both migrations completed; UI, API health, the webhook route and the live WebSocket reachable through Traefik; the gateway refuses the ingest token and accepts its own; NetworkPolicies block outsiders and allow the needed paths; every pod follows global.nodeSelector to a labelled node; an upgrade with unchanged values keeps all 36 Secrets byte-identical and recreates no database; Pod Security restricted raises nothing; a hand-made Secret is left untouched across four upgrades; under a deny-all egress policy the four Lore apps logged no attempt to reach a service nobody configured.
  • The first install found five bugs that renders could not: pgvector created in the wrong database, a wrong format for Utopia's secret key, the floor left empty because lore-api seeds it once at boot (it now waits for the floor), the live-socket route losing to the UI route on Traefik, and no way to render an Ingress without TLS.

Not checked

  • A real AKS or GKE cluster, TLS through cert-manager, backups, Workload Identity, Microsoft Entra.
  • Anything that needs real credentials: GitHub sign-in, webhook delivery, model calls, an agent run. Agent pods were not run under restricted.
  • The kind installs used Utopia re.36 (patched by hand, then off); re.37 is pinned and renders, but was not installed.
  • The hardened setting on lore-api, lore-mcp and lore-ui started cleanly with the real images; a full day of use is unproven.

Known leftovers

  • external-secrets.io/v1beta1 is kept in the ExternalSecret template: I could not see which version our cluster's operator serves.
  • Two defaults in the app still name Google and need app changes: the task-log bucket falls back to lore-task-logs, and context building looks up the npm registry on demand.
  • lore-api seeding the floor once without retry is worked around with an init container; a retry in seed-floor.ts is the proper fix.
  • Dgraph keeps v24.0.0, pinned by digest: it is being removed.
  • docs/INSTALL.md is only patched where a renamed value would mislead; the tutorials PR deletes it.

Related: #4896, re-cinq/floor#86, re-cinq/utopia#73, re-cinq/utopia#74, re-cinq/utopia#75, re-cinq/ai-agent-subsystem#392

🤖 Generated with Claude Code

…tral ingress, the lore-databases chart, generated secrets, pod hardening and network policies
…s files, and the fixes a first install on kind needed
…h labels and annotations, one identity-provider block, and only GitHub mandatory
@lore-agent

lore-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — bc3dbc6a-36ff-4f9a-938b-633ce3de0a72.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent

lore-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Nothing blocks this PR from merging now. Lore updates this comment when the reason changes.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Lore Spec Impact — advisory

This PR touches 8 statement(s) across 2 spec(s), and 2 of them have validating tests this PR does not change.

Feature Specification: Lore — Shared Context Infrastructure · 6 statement(s)

specs/1-lore-platform/spec.md

NFR-1: Security
✓ this PR also changes the tests that validate it

No long-lived credentials anywhere in the system.

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101

NFR-1: Security
✓ this PR also changes the tests that validate it

Workload Identity for all GKE workloads.

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101

NFR-1: Security
✓ this PR also changes the tests that validate it

Workload Identity Federation for GitHub Actions.

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101

NFR-2: Reliability & Freshness
✓ this PR also changes the tests that validate it

Dgraph's one pod MUST NOT be deleted by node scale-down: a PodDisruptionBudget of minAvailable: 1 protects it, becaus…

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101

Background — Usage Scenarios
⚠ the tests that validate it are not touched by this PR

only its test links changed — the statement text itself is unchanged

The gateway's top-level router tries /healthz, then /skills/*, before falling through to /mcp: a non-/mcp path …

validated by apps/mcp-server/src/transport/http-transport.test.ts:287

Background — Usage Scenarios
⚠ the tests that validate it are not touched by this PR

only its test links changed — the statement text itself is unchanged

A gateway restart forgets every in-memory session, so a request carrying a session id the gateway does not know answers…

validated by apps/mcp-server/src/transport/http-transport.test.ts:287

Weaker signals (2) — linked by a spec, not proven by a test run

Project Constitution · 2 statement(s)

.specify/memory/constitution.md

Principle 2: Zero Stored Credentials
✓ this PR also changes the tests that validate it

This is a hard requirement with no exceptions.

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101
via changed file libs/shared/src/domain/infra-contract/security-posture.test.ts

Principle 2: Zero Stored Credentials
✓ this PR also changes the tests that validate it

GitHub Actions: Workload Identity Federation.

validated by libs/shared/src/domain/infra-contract/security-posture.test.ts:101
via changed file libs/shared/src/domain/infra-contract/security-posture.test.ts

6 new statement(s) have no test link yet.

Deterministic · graph @ 4acd241 (projected 2026-11-18) · 2 file(s) skipped: changed since the graph last saw them, so their line numbers no longer line up · no tests run by this check

@lore-agent lore-agent Bot 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.

Lore review — Changes suggested

CI fails in security-posture.test.ts because Dgraph's PodDisruptionBudget was removed (violating NFR-2 in specs/1-lore-platform/spec.md) and GKE Workload Identity annotations moved to deploy/clusters/internal/values.yaml.

Must fix (2) · Consider (1) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Notes on lines outside changed hunks

deploy/clusters/internal/values.yaml:222 — issue (blocking): update libs/shared/src/domain/infra-contract/security-posture.test.ts to scan deploy/clusters (or deploy/) now that iam.gke.io/gcp-service-account lives in cluster values rather than deploy/chart/charts

docs/INSTALL.md:360 — suggestion: update section 3.3 table and token-generation snippet to match values.aks.example.yaml (tokens, Utopia DB/cookie secrets, and lore-databases passwords are now generated automatically and ghcr credentials were removed)

Posted by floor, visit fdd31538-690e-4f0f-88a4-e8bf8fecdd3e.

Comment thread deploy/chart/templates/lore-dgraph.yaml Resolved
@gedaiu

gedaiu commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

@lore review

@lore-agent

lore-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — ea5f705d-83ae-430e-9f4c-d58fbdc27154.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent lore-agent Bot 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.

Lore review — Approved

Production-grade Helm charts, render assertions, and Dgraph PDB / Workload Identity contracts are clean and passing; one non-blocking doc sync suggestion in docs/INSTALL.md.

Must fix (0) · Consider (1) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Notes on lines outside changed hunks

docs/INSTALL.md:360 — suggestion: update section 3.3 table and token-generation snippet to match values.aks.example.yaml (public images, auto-generated tokens, lore-databases default, and secrets.mcpAuthToken in section 3.6)

Posted by floor, visit 191d6ad7-8671-43e3-80f6-116582366682.

@gedaiu
gedaiu merged commit 65d27fe into main Nov 18, 2026
51 checks passed
gedaiu added a commit that referenced this pull request Nov 18, 2026
…art is set to v1.1.0 (#4907)

The install guide was one 707-line page that mixed a client's path with
our own GKE and Argo CD setup, told readers to install ingress-nginx
(retired upstream) and read as if External Secrets were required. A
client's platform engineer called it "pretty messy and hard to read".
This replaces it.

**New pages**

- `docs/install/README.md`: what gets installed, what you must bring
(GitHub and a model endpoint), and which page to read.
- `docs/install/aks.md`: Azure AKS with Microsoft Foundry, a GitHub
Enterprise host, a management node pool, Azure Workload Identity,
backups to Azure Blob, and Utopia with Microsoft Entra sign-in as an
optional section.
- `docs/install/gke.md`: Google GKE for a client, with Vertex or
Anthropic, Workload Identity and backups to GCS. None of our own project
names or Argo CD.
- `docs/install/local.md`: a trial on one machine with kind; it is also
the minimal install (GitHub plus one model key).

Each has the same shape: what you get, a checklist with who provides
each item, numbered steps with the command and the output that proves it
worked, verify, upgrade, remove, the likeliest errors with the chart's
own messages, and what has not been tested.

**Removed and moved**

- `docs/INSTALL.md` is deleted. What only we need (Argo CD, our Secret
Manager names, our cluster's specifics) is in `deploy/README.md`; the
laptop install and onboarding are in `README.md`; webhooks and the
GitHub Enterprise requirements are in `docs/github-setup.md`, whose
webhook URL is now `/api/webhook/github` and whose registry-token
section is gone, because the images are public.
- `scripts/ci/check-install-pins.sh` reads the versions in
`docs/install/*.md`.

**Release pin**

`deploy/install/values.yaml` and every `--version` in the tutorials are
set to 1.1.0, the release that first publishes the `lore-databases`
chart. The tag follows this merge.

**Checked:** every `helm` command in the pages renders offline with the
matching example values; the four error messages quoted are verbatim
from the chart; relative links resolve; `check-install-pins.sh v1.1.0`
and the chart check scripts pass. The local page follows the recipe that
was run on kind.

**Not checked:** no page was followed on AKS or GKE. The Traefik,
cert-manager and backup-plugin commands on the two cloud pages are
generic and were not run there. The local page was run with dummy GitHub
credentials, so sign-in and webhook delivery are unproven. Whether Azure
Blob backups work through Workload Identity with the databases chart is
open, and the AKS page says so.

Related: #4901

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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