59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: openclaw
|
|
namespace: openclaw
|
|
labels:
|
|
app.kubernetes.io/name: openclaw
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: openclaw
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: openclaw
|
|
spec:
|
|
serviceAccountName: openclaw
|
|
|
|
containers:
|
|
- name: openclaw
|
|
image: default-route-openshift-image-registry.apps.lab.apilab.us/openclaw/openclaw:latest
|
|
imagePullPolicy: Always
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
set -e
|
|
# Bootstrap if config doesn't exist
|
|
if [ ! -f ~/.openclaw/openclaw.json ]; then
|
|
node /app/openclaw.mjs onboard --non-interactive --accept-risk \
|
|
--gateway-port 18789 --gateway-bind lan \
|
|
--skip-daemon --skip-channels --skip-skills --skip-health --skip-ui
|
|
fi
|
|
# Run the gateway
|
|
exec node /app/openclaw.mjs gateway --port 18789 --bind lan
|
|
ports:
|
|
- name: gateway
|
|
containerPort: 18789
|
|
protocol: TCP
|
|
env:
|
|
- name: HOME
|
|
value: /home/node
|
|
- name: NPM_CONFIG_CACHE
|
|
value: /tmp/npm-cache
|
|
- name: XDG_CACHE_HOME
|
|
value: /tmp
|
|
volumeMounts:
|
|
- name: home
|
|
mountPath: /home/node
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
|
|
volumes:
|
|
- name: home
|
|
persistentVolumeClaim:
|
|
claimName: openclaw-home
|
|
- name: tmp
|
|
emptyDir: {}
|