Skip to content

charts: add the Helm charts for Agent Substrate - #4149

Draft
Jeremy Alvis (iplay88keys) wants to merge 27 commits into
agent-substrate:mainfrom
kagent-dev:iplay88keys/substrate-charts
Draft

Jeremy Alvis (iplay88keys) wants to merge 27 commits into
agent-substrate:mainfrom
kagent-dev:iplay88keys/substrate-charts

Conversation

@iplay88keys

@iplay88keys Jeremy Alvis (iplay88keys) commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Part-of: #79 (phase 1)

Summary

This change adds four Helm charts for Agent Substrate under charts/. It covers phase 1 of the Helm install plan, apart from two follow-ups. The charts come from kagent-dev/substrate, with changes for upstream.

Chart Contents Namespace
substrate-crds The CRDs Cluster-scoped
substrate-podcert The pod certificate controller The release namespace
substrate-atelet The atelet DaemonSet The namespace of the substrate release
substrate The control plane, the data plane and the SandboxConfigs The release namespace

Install the charts in the order of the table. Upgrade substrate-podcert and substrate-atelet before substrate, as the version skew policy requires.

Changes from the kagent-dev/substrate charts

These changes need action during an upgrade from those charts:

  • Only substrate-atelet installs atelet. An upgrade of a substrate release that ran atelet deletes atelet, unless a substrate-atelet release takes the atelet objects first.
  • The substrate chart has the envoy data plane next to agentgateway. The atenetDataPlane value has no default, so an upgrade fails until it names a data plane.
  • The substrate chart no longer bundles RustFS. ateApi.snapshotLocation is required, unless the PerTemplateSnapshotLocation preview gate is on.
  • Both charts configure the object-store plugin through objectStorePlugin.extraEnv and objectStorePlugin.credentialsSecret. The rustfs, objectStore and atelet.storageBackend values are removed. Without ATE_STORAGE_BACKEND, the plugin uses GCS, and the earlier charts used S3.
  • The agentgateway egress gateway rejects WebSocket upgrades with 403, as docs/guides/egress-traffic.md describes. A tls_passthrough rule still allows wss://.

Other changes:

  • The charts pick up the changes to manifests/ate-install that the earlier charts missed. Examples are the RBAC names, dual-stack listeners, ServiceAccount token settings and the credential provider UID.
  • The substrate chart can install the microVM SandboxConfig. It is off by default, because the chart does not upload the microVM assets.
  • The preview values reach every substrate container, as ate-setup --preview does.
  • The charts work under any release name. For example, atelet reaches the API Service of its own release.
  • The CRDs and the Namespace from createNamespace have the helm.sh/resource-policy: keep annotation.
  • The image defaults point to ghcr.io/agent-substrate/substrate.

podcertcontroller flags

The substrate-podcert chart sets two flags that podcertcontroller does not have upstream. This change adds them:

  • --postgres-client-service-account names the service account that can request PostgreSQL login certificates. The default is ate-api-server, so ate-setup installs do not change.
  • --postgres-client lets more service accounts request fixed logins, through the postgresClients value. It refuses the administrator login postgres.

This Go change can move to a separate PR that merges first.

Tests and CI

  • charts/scenarios holds one directory for each supported configuration: kind-envoy, kind-agentgateway, external-postgres and microvm. hack/verify/chart-scenarios.sh makes sure that each scenario renders. The repo does not keep the renders.
  • The test in cmd/ate-setup/internal/chartcompare installs each scenario twice on envtest, once with ate-setup and once with the charts. It fails on any difference that differences.yaml does not list.
  • The listed differences come from a few chart choices. Examples are the otel values, resource requests on every container and Secrets for credentials.
  • hack/verify/chart-generated.sh makes sure that the copied CRDs, controller Role and Envoy configs match manifests/ate-install.
  • The helm-verify workflow runs helm lint and helm unittest.
  • The helm-e2e workflow installs the charts on kind and runs the e2e suites. It runs a smoke subset on Kubernetes 1.36 and every suite on 1.37.
  • On 1.37, helm-e2e runs each data plane with the preview gates off and on, on gVisor and on microVM. The helm-e2e-test job reports the result as one check.
  • hack/install-charts-kind.sh, hack/install-postgres.sh and hack/install-rustfs.sh install the charts and their dependencies on kind.

For reviewers

  • New values let the charts run another object-store plugin and use workload identity. These are objectStorePlugin.image, the plugin args, startup probes and extra volumes, and the ServiceAccount annotations and pod labels of the API server and atelet. The defaults do not change the rendered objects. Please check the names.
  • helm-e2e runs ten jobs on every PR, next to the four e2e jobs. Upstream runs agentgateway only after merge. Should a smaller set run on PRs?
  • The APIServerOnly field of the ate-setup kube client exists only for the comparison test. Phase 3 deletes both. If you prefer, the test can mark the workloads ready itself instead.
  • The agentgateway router keeps the 60s parking budget and request timeout of the earlier charts, so that slow restores finish. The envoy router uses its 5s default. Should the chart keep 60s?

Not in this change

Testing

  • helm lint, helm unittest, hack/verify-all.sh and go test -race ./... pass.
  • All helm-e2e jobs pass in this PR. The gVisor jobs also pass on local kind clusters.
  • On a dual-stack kind cluster, the charts install with the default release names and with a prefix. The demos and the networking e2e tests pass.
  • On that cluster, an upgrade moves the install to the envoy data plane in place. An upgrade to the charts without RustFS keeps the snapshots.

AI use

AI-assisted. I reviewed and tested every change.

- Add podcertcontroller flags for sharing the bundled pg instance with other pods
- Add helm verify workflow

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
- add unit tests for charts

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
The kagent-dev/substrate charts started from an older copy of
manifests/ate-install and missed later changes there:

- Drop the -role and -binding suffixes from the API server and atelet
  ClusterRoles and bindings, and give each atelet resource its own rule.
- Rename the egress ConfigMap to atenet-egress-agentgateway-substrate-config.
- Reject WebSocket upgrades at the egress gateway with 403.
- Give atelet a 330s termination grace period to cover its 5m drain.
- Listen on every address family in the API server, and make the api
  Service PreferDualStack.
- Connect the controller to the API server with k8s:///.
- Mount the optional postgres-server-ca Secret in the API server.
- Set OTEL_RESOURCE_ATTRIBUTES on the controller and the credential
  provider.

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
The object-store plugin now reads its settings from objectStorePlugin
extraEnv and credentialsSecret in both charts, and the snapshot location
is required. The API server and atelet ServiceAccounts take annotations
for workload identity. hack/install-rustfs.sh deploys RustFS for dev
installs.

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
global.imageRegistry now replaces the registry of objectStorePlugin.image,
as it does for the images values.

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
…t scenario

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
… provider UID

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant