Skip to content

Commit

Permalink
Merge pull request #723 from robscott/redirect-support
Browse files Browse the repository at this point in the history
Clarifying Redirect Support levels
  • Loading branch information
k8s-ci-robot authored Jul 15, 2021
2 parents 8791c4f + 61c3797 commit 9f1a3a1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 16 deletions.
8 changes: 8 additions & 0 deletions apis/v1alpha2/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,23 +657,31 @@ type HTTPRequestRedirect struct {
// header in the response.
// When empty, the protocol of the request is used.
//
// Support: Extended
//
// +optional
// +kubebuilder:validation:Enum=HTTP;HTTPS
Protocol *string `json:"protocol,omitempty"`
// Hostname is the hostname to be used in the value of the `Location`
// header in the response.
// When empty, the hostname of the request is used.
//
// Support: Core
//
// +optional
Hostname *string `json:"hostname,omitempty"`
// Port is the port to be used in the value of the `Location`
// header in the response.
// When empty, port (if specified) of the request is used.
//
// Support: Extended
//
// +optional
Port *int `json:"port,omitempty"`
// StatusCode is the HTTP status code to be used in response.
//
// Support: Core
//
// +optional
// +kubebuilder:default=302
// +kubebuilder:validation=301;302
Expand Down
35 changes: 19 additions & 16 deletions config/crd/bases/gateway.networking.k8s.io_httproutes.yaml

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

16 changes: 16 additions & 0 deletions site-src/v1alpha2/concepts/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,22 @@ universal support will not be a blocker towards developing portable
feature sets. Standardizing on spec will make it easier to eventually
graduate to CORE when support is widespread.

### Overlapping Support Levels
It is possible for support levels to overlap. When this occurs, the minimum
expressed support level should be interpreted. For example, an identical struct
may be embedded in two different places. In one of those places, the struct is
considered to have CORE support while the other place only includes EXTENDED
support. Fields within this struct may express separate CORE and EXTENDED
support levels, but those levels may never be interpreted as exceeding the
support level of the parent struct they are embedded in.

For a more concrete example, HTTPRoute includes CORE support for filters defined
within a Rule and EXTENDED support when defined within ForwardTo. Those filters
may separately define support levels for each field. When interpreting
overlapping support levels, the minimum value should be interpreted. That means
if a field has a CORE support level but is in a filter attached in a place with
EXTENDED support, the interpreted support level should be EXTENDED.

### Conformance expectations

We expect there will be varying levels of conformance among the
Expand Down

0 comments on commit 9f1a3a1

Please sign in to comment.