gcloud-lab/apps/base/customer1/hermes-agent/deployment.yaml
sirius0xdev 9e5eea2cd1 feat(hermes-agent): add hermes-config ConfigMap and mount to deployment
- hermes-config::ConfigMap with current /opt/data/config.yaml (models incl. vLLM, agent/tool settings)
- deployment.yaml: volume + subPath mountPath=/opt/data/config.yaml (overrides PVC)
- kustomization.yaml: include configmap.yaml

Standardizes Hermes config via K8s ConfigMap for easier management.
2026-04-29 04:45:18 +00:00

86 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: hermes-agent
namespace: customer1
spec:
replicas: 1
selector:
matchLabels:
app: hermes-agent
template:
metadata:
labels:
app: hermes-agent
spec:
containers:
- name: hermes-agent
image: nousresearch/hermes-agent:latest
command: ["/bin/bash", "-c"]
args:
- |
# Make `hermes` CLI instantly available when you exec in
ln -sf /opt/hermes/.venv/bin/hermes /usr/local/bin/hermes 2>/dev/null || true
echo "Hermes Agent starting (Telegram polling + full config persistence)..."
exec hermes gateway run
env:
# === Hermes Home - REQUIRED for config persistence ===
- name: HERMES_HOME
value: "/opt/data"
# === Telegram Configuration (polling only - no public exposure) ===
- name: TELEGRAM_BOT_TOKEN
valueFrom:
secretKeyRef:
name: hermes-secrets
key: TELEGRAM_BOT_TOKEN
- name: XAI_API_KEY
valuesFrom:
secretKeyRef:
name: xai-apikey
key: XAI_API_KEY
- name: TELEGRAM_ALLOWED_USERS
value: "7528130947"
# === Local vLLM (OpenAI-compatible) ===
- name: OPENAI_BASE_URL
value: "http://openclaw-brain-service.customer1.svc.cluster.local:8000/v1" # ← adjust if your service name differs
- name: HERMES_MODEL_PROVIDER
value: xai
- name: HERMES_MODEL
value: grok-4.1-fast
- name: OPENAI_API_KEY
value: "dummy" # vLLM ignores this
# === Optional ===
# - name: LOG_LEVEL
# value: "INFO"
volumeMounts:
- name: hermes-data
mountPath: /opt/data
- name: hermes-config
mountPath: /opt/data/config.yaml
subPath: config.yaml
volumes:
- name: hermes-config
configMap:
name: hermes-config
- name: hermes-data
persistentVolumeClaim:
claimName: hermes-agent-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hermes-agent-pvc
namespace: customer1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 25Gi