refactor(agents)!: remove agent creation, agents move to the generic agent chart#204
Merged
Conversation
…gent chart Agents are no longer created by this chart. Install one release of the generic agent chart (github.com/giantswarm/agent) per agent, per the creating-agents PRD. Removes agents.definitions and the templates it drove (Agent CR + SA, per-agent muster RemoteMCPServer, per-agent A2A route, helpers). The admin-owned surface the agent chart depends on stays: the shared muster RemoteMCPServer, agents.models, agents.remoteMcpServers, and the kagent-namespace policies.
The templates driven by the removed agents.definitions block: the Agent CR + ServiceAccount, the per-agent A2A AgentgatewayBackend/HTTPRoute, and the now-unused helpers.
With agent creation gone, the leftover agents key only held admin-owned kagent CRs, which was misleading. agents.models moves to kagent.modelConfigs (renamed to match the CR kind) and agents.remoteMcpServers to kagent.remoteMcpServers, next to kagent.providers under the same read-by-connectivity convention as controllerRoute/uiRoute. The templates move up out of templates/kagent/agents/, remoteMcpServers gains schema validation, and validate.yaml fails loudly when agents.* is still set so stale per-cluster values break the render instead of silently dropping CRs.
Leftover agents.* keys are silently ignored on purpose: on the auto-updating dev track the chart version and per-cluster values cannot be changed atomically, so the zero-gap migration is to set the new kagent.* keys alongside the old agents.* keys and clean up after the rollout. A fail guard would turn that overlap into a red HelmRelease.
fiunchinho
marked this pull request as ready for review
July 15, 2026 16:26
QuentinBisson
approved these changes
Jul 15, 2026
Member
Author
|
The sre-agent migration this PR requires is prepared in giantswarm/giantswarm-management-clusters#2217 (agent-chart HelmRelease + OCIRepository for glean/gazelle/graveler; agent chart v0.2.2 is published and the OCIRepository floor resolves to it). Merge ordering: this PR's release must roll out first — the old Agent CR is Helm-owned by the connectivity release, so until it is pruned the new sre-agent HelmRelease fails install with an ownership conflict. (The shared muster RemoteMCPServer is already live via v1.22.1.) |
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 this PR does
Removes agent creation from the agentic-platform charts. Agents are now created by installing one release of the generic
agentchart per agent, per the creating-agents PRD. The leftoveragentsvalues key is then dissolved entirely — it only held admin-owned kagent CRs, which was misleading.Removed
agents.*values key from both the umbrella and connectivityvalues.yaml(including the eval-tuned sre-agent definition and its reciprocal keep-in-sync notes).agents.definitionsdrove:templates/kagent/agents/agents.yaml— the kagentAgentCR + chart-ownedServiceAccount.muster-<name>RemoteMCPServerloop inremotemcpservers.yaml— theagentchart references the sharedmusterserver cross-namespace instead.templates/kagent/agents/agentgateway-backends.yaml— the per-agent A2AAgentgatewayBackend+/agents/<name>HTTPRoute. Not part of the PRD's chart scope and unused: in-cluster A2A callers go through the kagent controller route (/kagent).extraObjectscovers one-offs.templates/kagent/agents/_agents.tpl— both helpers became unused.Moved / renamed
agents.models→kagent.modelConfigs(renamed to match the CR kind) andagents.remoteMcpServers→kagent.remoteMcpServers: both are admin-owned kagent CRs, so they now live in thekagentblock next toproviders(whoseanthropicentry already yields the subchart-createddefault-model-config), under the same "read by connectivity templates, not the subchart" convention ascontrollerRoute/uiRoute.templates/kagent/agents/totemplates/kagent/.kagent.remoteMcpServersgains the schema validation it never had (requiredname/url, optionaldescription/tokenSecret,additionalProperties: false).agents.*keys in per-cluster values are silently ignored on purpose (the root schema stays permissive forforwardAllValues): on the auto-updating dev track the chart version and per-cluster values can't change atomically, so the zero-gap migration is a dual-key overlap — a fail guard would turn that overlap into a red HelmRelease.Kept (the admin-owned surface the
agentchart depends on)musterRemoteMCPServer(allowedNamespaces: {from: All}) — the platform contract theagentchart's defaultserverReftargets.agents.definitions.sre-agent.enabled: truein giantswarm-config must have anagent-chart-based replacement (carrying the eval-tunedsystemMessage+ mustertoolNames) deployed before this upgrade rolls out, or the live Agent CR, its SA, andmuster-sre-agentare deleted. This matches the PRD's PoC path (recreate sre-agent with the chart on glean).agents.models/agents.remoteMcpServers: add the equivalentkagent.modelConfigs/kagent.remoteMcpServerskeys before the chart rolls out (old chart reads the old keys, new chart reads the new ones — zero gap), then delete the old keys afterwards.Trade-off noted
kagent.modelConfigs/kagent.remoteMcpServersride into the kagent component's HelmRelease values (ignored by that chart today, like the routing keys). If upstream kagent ever introduces same-named values, they must be renamed here.Follow-up (separate issue)
kagent.modelConfigsrenders ModelConfigs only into the single kagent namespace, and the referencedSecrets are not rendered at all. The PRD's tenant-namespace model needs per-namespace ModelConfig + Secret provisioning once real tenant namespaces exist.Verification
helm templateof the connectivity chart against allci/*.yamlvalues files renders clean; withkagent.enabled+muster.enabledthe sharedmusterRemoteMCPServer still renders and noAgent/per-agent CRs do.kagent.modelConfigs[0]+kagent.remoteMcpServers[0]set via--setrender the expectedModelConfigandRemoteMCPServerCRs.agents.models[0]set via--setrenders clean and is ignored (the dual-key migration path).helm templateof the umbrella chart withci-values.yaml(flux + argo engines) renders clean;helm lintpasses on both charts (also validates values againstvalues.schema.json).