Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions charts/openclaw-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ spec:
- |
mkdir -p /home/node/.openclaw
[ -f /home/node/.openclaw/openclaw.json ] || cp /config/openclaw.json /home/node/.openclaw/openclaw.json
# Sync gateway.remote.token to match OPENCLAW_GATEWAY_TOKEN (if set)
# gateway reads auth token from env var first (env-first precedence), so auth.token in config is not needed
if [ -n "$OPENCLAW_GATEWAY_TOKEN" ]; then
node -e "
const fs = require('fs');
const p = '/home/node/.openclaw/openclaw.json';
const c = JSON.parse(fs.readFileSync(p));
c.gateway = c.gateway || {};
c.gateway.remote = c.gateway.remote || {};
c.gateway.remote.token = process.env.OPENCLAW_GATEWAY_TOKEN;
fs.writeFileSync(p, JSON.stringify(c, null, 2));
"
fi
env:
- name: OPENCLAW_GATEWAY_TOKEN
valueFrom:
secretKeyRef:
{{- if .Values.gateway.token.generate }}
name: {{ include "openclaw-helm.fullname" . }}-gateway-token
{{- else }}
name: {{ .Values.gateway.token.secretName }}
{{- end }}
key: token
optional: true
volumeMounts:
- name: config
mountPath: /config
Expand Down