TLSRoute: Require hostnames and bump version to v1alpha3#3872
Conversation
|
Welcome @rostislavbobo! |
|
Hi @rostislavbobo. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
8a842f0 to
5630d40
Compare
75ab19e to
563794e
Compare
2cc1661 to
bf124db
Compare
bf124db to
1c19f20
Compare
|
Thanks @rostislavbobo! /ok-to-test |
9dc3faf to
2ba0374
Compare
robscott
left a comment
There was a problem hiding this comment.
Thanks @rostislavbobo! Some small nits, but otherwise LGTM.
| } | ||
|
|
||
| // TLSRouteSpec defines the desired state of a TLSRoute resource. | ||
| type TLSRouteSpec struct { |
There was a problem hiding this comment.
Going back in time to one of the recent times we did something similar, we used aliases in the old API version that pointed to the new one. I'd recommend doing that here as well. So in this case v1alpha3 would be the source of truth, and v1alpha2 would point at that. Take a look at this for an example:
gateway-api/apis/v1beta1/gateway_types.go
Lines 48 to 55 in 093f653
There was a problem hiding this comment.
When promoting TLSRoutes to v1, we'll use aliases in v1alpha3 to reference the v1 version.
TLSRoute promotion from from v1alpha2 to v1alpha3 is different, let me summarize the conversation above:
- @youngnick asked to keep old
v1alpha2TLSRoute while introducing newv1alpha3TLSRoute. This is to avoid breaking existing implementations that usev1alpha2in prod.- As a result, we can only aliases unchanged parts of TLSRoute –
TLSRouteStatusandTLSRouteRule.TLSRouteSpechas changed and can't be aliased.
- As a result, we can only aliases unchanged parts of TLSRoute –
- We can't reference
v1alpha2fromv1alpha3.v1alpha3is already based onv1alpha2(see v1alpha3/backendtlspolicy_types.go, v1alpha3/zz_generated.deepcopy.go).- Referencing
v1alpha2fromv1alpha3requires re-doing Update API and docs for GEP-2907 changes (BackendTLSPolicy) #2955
7b67116 to
892a84d
Compare
892a84d to
cf5c16d
Compare
|
/retitle TLSRoute: Require hostnames and bump version to v1alpha3 |
|
Thanks @rostislavbobo! /approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: robscott, rostislavbobo, shaneutt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…sigs#3872) * TLSRoute: Require hostnames * TLSRoute: Move to v1alpha3 TLSRoute: Update config crd TLSRoute: Update pkg TLSRoute: Update hack example * TLSRoute: Bring TLSRoute back to v1alpha2 * TLSRoute: Update conformance helpers * TLSRoute: Remove storageversion from v1alpha3 * TLSRoute: Update invalid example * TLSRoute: v1alpha3 example * TLSRoute: Make v1alpha3 storage
| // | ||
| // If both the Listener and TLSRoute have specified hostnames, any | ||
| // TLSRoute hostnames that do not match the Listener hostname MUST be | ||
| // ignored. For example, if a Listener specified `*.example.com`, and the |
There was a problem hiding this comment.
For what added in #4437
does *.example.com matched test.example.com? what I missed?
There was a problem hiding this comment.
I'd recommend going through #4437 (comment) thread for more details
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR makes the
hostnamesfield in TLSRoute non-optional. Hostnames is the only available match for TLSRoutes and, per the TLSRoute spec, at least one hostname match is required. If SNI hostname matching is not needed, TCPRoute should be used instead.Which issue(s) this PR fixes:
Fixes #3871
Does this PR introduce a user-facing change?: