Skip to content

feat(agent-relay): render the EKS ALB Ingress from the release (eksIngress, agent-relay 0.7.66) - #513

Merged
khaliqgant merged 6 commits into
mainfrom
feat/eks-alb-ingress-chart
Nov 20, 2026
Merged

khaliqgant merged 6 commits into
mainfrom
feat/eks-alb-ingress-chart

Conversation

@AgentRelayBot

@AgentRelayBot AgentRelayBot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

The EKS ALB edge is today applied by hand with scripts/selfhost/eks-alb-ingress.sh, separately from the release. This adds an opt-in eksIngress block (default off, next to gkeIngress) that renders the same Ingress from the release, so an install's edge is repeatable and versioned with it. The script is unchanged and stays the documented way. The chart option is the alternative.

What changes

  • charts/agent-relay/templates/eks-alb-ingress.yaml (new). One internet-facing ALB Ingress with the script's four hosts, annotations, edge denials and rule order. The namespace is the release namespace.

  • eksIngress values. Each option maps to one script variable and keeps the script's default:

    Option Script variable Default
    name EKS_ALB_INGRESS_NAME agent-relay
    className EKS_INGRESS_CLASS alb
    domain EKS_ALB_DOMAIN required
    certificateArn EKS_ALB_CERT_ARN required
    history.enabled EKS_ALB_HISTORY true
    history.readOnly EKS_ALB_HISTORY_READ_ONLY false
    ingest.enabled EKS_ALB_INGEST null (on when history is on and not read-only)
    ingest.serviceName / servicePort EKS_ALB_INGEST_SERVICE / _PORT agent-relay-ingest-edge / 80
    readApi.serviceName / servicePort EKS_ALB_READ_API_SERVICE / _PORT agent-relay-read-api / 80
    flows.enabled / serviceName / servicePort EKS_ALB_RELAYFILE_CONTROL / _SERVICE / _PORT false / relayfile-control / 3100
    chief.serviceName / servicePort EKS_ALB_CHIEF_SERVICE / _PORT empty (off) / 3200
    control.serviceName EKS_ALB_CONTROL_SERVICE relay-control
    webapp.serviceName EKS_ALB_WEBAPP_SERVICE relay-webapp
    controlPaths (new) none [/cloud/api, /login, /relay-node]
  • controlPaths is the one option the script lacks: the dashboard-host paths sent to the control API, in order. They are Prefix paths. With Chief on, each becomes Exact plus <path>/* after the Chief wildcards, as the script does. An install can pin the list its live ALB has.

  • Refusals. The template refuses everything the script refuses: missing domain or certificate; read-only without history or with ingest on; ingest off on a history host that is not read-only; ingest on without history; Service names that are not DNS labels; ports outside 1-65535. Each check runs only where the script runs it. It also refuses:

    • eksIngress together with gkeIngress. This check is in agent-relay.validate, so it fires before the GKE template's own checks.
    • Switches that are not booleans.
    • A domain that is not a DNS name.
    • A certificate that does not start with arn:.
    • Malformed or repeated controlPaths.
  • Backends are named, never looked up. There is no lookup and no "component X must be enabled" check. Flows and Chief are separate releases, and a read-only history host may name a read API Service this release does not install. A test renders Flows, Chief and a foreign read API with components.sessionsPipeline=false.

  • Docs.

    • charts/agent-relay/README.md gets a new "EKS ALB Ingress" section and an "Adopting an Ingress that was applied with the script" section. Adoption means: add meta.helm.sh/release-name, meta.helm.sh/release-namespace and app.kubernetes.io/managed-by=Helm, render, kubectl diff, then upgrade. The same name and no group mean the controller keeps the same load balancer. This is documented only and was not run anywhere.
    • The comment block in values-eks.yaml and docs/self-hosted-eks.md now point to the chart option. Gap 1 in the EKS doc ("the chart has no EKS edge") is rewritten.
  • CI.

    • ci/agent-relay/test_eks_alb_ingress.py is wired into lint.yml, and fast-path.yml is regenerated with scripts/ci/render-fast-path.py.
    • charts/agent-relay/ci/eks-ingress-values.yaml makes scripts/ci/charts.sh static run lint --strict and kubeconform on the enabled edge, with history, Flows and Chief all on.

Equivalence test (acceptance)

Every case runs the real script and a real helm template with the same options. It compares apiVersion, kind, name, namespace, annotations and spec after a YAML parse, with deep equality, so rule and path order and pathType count. Helm's two labels are the only difference allowed.

Case Result
defaults equal
history off equal
history read-only equal
read-only, ingest explicitly off, own read API Service/port equal
ingest off (history off) equal
ingest explicitly on equal
Flows on equal
Chief on equal
Flows + Chief + read-only equal
overridden Service names/ports, Ingress name, class, domain (Flows + Chief on) equal
namespace = release namespace (other-ns) equal
Flows + Chief + read-only on a release without the sessions pipeline equal
controlPaths set explicitly to the default (plain and Chief) equal
controlPaths: [/cloud/api, /login] (plain, Chief, Flows) equal to the script output with only the /relay-node* rules removed
controlPaths extended (/mcp, /.well-known/openid-configuration) rendered in order before /
off by default no ALB Ingress, template not rendered
16 refusals (domain, certificate, read-only combinations, ingest combinations, control/webapp/ingest/read API/flows/chief labels, ingest/read API/flows/chief ports) the script exits non-zero and the chart fails with the matching message
10 chart-only refusals (both edges, string booleans, controlPaths /, *, trailing /, relative, repeated, not a list, domain with scheme) the chart fails

I mutation-checked the test: swapping two history paths in the template fails 15 subtests, and changing ssl-redirect fails 17.

How this meets PR 502

PR 502 replaces the script's control routes with a control_paths array of 10 paths and adds ci/agent-relay/test_ingress_routes.py. This PR does not touch the script, gke-ingress.yaml, render.sh or charts.sh, so the two do not collide textually. Whichever merges second does three things:

  1. Updates the eksIngress.controlPaths default in values.yaml (and the README table) to the script's list. On this side that is a one-place change, because the template already loops over the list for both the Prefix and the Chief Exact + wildcard forms.
  2. Updates the equivalence test: test_control_paths_drop_only_the_relay_node_rules filters the script output, so it keeps working, and the default-list assertion takes the new list.
  3. Rebases the chart version.

Installs that pinned controlPaths keep their list.

Version

agent-relay 0.7.63 → 0.7.66. PRs 502 and 474 already plan 0.7.64 and 0.7.65, so this takes the next free version. Whichever of the three merges later rebases its version (Chart.yaml, self-hosted/requirements.yaml entry, docs/self-hosted-requirements.md). The registry gets agent-relay-0.7.66 as the current unreleased entry, and 0.7.63 becomes planned. Images and dependencies are unchanged, so there is no Chart.lock change. The subdomain golden hashes are unchanged: the default renders are byte-identical with the version normalized.

Not reproduced from the script

  • EKS_ALB_HISTORY_LEGACY_SERVICE (refused by the script) has no chart option, so there is nothing to refuse.
  • The script treats any EKS_ALB_HISTORY value other than true as off. The chart requires a real boolean. This is stricter and refused at render.
  • The script exits 1 (from bash's :?) for a missing domain or certificate and 2 for every other refusal. The chart fails the render in both cases.

Neither the script nor the chart checks how the edge interacts with sessions-pipeline.nativeRouting or gate-only, which gkeIngress does. That stays out of scope here.

Local validation

Helm v4.3.1+gc0d08d0 (the CI pin, checksum verified) and kubeconform v0.8.0 on macOS. No cluster, cloud or terraform calls.

Command Result
python3 ci/agent-relay/test_eks_alb_ingress.py -v PASS, 10 tests (matrix and refusals as above)
bash scripts/ci/charts.sh static agent-relay PASS, 52 profiles including the new eks-ingress-values.yaml (lint --strict, render, kubeconform)
helm lint --strict charts/agent-relay -f values-gcp-proof.yaml -f ci/eks-ingress-values.yaml PASS (1 chart linted, 0 failed)
bash ci/agent-relay/render.sh PASS: "subdomain renders match ci/agent-relay/subdomain-golden.sha256", "agent-relay GCP proof render contract: ok"
bash ci/agent-relay/subdomain-golden.sh diff origin/main byte-identical (helm.sh/chart version normalized)
python3 ci/agent-relay/test_control_webapp_names.py PASS, 13 tests (existing script tests)
node ci/self-hosted-requirements/registry.mjs render / check PASS: "registry: OK (203 entries, 28 profiles)"; only the existing published-tag status warnings
bash scripts/ci/version-bump.sh PASS: agent-relay: 0.7.63 -> 0.7.66
shellcheck -S warning scripts/selfhost/eks-alb-ingress.sh PASS (no shell script changed)
yamllint -d '{extends: relaxed, rules: {line-length: disable}}' on Chart.yaml, values.yaml, values-eks.yaml, ci/eks-ingress-values.yaml, self-hosted/requirements.yaml, lint.yml, fast-path.yml PASS
the same yamllint on the rendered eks-alb-ingress.yaml PASS, one empty-lines warning (the trailing document newline Helm emits)

I did not run scripts/selfhost/tests/run-tests.sh, because the script is unchanged; it stalls on macOS stat -c, as noted in 502.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds an opt-in eksIngress block to the agent-relay chart that renders the same EKS ALB Ingress that scripts/selfhost/eks-alb-ingress.sh applies, so the edge can be versioned with the release. The script stays the documented default; the chart option is the alternative.

Key changes

  • New charts/agent-relay/templates/eks-alb-ingress.yaml renders one internet-facing ALB Ingress with the script's hosts, annotations, edge denials, and rule order.
  • eksIngress values mirror every script variable; default options are the script's. controlPaths (default /cloud/api, /login, /relay-node) is new and pins the dashboard-host control routes.
  • The template refuses every configuration the script refuses, plus chart-only checks: eksIngress together with gkeIngress, non-boolean switches (a string "false" would otherwise render the edge), malformed certificates/controlPaths, and per-label DNS validation on name, className and domain (domain capped at 245 so history.<domain> fits in 253).
  • Backends are always named, never looked up, so Flows, Chief, and a foreign read API need no component of this release enabled.
  • README documents how to adopt an Ingress applied with the script without creating a new load balancer.
  • eksIngress is off by default; existing script usage is unchanged.

Equivalence verification

  • ci/agent-relay/test_eks_alb_ingress.py runs the real script and a real helm template with the same options and asserts deep equality on annotations and spec across a 12-case matrix, including overridden names/ports and refusals.
  • CI runs this test in lint.yml and fast-path.yml; the new ci/eks-ingress-values.yaml profile exercises the enabled edge in static lint and kubeconform.
  • Chart version bumps to 0.7.66; images and dependencies are unchanged.

Written for commit d06cf8b. Summary will update on new commits.

View guided diff Turn on auto-fix

agentrelaybot and others added 5 commits November 20, 2026 16:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on matrix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h, and adopting a script-applied Ingress

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gress-values.yaml)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c5359c41-d63a-4693-b460-e63c7241080b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed, and no new blocking issues were found.

Summary

Adds an optional EKS ALB Ingress to the agent-relay release.

  • The agent-relay chart can render its EKS ALB edge with the release.

No new actionable issues were found in the changes since the previous review. This review checked source code; it did not run Helm or cluster tests.

Reviews (2) · Last reviewed commit: "fix(agent-relay): refuse a non-boolean e..." · Reviewed by Greptile

…names label by label

A string "false" is truthy in a template and rendered the edge; the type is
now checked before the gate. domain, name and className are checked per
dot-separated label (1-63, no leading/trailing hyphen, no empty label) and by
total length (domain at most 245 so history.<domain> fits in 253).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khaliqgant
khaliqgant merged commit 422cbb1 into main Nov 20, 2026
9 checks passed
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.

2 participants