File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,27 @@ Your release is named {{ .Release.Name }} in namespace {{ .Release.Namespace }}.
7878 # Upgrade after changing values
7979 helm upgrade {{ .Release.Name }} ./helm/sim --namespace {{ .Release.Namespace }} -f your-values.yaml
8080
81+ {{- if .Release.IsUpgrade }}
82+ 5. Upgrading from a pre-1.0.0 build?
83+
84+ The internal Postgres StatefulSet's `spec.serviceName` was renamed to point
85+ at a new headless Service. That field is immutable, so `helm upgrade` will
86+ fail with: `Forbidden: updates to statefulset spec for fields other than
87+ ...`. Orphan-delete the StatefulSet first (preserves pods and PVCs, traffic
88+ keeps flowing):
89+
90+ kubectl --namespace {{ .Release.Namespace }} delete statefulset {{ include "sim.fullname" . }}-postgresql --cascade=orphan
91+ {{- if .Values.copilot.enabled }}
92+ kubectl --namespace {{ .Release.Namespace }} delete statefulset {{ include "sim.fullname" . }}-copilot-postgresql --cascade=orphan
93+ {{- end }}
94+
95+ Then re-run `helm upgrade`. See README → "Upgrading from a pre-1.0.0 build"
96+ for the full procedure. Skip this step if you're already on 1.0.0+.
97+
98+ 6. Where to go next:
99+ {{- else }}
811005. Where to go next:
101+ {{- end }}
82102
83103 * Production checklist: helm/sim/README.md (search "Production checklist")
84104 * Troubleshooting: helm/sim/README.md (search "Troubleshooting")
Original file line number Diff line number Diff line change @@ -67,13 +67,20 @@ spec:
6767 {{- end }}
6868 {{- /*
6969 Inline realtime.envDefaults, skipping keys explicitly set in realtime.env
70- (K8s `env` overrides `envFrom`, so an inline default would otherwise mask
71- a user's Secret-bound value).
70+ OR app.env (K8s `env` overrides `envFrom`, so an inline default would
71+ otherwise mask a Secret-bound value). The chart-managed Secret is shared
72+ between app and realtime via envFrom, so a key set in app.env (e.g.
73+ NEXT_PUBLIC_APP_URL=https://prod.example.com) lands on the realtime pod
74+ too — inlining the localhost envDefault here would mask it.
7275 */}}
7376 {{- $rtEnv := .Values.realtime.env | default dict }}
77+ {{- $appEnv := .Values.app.env | default dict }}
7478 {{- range $key, $value := .Values.realtime.envDefaults | default dict }}
75- {{- $override := index $rtEnv $key }}
76- {{- if and (ne (toString $value) "") (ne (toString $value) "<nil>") (or (not $override) (eq (toString $override) "") (eq (toString $override) "<nil>")) }}
79+ {{- $rtOverride := index $rtEnv $key }}
80+ {{- $appOverride := index $appEnv $key }}
81+ {{- $hasRt := and $rtOverride (ne (toString $rtOverride) "") (ne (toString $rtOverride) "<nil>") }}
82+ {{- $hasApp := and $appOverride (ne (toString $appOverride) "") (ne (toString $appOverride) "<nil>") }}
83+ {{- if and (ne (toString $value) "") (ne (toString $value) "<nil>") (not $hasRt) (not $hasApp) }}
7784 - name : {{ $key }}
7885 value : {{ $value | quote }}
7986 {{- end }}
You can’t perform that action at this time.
0 commit comments