hermes: avoid image broker service env collision

This commit is contained in:
jenkins 2026-08-11 01:22:16 -03:00
parent ffffe98a3f
commit da7675c6dd
2 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,7 @@ spec:
ai.bstein.dev/execution: Hermes Kanban with durable direct Codex and Claude Code CLI workers ai.bstein.dev/execution: Hermes Kanban with durable direct Codex and Claude Code CLI workers
ai.bstein.dev/model-policy: Jetson-assisted AUTO routing, low through xhigh, cross-provider fallback ai.bstein.dev/model-policy: Jetson-assisted AUTO routing, low through xhigh, cross-provider fallback
ai.bstein.dev/placement: rpi5 preferred; Jetson deferred until state storage is available ai.bstein.dev/placement: rpi5 preferred; Jetson deferred until state storage is available
ai.bstein.dev/config-rev: "20260811-codex-image-broker" ai.bstein.dev/config-rev: "20260811-codex-image-broker-port"
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: hermes-agent vault.hashicorp.com/role: hermes-agent
vault.hashicorp.com/agent-inject-secret-anthropic-token: kv/data/atlas/hermes/agent-tokens vault.hashicorp.com/agent-inject-secret-anthropic-token: kv/data/atlas/hermes/agent-tokens
@ -705,6 +705,7 @@ spec:
- {name: CODEX_HOME, value: /opt/data/home/.codex} - {name: CODEX_HOME, value: /opt/data/home/.codex}
- {name: PYTHONPATH, value: /opt/hermes} - {name: PYTHONPATH, value: /opt/hermes}
- {name: HERMES_IMAGE_BROKER_DEFAULT_MODEL, value: gpt-image-2-high} - {name: HERMES_IMAGE_BROKER_DEFAULT_MODEL, value: gpt-image-2-high}
- {name: HERMES_IMAGE_BROKER_LISTEN_PORT, value: "9002"}
readinessProbe: readinessProbe:
tcpSocket: {port: image-broker} tcpSocket: {port: image-broker}
initialDelaySeconds: 5 initialDelaySeconds: 5

View File

@ -14,8 +14,10 @@ from pathlib import Path
from typing import Any from typing import Any
HOST = os.environ.get("HERMES_IMAGE_BROKER_HOST", "0.0.0.0") HOST = os.environ.get("HERMES_IMAGE_BROKER_LISTEN_HOST", "0.0.0.0")
PORT = int(os.environ.get("HERMES_IMAGE_BROKER_PORT", "9002")) # Kubernetes reserves <SERVICE>_PORT for service-link discovery and injects a
# tcp://... value. Keep listener configuration out of that namespace.
PORT = int(os.environ.get("HERMES_IMAGE_BROKER_LISTEN_PORT", "9002"))
TOKEN = os.environ.get("HERMES_IMAGE_BROKER_KEY", "").strip() TOKEN = os.environ.get("HERMES_IMAGE_BROKER_KEY", "").strip()
PROVIDER_PATH = Path( PROVIDER_PATH = Path(
os.environ.get( os.environ.get(