Skip to content

Conversation

@linkvt
Copy link
Contributor

@linkvt linkvt commented Dec 17, 2025

The basic idea is that we don't create ingress rules with multiple hosts for external visibility, as we need to be able merge ACME rules into these hosts.
I don't really like that though as it puts the knowledge of exactly 1 host per external rule in two places (rule creation and ACME rule merging).

Another alternative would be that we accept the incorrect rule merging with multiple hosts that we had before:

rules:
  - hosts: a, b
    paths:
      - acme-of-a
      - acme-of-b

This would result in 4 possible routes in the Ingress:

  • host a with path acme-of-a - correct
  • host b with path acme-of-a - wrong
  • host a with path acme-of-b - wrong
  • host b with path acme-of-b - correct

This won't be a problem in practice though as the ACME server would not try to do a request to host a with path acme-of-b.
This would be a simple loop over existing rules, check if it contains a matching host and merge it inside there (while still preventing double duplicate rules that we had before #16259 )

Let me know what you think of this approach in general.

/cc @dprotaso

Proposed Changes

Release Note


@knative-prow knative-prow bot requested a review from dprotaso December 17, 2025 11:10
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 17, 2025
@knative-prow
Copy link

knative-prow bot commented Dec 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: linkvt
Once this PR has been reviewed and has the lgtm label, please assign skonto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 17, 2025
@linkvt linkvt force-pushed the prevent-duplicate-hosts-in-ingress-rules branch from 343a4c7 to b08bcab Compare December 17, 2025 11:29
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.06%. Comparing base (1e52818) to head (b08bcab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16312      +/-   ##
==========================================
- Coverage   80.07%   80.06%   -0.02%     
==========================================
  Files         215      215              
  Lines       13361    13374      +13     
==========================================
+ Hits        10699    10708       +9     
  Misses       2304     2304              
- Partials      358      362       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant