From 59d2b9c91b76bf260e78f4012ba36eaaa7c15205 Mon Sep 17 00:00:00 2001 From: Adam Kamali Date: Tue, 20 Oct 2026 05:40:59 +0000 Subject: [PATCH] Generate template secrets, add langfuse-worker, pin images (#138) Follow-ups from #136 that the templates can fix on their own. - dittofeed: SECRET_KEY and the dashboard PASSWORD are generated at deploy. SECRET_KEY is 43 random base64 characters plus '=', which decodes to the 32 bytes Dittofeed's AES-256-GCM key needs. - cryptomator: HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET is generated and shared by name between Hub and the Keycloak companion; the seed realm reads it, and a generated CRYPTOMATOR_REALM_ADMIN_PASSWORD, through $(NAME) references that Kubernetes expands. - langfuse: add the langfuse-worker companion (v3 ingestion; inherits the web app's env). Pin web and worker to 3.225.11, which is what `3` points at now. NEXTAUTH_SECRET and SALT are generated. The startup wait loop dials $PGPORT instead of a hard-coded 5432. - posthog: pin the image to the master commit tag that `latest` points at now (PostHog publishes no release tags). - index.json: apply the 8 add-on drifts sync-index-addons.py reports (wagtail gains Cluster; the rest are reorders) without reformatting the file. --- index.json | 32 ++++++++++++++------------- services/cryptomator/app.yaml | 24 +++++++++++++++----- services/dittofeed/app.yaml | 13 ++++++----- services/langfuse/app.yaml | 41 ++++++++++++++++++++++++++--------- services/posthog/app.yaml | 4 +++- 5 files changed, 77 insertions(+), 37 deletions(-) diff --git a/index.json b/index.json index f93fca33..06696b10 100644 --- a/index.json +++ b/index.json @@ -937,8 +937,8 @@ "links": [], "addons": [ "Cluster", - "Smtp", - "Tenant" + "Tenant", + "Smtp" ], "stars": 16314, "forks": 1481, @@ -3427,8 +3427,8 @@ "links": [], "addons": [ "Cluster", - "Smtp", - "Tenant" + "Tenant", + "Smtp" ], "stars": 60104, "forks": 2781, @@ -5267,8 +5267,8 @@ "Cluster", "Valkey", "RabbitmqCluster", - "Smtp", - "Tenant" + "Tenant", + "Smtp" ], "stars": 47000, "forks": 4700, @@ -6555,8 +6555,8 @@ ], "addons": [ "MariaDB", - "Smtp", - "Tenant" + "Tenant", + "Smtp" ], "stars": 8600, "forks": 860, @@ -9931,8 +9931,8 @@ ], "addons": [ "Cluster", - "RabbitmqCluster", - "Valkey" + "Valkey", + "RabbitmqCluster" ], "stars": 1500, "forks": 150, @@ -10030,8 +10030,8 @@ "addons": [ "Cluster", "Valkey", - "Smtp", - "Tenant" + "Tenant", + "Smtp" ], "stars": 13, "forks": 3, @@ -11115,9 +11115,9 @@ "https://developers.revolt.chat/" ], "addons": [ - "KuberoFerretDB", "Valkey", - "RabbitmqCluster" + "RabbitmqCluster", + "KuberoFerretDB" ], "stars": 4200, "forks": 420, @@ -13597,7 +13597,9 @@ "https://docs.wagtail.org/", "https://github.com/wagtail/bakerydemo" ], - "addons": [], + "addons": [ + "Cluster" + ], "stars": 19000, "forks": 0, "watchers": 19000, diff --git a/services/cryptomator/app.yaml b/services/cryptomator/app.yaml index d4be8167..0fa4aed5 100644 --- a/services/cryptomator/app.yaml +++ b/services/cryptomator/app.yaml @@ -13,9 +13,10 @@ metadata: URL; after the first deploy set HUB_KEYCLOAK_PUBLIC_URL on the Hub app to that URL (browsers sign in there) and redeploy. Keycloak stores its data in a separate `keycloak` database that the PostgreSQL add-on creates on a dedicated cluster; - on shared zones that database is not provisioned. Rotate the seed realm credentials - (admin/cryptomator, client secret cryptomator, HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET) - before exposing publicly. Use the cryptomator.org/hub/self-hosted Setup Wizard + on shared zones that database is not provisioned. The seed realm's `admin` user + password (CRYPTOMATOR_REALM_ADMIN_PASSWORD on the Keycloak app, changed at first + sign-in) and the system client secret (HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET, the same + on both apps) are generated at deploy. Use the cryptomator.org/hub/self-hosted Setup Wizard output to customize realm/clients for production. kubero.dev/template.links: '["https://docs.cryptomator.org/hub/", "https://docs.cryptomator.org/hub/deployment/"]' kubero.dev/template.screenshots: '[]' @@ -111,8 +112,11 @@ spec: value: cryptomator - name: HUB_KEYCLOAK_SYSTEM_CLIENT_ID value: cryptomatorhub-system + # Generated at deploy and shared with the Keycloak companion (one value per + # variable name across the group), whose seed realm uses it as the + # cryptomatorhub-system client secret. - name: HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET - value: cryptomator + value: '{{KUBERO_GEN_ALNUM:32}}' - name: HUB_KEYCLOAK_SYNCER_PERIOD value: 5m - name: HUB_KEYCLOAK_OIDC_CRYPTOMATOR_CLIENT_ID @@ -209,6 +213,14 @@ spec: value: 'false' - name: QUARKUS_TRANSACTION_MANAGER_ENABLE_RECOVERY value: 'false' + # Same name as on the Hub app, so both get the same generated value. + - name: HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET + value: '{{KUBERO_GEN_ALNUM:32}}' + # First password of the realm's `admin` user (Hub sign-in); Keycloak + # makes the user change it at first login. + - name: CRYPTOMATOR_REALM_ADMIN_PASSWORD + value: '{{KUBERO_GEN_ALNUM:24}}' + # $(NAME) references are expanded by Kubernetes from the variables above. - name: CRYPTOMATOR_REALM_JSON value: | { @@ -237,7 +249,7 @@ spec: { "username": "admin", "enabled": true, - "credentials": [{ "type": "password", "value": "cryptomator", "temporary": true }], + "credentials": [{ "type": "password", "value": "$(CRYPTOMATOR_REALM_ADMIN_PASSWORD)", "temporary": true }], "requiredActions": ["UPDATE_PASSWORD"], "realmRoles": ["admin"] }, @@ -284,7 +296,7 @@ spec: "name": "Cryptomator Hub System", "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "cryptomator", + "secret": "$(HUB_KEYCLOAK_SYSTEM_CLIENT_SECRET)", "standardFlowEnabled": false } ] diff --git a/services/dittofeed/app.yaml b/services/dittofeed/app.yaml index e387f701..d284a5fd 100644 --- a/services/dittofeed/app.yaml +++ b/services/dittofeed/app.yaml @@ -19,9 +19,9 @@ metadata: split images dittofeed/api, dittofeed/dashboard, and dittofeed/worker (worker handles the Temporal-driven journey processing) rather than the lite bundle; blob storage (any S3/MinIO) is optional. BOOTSTRAP=true auto-creates the default - workspace and tables on first start. ROTATE before exposing: SECRET_KEY (openssl - rand -base64 32), the admin PASSWORD env, plus the Postgres and ClickHouse add-on - passwords. Set DASHBOARD_API_BASE / dashboard URLs to your public host. CLICKHOUSE_HOST + workspace and tables on first start. SECRET_KEY and the dashboard login PASSWORD + are generated at deploy (read PASSWORD from the app''s env vars). ROTATE before + exposing: the Postgres and ClickHouse add-on passwords. Set DASHBOARD_API_BASE / dashboard URLs to your public host. CLICKHOUSE_HOST must be the full http://host:8123 URL.' kubero.dev/template.links: '["https://docs.dittofeed.com/deployment/self-hosted", "https://docs.dittofeed.com/deployment/self-hosted/docker-compose"]' @@ -151,10 +151,13 @@ spec: value: 'true' - name: WORKSPACE_NAME value: Default + # Generated at deploy. SECRET_KEY must base64-decode to exactly 32 bytes + # (AES-256-GCM key): 43 base64 characters plus one '=' pad do. PASSWORD is + # the single-tenant dashboard login; read it from this app's env. - name: SECRET_KEY - value: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + value: '{{KUBERO_GEN_ALNUM:43}}=' - name: PASSWORD - value: dittofeed + value: '{{KUBERO_GEN_ALNUM:24}}' - name: DATABASE_HOST value: '$(PGHOST)' - name: DATABASE_PORT diff --git a/services/langfuse/app.yaml b/services/langfuse/app.yaml index c964e8f1..d6db6630 100644 --- a/services/langfuse/app.yaml +++ b/services/langfuse/app.yaml @@ -8,16 +8,17 @@ metadata: \ traces, evals, prompt management, datasets, and cost analytics for AI applications." kubero.dev/template.icon: https://raw.githubusercontent.com/stackblaze/stack-templates/main/services/langfuse/icon.png kubero.dev/template.installation: 'Langfuse v3 is a multi-service stack. This - template runs the PRIMARY web/API container (ghcr.io/langfuse/langfuse:3, port + template runs the PRIMARY web/API container (ghcr.io/langfuse/langfuse, port 3000). Bundled add-ons provision Postgres (transactional data), ClickHouse (trace/observation store), Valkey (Redis-compatible queue/cache), plus a MinIO companion app (S3 for event/media uploads, on a 5Gi volume, root password generated at deploy and shared with Langfuse). You may swap MinIO for the RustFS add-on or external - S3. For full ingestion throughput you should ALSO - deploy a companion WORKER from image ghcr.io/langfuse/langfuse-worker:3 (port - 3030) sharing the same env vars below. ROTATE before production: NEXTAUTH_SECRET, - SALT, ENCRYPTION_KEY (64-char hex via openssl rand -hex 32), Postgres/ClickHouse/MinIO - credentials, and LANGFUSE_INIT_* seed values. Instrument your app with the Langfuse + S3. A langfuse-worker companion app (ghcr.io/langfuse/langfuse-worker, + same release as the web image) shares the web app''s env and processes ingestion. + NEXTAUTH_SECRET, SALT and the MinIO password are generated at deploy. ROTATE before + production: ENCRYPTION_KEY (64-char hex via openssl rand -hex 32; set the same value + on the web and worker apps), the Postgres/ClickHouse credentials, and LANGFUSE_INIT_* + seed values. Instrument your app with the Langfuse SDK and set LANGFUSE_HOST={{KUBERO_APP_URL}}.' kubero.dev/template.links: '["https://langfuse.com/docs", "https://langfuse.com/self-hosting"]' kubero.dev/template.screenshots: '["https://langfuse.com/api/og?title=Langfuse+%E2%80%93+Open+Source+AI+Engineering+Platform&description=Traces%2C+evals%2C+prompt+management+and+metrics+to+debug+and+improve+your+LLM+application."]' @@ -184,10 +185,12 @@ spec: value: 'postgresql://$(PGUSER):$(PGPASSWORD)@$(PGHOST):$(PGPORT)/$(PGDATABASE)' - name: NEXTAUTH_URL value: '{{KUBERO_APP_URL}}' + # Generated at deploy; the worker companion inherits this env, so both get + # the same SALT (API key hashing). - name: NEXTAUTH_SECRET - value: change-me-to-random-32char-string + value: '{{KUBERO_GEN_ALNUM:32}}' - name: SALT - value: change-me-to-random-string + value: '{{KUBERO_GEN_ALNUM:32}}' - name: ENCRYPTION_KEY value: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - name: CLICKHOUSE_MIGRATION_URL @@ -265,12 +268,14 @@ spec: containerPort: '3000' pullPolicy: Always repository: ghcr.io/langfuse/langfuse - tag: '3' + # Same pin as the langfuse-worker companion below: web and worker must + # run the same release. + tag: 3.225.11 command: - sh - -c - 'node -e "const net=require(''net'');const wait=(h,p)=>new Promise(r=>{const - go=()=>{const s=net.connect(p,h,()=>{s.end();r();});s.on(''error'',()=>setTimeout(go,2000));};go();});Promise.all([wait(process.env.PGHOST,5432),wait(process.env.CHHOST,8123),wait(process.env.REDIS_HOST,+process.env.REDIS_PORT),wait(process.env.S3HOST,80)]).then(()=>process.exit(0));" + go=()=>{const s=net.connect(p,h,()=>{s.end();r();});s.on(''error'',()=>setTimeout(go,2000));};go();});Promise.all([wait(process.env.PGHOST,+(process.env.PGPORT||5432)),wait(process.env.CHHOST,8123),wait(process.env.REDIS_HOST,+process.env.REDIS_PORT),wait(process.env.S3HOST,80)]).then(()=>process.exit(0));" && dumb-init -- ./web/entrypoint.sh sh -c ''node ./web/server.js --keepAliveTimeout 110000'' @@ -317,3 +322,19 @@ spec: path: /minio/health/live timeoutSeconds: 5 periodSeconds: 10 + # The Langfuse v3 worker: it processes the ingestion queue (events land in + # S3 + Valkey, the worker writes them to ClickHouse), so traces never show + # up without it. Same release as the web image, default entrypoint (it does + # not run the database migrations; the web app does). It inherits the web + # app's env (and so its add-ons and generated secrets) and serves nothing. + - id: worker + nameHint: langfuse-worker + serviceType: worker + exposeInternet: false + image: + repository: ghcr.io/langfuse/langfuse-worker + tag: 3.225.11 + containerPort: '3030' + inheritEnvFrom: primary + healthcheck: + enabled: false diff --git a/services/posthog/app.yaml b/services/posthog/app.yaml index 1e43265d..1f20cbec 100644 --- a/services/posthog/app.yaml +++ b/services/posthog/app.yaml @@ -318,7 +318,9 @@ spec: containerPort: '8000' pullPolicy: Always repository: ghcr.io/posthog/posthog - tag: latest + # PostHog publishes no release tags, only one per master commit; this is + # the commit `latest` pointed at on 2026-10-20. + tag: 48912b83f12851f5ca9188750b6ade3b97f93616 run: securityContext: readOnlyRootFilesystem: false