Skip to content

Fixes TLS Mode Defaulting #518

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

Merged
merged 1 commit into from
Jan 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
28 changes: 19 additions & 9 deletions apis/v1alpha1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,21 +310,30 @@ type GatewayTLSConfig struct {
// Mode defines the TLS behavior for the TLS session initiated by the client.
// There are two possible modes:
// - Terminate: The TLS session between the downstream client
// and the Gateway is terminated at the Gateway.
// and the Gateway is terminated at the Gateway. This mode requires
// certificateRef to be set.
// - Passthrough: The TLS session is NOT terminated by the Gateway. This
// implies that the Gateway can't decipher the TLS stream except for
// the ClientHello message of the TLS protocol.
// CertificateRef field is ignored in this mode.
//
// Support: Core
//
// +kubebuilder:default=Terminate
Mode TLSModeType `json:"mode,omitempty"`

// CertificateRef is the reference to Kubernetes object that
// contain a TLS certificate and private key.
// This certificate MUST be used for TLS handshakes for the domain
// this GatewayTLSConfig is associated with.
// If an entry in this list omits or specifies the empty
// string for both the group and the resource, the resource defaults to "secrets".
// An implementation may support other resources (for example, resource
// CertificateRef is the reference to Kubernetes object that contain a
// TLS certificate and private key. This certificate MUST be used for
// TLS handshakes for the domain this GatewayTLSConfig is associated with.
//
// This field is required when mode is set to "Terminate" (default) and
// optional otherwise.
//
// If an entry in this list omits or specifies the empty string for both
// the group and the resource, the resource defaults to "secrets". An
// implementation may support other resources (for example, resource
// "mycertificates" in group "networking.acme.io").
//
// Support: Core (Kubernetes Secrets)
// Support: Implementation-specific (Other resource types)
//
Expand All @@ -338,6 +347,8 @@ type GatewayTLSConfig struct {
// set to 'Allow' as it will be used as the default certificate for the
// listener.
//
// Support: Core
//
// +kubebuilder:default={certificate:Deny}
RouteOverride TLSOverridePolicy `json:"routeOverride,omitempty"`

Expand All @@ -357,7 +368,6 @@ type GatewayTLSConfig struct {

// TLSModeType type defines behavior of gateway with TLS protocol.
// +kubebuilder:validation:Enum=Terminate;Passthrough
// +kubebuilder:default=Terminate
type TLSModeType string

const (
Expand Down
7 changes: 4 additions & 3 deletions config/crd/bases/networking.x-k8s.io_gateways.yaml

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

24 changes: 14 additions & 10 deletions docs-src/spec.md

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

24 changes: 14 additions & 10 deletions docs/spec/index.html

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