You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 067a8a5
Browse filesBrowse the repository at this point in the historyBrowse files
fix(helm): keep bundled Postgres upgradable, stop secret modes masking settings, and route realtime on the app host (#10768)
* fix(helm): keep bundled Postgres upgradable, stop secret modes masking settings, and route realtime on the app host
- volumeClaimTemplates labels: reuse an existing StatefulSet's labels (lookup), stable selector labels otherwise; Kubernetes rejects any change there, so every version bump failed helm upgrade
- CI: install the newest published chart and helm upgrade it to the checkout
- External Secrets: skip an envDefaults key mapped in remoteRefs.app
- existingSecret: inline envDefaults values changed from the chart's defaults
- BETTER_AUTH_URL follows $(NEXT_PUBLIC_APP_URL) unless set
- ingress.realtime defaults to the app host under /socket.io; a separate host derives NEXT_PUBLIC_SOCKET_URL; "/" on the app host fails
- refuse multi-replica installs on local upload storage, warn otherwise
- fail on empty existingSecret names and on both databases enabled
- NOTES: realtime port-forward, OCI upgrade ref, upgrade pointer; chart 1.20.0
* fix(helm): exact uploads mount match, https socket URL from every source, legacy realtime host, and runnable example installs
* improvement(helm): one env resolver, shared ingress and env templates, and concise upgrade notes
* fix(helm): grant Marketplace S3 access to the named upload buckets only
Copy file name to clipboardExpand all lines: apps/docs/content/docs/platform/self-hosting/kubernetes.mdx
+5-18Lines changed: 5 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,22 +88,18 @@ Open [http://localhost:3000](http://localhost:3000). For public access, complete
88
88
89
89
## Public access [#key-configuration]
90
90
91
-
Configure a public app origin, realtime routing, allowed origins, and TLS together. This same-host example belongs in `public-values.yaml`; replace the ingress class with your installed controller's class:
91
+
Configure a public app origin and TLS together; realtime is served on the app host under `/socket.io` by default. This same-host example belongs in `public-values.yaml`; replace the ingress class with your installed controller's class:
The app and realtime consume shared app env values; `ALLOWED_ORIGINS` explicitly admits the public app origin. Matching ingress hosts lets the chart route `/socket.io` before the app's `/` path. Keep app, realtime, and migrations on the same image release.
124
+
The app and realtime consume shared app env values: `BETTER_AUTH_URL` follows `NEXT_PUBLIC_APP_URL`, and realtime always admits that origin (`realtime.env.ALLOWED_ORIGINS` is only for extra origins). With `ingress.realtime.host` empty, the chart routes `/socket.io` on the app host before the app's `/` path. Keep app, realtime, and migrations on the same image release.
134
125
135
126
Create `sim-tls` in `simstudio` from your certificate and private key, or configure your certificate manager to populate that Secret:
For a fresh public installation, create the namespace before creating the Secret. Configure DNS and the controller's own HTTPS redirect, upload-size, WebSocket, timeout, and streaming settings. The `null` above removes the chart's legacy nginx redirect annotation; it does not configure another controller.
143
134
144
-
For a separate realtime hostname, change all three fields together:
135
+
A separate realtime hostname is optional. Set it, and the chart points the app at it through `NEXT_PUBLIC_SOCKET_URL` (unless you set that yourself, which you must in `app.secrets.existingSecret` mode):
Keep `ALLOWED_ORIGINS` set to the app origin, and use a TLS certificate covering both hosts. App/auth URLs remain on `sim.yourdomain.com`.
146
+
Use a TLS certificate covering both hosts. App/auth URLs remain on `sim.yourdomain.com`.
159
147
160
148
Apply your complete values with `helm upgrade --install`, retaining the same secrets as installation. For inline mode, repeat the secret `--set` arguments from the install command and add `-f public-values.yaml`. For secret-store mode, use a complete values file defining that strategy.
161
149
@@ -238,8 +226,7 @@ Configure model provider keys, such as `OPENAI_API_KEY`, through the same select
238
226
Use a cloud example as a starting file, not a complete install configuration. Fetch it from the release corresponding to the pinned chart example:
Choose `values-aws.yaml` for EKS, `values-azure.yaml` for AKS, or `values-gcp.yaml` for GKE. Review and replace provider-specific fields before installation:
`NEXT_PUBLIC_SOCKET_URL` can be left unset — the client defaults to the page origin.
25
+
`NEXT_PUBLIC_SOCKET_URL` can be left unset — the client defaults to the page origin. This is the Helm chart's default: with `ingress.realtime.host` empty, it routes `/socket.io` on the app host.
26
26
27
27
</Tab>
28
28
<Tabvalue="Two hostnames">
29
29
30
-
Use separate hostnames when your ingress setup cannot split paths across backends. GKE's example values use this layout.
30
+
Optionally, use separate hostnames when your ingress setup cannot split paths across backends. GKE's example values use this layout.
31
31
32
32
```
33
33
sim.yourdomain.com → app:3000
34
34
sim-ws.yourdomain.com → realtime:3002
35
35
```
36
36
37
-
Then tell the client where realtime lives, and tell realtime which origins to accept:
`ALLOWED_ORIGINS` is the CORS allowlist realtime enforces on socket connections; it must contain the app's origin. The URL keys only need to be set once under `app.env` — the chart writes them into a Secret both Deployments consume.
46
+
With the Helm chart, setting `ingress.realtime.host` is enough: the chart sets `NEXT_PUBLIC_SOCKET_URL` to that host unless you do (set it yourself in `app.secrets.existingSecret` mode). Realtime always accepts the `NEXT_PUBLIC_APP_URL` origin; `ALLOWED_ORIGINS` is only for extra origins. The URL keys only need to be set once under `app.env` — the chart writes them into a Secret both Deployments consume.
52
47
53
48
Both hostnames need DNS records and TLS certificates.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/platform/self-hosting/scaling.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ app:
39
39
cpu: 1000m
40
40
```
41
41
42
-
The `resources` block above is the chart's default — it is shown so the numbers are visible, not because it changes anything. Only `replicaCount` needs setting unless you are raising the ceiling.
42
+
The `resources` block above is the chart's default — it is shown so the numbers are visible, not because it changes anything. Only `replicaCount` needs setting unless you are raising the ceiling. More than one replica needs object storage (S3, Azure Blob, or GCS via `STORAGE_PROVIDER`), or the chart fails to render; `app.storage.allowLocalWithReplicas=true` opts out and keeps uploads on each pod, lost on restart.
43
43
44
44
The app orchestrates workflows, and local JavaScript runs in Node child workers inside its container. Those workers and in-memory file parsing share the pod's memory limit. OOMKills can terminate in-flight runs.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/platform/self-hosting/verify.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ Expect `simstudio`, `realtime`, `db`, `redis`, and `cron` to be running, with `m
107
107
| --- | --- |
108
108
| App does not load | Database connectivity and migration logs. On Helm, failed migrations block the app init sequence. On Compose, the app waits for successful migrations. |
109
109
| Sign-in loops or is rejected | Public app/auth origins, scheme, and trusted origins. Confirm the app and realtime use the same `BETTER_AUTH_SECRET`. |
110
-
| Socket is unavailable | WebSocket upgrades and `/socket.io` routing. For a separate realtime host, set `NEXT_PUBLIC_SOCKET_URL`and include the app origin in realtime's `ALLOWED_ORIGINS`. |
110
+
| Socket is unavailable | WebSocket upgrades and `/socket.io` routing. Realtime defaults to the app host; for a separate realtime host, `NEXT_PUBLIC_SOCKET_URL`must point at it (the Helm chart sets it from `ingress.realtime.host` unless you do). `ALLOWED_ORIGINS` is only for origins beyond `NEXT_PUBLIC_APP_URL`. |
111
111
| Edits do not propagate | Realtime connectivity and Redis on every replica; verify which pods hold the connections. |
112
112
| Workflow execution fails | Provider egress, saved credentials, and app logs. A decryption error can mean the current `ENCRYPTION_KEY` differs from the key that encrypted the credential. |
113
113
| Cloud upload fails | Bucket CORS for the Sim origin and signed headers; server permissions to complete multipart uploads. S3 completion needs `s3:ListMultipartUploadParts`. |
Copy file name to clipboardExpand all lines: helm/sim/.claude/skills/sim-helm/references/install-paths.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,6 @@ postgresql:
79
79
existingSecret:
80
80
enabled: true
81
81
name: sim-postgres-secret
82
-
passwordKey: POSTGRES_PASSWORD
83
82
```
84
83
85
84
**The chart cannot introspect your Secret.** If you forget a required key, the pod will fail at runtime with `CreateContainerConfigError: secret key "X" not found`. The required keys are: `BETTER_AUTH_SECRET`, `ENCRYPTION_KEY`, `INTERNAL_API_SECRET`, plus `CRON_SECRET` when cronjobs are enabled.
@@ -46,7 +49,7 @@ The Sim chart splits configuration across **four** layers. Understanding which l
46
49
47
50
**ESO compatibility.** When `externalSecrets.enabled=true`, the chart-managed Secret is **not rendered** — ESO renders one instead. Anything in Layer 1 must be mapped via `remoteRefs.app.<KEY>` or it's silently missing. Layers 2–4 are unaffected by ESO.
48
51
49
-
**Override precedence.***Non-empty* values set in `app.env` (Layer 1 overrides) win over `envDefaults` (Layer 2) — so users who already had operational tunables in `app.env` continue to work. An *empty*`app.env` value does not override: it reads as "not specified" and the Layer 2 default still applies. To remove a key, override it with `null` (see "I want to REMOVE a key the chart sets" below).
52
+
**Override precedence.***Non-empty* values set in `app.env` (Layer 1 overrides) win over `envDefaults` (Layer 2) — so users who already had operational tunables in `app.env` continue to work. In `app.secrets.existingSecret` mode no `envDefaults` are inlined (the pre-created Secret is the source of truth) and `app.env` values are inlined instead, so overrides go in `app.env`. An *empty*`app.env` value does not override: it reads as "not specified" and the Layer 2 default still applies. To remove a key, override it with `null` (see "I want to REMOVE a key the chart sets" below).
50
53
51
54
## Where keys live — the canonical list
52
55
@@ -56,7 +59,7 @@ The exhaustive list of keys per layer lives in `helm/sim/values.yaml`. Read the
| Rate limits | 2 (envDefaults) |`RATE_LIMIT_WINDOW_MS`, `RATE_LIMIT_FREE_SYNC`, etc. |
@@ -124,10 +127,9 @@ Caveat worth passing to operators: `null` has no effect under `helm upgrade --re
124
127
app:
125
128
env:
126
129
NEXT_PUBLIC_APP_URL: "https://sim.example.com"
127
-
BETTER_AUTH_URL: "https://sim.example.com"
128
130
```
129
131
130
-
This is the right answer for any clustered deploy. The chart's default is `http://localhost:3000` (Layer 2) — fine for kind/minikube, broken for production. The realtime Deployment also reads these via the shared Secret.
132
+
This is the right answer for any clustered deploy. `BETTER_AUTH_URL` is set to `$(NEXT_PUBLIC_APP_URL)` unless you set it (in `app.secrets.existingSecret` mode the chart sets nothing, so the Secret must hold both). The chart's default is `http://localhost:3000` (Layer 2) — fine for kind/minikube, broken for production. The realtime Deployment also reads these via the shared Secret.
131
133
132
134
### "I want to inject a value from another ConfigMap"
0 commit comments