Skip to content

Commit 4cdcb13

Browse files
committed
Adding new PartiallyInvalid condition for Routes
1 parent d4ff2d4 commit 4cdcb13

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

apis/v1beta1/shared_types.go

+42-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ const (
298298
// This condition indicates whether the route has been accepted or rejected
299299
// by a Gateway, and why.
300300
//
301-
// Possible reasons for this condition to be true are:
301+
// Possible reasons for this condition to be True are:
302302
//
303303
// * "Accepted"
304304
//
@@ -349,15 +349,17 @@ const (
349349
// are incompatible filters present on a route rule (for example if
350350
// the URLRewrite and RequestRedirect are both present on an HTTPRoute).
351351
RouteReasonIncompatibleFilters RouteConditionReason = "IncompatibleFilters"
352+
)
352353

354+
const (
353355
// This condition indicates whether the controller was able to resolve all
354356
// the object references for the Route.
355357
//
356-
// Possible reasons for this condition to be true are:
358+
// Possible reasons for this condition to be True are:
357359
//
358360
// * "ResolvedRefs"
359361
//
360-
// Possible reasons for this condition to be false are:
362+
// Possible reasons for this condition to be False are:
361363
//
362364
// * "RefNotPermitted"
363365
// * "InvalidKind"
@@ -394,6 +396,43 @@ const (
394396
RouteReasonUnsupportedProtocol RouteConditionReason = "UnsupportedProtocol"
395397
)
396398

399+
const (
400+
// This condition indicates that the Route contains a combination of both
401+
// valid and invalid rules.
402+
//
403+
// When this happens, implementations MUST take one of the following
404+
// approaches:
405+
//
406+
// 1) Drop Rule(s): With this approach, implementations will drop the
407+
// invalid Route Rule(s) until they are fully valid again. The message
408+
// for this condition MUST start with the prefix "Dropped Rule" and
409+
// include information about which Rules have been dropped. In this
410+
// state, the "Accepted" condition MUST be set to "True" with the latest
411+
// generation of the resource.
412+
// 2) Fall Back: With this approach, implementations will fall back to the
413+
// last known good state of the entire Route. The message for this
414+
// condition MUST start with the prefix "Fall Back" and include
415+
// information about why the current Rule(s) are invalid. To represent
416+
// this, the "Accepted" condition MUST be set to "True" with the
417+
// generation of the last known good state of the resource.
418+
//
419+
// Reverting to the last known good state should only be done by
420+
// implementations that have a means of restoring that state if/when they
421+
// are restarted.
422+
//
423+
// This condition MUST NOT be set if a Route is fully valid, fully invalid,
424+
// or not accepted. By extension, that means that this condition MUST only
425+
// be set when it is "True".
426+
//
427+
// Possible reasons for this condition to be True are:
428+
//
429+
// * "UnsupportedValue"
430+
//
431+
// Controllers may raise this condition with other reasons, but should
432+
// prefer to use the reasons listed above to improve interoperability.
433+
RouteConditionPartiallyInvalid RouteConditionType = "PartiallyInvalid"
434+
)
435+
397436
// RouteParentStatus describes the status of a route with respect to an
398437
// associated Parent.
399438
type RouteParentStatus struct {

0 commit comments

Comments
 (0)