Confirmed by extracting dist/config.js from the actual image - v3.x's getConfigPath() only checks --draupnir-config/--mjolnir-config CLI flags, no longer NODE_CONFIG_DIR/node-config auto-discovery.
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: draupnir
|
|
namespace: matrix
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: draupnir
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: draupnir
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
containers:
|
|
- name: draupnir
|
|
image: gnuxie/draupnir:v3.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
# v3.x dropped NODE_CONFIG_DIR auto-discovery in favour of an explicit CLI flag
|
|
# (confirmed by extracting dist/config.js from the image - getConfigPath() only
|
|
# checks --draupnir-config/--mjolnir-config, throws otherwise).
|
|
args: ["bot", "--draupnir-config", "/data/config/default.yaml"]
|
|
ports:
|
|
- name: healthz
|
|
containerPort: 8080
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /data/config/default.yaml
|
|
subPath: default.yaml
|
|
readOnly: true
|
|
- name: storage
|
|
mountPath: /data/storage
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
memory: 384Mi
|
|
# healthz reports 418 (not just a plain failure) until Draupnir finishes its
|
|
# initial room-state sync with the homeserver - generous initialDelay/failureThreshold
|
|
# avoids a restart loop while that's still in progress on first boot.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 15
|
|
failureThreshold: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
failureThreshold: 10
|
|
volumes:
|
|
- name: config
|
|
secret:
|
|
secretName: draupnir-config
|
|
- name: storage
|
|
persistentVolumeClaim:
|
|
claimName: draupnir-data
|