feat(k8s): add agent service and LiteLLM to the Helm chart#5272
Open
bobbai00 wants to merge 1 commit into
Open
feat(k8s): add agent service and LiteLLM to the Helm chart#5272bobbai00 wants to merge 1 commit into
bobbai00 wants to merge 1 commit into
Conversation
The agent-service image is built and runs under single-node compose but had no Helm deployment, and there was no in-cluster LLM gateway. This adds both, mirroring the proven preview/production chart: Agent service - deployment + service (gated on agentService.enabled), wired to in-cluster service DNS using the env names the service actually reads (TEXERA_DASHBOARD_SERVICE_ENDPOINT, LLM_ENDPOINT, WORKFLOW_COMPILING_SERVICE_ENDPOINT, EXECUTION_ENDPOINT_TEMPLATE). - a dedicated /api/agents HTTPRoute plus a BackendTrafficPolicy that consistent-hashes on X-Agent-Workflow-Id, so a workflow's requests always reach the replica holding its in-memory agent. - readiness/liveness on /api/healthcheck. LiteLLM (in-cluster LLM gateway) - deployment + service + config ConfigMap (gated on litellm.enabled). - Postgres persistence enabled by default: a texera_litellm database created by the postgres init script, with DATABASE_URL + STORE_MODEL_IN_DB so keys, spend, and model config survive restarts. - access-control-service wired to LiteLLM (LITELLM_BASE_URL/MASTER_KEY, copilot enabled). A shared Opaque Secret holds the agent gateway key, the LiteLLM master key, and the provider API keys (supply via --set / override; none committed). Closes apache#5269
ede4eec to
7620a52
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.
What changes were proposed in this PR?
The agent-service image is built and runs under single-node compose but had no Helm deployment, and the chart had no in-cluster LLM gateway. This adds both, mirroring the proven preview/production chart while aligning the agent service's env to what the code on
mainactually reads.Agent service (gated on
agentService.enabled)agent-service-deployment.yaml+agent-service-service.yaml, wired to in-cluster service DNS using the env names fromagent-service/src/config/env.ts:TEXERA_DASHBOARD_SERVICE_ENDPOINT(webserver),LLM_ENDPOINT(access-control-service),WORKFLOW_COMPILING_SERVICE_ENDPOINT, and a per-CUEXECUTION_ENDPOINT_TEMPLATE./api/agentsHTTPRoute (REST + the/api/agents/:id/reactWebSocket) plus aBackendTrafficPolicythat consistent-hashes onX-Agent-Workflow-Id— agents are held in memory per pod, so a workflow's requests must always reach the same replica (the client already stamps that header)./api/healthcheck.LiteLLM — in-cluster LLM gateway (gated on
litellm.enabled)litellm-deployment.yaml+litellm-service.yaml+litellm-config.yaml(ConfigMap).texera_litellmdatabase is created by the Postgres init script, and the deployment setsDATABASE_URL+STORE_MODEL_IN_DB=trueso keys, spend, and model config survive restarts.access-control-servicewired to LiteLLM (LITELLM_BASE_URL,LITELLM_MASTER_KEY, copilot enabled).A shared Opaque
Secretholds the agent gateway key, the LiteLLM master key, and the provider API keys (supply via--set/override; none committed).Any related issues, documentation, discussions?
Closes #5269
Also implements the in-cluster LiteLLM Helm support tracked by #4108 (supersedes the approach in #4109).
How was this PR tested?
helm lintandhelm templateagainst the chart (subchartdependencies:stripped locally so the render needs no remote charts):Verified the rendered output: agent deployment env +
/api/healthcheckprobes;agent-service-svc; the/api/agents -> agent-service-svcHTTPRoute and theBackendTrafficPolicytargeting it (consistent hash onX-Agent-Workflow-Id); LiteLLMDATABASE_URL=postgresql://…/texera_litellm+STORE_MODEL_IN_DB; access-control-serviceLITELLM_BASE_URL/MASTER_KEY; and the idempotentCREATE DATABASE texera_litellmin the Postgres init script. Not applied to a live cluster.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)