-
Notifications
You must be signed in to change notification settings - Fork 597
TLSRoute: Require hostnames and bump version to v1alpha3 #3872
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
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. Instructions 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 |
07a0313
to
afb02dc
Compare
9dc3faf
to
2ba0374
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
// GatewaySpec defines the desired state of Gateway. | |
// | |
// Not all possible combinations of options specified in the Spec are | |
// valid. Some invalid configurations can be caught synchronously via a | |
// webhook, but there are many cases that will require asynchronous | |
// signaling via the GatewayStatus block. | |
// +k8s:deepcopy-gen=false | |
type GatewaySpec = v1.GatewaySpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
v1alpha2
TLSRoute while introducing newv1alpha3
TLSRoute. This is to avoid breaking existing implementations that usev1alpha2
in prod.- As a result, we can only aliases unchanged parts of TLSRoute –
TLSRouteStatus
andTLSRouteRule
.TLSRouteSpec
has changed and can't be aliased.
- As a result, we can only aliases unchanged parts of TLSRoute –
- We can't reference
v1alpha2
fromv1alpha3
.v1alpha3
is already based onv1alpha2
(see v1alpha3/backendtlspolicy_types.go, v1alpha3/zz_generated.deepcopy.go).- Referencing
v1alpha2
fromv1alpha3
requires 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR makes the
hostnames
field 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?: