feat(agent-relay): site values set once, every values problem in one report (chart 0.7.86)
The Automation Anywhere by-hand rehearsal (examples/aws copied to values-poc.yaml) failed mostly on partial edits: the domain is typed on 12 lines, the region on 7, the bucket on 5, the OpenSearch URL on 2. The operator changed some copies and not others, then met the chart's checks one helm install at a time.
Site values: each fact once
site:
domain: relay.acme.com # <domain>, api., cast., history.<domain>
region: us-east-1
sessionsBucket: acme-agent-relay-sessions
opensearchUrl: https://vpc-agent-relay-abc123.us-east-1.es.amazonaws.com
orgId: org_acme
orgName: Acme
adminEmail: admin@acme.com
rds: true # feeds global.rdsCa.bundle (#553) from region
# hosts: { dashboard: app.acme.com } # optional per-host override
The umbrella fills every component value that repeats one of these (README "Site values" has the table): Relaycast baseUrl; Control publicUrl, dashboardUrl, relaycast/sessionReadApi public URLs, introspection audiences, bootstrap; the dashboard publicUrl; the read API origin, CORS, OpenSearch URL/region and LOCKER_BUCKET/LOCKER_REGION; the ingest edge origin and locker; the search indexer locker and OpenSearch; worker/alleyoop locker and historyOrigin; nativeConsumer/nativeRouting when on; global.tenant.orgId in every chart; global.rdsCa.bundle with rds; eksIngress/gkeIngress/traefikIngress hosts when that edge is on.
- Backward compatible. Empty site keys fill nothing. The old long-form examples/aws (kept as
ci/agent-relay/fixtures/aws-long-form-values.yaml) renders byte-identically, and the subdomain golden (no-site profiles, AKS doc values) is unchanged. - Overrides. A component value that is empty, or still what a chart profile ships at that path (values-eks.yaml's placeholder.company hosts, example bucket, example-org), takes the site value. A profile region such as us-west-2 counts as an example only while its bucket/URL is one too, so a real us-west-2 next to a real endpoint wins. Values that may differ (OpenSearch region, CORS, audiences, bootstrap, rdsCa.bundle) keep the explicit value.
- Contradictions fail. Where values must agree (hosts/origins, bucket, bucket region, OpenSearch URL, orgId) an explicit value that differs fails with both values and the fix.
One report with every problem
Helm hands a parent's values to subcharts only through global, and it stops at the first fail. So the umbrella does the work in one template, templates/site/runs-before-subcharts/1/2/3/4/5/site.yaml. Helm renders the deepest template path first (engine sortTemplates), and each subchart's .Values is the same map as the umbrella's .Values.<subchart>. The template therefore runs before every subchart template, fills the derived values, collects every problem it can see, and fails once. Problems it collects: site values (format, .internal/example domains, a missing https://, bad bucket/region, unknown keys), contradictions, and mirrored copies of the subchart checks the rehearsal hit one at a time (read API origin, OpenSearch URLs/region, ingest origin == read origin, LOCKER_BUCKET == ingestEdge bucket, required bucket/region, Control public URLs). The mirrored checks are no stricter than the subcharts' own, which still run. One bad site value is reported once, not once per derived copy. Checks it does not mirror still fail one at a time, after the list is clear.
The rehearsal's mistakes (history origin still on example.com, OpenSearch without https://, the ingest bucket edited but LOCKER_BUCKET not) now fail once, from check-values.sh or helm:
agent-relay: 5 values problems. Nothing was installed. Fix all of them, then run helm again
(scripts/selfhost/check-values.sh lists them without a cluster):
1. sessions-pipeline.sessionReadApi.origin = "https://history.ar.example.com"
must be a public HTTPS origin: https:// plus a public multi-label DNS name, with no path, credentials, query or fragment; .internal, .local, .lan, .test, .example, .localhost, .invalid, .home.arpa, .onion and example.com/.net/.org names are refused
fix: set site.domain (it gives https://history.<domain>), or fix this value
2. sessions-pipeline.sessionReadApi.search.opensearch.url = "vpc-agent-relay-example.us-east-1.es.amazonaws.com"
must be a base HTTPS origin (https://<domain endpoint>, no path or trailing slash)
fix: set site.opensearchUrl to https://<the OpenSearch domain endpoint>
3. sessions-pipeline.ingestEdge.origin = "https://history.ar.example.com"
must be a public HTTPS origin: https:// plus a public multi-label DNS name, with no path, credentials, query or fragment; .internal, .local, .lan, .test, .example, .localhost, .invalid, .home.arpa, .onion and example.com/.net/.org names are refused; lowercase, and no :443
fix: set site.domain (it gives https://history.<domain>), or fix this value
4. sessions-pipeline.sessionReadApi.extraEnv LOCKER_BUCKET = "example-agent-relay-sessions"
must equal sessions-pipeline.ingestEdge.locker.bucket ("aa-relay-sessions"): the read API reads the objects the ingest edge writes
fix: set site.sessionsBucket once and delete LOCKER_BUCKET and every locker.bucket
5. sessions-pipeline.searchIndexer.search.opensearch.url = "vpc-agent-relay-example.us-east-1.es.amazonaws.com"
must be an https endpoint, lowercase, with no path, trailing slash, credentials or query
fix: set site.opensearchUrl to https://<the OpenSearch domain endpoint>
ci/agent-relay/test_site_values.py fails if any template in the built chart becomes as deep as site.yaml, or if the report stops coming out before a subchart's own failure. Single-host mode takes CORS and dashboardUrl from the single host. Verified on Helm 3.10.3, 3.16.4, 4.1.1 and 4.3.1.
check-values.sh
scripts/selfhost/check-values.sh -f ... -f values.yaml (same files as helm, no cluster) lists example values left in the operator's own files by file:line (the same markers as diagnose-install.py), then the chart's report. Exit 0/1/2. It ships in the customer handoff.
Also
- examples/aws/values.yaml uses the short form and renders byte-identically to the long form (the fixture). The GKE and AKS guides' values.yaml stay in the long form: those guides install a pinned released chart with the checkout's files, so they move when their pin does.
ci/agent-relay/fixtures/gcp-site-values.yamlis the GKE file in the short form, and tests render it; it was byte-identical to the long form through a managed-values stub. The Azure conversion was golden-identical too and is left for the pin bump. - ci/rds-ca: the BYO and legacy cases also turn
site.rdsoff, since the example now enables the managed CA that way. - Registry:
opt.agent-relay.site-values, plus the matrix entry. README, examples/aws README, scripts/selfhost README and self-hosted-eks.md are updated. - Chart.yaml dependency entries are untouched; only the umbrella version is bumped. No lock file changes.
Not verified: a live helm install on a cluster. The new behaviour is render-time only, and rendering is covered above.
Docs follow in a draft PR in AgentWorkforce/agentrelay.com. It depends on the infra release after the one being cut from current main.
š¤ Generated with Claude Code