fix(agent-gateway): derive agents host as sibling of ingress host for wildcard cert#28
Open
elamaran11 wants to merge 1 commit into
Open
fix(agent-gateway): derive agents host as sibling of ingress host for wildcard cert#28elamaran11 wants to merge 1 commit into
elamaran11 wants to merge 1 commit into
Conversation
… 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
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.
Problem
agent-gateway-{hub,spoke-dev,spoke-prod} are stuck Progressing: the
agentgateway-agentsIngress never gets an ALB. LBC reports:The
agentHostdefault isagents.<ingress_domain_name>— e.g. for hostidp.elamaras.people.aws.devit producesagents.idp.elamaras.people.aws.dev. A single-level wildcard ACM cert (*.elamaras.people.aws.dev) covers the main hostidp.elamaras...but not the two-label-deepagents.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:
For a 3+ label host, strip the leftmost label and prefix
agents.; for a bare apex, fall back toagents.<host>. Theagent_gateway_hostannotation still overrides entirely.Testing
Verified the Sprig/goTemplate logic via
helm templateacross all three cases above (see table). File remains valid YAML.