update hermes deployment

This commit is contained in:
sirius0xdev 2026-05-08 00:37:53 +00:00
parent 3e2b9e0541
commit 47f061ad19

View file

@ -70,13 +70,10 @@ spec:
- name: hermes-agent - name: hermes-agent
securityContext: securityContext:
runAsNonRoot: true runAsNonRoot: true
runAsUser: 1000 runAsUser: 10000
runAsGroup: 1000 runAsGroup: 10000
allowPrivilegeEscalation: false allowPrivilegeEscalation: true
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
capabilities:
drop:
- ALL
seccompProfile: seccompProfile:
type: RuntimeDefault type: RuntimeDefault
image: nousresearch/hermes-agent:latest image: nousresearch/hermes-agent:latest
@ -89,7 +86,7 @@ spec:
set -euo pipefail set -euo pipefail
echo "Hermes Agent starting (Telegram polling + full config persistence)..." echo "Hermes Agent starting (Telegram polling + full config persistence)..."
HERMES_BIN="/home/hermes/.venv/bin/hermes" HERMES_BIN="/opt/data/.venv/bin/hermes"
if [ ! -x "$HERMES_BIN" ]; then if [ ! -x "$HERMES_BIN" ]; then
echo "❌ hermes binary NOT FOUND at $HERMES_BIN" echo "❌ hermes binary NOT FOUND at $HERMES_BIN"
@ -101,25 +98,16 @@ spec:
echo "✅ Found hermes at: $HERMES_BIN" echo "✅ Found hermes at: $HERMES_BIN"
# Copy config # Copy config
cp -f /tmp/hermes/config.yaml /home/hermes/.config/config.yaml || true cp -f /tmp/hermes/config.yaml /opt/hermes/.config/config.yaml || true
# Create symlink in a writable location (PVC) so it works when you exec in # Create symlink in a writable location (PVC) so it works when you exec in
mkdir -p /opt/data/bin mkdir -p /opt/data/bin
ln -sf "$HERMES_BIN" /home/hermes/bin || true ln -sf "$HERMES_BIN" /opt/data/bin || true
export PATH="/home/hermes/bin:$PATH" export PATH="/opt/data/bin:$PATH"
echo "🚀 Starting hermes gateway..." echo "🚀 Starting hermes gateway..."
exec "$HERMES_BIN" gateway run exec "$HERMES_BIN" gateway run
env: env:
# === Hermes Home - REQUIRED for config persistence ===
- name: HERMES_HOME
value: "/home/hermes/.hermes"
- name: XDG_CACHE_HOME
value: "/home/hermes/.cache"
- name: XDG_CONFIG_HOME
value: "/home/hermes/.config"
# === Telegram Configuration (polling only - no public exposure) ===
- name: TELEGRAM_BOT_TOKEN - name: TELEGRAM_BOT_TOKEN
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -164,7 +152,7 @@ spec:
# value: "INFO" # value: "INFO"
volumeMounts: volumeMounts:
- name: hermes-data - name: hermes-data
mountPath: /home/hermes/.hermes mountPath: /opt/hermes/.hermes
- name: hermes-configmap - name: hermes-configmap
mountPath: /tmp/hermes/config.yaml mountPath: /tmp/hermes/config.yaml
subPath: config.yaml subPath: config.yaml
@ -220,11 +208,9 @@ spec:
runAsNonRoot: false runAsNonRoot: false
allowPrivilegeEscalation: true allowPrivilegeEscalation: true
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
seccompProfile: seccompProfile:
type: RuntimeDefault type: RuntimeDefault
volumes: volumes:
- name: hermes-configmap - name: hermes-configmap
configMap: configMap: