Skip to content

fix(argo-cd): default HTTPRoute hostnames to global.domain when unset - #4014

Draft
lemon0333 wants to merge 3 commits into
argoproj:mainfrom
lemon0333:fix/argocd-httproute-hostnames
Draft

lemon0333 wants to merge 3 commits into
argoproj:mainfrom
lemon0333:fix/argocd-httproute-hostnames

Conversation

@lemon0333

@lemon0333 lemon0333 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Defaults the argo-cd server and applicationSet HTTPRoute spec.hostnames to global.domain when hostnames are not set and no ListenerSet is enabled. Previously the rendered HTTPRoute omitted spec.hostnames entirely in that case. This mirrors the existing ListenerSet branch, which already falls back to global.domain.

Verified with helm lint and helm template:

  • hostnames unset → spec.hostnames: ["<global.domain>"]
  • hostnames set → uses the provided values (unchanged)
  • omitted when global.domain is also empty

Closes #3990

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • I have created a separate pull request for each chart according to pull requests
  • My build is green (troubleshooting builds).

Closes #3972

@jmeridth

Copy link
Copy Markdown
Member

@lemon0333 Triaged this today. The change is directionally right, it's what #3990 asked for, and it matches the ingress and ListenerSet conventions. The implementation is clean. One substantive ask and one mechanical one before approval:

1. Reframe the changelog: this is kind: changed, not fixed. In Gateway API, an omitted spec.hostnames is meaningful config: the route matches all hostnames of the bound listener, letting the listener own hostname policy. And since global.domain defaults to the placeholder argocd.example.com, your new branch is effectively always taken. Any existing user who deliberately omitted hostnames will have their route silently narrowed to argocd.example.com on upgrade and stop matching real traffic. The escape hatches exist (set httproute.hostnames explicitly, or global.domain: ""), but nobody will find them behind a changelog line that says "fixed". Please make the entry kind: changed and spell out the new default plus how to restore match-all behavior.

2. Rebase. Main has moved to 10.4.2, so bump to 10.4.3 with the updated changelog entry.

For most users who've set global.domain to their real domain this default is exactly what they wanted, so I'm fine shipping it without a major bump as long as the changelog is honest about the behavior change. Ready to approve once both are pushed.

@lemon0333
lemon0333 force-pushed the fix/argocd-httproute-hostnames branch from bcfd9e7 to cee6f65 Compare September 2, 2026 04:44
@lemon0333

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @jmeridth!

  • Rebased onto main (chart was at 10.6.1) to clear the conflicts.

  • Bumped charts/argo-cd to 10.6.4 (skipping 10.6.2/10.6.3/10.7.0 to avoid colliding with sibling PRs in flight).

  • Reframed the changelog from kind: fixed to kind: changed, since this is a behavior change rather than a bugfix. The single entry now spells it out:

    HTTPRoute now defaults spec.hostnames to global.domain when httproute.hostnames is unset. This changes behavior — an omitted hostnames previously matched all hostnames of the bound listener, and now narrows to global.domain (default placeholder argocd.example.com). To restore match-all, set httproute.hostnames explicitly or set global.domain to "".

helm lint charts/argo-cd passes clean. No values.yaml changes, so the README is unchanged.

@jmeridth

jmeridth commented Sep 2, 2026

Copy link
Copy Markdown
Member

@lemon0333 one more time on the Chart.yaml. sorry

@lemon0333
lemon0333 force-pushed the fix/argocd-httproute-hostnames branch from cee6f65 to fb0ce79 Compare September 2, 2026 05:57
@lemon0333

Copy link
Copy Markdown
Contributor Author

@jmeridth No worries — re-rebased onto current main (now argo-cd chart 10.6.3 after the sibling PR merged). Bumped version to 10.6.5, and the Chart.yaml conflict is cleared. The changelog entry (kind: changed, HTTPRoute hostnames) is unchanged, and remains the single artifacthub.io/changes entry. Force-pushed the rebased branch.

{{- else if .Values.server.listenerset.enabled }}
hostnames:
- {{ tpl (.Values.server.listenerset.hostname | default .Values.global.domain) $ | quote }}
{{- else if .Values.global.domain }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this break anyone sitting on the default global.domain? With server.httproute.enabled=true and nothing else set, the route goes from no hostnames at all, which matches every hostname on the listener, to hostnames: ["argocd.example.com"]. Your changelog says as much, so should this be a major with an Upgrading section rather than a patch? (versioning)

@lemon0333
lemon0333 force-pushed the fix/argocd-httproute-hostnames branch from fb0ce79 to 80bb966 Compare September 2, 2026 08:56
@lemon0333

Copy link
Copy Markdown
Contributor Author

Re-rebased onto main again (it moved to 10.6.4 after the sibling merge) — Chart.yaml conflict cleared, version stays 10.6.5, kind: changed changelog entry unchanged.

@jmeridth

jmeridth commented Sep 2, 2026

Copy link
Copy Markdown
Member

@tico24 agreeing with you, and revising my earlier position on the record: I had accepted kind: changed with an honest changelog as sufficient, but you're right that by our versioning convention a default that turns a match-all route into hostnames: ["argocd.example.com"] for anyone sitting on the default global.domain is a breaking change, and breaking changes mean a major with an Upgrading section, not a patch.

@lemon0333 two asks, which conveniently collapse into one rebase since #4033 took 10.7.0:

  1. Re-target to 11.0.0.
  2. Add an ## Upgrading to 11.0.0 entry to the chart README (gotmpl) covering: HTTPRoutes with hostnames unset now default to global.domain; to restore match-all behavior set httproute.hostnames explicitly or global.domain: "". The changelog text you already wrote is the right content, it just also belongs in the Upgrading section.

The implementation itself needs no changes. Sorry for the moving target on versions this week; the merge queue has been busy.

@jmeridth
jmeridth marked this pull request as draft September 25, 2026 16:16
lemon0333 and others added 3 commits November 1, 2026 20:41
When server.httproute.hostnames (and applicationSet.httproute.hostnames)
are not set and no ListenerSet is enabled, the rendered HTTPRoute omitted
spec.hostnames entirely. Default it to global.domain, matching how the
ListenerSet branch already falls back to global.domain.

Closes argoproj#3990

Signed-off-by: lemon0333 <147061193+lemon0333@users.noreply.github.com>
argo-helm now bumps chart versions after merge (argoproj#4176). This puts the version and artifacthub.io/changes in Chart.yaml back to main's, and moves this PR's changelog entry into charts/argo-cd/changes/default-httproute-hostnames-to-global-domain-when-unset.yaml with the same bump level.

Signed-off-by: Tim Collins <tim@thecollins.team>
@lemon0333
lemon0333 force-pushed the fix/argocd-httproute-hostnames branch from 066ba8b to 75920dc Compare November 1, 2026 11:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gateway(argo-cd): spec.hostnames may not set [Documentation] [argocd] httproute example does not provide hostnames

3 participants