Repository navigation
feat(agent-relay): render the EKS ALB Ingress from the release (eksIngress, agent-relay 0.7.66) - #513
Merged
Merged
Conversation
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>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Medium impact] The PR appears safe to merge; both previous findings are fixed, and no new blocking issues were found.
|
…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>
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.
The EKS ALB edge is today applied by hand with
scripts/selfhost/eks-alb-ingress.sh, separately from the release. This adds an opt-ineksIngressblock (default off, next togkeIngress) 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.eksIngressvalues. Each option maps to one script variable and keeps the script's default:nameEKS_ALB_INGRESS_NAMEagent-relayclassNameEKS_INGRESS_CLASSalbdomainEKS_ALB_DOMAINcertificateArnEKS_ALB_CERT_ARNhistory.enabledEKS_ALB_HISTORYtruehistory.readOnlyEKS_ALB_HISTORY_READ_ONLYfalseingest.enabledEKS_ALB_INGESTnull(on when history is on and not read-only)ingest.serviceName/servicePortEKS_ALB_INGEST_SERVICE/_PORTagent-relay-ingest-edge/80readApi.serviceName/servicePortEKS_ALB_READ_API_SERVICE/_PORTagent-relay-read-api/80flows.enabled/serviceName/servicePortEKS_ALB_RELAYFILE_CONTROL/_SERVICE/_PORTfalse/relayfile-control/3100chief.serviceName/servicePortEKS_ALB_CHIEF_SERVICE/_PORT3200control.serviceNameEKS_ALB_CONTROL_SERVICErelay-controlwebapp.serviceNameEKS_ALB_WEBAPP_SERVICErelay-webappcontrolPaths(new)[/cloud/api, /login, /relay-node]controlPathsis 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:
eksIngresstogether withgkeIngress. This check is inagent-relay.validate, so it fires before the GKE template's own checks.arn:.controlPaths.Backends are named, never looked up. There is no
lookupand 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 withcomponents.sessionsPipeline=false.Docs.
charts/agent-relay/README.mdgets a new "EKS ALB Ingress" section and an "Adopting an Ingress that was applied with the script" section. Adoption means: addmeta.helm.sh/release-name,meta.helm.sh/release-namespaceandapp.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.values-eks.yamlanddocs/self-hosted-eks.mdnow 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.pyis wired intolint.yml, andfast-path.ymlis regenerated withscripts/ci/render-fast-path.py.charts/agent-relay/ci/eks-ingress-values.yamlmakesscripts/ci/charts.sh staticrun lint--strictand 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 templatewith the same options. It comparesapiVersion,kind, name, namespace, annotations and spec after a YAML parse, with deep equality, so rule and path order andpathTypecount. Helm's two labels are the only difference allowed.other-ns)controlPathsset explicitly to the default (plain and Chief)controlPaths: [/cloud/api, /login](plain, Chief, Flows)/relay-node*rules removedcontrolPathsextended (/mcp,/.well-known/openid-configuration)/controlPaths/,*, trailing/, relative, repeated, not a list, domain with scheme)I mutation-checked the test: swapping two history paths in the template fails 15 subtests, and changing
ssl-redirectfails 17.How this meets PR 502
PR 502 replaces the script's control routes with a
control_pathsarray of 10 paths and addsci/agent-relay/test_ingress_routes.py. This PR does not touch the script,gke-ingress.yaml,render.shorcharts.sh, so the two do not collide textually. Whichever merges second does three things:eksIngress.controlPathsdefault invalues.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.test_control_paths_drop_only_the_relay_node_rulesfilters the script output, so it keeps working, and the default-list assertion takes the new list.Installs that pinned
controlPathskeep 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.yamlentry,docs/self-hosted-requirements.md). The registry getsagent-relay-0.7.66as the current unreleased entry, and 0.7.63 becomesplanned. Images and dependencies are unchanged, so there is noChart.lockchange. 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.EKS_ALB_HISTORYvalue other thantrueas off. The chart requires a real boolean. This is stricter and refused at render.:?) 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.nativeRoutingor gate-only, whichgkeIngressdoes. 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.
python3 ci/agent-relay/test_eks_alb_ingress.py -vbash scripts/ci/charts.sh static agent-relayeks-ingress-values.yaml(lint--strict, render, kubeconform)helm lint --strict charts/agent-relay -f values-gcp-proof.yaml -f ci/eks-ingress-values.yamlbash ci/agent-relay/render.shbash ci/agent-relay/subdomain-golden.sh diff origin/mainpython3 ci/agent-relay/test_control_webapp_names.pynode ci/self-hosted-requirements/registry.mjs render/checkbash scripts/ci/version-bump.shagent-relay: 0.7.63 -> 0.7.66shellcheck -S warning scripts/selfhost/eks-alb-ingress.shyamllint -d '{extends: relaxed, rules: {line-length: disable}}'onChart.yaml,values.yaml,values-eks.yaml,ci/eks-ingress-values.yaml,self-hosted/requirements.yaml,lint.yml,fast-path.ymleks-alb-ingress.yamlI did not run
scripts/selfhost/tests/run-tests.sh, because the script is unchanged; it stalls on macOSstat -c, as noted in 502.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds an opt-in
eksIngressblock to theagent-relaychart that renders the same EKS ALB Ingress thatscripts/selfhost/eks-alb-ingress.shapplies, so the edge can be versioned with the release. The script stays the documented default; the chart option is the alternative.Key changes
charts/agent-relay/templates/eks-alb-ingress.yamlrenders one internet-facing ALB Ingress with the script's hosts, annotations, edge denials, and rule order.eksIngressvalues 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.eksIngresstogether withgkeIngress, non-boolean switches (a string"false"would otherwise render the edge), malformed certificates/controlPaths, and per-label DNS validation onname,classNameanddomain(domain capped at 245 sohistory.<domain>fits in 253).eksIngressis off by default; existing script usage is unchanged.Equivalence verification
ci/agent-relay/test_eks_alb_ingress.pyruns the real script and a realhelm templatewith the same options and asserts deep equality on annotations and spec across a 12-case matrix, including overridden names/ports and refusals.lint.ymlandfast-path.yml; the newci/eks-ingress-values.yamlprofile exercises the enabled edge in static lint and kubeconform.Written for commit d06cf8b. Summary will update on new commits.