Skip to content

Commit 954c811

Browse files
committed
review
1 parent 6a5f47f commit 954c811

File tree

8 files changed

+112
-88
lines changed

8 files changed

+112
-88
lines changed

apis/v1/gateway_types.go

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,21 @@ type GatewaySpec struct {
298298

299299
// TLSConfigs stores TLS configurations for a Gateway.
300300
//
301-
// GatewayTLSConfigs will impact all existing and newly added Listeners.
301+
// - If the `port` field in `TLSConfig` is not set, the TLS configuration applies
302+
// to all listeners in the gateway. We call this `default` configuration.
303+
// - If the `port` field in `TLSConfig` is set, the TLS configuration applies
304+
// only to listeners with a matching port. Each port requires a unique TLS configuration.
305+
// - Per-port configurations can override the `default` configuration.
306+
// - The `default` configuration is optional. Clients can apply TLS configuration
307+
// to a subset of listeners by creating only per-port configurations.
308+
// Listeners with a port that does not match any TLS configuration will
309+
// not have `frontendValidation` set.
302310
//
303311
// Support: Core
304-
//
305312
// +optional
306-
TLSConfigs GatewayTLSConfigs `json:"tlsConfigs,omitempty"`
313+
//
314+
// <gateway:experimental>
315+
TLSConfigs []TLSConfig `json:"tlsConfigs,omitempty"`
307316
}
308317

309318
// AllowedListeners defines which ListenerSets can be attached to this Gateway.
@@ -644,6 +653,7 @@ type TLSConfig struct {
644653
// +optional
645654
// <gateway:experimental>
646655
Port *PortNumber `json:"port,omitempty"`
656+
//
647657
// FrontendValidation holds configuration information for validating the frontend (client).
648658
// Setting this field will result in mutual authentication when connecting to the gateway.
649659
// In browsers this may result in a dialog appearing
@@ -706,19 +716,6 @@ type FrontendTLSValidation struct {
706716
Mode FrontendValidationModeType `json:"mode,omitempty"`
707717
}
708718

709-
// GatewayTLSConfigs stores TLS configurations for a Gateway.
710-
//
711-
// - If the `port` field in `TLSConfig` is not set, the TLS configuration applies
712-
// to all listeners in the gateway. We call this `default` configuration.
713-
// - If the `port` field in `TLSConfig` is set, the TLS configuration applies
714-
// only to listeners with a matching port. Each port requires a unique TLS configuration.
715-
// - Per-port configurations can override the `default` configuration.
716-
// - The `default` configuration is optional. Clients can apply TLS configuration
717-
// to a subset of listeners by creating only per-port configurations.
718-
// Listeners with a port that does not match any TLS configuration will
719-
// not have `frontendValidation` set.
720-
type GatewayTLSConfigs []TLSConfig
721-
722719
// FrontendValidationModeType type defines how a Gateway validates client certificates.
723720
//
724721
// +kubebuilder:validation:Enum=AllowValidOnly;AllowInvalidOrMissingCert

apis/v1/zz_generated.deepcopy.go

Lines changed: 1 addition & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applyconfiguration/apis/v1/gatewayspec.go

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applyconfiguration/apis/v1/tlsconfig.go

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/experimental/gateway.networking.k8s.io_gateways.yaml

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/standard/gateway.networking.k8s.io_gateways.yaml

Lines changed: 0 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

geps/gep-91/index.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,6 @@ type ObjectReference struct {
7878
Namespace *Namespace `json:"namespace,omitempty"`
7979
}
8080

81-
// GatewayTLSConfigs stores TLS configurations for a Gateway.
82-
//
83-
// * If the `port` field in `TLSConfig` is not set, the TLS configuration applies
84-
// to all listeners in the gateway. We call this `default` configuration.
85-
// * If the `port` field in `TLSConfig` is set, the TLS configuration applies
86-
// only to listeners with a matching port. Each port requires a unique TLS configuration.
87-
// * Per-port configurations can override the `default` configuration.
88-
// * The `default` configuration is optional. Clients can apply TLS configuration
89-
// to a subset of listeners by creating only per-port configurations. Listeners
90-
// with a port that does not match any TLS configuration will not have
91-
// `frontendValidation` set.
92-
type GatewayTLSConfigs = []TLSConfig
93-
9481
// TLSConfig describes a TLS configuration that can be applied to all Gateway
9582
// Listeners or to all Listeners matching the Port if set.
9683
type TLSConfig struct {
@@ -179,7 +166,22 @@ const (
179166
type GatewaySpec struct {
180167
...
181168
// TLSConfigs stores TLS configurations for a Gateway.
182-
TLSConfigs GatewayTLSConfigs
169+
//
170+
// - If the `port` field in `TLSConfig` is not set, the TLS configuration applies
171+
// to all listeners in the gateway. We call this `default` configuration.
172+
// - If the `port` field in `TLSConfig` is set, the TLS configuration applies
173+
// only to listeners with a matching port. Each port requires a unique TLS configuration.
174+
// - Per-port configurations can override the `default` configuration.
175+
// - The `default` configuration is optional. Clients can apply TLS configuration
176+
// to a subset of listeners by creating only per-port configurations.
177+
// Listeners with a port that does not match any TLS configuration will
178+
// not have `frontendValidation` set.
179+
//
180+
// Support: Core
181+
// +optional
182+
//
183+
// <gateway:experimental>
184+
TLSConfigs []TLSConfig `json:"tlsConfigs,omitempty"`
183185
}
184186

185187
```
@@ -319,7 +321,6 @@ This GEP aims to standardize this behavior as an official part of the upstream s
319321

320322
[TLS Handshake Protocol]: https://www.rfc-editor.org/rfc/rfc5246#section-7.4
321323
[Certificate Path Validation]: https://www.rfc-editor.org/rfc/rfc5280#section-6
322-
[GatewayTLSConfig]: ../../reference/spec.md#gateway.networking.k8s.io/v1.GatewayTLSConfig
323324
[BackendTLSPolicy]: ../../api-types/backendtlspolicy.md
324325
[TLS Configuration GEP]: ../gep-2907/index.md
325326
[Gateway API TLS Use Cases]: https://docs.google.com/document/d/17sctu2uMJtHmJTGtBi_awGB0YzoCLodtR6rUNmKMCs8/edit?pli=1#heading=h.cxuq8vo8pcxm

pkg/generated/openapi/zz_generated.openapi.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)