@@ -298,12 +298,21 @@ type GatewaySpec struct {
298
298
299
299
// TLSConfigs stores TLS configurations for a Gateway.
300
300
//
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.
302
310
//
303
311
// Support: Core
304
- //
305
312
// +optional
306
- TLSConfigs GatewayTLSConfigs `json:"tlsConfigs,omitempty"`
313
+ //
314
+ // <gateway:experimental>
315
+ TLSConfigs []TLSConfig `json:"tlsConfigs,omitempty"`
307
316
}
308
317
309
318
// AllowedListeners defines which ListenerSets can be attached to this Gateway.
@@ -423,7 +432,7 @@ type Listener struct {
423
432
// the Protocol field is "HTTPS" or "TLS". It is invalid to set this field
424
433
// if the Protocol field is "HTTP", "TCP", or "UDP".
425
434
//
426
- // The association of SNIs to Certificate defined in GatewayTLSConfig is
435
+ // The association of SNIs to Certificate defined in ListenerTLSConfig is
427
436
// defined based on the Hostname field for this listener.
428
437
//
429
438
// The GatewayClass MUST use the longest matching SNI out of all
@@ -432,7 +441,7 @@ type Listener struct {
432
441
// Support: Core
433
442
//
434
443
// +optional
435
- TLS * GatewayTLSConfig `json:"tls,omitempty"`
444
+ TLS * ListenerTLSConfig `json:"tls,omitempty"`
436
445
437
446
// AllowedRoutes defines the types of routes that MAY be attached to a
438
447
// Listener and the trusted namespaces where those Route resources MAY be
@@ -535,10 +544,10 @@ type GatewayBackendTLS struct {
535
544
ClientCertificateRef * SecretObjectReference `json:"clientCertificateRef,omitempty"`
536
545
}
537
546
538
- // GatewayTLSConfig describes a TLS configuration.
547
+ // ListenerTLSConfig describes a TLS configuration for a listener .
539
548
//
540
549
// +kubebuilder:validation:XValidation:message="certificateRefs or options must be specified when mode is Terminate",rule="self.mode == 'Terminate' ? size(self.certificateRefs) > 0 || size(self.options) > 0 : true"
541
- type GatewayTLSConfig struct {
550
+ type ListenerTLSConfig struct {
542
551
// Mode defines the TLS behavior for the TLS session initiated by the client.
543
552
// There are two possible modes:
544
553
//
@@ -587,17 +596,6 @@ type GatewayTLSConfig struct {
587
596
// +kubebuilder:validation:MaxItems=64
588
597
CertificateRefs []SecretObjectReference `json:"certificateRefs,omitempty"`
589
598
590
- // FrontendValidation holds configuration information for validating the frontend (client).
591
- // Setting this field will result in mutual authentication when connecting to the gateway. In browsers this may result in a dialog appearing
592
- // that requests a user to specify the client certificate.
593
- // The maximum depth of a certificate chain accepted in verification is Implementation specific.
594
- //
595
- // Support: Extended
596
- //
597
- // +optional
598
- // <gateway:experimental>
599
- FrontendValidation * FrontendTLSValidation `json:"frontendValidation,omitempty"`
600
-
601
599
// Options are a list of key/value pairs to enable extended TLS
602
600
// configuration for each implementation. For example, configuring the
603
601
// minimum TLS version or supported cipher suites.
@@ -644,6 +642,7 @@ type TLSConfig struct {
644
642
// +optional
645
643
// <gateway:experimental>
646
644
Port * PortNumber `json:"port,omitempty"`
645
+ //
647
646
// FrontendValidation holds configuration information for validating the frontend (client).
648
647
// Setting this field will result in mutual authentication when connecting to the gateway.
649
648
// In browsers this may result in a dialog appearing
@@ -706,19 +705,6 @@ type FrontendTLSValidation struct {
706
705
Mode FrontendValidationModeType `json:"mode,omitempty"`
707
706
}
708
707
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
-
722
708
// FrontendValidationModeType type defines how a Gateway validates client certificates.
723
709
//
724
710
// +kubebuilder:validation:Enum=AllowValidOnly;AllowInvalidOrMissingCert
0 commit comments