@@ -221,6 +221,7 @@ type HTTPRouteRule struct {
221
221
// recommended to return a 503 status code.
222
222
//
223
223
// Support: Core for Kubernetes Service
224
+ //
224
225
// Support: Custom for any other resource
225
226
//
226
227
// Support for weight: Core
@@ -242,6 +243,13 @@ type HTTPRouteRule struct {
242
243
// - Must begin with the `/` character
243
244
// - Must not contain consecutive `/` characters (e.g. `/foo///`, `//`).
244
245
//
246
+ // Note that values may be added to this enum, implementations
247
+ // must ensure that unknown values will not cause a crash.
248
+ //
249
+ // Unknown values here must result in the implementation setting the
250
+ // Attached Condition for the Route to `status: False`, with a
251
+ // Reason of `UnsupportedValue`.
252
+ //
245
253
// +kubebuilder:validation:Enum=Exact;PathPrefix;RegularExpression
246
254
type PathMatchType string
247
255
@@ -297,6 +305,13 @@ type HTTPPathMatch struct {
297
305
// * "Exact"
298
306
// * "RegularExpression"
299
307
//
308
+ // Note that values may be added to this enum, implementations
309
+ // must ensure that unknown values will not cause a crash.
310
+ //
311
+ // Unknown values here must result in the implementation setting the
312
+ // Attached Condition for the Route to `status: False`, with a
313
+ // Reason of `UnsupportedValue`.
314
+ //
300
315
// +kubebuilder:validation:Enum=Exact;RegularExpression
301
316
type HeaderMatchType string
302
317
@@ -371,6 +386,13 @@ type HTTPHeaderMatch struct {
371
386
// * "Exact"
372
387
// * "RegularExpression"
373
388
//
389
+ // Note that values may be added to this enum, implementations
390
+ // must ensure that unknown values will not cause a crash.
391
+ //
392
+ // Unknown values here must result in the implementation setting the
393
+ // Attached Condition for the Route to `status: False`, with a
394
+ // Reason of `UnsupportedValue`.
395
+ //
374
396
// +kubebuilder:validation:Enum=Exact;RegularExpression
375
397
type QueryParamMatchType string
376
398
@@ -422,6 +444,14 @@ type HTTPQueryParamMatch struct {
422
444
// [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4) and
423
445
// [RFC 5789](https://datatracker.ietf.org/doc/html/rfc5789#section-2).
424
446
// The value is expected in upper case.
447
+ //
448
+ // Note that values may be added to this enum, implementations
449
+ // must ensure that unknown values will not cause a crash.
450
+ //
451
+ // Unknown values here must result in the implementation setting the
452
+ // Attached Condition for the Route to `status: False`, with a
453
+ // Reason of `UnsupportedValue`.
454
+ //
425
455
// +kubebuilder:validation:Enum=GET;HEAD;POST;PUT;DELETE;CONNECT;OPTIONS;TRACE;PATCH
426
456
type HTTPMethod string
427
457
@@ -522,6 +552,13 @@ type HTTPRouteFilter struct {
522
552
// MUST NOT be skipped. Instead, requests that would have been processed by
523
553
// that filter MUST receive a HTTP error response.
524
554
//
555
+ // Note that values may be added to this enum, implementations
556
+ // must ensure that unknown values will not cause a crash.
557
+ //
558
+ // Unknown values here must result in the implementation setting the
559
+ // Attached Condition for the Route to `status: False`, with a
560
+ // Reason of `UnsupportedValue`.
561
+ //
525
562
// +unionDiscriminator
526
563
// +kubebuilder:validation:Enum=RequestHeaderModifier;RequestMirror;RequestRedirect;ExtensionRef
527
564
// <gateway:experimental:validation:Enum=RequestHeaderModifier;RequestMirror;RequestRedirect;URLRewrite;ExtensionRef>
@@ -741,6 +778,13 @@ type HTTPPathModifier struct {
741
778
// Type defines the type of path modifier. Additional types may be
742
779
// added in a future release of the API.
743
780
//
781
+ // Note that values may be added to this enum, implementations
782
+ // must ensure that unknown values will not cause a crash.
783
+ //
784
+ // Unknown values here must result in the implementation setting the
785
+ // Attached Condition for the Route to `status: False`, with a
786
+ // Reason of `UnsupportedValue`.
787
+ //
744
788
// <gateway:experimental>
745
789
// +kubebuilder:validation:Enum=ReplaceFullPath;ReplacePrefixMatch
746
790
Type HTTPPathModifierType `json:"type"`
@@ -778,6 +822,13 @@ type HTTPRequestRedirectFilter struct {
778
822
//
779
823
// Support: Extended
780
824
//
825
+ // Note that values may be added to this enum, implementations
826
+ // must ensure that unknown values will not cause a crash.
827
+ //
828
+ // Unknown values here must result in the implementation setting the
829
+ // Attached Condition for the Route to `status: False`, with a
830
+ // Reason of `UnsupportedValue`.
831
+ //
781
832
// +optional
782
833
// +kubebuilder:validation:Enum=http;https
783
834
Scheme * string `json:"scheme,omitempty"`
@@ -814,6 +865,13 @@ type HTTPRequestRedirectFilter struct {
814
865
//
815
866
// Support: Core
816
867
//
868
+ // Note that values may be added to this enum, implementations
869
+ // must ensure that unknown values will not cause a crash.
870
+ //
871
+ // Unknown values here must result in the implementation setting the
872
+ // Attached Condition for the Route to `status: False`, with a
873
+ // Reason of `UnsupportedValue`.
874
+ //
817
875
// +optional
818
876
// +kubebuilder:default=302
819
877
// +kubebuilder:validation:Enum=301;302
0 commit comments