Skip to content

Conversation

@rlymbur
Copy link
Contributor

@rlymbur rlymbur commented May 15, 2025

What type of PR is this?

Bug

Which issue does this PR fix:

#649

What does this PR do / Why do we need it:

This adds a validation to ensure at least one hostname is present when using a TLSRoute.

Testing done on this change:

The TLSRoute without hostname should fail unit test was added to validate the new logic.

Automation added to e2e:

None.

Will this PR introduce any new dependencies?:

No.

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

No.

Does this PR introduce any user-facing change?:

Add TLSRoute Hostname Validation 

Do all end-to-end tests successfully pass when running make e2e-test?:

------------------------------ Ran 57 of 70 Specs in 3137.332 seconds SUCCESS! -- 57 Passed | 0 Failed | 0 Pending | 13 Skipped --- PASS: TestIntegration (3141.33s) PASS ok github.com/aws/aws-application-networking-k8s/test/suites/integration 3141.993s 

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rlymbur rlymbur requested a review from mikestvz May 15, 2025 22:47
@rlymbur rlymbur self-assigned this May 15, 2025
@rlymbur rlymbur added the bug Something isn't working label May 15, 2025
@rlymbur rlymbur enabled auto-merge May 16, 2025 15:00
case *core.TLSRoute:
routeType = core.TlsRouteType
// VPC Lattice requires a custom domain name for TLS listeners
if len(t.route.Spec().Hostnames()) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

In which scenario will the hostname will be nil ? Is this a user configuration that needs to be highlighted for customers in docs ?

Copy link
Contributor

@mikestvz mikestvz left a comment

Choose a reason for hiding this comment

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

LGTM - minor comment

@rlymbur rlymbur added this pull request to the merge queue May 23, 2025
Merged via the queue into aws:main with commit 3f8359f May 24, 2025
2 checks passed
@rlymbur rlymbur deleted the fix-tlsroute-hostname-validation branch May 26, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants