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:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user