Skip to content

Add oap render: a GitOps-ready kustomize overlay for the install - #33

Open
josephschorr wants to merge 1 commit into
mainfrom
worktree-oap-render-gitops
Open

josephschorr wants to merge 1 commit into
mainfrom
worktree-oap-render-gitops

Conversation

@josephschorr

Copy link
Copy Markdown
Member

What

oap render emits a GitOps-ready kustomize overlay into deploy/oap for Argo CD / Flux — an alternative to oap install mutating a cluster directly. The overlay is a pure function of its flags (byte-identical re-render → no phantom drift) and provisions every internal Secret, with nothing external by default.

How

  • Pre-start bootstrap Job (the operator image's bootstrap-secrets entrypoint) mints the memory/admind/passthrough/NATS/SpiceDB/Postgres secrets idempotently before the operator and data plane start. Its name carries a content hash, so an operator-image upgrade is a new Job object (prune-and-create) instead of an immutable-pod-template apply conflict.
  • cert-manager (self-signed Issuer + Certificate + ca-injector) provisions the operator webhook serving cert.
  • All internal-secret minting consolidated into pkg/platform/bootstrap as the single source: oap install delegates to it, the operator's leader-elected bootstrap runnable is now schema-only, and the NATS publish-surface grant moved verbatim with its adversarial test.
  • Escape hatches: --external-spicedb / --external-postgres / --external-webhook-tls, and per-component --channelsd/--webd/--authzd-memory-token-secret links. webd's token must resolve to a different Secret than channelsd/authzd (effective-name compare) — webd is browser-facing and read-only, the others can write the audit log.
  • oap render --validate lints the built overlay (every non-optional Secret has a creator, AP_CLUSTER_KIND stamped, images pinned); oap check verifies the memory tokens post-sync. Guide: site/content/docs/gitops.mdx.

Scope notes

  • --with-postgres is the only dependency component offered — its token is Job-minted, so it works end to end. Graphiti/Neo4j need a user-supplied LLM key the overlay cannot mint; their GitOps support is a follow-up (oap install still handles them).
  • e2e deferred. The GitOps cold-start — the operator booting before the Job completes its first mint — is the Add oxfmt, format the repo, fix the showcase typecheck #1 thing to verify against a live kubelet before leaning on this in production.

Tests

mage test:unit and mage test:integration both green. A fresh whole-branch code review was run; 4 findings were fixed via TDD (including one security-critical webd capability-leak guard bypass) and 2 minors deferred.

`oap install` brings a cluster up imperatively. `oap render` instead emits a
self-contained kustomize overlay into deploy/oap for Argo CD / Flux to
reconcile, never mutating the cluster — its only remote call is read-only
image-digest resolution, skipped with --no-digest-pin. The overlay is a pure
function of its flags, so re-rendering identical inputs is byte-identical and
GitOps controllers see no phantom drift.

It provisions every internal Secret, with nothing external by default:

- A pre-start bootstrap Job (the operator image's `bootstrap-secrets`
  entrypoint) mints the memory tokens, admind token, passthrough key, NATS
  identity/TLS/client creds, and the SpiceDB + Postgres tokens — idempotently,
  before the operator and data plane start. The Job's name carries a hash of
  its pod template, so an operator-image upgrade yields a new Job object the
  controller prunes-and-creates rather than an immutable-pod-template apply
  conflict.
- cert-manager (a self-signed Issuer + Certificate + ca-injector annotation on
  the webhook configuration) provisions the operator's webhook serving cert.

All internal-secret minting is consolidated into pkg/platform/bootstrap as the
single source; `oap install` delegates to it, and the operator's leader-elected
bootstrap runnable is now schema-only. The NATS minting (identity/TLS/creds and
the webd publish-surface grant, with its adversarial test) moved verbatim.

Escape hatches: --external-spicedb / --external-postgres / --external-webhook-tls
for instances you run yourself, and per-component --channelsd/--webd/--authzd-
memory-token-secret links. webd's token must resolve to a different Secret than
channelsd/authzd (effective-name compare, since the Job mints the defaults
regardless of links): webd is browser-facing and its token is read-only, while
channelsd/authzd tokens can write the audit log.

`oap render --validate` lints the built overlay in-process (every non-optional
Secret reference has a creator, AP_CLUSTER_KIND is stamped, first-party images
are pinned); `oap check` verifies the memory-token Secrets after a sync. Only
--with-postgres is offered among the dependency components — its token is
Job-minted, so it works end to end; Graphiti/Neo4j need a user-supplied LLM key
the overlay cannot mint, deferred to a follow-up. Guide: site/content/docs/gitops.mdx.
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
openagentprimitives Ignored Ignored Oct 15, 2026 6:49pm UTC

Request Review

This branch has not been deployed

No deployments
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