diff --git a/apps/base/customer1/hermes-agent/new-deployment.yaml b/apps/base/customer1/hermes-agent/new-deployment.yaml index 37bc2f3..a09dce7 100644 --- a/apps/base/customer1/hermes-agent/new-deployment.yaml +++ b/apps/base/customer1/hermes-agent/new-deployment.yaml @@ -28,6 +28,9 @@ spec: emptyDir: {} - name: hermes-webui-app emptyDir: {} + - name: hermes-configmap + configMap: + name: hermes-config initContainers: # 3. K8s workaround: Copy the agent source code into the shared emptyDir @@ -38,10 +41,16 @@ spec: - "-c" - | 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 echo '#!/bin/sh' > /shared-home/.local/bin/gh echo 'exit 1' >> /shared-home/.local/bin/gh chmod +x /shared-home/.local/bin/gh + securityContext: runAsUser: 0 # Run as root briefly to copy and fix permissions runAsNonRoot: false @@ -50,6 +59,9 @@ spec: mountPath: /shared-src - name: hermes-home mountPath: /shared-home + - name: hermes-configmap + mountPath: /tmp/hermes/config.yaml + subPath: config.yaml containers: # ========================================== # CONTAINER 1: HERMES AGENT @@ -125,6 +137,8 @@ spec: env: - name: HOME value: "/home/hermeswebui/.hermes" + - name: HERMES_HOME + value: "/home/hermeswebui/.hermes" - name: HERMES_WEBUI_HOST value: "0.0.0.0" - name: HERMES_WEBUI_PORT