Rebuild Executor Image¶
When needed: Any change to Python code in ge_agent/, ge_engine/, ge_common/, ge_comm/, ge_orchestrator/, or to the Dockerfile/requirements.
When NOT needed: Config file changes, ge-ops/ file changes (these are hostPath-mounted, not baked in).
Steps¶
# 1. Run the build script
bash ge-ops/infrastructure/local/k3s/executor/build-executor.sh
# 2. Restart deployment
kubectl rollout restart deployment/ge-executor -n ge-agents
# 3. Verify pods are running
kubectl get pods -n ge-agents -l app=ge-executor
What the Build Script Does¶
- Creates temp build context at
/tmp/ge-executor-build-context - Copies Python packages:
ge_agent/,ge_engine/,ge_common/,ge_comm/,ge_orchestrator/ - Copies
ge-ops/directory - Copies Dockerfile, requirements.txt, health_server.py, entrypoint.sh
docker buildwith tagge-bootstrap-agent-executor:latestdocker save | k3s ctr images import(imports to k3s containerd)- Cleans up build context
Source of truth: ge-ops/infrastructure/local/k3s/executor/build-executor.sh
Dockerfile: ge-ops/infrastructure/local/k3s/executor/Dockerfile
The executor-refresh CronJob¶
executor-refresh runs at 03:00 and 15:00 daily. It does rolling restart only (no rebuild). It uses bitnami/kubectl:latest to run kubectl rollout restart. This picks up hostPath changes but NOT baked-in code changes.
Common Issues¶
- Build takes ~3 minutes (large ge-ops context transfer)
k3s ctr images importtakes ~60s- If pods crash after rebuild: check
kubectl logsfor import errors - Import priority:
/app/(baked in) beatsPYTHONPATH=/home/claude/ge-bootstrap(hostPath). Always rebuild for code changes.