feat(exgentic-runner): in-cluster execution support#27
Open
yoavkatz wants to merge 1 commit into
Open
Conversation
5 tasks
3acb3fb to
ebc01e0
Compare
Add full in-cluster execution for the exgentic A2A runner as a Kubernetes Job, e2e test script, shared URL helpers, and a set of correctness fixes. Key changes: - feat: add in-cluster Kubernetes Job execution (k8s/job.yaml, Dockerfile) - feat: add e2e-test.sh — runs all benchmarks and emits a results table - feat: add libsh/urls.sh — URL helpers that switch between localtest.me and cluster-internal DNS based on KUBERNETES_SERVICE_HOST - feat: add sync-image-to-cluster.sh and update-secrets.sh helpers - refactor: deploy-agent/benchmark use GHCR registry images by default; local image sync only triggered by --local-image - fix: replace kubectl port-forward health checks with HTTP wait_for_url - fix: skip kubectl context checks inside cluster (no kubeconfig) - fix: MLflow tracing enabled by default; --mlflow renamed --disable-mlflow - fix: OTEL exporter uses HTTP/protobuf in-cluster (port 8335) - fix: preserve benchmark exit status in parallel e2e runs - fix: respect CLI/env overrides over .env file values - fix: unique port-forward ports per benchmark in parallel mode - docs: add In-Cluster Execution and E2E Test Script sections to README - docs: add AGENTS.md branching and DCO sign-off policy Signed-off-by: Yoav Katz <katz@il.ibm.com>
ebc01e0 to
a9d6a5c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add full in-cluster execution support for the exgentic A2A runner so benchmarks can be run as Kubernetes Jobs without any local machine involvement. Also introduces an end-to-end test script, several correctness fixes for parallel and in-cluster runs, and documentation updates.
New files
e2e-test.shOrchestrates a full end-to-end test across all benchmarks (
gsm8k,tau2,appworld) by callingdeploy-and-evaluate.shonce per benchmark. Key features:SKIP--parallel-jobs: runs all benchmarks concurrently; each gets unique OTEL-collector and Prometheus local ports so port-forwards do not collide--in-cluster: submits akubectlJob per benchmark derived fromk8s/job.yaml, streams logs, checks job success status--tasks N/--parallel-sessions N: forwarded asMAX_TASKS/MAX_PARALLEL_SESSIONSenv varsdeploy-and-evaluate.she2e-results.mdwith a summary table: benchmark, status (PASS/FAIL/SKIP), eval success rate, avg latency, failure countlibsh/urls.shShared URL helper library sourced by all deploy/evaluate scripts. Each function returns the correct URL depending on whether
KUBERNETES_SERVICE_HOSTis set (in-cluster cluster-DNS) or not (developer laptoplocaltest.me):kagenti_api_url— Kagenti backendkeycloak_api_url— Keycloaktool_http_url/tool_k8s_url— MCP serveragent_http_url— A2A agentmcp_gateway_url— MCP Gatewayotel_collector_url— OTEL Collector (HTTP/protobuf port 8335 in-cluster)prometheus_url— Prometheusk8s/job.yamlKubernetes Job template for in-cluster runner execution. Reads credentials from secrets (
openai-secret,kagenti-test-user,hf-secret), uses the default ServiceAccount (no kubectl RBAC needed), and hasttlSecondsAfterFinished: 3600/backoffLimit: 0.sync-image-to-cluster.shExtracted helper (previously inlined in deploy scripts) that loads a locally-built container image into the kind cluster. Only needed when
--local-imageis passed; normal runs pull from the GHCR registry.update-secrets.shConvenience script to create/patch
openai-secretandhf-secretin a target namespace viakubectl. Run from a local machine before submitting Jobs.DockerfileContainer image definition for the runner itself, used to produce
ghcr.io/exgentic/runner:latest.Changed files
deploy-benchmark.sh/deploy-agent.shghcr.io/exgentic/<image>:latestdirectly; local image sync is only triggered with--local-imagelocaltest.meURLs replaced withlibsh/urls.shcalls so the same scripts work on a dev laptop and inside the cluster${VAR:-default}so secrets injected via Kubernetes Job env vars are not overwritten by.envfile loadingdocker pull/podman taglogic (moved tosync-image-to-cluster.sh)evaluate-benchmark.sh--mlflowflag replaced by--disable-mlflow; tracing is on unless explicitly turned offkubectlcontext check block is skipped whenKUBERNETES_SERVICE_HOSTis set — avoids hangs from interactive prompts inside a pod.envfile is read with${VAR:-}guarding so CLI/env overrides are respectedOTEL_COLLECTOR_LOCAL_PORTandPROMETHEUS_LOCAL_PORTdefault from environment soe2e-test.shcan inject unique values per concurrent benchmarkkubectl waitpod-readiness checks with pollingwait_for_urlagainst the service HTTP endpointsdeploy-and-evaluate.sh--disable-mlflow(was--mlflow) toevaluate-benchmark.shMAX_TASKS/MAX_PARALLEL_SESSIONSfrom environmentexgentic_a2a_runner/otel.pyKUBERNETES_SERVICE_HOSTto switch the OTEL exporter from gRPC (localhost:4317) to HTTP/protobuf (otel-collector…:8335) — the OTEL Collector in the Kagenti cluster only exposes the HTTP/protobuf port inside the clusterAGENTS.mdmaingit commit -s)README.mde2e-test.shusage, flags, and the results table format--mlflowreferences to--disable-mlflowBug fixes
223b5cdrun_benchmarkwas backgroundedb5439b0.envfile —.envwas overwriting already-exported vars1b1a7e1e2e-test.shruns were binding the same local ports2a4c0f3localtest.meroute953b221--mlflow→--disable-mlflowaa9251ekubectl waitwith HTTP health checks so scripts work without a kubeconfig