Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(chart): state the current reason replicaCount must stay 1

Yudhi Armyndharis798281129c3f
diff --git a/charts/openwa/README.md b/charts/openwa/README.md
index de1014ae0..7b496de8e 100644
--- a/charts/openwa/README.md
+++ b/charts/openwa/README.md
@@ -2,8 +2,9 @@
Helm chart for [OpenWA](https://github.com/rmyndharis/OpenWA) — WhatsApp API.
-> **Single instance only.** OpenWA is single-process with in-memory engine state.
-> Keep `replicaCount: 1`; scaling out corrupts WhatsApp session auth. See
+> **Single instance only.** A session lease stops two pods from launching the same session,
+> but API-key socket eviction, WS rate-limit buckets and in-flight bulk batches are still
+> process-local. Keep `replicaCount: 1`. See
> [docs/13-horizontal-scaling.md](../../docs/13-horizontal-scaling.md).
## Install
diff --git a/charts/openwa/templates/NOTES.txt b/charts/openwa/templates/NOTES.txt
index ca9d16969..5e90c23ad 100644
--- a/charts/openwa/templates/NOTES.txt
+++ b/charts/openwa/templates/NOTES.txt
@@ -1,7 +1,8 @@
OpenWA has been installed as release "{{ .Release.Name }}".
- WARNING: replicaCount must stay 1. OpenWA holds live WhatsApp engine state in
- memory; scaling out corrupts session auth. See docs/13-horizontal-scaling.md.
+ WARNING: replicaCount must stay 1. A session lease stops two pods from launching the
+ same session, but socket eviction, WS rate limits and bulk batches stay process-local.
+ See docs/13-horizontal-scaling.md.
1. Wait for the pod:
kubectl -n {{ .Release.Namespace }} rollout status statefulset/{{ include "openwa.fullname" . }}
diff --git a/charts/openwa/values.yaml b/charts/openwa/values.yaml
index 9ade28c08..6e49c6aa0 100644
--- a/charts/openwa/values.yaml
+++ b/charts/openwa/values.yaml
@@ -1,6 +1,8 @@
-# replicaCount MUST stay 1. OpenWA is a single-process application: live WhatsApp
-# engine state is in-memory, and two pods driving the same session data corrupt the
-# session auth (forced logout / ban). See docs/13-horizontal-scaling.md.
+# replicaCount MUST stay 1. A session lease now stops two pods from launching the same
+# session, so the shared-auth corruption this warning used to describe can no longer
+# happen. What is still process-local is the reason: API-key socket eviction, the WS
+# rate-limit buckets, the liveness watchdog and reconnect timers, and in-flight bulk
+# batches. See docs/13-horizontal-scaling.md.
replicaCount: 1
image:
diff --git a/docs/13-horizontal-scaling.md b/docs/13-horizontal-scaling.md
index e7ac29558..321a551ba 100644
--- a/docs/13-horizontal-scaling.md
+++ b/docs/13-horizontal-scaling.md
@@ -474,6 +474,10 @@ spec:
### Deploy to Kubernetes
+The maintained chart is [`charts/openwa`](../charts/openwa), a single-instance StatefulSet that
+already encodes the `replicaCount: 1` constraint below; prefer it over hand-applied manifests. The
+raw manifests here stay for operators who do not use Helm.
+
```bash
# Apply all manifests
kubectl apply -f k8s/