Fix NATS max_payload — use config file instead of invalid CLI flag

-max_payload is not a valid NATS CLI flag; it must be set in a config file.

- Add deploy/k8s/configmap-nats.yaml with nats.conf (jetstream, http_port,
  max_payload=8 MB).
- Update deployment-nats.yaml to mount the ConfigMap at /etc/nats and
  start NATS with -c /etc/nats/nats.conf instead of individual CLI flags.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-28 20:09:59 -05:00
co-authored by Claude Happy
parent 2ed7ad2ba9
commit 775cf65899
2 changed files with 27 additions and 5 deletions
+17
View File
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nats-config
namespace: stone-server
data:
nats.conf: |
# JetStream (replaces -js CLI flag)
jetstream: true
# HTTP monitoring port (replaces -m 8222 CLI flag)
http_port: 8222
# Maximum message payload size.
# Default is 1 MB which is too small for content.sync responses
# that include full card DTOs with AbilitiesJson / EffectsJson fields.
max_payload: 8388608 # 8 MB
+10 -5
View File
@@ -15,15 +15,20 @@ spec:
labels:
app: nats
spec:
volumes:
- name: nats-config
configMap:
name: nats-config
containers:
- name: nats
image: nats:2.10-alpine
args:
- "-js"
- "-m"
- "8222"
- "-max_payload"
- "8388608" # 8 MB — allows large content.sync payloads through NATS
- "-c"
- "/etc/nats/nats.conf"
volumeMounts:
- name: nats-config
mountPath: /etc/nats
readOnly: true
ports:
- name: client
containerPort: 4222