gcloud-lab/apps/base/customer1/openclaw/deployment.yaml

158 lines
4.5 KiB
YAML
Raw Normal View History

2026-04-18 02:56:18 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: customer1
name: openclaw
labels:
app: openclaw
spec:
replicas: 1
selector:
matchLabels:
app: openclaw
strategy:
type: Recreate
template:
metadata:
labels:
app: openclaw
spec:
automountServiceAccountToken: false
securityContext:
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
initContainers:
- name: init-config
image: busybox:1.37
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- |
2026-04-24 00:20:57 +00:00
mkdir -p /home/node/.npm /home/node/.openclaw/workspace
chown -R 1000:1000 /home/node
chmod -R 755 /home/node
echo "✅ Home + .npm directory ready"
2026-04-18 02:56:18 +00:00
securityContext:
2026-04-24 00:20:57 +00:00
runAsUser: 0
runAsGroup: 0
2026-04-18 02:56:18 +00:00
resources:
requests:
memory: 32Mi
cpu: 50m
limits:
memory: 64Mi
cpu: 100m
volumeMounts:
2026-04-23 23:49:36 +00:00
- name: openclaw-home-new
2026-04-18 02:56:18 +00:00
mountPath: /home/node/.openclaw
- name: config
mountPath: /config
containers:
- name: gateway
2026-04-20 01:52:50 +00:00
image: ghcr.io/openclaw/openclaw:slim
2026-04-18 02:56:18 +00:00
imagePullPolicy: IfNotPresent
2026-04-22 22:31:38 +00:00
stdin: true
tty: true
2026-04-18 02:56:18 +00:00
command:
- node
- /app/dist/index.js
- gateway
- run
ports:
- name: gateway
containerPort: 18789
protocol: TCP
env:
- name: HOME
value: /home/node
- name: OPENCLAW_CONFIG_DIR
value: /home/node/.openclaw
- name: NODE_ENV
value: production
- name: OPENCLAW_GATEWAY_TOKEN
valueFrom:
secretKeyRef:
name: openclaw-secrets
key: OPENCLAW_GATEWAY_TOKEN
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: openclaw-secrets
key: ANTHROPIC_API_KEY
optional: true
2026-04-18 04:18:31 +00:00
- name: TELEGRAM_BOT_TOKEN
2026-04-18 02:56:18 +00:00
valueFrom:
secretKeyRef:
name: openclaw-secrets
2026-04-18 04:18:31 +00:00
key: TELEGRAM_BOT_TOKEN
2026-04-18 02:56:18 +00:00
optional: true
- name: GEMINI_API_KEY
valueFrom:
secretKeyRef:
name: openclaw-secrets
key: GEMINI_API_KEY
optional: true
- name: OPENROUTER_API_KEY
valueFrom:
secretKeyRef:
name: openclaw-secrets
key: OPENROUTER_API_KEY
optional: true
2026-04-21 22:56:15 +00:00
- name: XAI_API_KEY
valueFrom:
secretKeyRef:
name: xai-apikey
key: XAI_API_KEY
optional: true
2026-04-18 02:56:18 +00:00
resources:
requests:
2026-04-18 04:18:31 +00:00
memory: 2Gi
2026-04-19 22:18:59 +00:00
cpu: "1"
2026-04-18 02:56:18 +00:00
limits:
2026-04-18 04:18:31 +00:00
memory: 6Gi
2026-04-19 22:18:59 +00:00
cpu: "4"
2026-04-18 02:56:18 +00:00
livenessProbe:
exec:
command:
- node
- -e
- "require('http').get('http://127.0.0.1:18789/healthz', r => process.exit(r.statusCode < 400 ? 0 : 1)).on('error', () => process.exit(1))"
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- node
- -e
- "require('http').get('http://127.0.0.1:18789/readyz', r => process.exit(r.statusCode < 400 ? 0 : 1)).on('error', () => process.exit(1))"
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
volumeMounts:
2026-04-23 23:49:36 +00:00
- name: openclaw-home-new
2026-04-18 02:56:18 +00:00
mountPath: /home/node/.openclaw
- name: tmp-volume
mountPath: /tmp
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumes:
2026-04-23 23:49:36 +00:00
- name: openclaw-home-new
2026-04-18 02:56:18 +00:00
persistentVolumeClaim:
2026-04-23 23:49:36 +00:00
claimName: openclaw-home-new-pvc
2026-04-18 02:56:18 +00:00
- name: config
configMap:
name: openclaw-config
- name: tmp-volume
emptyDir: {}