Skip to content

docs(k8s): app-only — account for the dedicated tpk database - #61

Merged
gangtao merged 1 commit into
mainfrom
docs/k8s-app-only-database
Aug 17, 2026
Merged

docs(k8s): app-only — account for the dedicated tpk database#61
gangtao merged 1 commit into
mainfrom
docs/k8s-app-only-database

Conversation

@gangtao

@gangtao gangtao commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The k8s manifests (#56/#57) were written before the tpk database change (#59). This updates the app-only mode, which is the one materially affected.

Why

app-only connects to an externally-managed Timeplus Enterprise. Since #59, the app runs CREATE DATABASE IF NOT EXISTS tpk on startup and puts all streams under tpk. So the pre-existing DB user now needs CREATE DATABASE (first run) plus read/write on that database — a restricted user would fail at startup/ingest with no hint why. The old manifest even said "Nothing here provisions or runs a database," which is now slightly misleading (it doesn't run a DB server, but it does create the tpk database).

Changes

  • app-only.yaml: header clarifies the app creates its own database on the existing server; adds a TIMEPLUS_DATABASE env (default tpk) with the privilege note and a pre-create fallback for restricted users.
  • deploy/k8s/README.md: a "tpk database" note in the App-only section (CREATE DATABASE grant + pre-create SQL), and a TIMEPLUS_DATABASE row in the Configuration table.

enterprise.yaml and allinone.yaml are unaffected — they provision a full-privilege tpk user, so database creation just works; noted as such.

Validation

Parsed app-only.yaml: TIMEPLUS_DATABASE=tpk present, still no DB server object.

🤖 Generated with Claude Code

The k8s manifests (#56/#57) predate the change that moved all tpk streams
under a dedicated `tpk` database (#59). For app-only — which connects to an
externally-managed Timeplus Enterprise — the app now runs
`CREATE DATABASE IF NOT EXISTS tpk` on startup, so the pre-existing DB user
needs CREATE DATABASE (first run) plus read/write on that database. A
restricted user would otherwise fail at startup/ingest.

- app-only.yaml: header now states the app creates its own database on the
  existing server; add a `TIMEPLUS_DATABASE` env (default `tpk`) with the
  privilege note and the pre-create fallback for restricted users.
- deploy/k8s/README.md: add a "tpk database" note to the App-only section
  (CREATE DATABASE grant + pre-create SQL), and a TIMEPLUS_DATABASE row to the
  Configuration table. Notes that enterprise/allinone are unaffected (they
  provision a full-privilege tpk user).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XPzYZXxyTdj5G25KoujpHb
@gangtao
gangtao merged commit 534f3d6 into main Aug 17, 2026
2 checks passed
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