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

Removing BackendPolicy #732

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 0 additions & 150 deletions apis/v1alpha2/backendpolicy_types.go

This file was deleted.

10 changes: 2 additions & 8 deletions apis/v1alpha2/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,8 @@ type HTTPRouteForwardTo struct {
// The gateway status for this route should be updated with a
// condition that describes the error more specifically.
//
// The protocol to use should be specified with the AppProtocol field on Service
// resources. This field was introduced in Kubernetes 1.18. If using an earlier version
// of Kubernetes, a `gateway.networking.k8s.io/app-protocol` annotation on the
// BackendPolicy resource may be used to define the protocol. If the
// AppProtocol field is available, this annotation should not be used. The
// AppProtocol field, when populated, takes precedence over the annotation
// in the BackendPolicy resource. For custom backends, it is encouraged to
// add a semantically-equivalent field in the Custom Resource Definition.
// The protocol to use should be specified with the AppProtocol field on
// Service resources.
//
// Support: Core
//
Expand Down
27 changes: 2 additions & 25 deletions apis/v1alpha2/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ const (
GatewayAllowSameNamespace GatewayAllowType = "SameNamespace"
)

const (
// AnnotationAppProtocol defines the protocol a Gateway should use for
// communication with a Kubernetes Service. This annotation must be present
// on the BackendPolicy resource and the protocol will apply to all Service
// ports that are selected by BackendPolicy.Spec.BackendRefs. If the
// AppProtocol field is available, this annotation should not be used. The
// AppProtocol field, when populated, takes precedence over this annotation.
// The value of this annotation must be also be a valid value for the
// AppProtocol field.
//
// Examples:
//
// - `gateway.networking.k8s.io/app-protocol: https`
// - `gateway.networking.k8s.io/app-protocol: tls`
AnnotationAppProtocol = "gateway.networking.k8s.io/app-protocol"
Comment on lines -36 to -49
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a significant removal, but given that Kubernetes 1.18+ is so widely used already, I don't think it's worth including workarounds for older Kubernetes versions anymore. Since this one depended on BackendPolicy, it would be difficult to recreate without some kind of intermediate resource.

Copy link
Contributor

Choose a reason for hiding this comment

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

I opened up #737 to track the versions we support.
I was ambivallent about the change but given where we are and where this API is, reworking this in won't have much ROI.
+1

)

// RouteGateways defines which Gateways will be able to use a route. If this
// field results in preventing the selection of a Route by a Gateway, an
// "Admitted" condition with a status of false must be set for the Gateway on
Expand Down Expand Up @@ -106,14 +89,8 @@ type RouteForwardTo struct {
// with the "DegradedRoutes" reason. The gateway status for this route should
// be updated with a condition that describes the error more specifically.
//
// The protocol to use is defined using AppProtocol field (introduced in
// Kubernetes 1.18) in the Service resource. In the absence of the
// AppProtocol field a `gateway.networking.k8s.io/app-protocol` annotation on the
// BackendPolicy resource may be used to define the protocol. If the
// AppProtocol field is available, this annotation should not be used. The
// AppProtocol field, when populated, takes precedence over the annotation
// in the BackendPolicy resource. For custom backends, it is encouraged to
// add a semantically-equivalent field in the Custom Resource Definition.
// The protocol to use should be specified with the AppProtocol field on
// Service resources.
//
// Support: Core
//
Expand Down
155 changes: 0 additions & 155 deletions apis/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions apis/v1alpha2/zz_generated.register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading