Skip to content

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

  1. Creates temp build context at /tmp/ge-executor-build-context
  2. Copies Python packages: ge_agent/, ge_engine/, ge_common/, ge_comm/, ge_orchestrator/
  3. Copies ge-ops/ directory
  4. Copies Dockerfile, requirements.txt, health_server.py, entrypoint.sh
  5. docker build with tag ge-bootstrap-agent-executor:latest
  6. docker save | k3s ctr images import (imports to k3s containerd)
  7. 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 import takes ~60s
  • If pods crash after rebuild: check kubectl logs for import errors
  • Import priority: /app/ (baked in) beats PYTHONPATH=/home/claude/ge-bootstrap (hostPath). Always rebuild for code changes.