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

Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy #6195

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

christianang
Copy link
Contributor

@christianang christianang commented Feb 16, 2024

This PR validates that the cluster name generation creates unique names when the tls settings are different due to creating one cluster using HTTPRoute with BackendTLSPolicy and another with HTTPProxy.

This PR also makes a small refactor of adding the type to the StatusUpdateCacher to differentiate resources with the same name but different types.

Fixes #6141

@christianang christianang force-pushed the test-cluster-name-btp branch 2 times, most recently from ebf88aa to 28ca751 Compare February 20, 2024 20:28
@christianang christianang changed the title [WIP] Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy Feb 20, 2024
@christianang christianang marked this pull request as ready for review February 20, 2024 20:28
@christianang christianang requested a review from a team as a code owner February 20, 2024 20:28
@christianang christianang requested review from tsaarni and sunjayBhatia and removed request for a team February 20, 2024 20:28
@sunjayBhatia sunjayBhatia requested review from a team, izturn and clayton-gonsalves and removed request for a team February 20, 2024 20:28
@christianang christianang changed the title Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy [WIP] Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy Feb 20, 2024
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.33%. Comparing base (9d7f9dd) to head (4bacca8).

❗ Current head 4bacca8 differs from pull request most recent head e506bcb. Consider uploading reports for the commit e506bcb to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6195   +/-   ##
=======================================
  Coverage   81.33%   81.33%           
=======================================
  Files         133      133           
  Lines       15772    15772           
=======================================
  Hits        12828    12828           
  Misses       2650     2650           
  Partials      294      294           
Files Coverage Δ
internal/k8s/statuscache.go 78.94% <100.00%> (ø)

@christianang christianang changed the title [WIP] Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy Add test validating cluster name generation is unique in HTTPRoute with BackendTLSPolicy vs HTTPProxy Feb 21, 2024
@sunjayBhatia sunjayBhatia added the release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes. label Feb 22, 2024
Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

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

LGTM just some small nits!

internal/featuretests/v3/upstreamtls_test.go Outdated Show resolved Hide resolved
internal/featuretests/v3/upstreamtls_test.go Show resolved Hide resolved
- add a test to ensure that two clusters with different tls settings due
  to one being created with HTTPRoute and BackendTLSPolicy vs HTTPProxy
  have different cluster names

Signed-off-by: Christian Ang <christian.ang@broadcom.com>
- to differentiate resources with the same name

Signed-off-by: Christian Ang <christian.ang@broadcom.com>
@sunjayBhatia sunjayBhatia merged commit c6ae46e into projectcontour:main Feb 23, 2024
24 checks passed
lubronzhan pushed a commit to lubronzhan/contour that referenced this pull request Mar 13, 2024
…th BackendTLSPolicy vs HTTPProxy (projectcontour#6195)

add a test to ensure that two clusters with different tls settings due
to one being created with HTTPRoute and BackendTLSPolicy vs HTTPProxy
have different cluster names

Also adds type to statusupdatercache
- to differentiate resources with the same name

Signed-off-by: Christian Ang <christian.ang@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Cluster Name generation won't run into duplicate cluster names with BackendTLSPolicy
2 participants