Skip to content

add tag label to HTTPRoute for traffic tag identification#931

Draft
kahirokunn wants to merge 1 commit intoknative-extensions:mainfrom
kahirokunn:add-tag-label-to-httproute
Draft

add tag label to HTTPRoute for traffic tag identification#931
kahirokunn wants to merge 1 commit intoknative-extensions:mainfrom
kahirokunn:add-tag-label-to-httproute

Conversation

@kahirokunn
Copy link
Member

@kahirokunn kahirokunn commented Mar 8, 2026

Changes

When a Knative Service has traffic tags, tagged HTTPRoutes are generated but have no metadata indicating which tag they belong to. This makes it difficult for external tools to identify the traffic tag from HTTPRoute resources.

  • 🎁 Add networking.internal.knative.dev/tag label to tagged HTTPRoutes

/kind enhancement

Release Note

Add `networking.internal.knative.dev/tag` label to HTTPRoutes so that traffic tags are identifiable from HTTPRoute metadata.

Docs

N/A

Manual testing

Deployed a Knative Service with a traffic tag and confirmed the networking.internal.knative.dev/tag label is present on the tagged HTTPRoute:

CleanShot 2026-03-08 at 22 13 26@2x

@knative-prow knative-prow bot added kind/enhancement size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 8, 2026
@knative-prow
Copy link

knative-prow bot commented Mar 8, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kahirokunn
Once this PR has been reviewed and has the lgtm label, please assign dprotaso 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 requested review from dprotaso and skonto March 8, 2026 13:03
@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 70.58824% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.15%. Comparing base (ffc6c4c) to head (3e95149).

Files with missing lines Patch % Lines
pkg/reconciler/ingress/resources/helpers.go 64.28% 5 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #931      +/-   ##
==========================================
- Coverage   76.38%   76.15%   -0.23%     
==========================================
  Files          17       17              
  Lines        1266     1296      +30     
==========================================
+ Hits          967      987      +20     
- Misses        263      268       +5     
- Partials       36       41       +5     

☔ 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.

// by comparing it with the ingress name. If the first segment of the host
// (before the first dot) ends with "-<ingressName>", the prefix is returned
// as the tag name. Returns empty string if no tag is found.
func TagOfHost(hosts []string, ingressName string) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
@kahirokunn kahirokunn force-pushed the add-tag-label-to-httproute branch from 11f4098 to 3e95149 Compare March 9, 2026 04:12
@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 9, 2026
@kahirokunn kahirokunn marked this pull request as draft March 9, 2026 05:19
@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 Mar 9, 2026
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. kind/enhancement size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants