You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apis/v1/gateway_types.go
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,6 @@ type GatewaySpec struct {
186
186
// +listMapKey=name
187
187
// +kubebuilder:validation:MinItems=1
188
188
// +kubebuilder:validation:MaxItems=64
189
-
// +kubebuilder:validation:XValidation:message="tls must be specified for protocols ['HTTPS', 'TLS']",rule="self.all(l, l.protocol in ['HTTPS', 'TLS'] ? has(l.tls) : true)"
190
189
// +kubebuilder:validation:XValidation:message="tls must not be specified for protocols ['HTTP', 'TCP', 'UDP']",rule="self.all(l, l.protocol in ['HTTP', 'TCP', 'UDP'] ? !has(l.tls) : true)"
191
190
// +kubebuilder:validation:XValidation:message="tls mode must be Terminate for protocol HTTPS",rule="self.all(l, (l.protocol == 'HTTPS' && has(l.tls)) ? (l.tls.mode == '' || l.tls.mode == 'Terminate') : true)"
192
191
// +kubebuilder:validation:XValidation:message="hostname must not be specified for protocols ['TCP', 'UDP']",rule="self.all(l, l.protocol in ['TCP', 'UDP'] ? (!has(l.hostname) || l.hostname == '') : true)"
@@ -376,18 +375,19 @@ const (
376
375
377
376
// GatewayTLSConfig describes a TLS configuration.
378
377
//
379
-
// +kubebuilder:validation:XValidation:message="certificateRefs must be specified when TLSModeType is Terminate",rule="self.mode == 'Terminate' ? size(self.certificateRefs) > 0 : true"
378
+
// +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"
380
379
typeGatewayTLSConfigstruct {
381
380
// Mode defines the TLS behavior for the TLS session initiated by the client.
382
381
// There are two possible modes:
383
382
//
384
-
// - Terminate: The TLS session between the downstream client
385
-
// and the Gateway is terminated at the Gateway. This mode requires
386
-
// certificateRefs to be set and contain at least one element.
383
+
// - Terminate: The TLS session between the downstream client and the
384
+
// Gateway is terminated at the Gateway. This mode requires certificates
385
+
// to be specified in some way, such as populating the certificateRefs
386
+
// field.
387
387
// - Passthrough: The TLS session is NOT terminated by the Gateway. This
388
388
// implies that the Gateway can't decipher the TLS stream except for
389
-
// the ClientHello message of the TLS protocol.
390
-
// CertificateRefs field is ignored in this mode.
389
+
// the ClientHello message of the TLS protocol. The certificateRefs field
0 commit comments