Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for BackendTLSPolicy to target ServiceImport #5451

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nareddyt
Copy link
Contributor

@nareddyt nareddyt commented Mar 10, 2025

Problem

BackendTLSPolicy only supports Service and Backend targetRefs, it doesn't support ServiceImport.

Fix

This PR adds support for that case.

Testing Done

Added a new translator test case that verifies tls settings appear in the xDS IR for ServiceImports.

Additional Info

Fixes #5376

Release Notes: Yes

Signed-off-by: Teju Nareddy <tejunareddy@gmail.com>
@nareddyt nareddyt requested a review from a team as a code owner March 10, 2025 06:05
settings:
- name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0
protocol: HTTP
tls:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the key section we are looking for. Previous test run was missing tls without the code changes in this PR.

@nareddyt nareddyt changed the title feat: BackendTLSPolicy supports targeting ServiceImport feat: Add support for BackendTLSPolicy to target ServiceImport Mar 10, 2025
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 18 lines in your changes missing coverage. Please review.

Project coverage is 65.33%. Comparing base (8b74d01) to head (83c1ad0).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
internal/gatewayapi/route.go 76.92% 16 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5451      +/-   ##
==========================================
+ Coverage   65.30%   65.33%   +0.02%     
==========================================
  Files         213      213              
  Lines       33915    33915              
==========================================
+ Hits        22147    22157      +10     
+ Misses      10438    10432       -6     
+ Partials     1330     1326       -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.

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested review from a team March 11, 2025 22:56
@arkodg arkodg added this to the v1.4.0-rc.1 milestone Mar 11, 2025
Comment on lines +1409 to +1414
// TODO(tnareddy): Should these protocols be supported for ServiceImport?
// Follow-up in separate issue and PR.
//
// if servicePort.AppProtocol != nil {
// protocol = serviceAppProtocolToIRAppProtocol(*servicePort.AppProtocol)
// }
Copy link
Member

Choose a reason for hiding this comment

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

need create an issue for this.

@arkodg
Copy link
Contributor

arkodg commented Mar 12, 2025

all tests are failing, is this a flake or a real issue ?

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.

BackendTLSPolicy does not support ServiceImport backends
4 participants