fix configmap issue

This commit is contained in:
sirius0xdev 2026-05-08 03:48:03 +00:00
parent f8bd3da6d7
commit b101ed43ab

View file

@ -28,6 +28,9 @@ spec:
emptyDir: {} emptyDir: {}
- name: hermes-webui-app - name: hermes-webui-app
emptyDir: {} emptyDir: {}
- name: hermes-configmap
configMap:
name: hermes-config
initContainers: initContainers:
# 3. K8s workaround: Copy the agent source code into the shared emptyDir # 3. K8s workaround: Copy the agent source code into the shared emptyDir
@ -38,10 +41,16 @@ spec:
- "-c" - "-c"
- | - |
cp -a /opt/hermes/. /shared-src/ && chown -R 1024:1000 /shared-src /shared-home cp -a /opt/hermes/. /shared-src/ && chown -R 1024:1000 /shared-src /shared-home
if [ -f /tmp/hermes/config.yaml ]; then
cp -f /tmp/hermes/config.yaml /shared-home/config.yaml
fi
mkdir -p /shared-home/.local/bin mkdir -p /shared-home/.local/bin
echo '#!/bin/sh' > /shared-home/.local/bin/gh echo '#!/bin/sh' > /shared-home/.local/bin/gh
echo 'exit 1' >> /shared-home/.local/bin/gh echo 'exit 1' >> /shared-home/.local/bin/gh
chmod +x /shared-home/.local/bin/gh chmod +x /shared-home/.local/bin/gh
securityContext: securityContext:
runAsUser: 0 # Run as root briefly to copy and fix permissions runAsUser: 0 # Run as root briefly to copy and fix permissions
runAsNonRoot: false runAsNonRoot: false
@ -50,6 +59,9 @@ spec:
mountPath: /shared-src mountPath: /shared-src
- name: hermes-home - name: hermes-home
mountPath: /shared-home mountPath: /shared-home
- name: hermes-configmap
mountPath: /tmp/hermes/config.yaml
subPath: config.yaml
containers: containers:
# ========================================== # ==========================================
# CONTAINER 1: HERMES AGENT # CONTAINER 1: HERMES AGENT
@ -125,6 +137,8 @@ spec:
env: env:
- name: HOME - name: HOME
value: "/home/hermeswebui/.hermes" value: "/home/hermeswebui/.hermes"
- name: HERMES_HOME
value: "/home/hermeswebui/.hermes"
- name: HERMES_WEBUI_HOST - name: HERMES_WEBUI_HOST
value: "0.0.0.0" value: "0.0.0.0"
- name: HERMES_WEBUI_PORT - name: HERMES_WEBUI_PORT