Skip to content

fix(agent-gateway): derive agents host as sibling of ingress host for wildcard cert#28

Open
elamaran11 wants to merge 1 commit into
feature/oam-for-agentsfrom
fix/agent-gateway-agents-host
Open

fix(agent-gateway): derive agents host as sibling of ingress host for wildcard cert#28
elamaran11 wants to merge 1 commit into
feature/oam-for-agentsfrom
fix/agent-gateway-agents-host

Conversation

@elamaran11

Copy link
Copy Markdown
Contributor

Problem

agent-gateway-{hub,spoke-dev,spoke-prod} are stuck Progressing: the agentgateway-agents Ingress never gets an ALB. LBC reports:

FailedBuildModel: no certificate found for host: agents.idp.elamaras.people.aws.dev

The agentHost default is agents.<ingress_domain_name> — e.g. for host idp.elamaras.people.aws.dev it produces agents.idp.elamaras.people.aws.dev. A single-level wildcard ACM cert (*.elamaras.people.aws.dev) covers the main host idp.elamaras... but not the two-label-deep agents.idp.elamaras..., so LBC's cert auto-discovery fails and the ALB is never created.

Fix

Derive the agents host as a sibling of the main ingress host (same parent domain) so one wildcard cert covers both:

ingress host old agentHost (broken) new agentHost
idp.elamaras.people.aws.dev agents.idp.elamaras.people.aws.dev agents.elamaras.people.aws.dev
peeks.dev.shapirov.people.a2z.com agents.peeks.dev.shapirov… agents.dev.shapirov.people.a2z.com
example.com (apex) agents.example.com agents.example.com (fallback)

For a 3+ label host, strip the leftmost label and prefix agents.; for a bare apex, fall back to agents.<host>. The agent_gateway_host annotation still overrides entirely.

Testing

Verified the Sprig/goTemplate logic via helm template across all three cases above (see table). File remains valid YAML.

… wildcard cert

The agent-gateway 'agents' ingress defaulted agentHost to 'agents.<ingress_domain_name>'
(e.g. agents.idp.elamaras.people.aws.dev). A single-level wildcard ACM cert
(*.elamaras.people.aws.dev) does NOT cover that two-label-deep host, so LBC failed
with 'no certificate found for host' and never provisioned the ALB — leaving
agent-gateway stuck Progressing.

Derive the agents host as a SIBLING of the main host (same parent domain):
idp.elamaras.people.aws.dev -> agents.elamaras.people.aws.dev, so one wildcard
cert covers both. Falls back to 'agents.<host>' for bare-apex domains, and the
agent_gateway_host annotation still overrides entirely.

Verified rendering via Sprig/helm:
  idp.elamaras.people.aws.dev            -> agents.elamaras.people.aws.dev
  example.com                            -> agents.example.com
  peeks.dev.shapirov.people.a2z.com      -> agents.dev.shapirov.people.a2z.com
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