Skip to content

Commit

Permalink
Adding new PartiallyInvalid condition for Routes
Browse files Browse the repository at this point in the history
  • Loading branch information
robscott committed Oct 6, 2023
1 parent d4ff2d4 commit 4cdcb13
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions apis/v1beta1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const (
// This condition indicates whether the route has been accepted or rejected
// by a Gateway, and why.
//
// Possible reasons for this condition to be true are:
// Possible reasons for this condition to be True are:
//
// * "Accepted"
//
Expand Down Expand Up @@ -349,15 +349,17 @@ const (
// are incompatible filters present on a route rule (for example if
// the URLRewrite and RequestRedirect are both present on an HTTPRoute).
RouteReasonIncompatibleFilters RouteConditionReason = "IncompatibleFilters"
)

const (
// This condition indicates whether the controller was able to resolve all
// the object references for the Route.
//
// Possible reasons for this condition to be true are:
// Possible reasons for this condition to be True are:
//
// * "ResolvedRefs"
//
// Possible reasons for this condition to be false are:
// Possible reasons for this condition to be False are:
//
// * "RefNotPermitted"
// * "InvalidKind"
Expand Down Expand Up @@ -394,6 +396,43 @@ const (
RouteReasonUnsupportedProtocol RouteConditionReason = "UnsupportedProtocol"
)

const (
// This condition indicates that the Route contains a combination of both
// valid and invalid rules.
//
// When this happens, implementations MUST take one of the following
// approaches:
//
// 1) Drop Rule(s): With this approach, implementations will drop the
// invalid Route Rule(s) until they are fully valid again. The message
// for this condition MUST start with the prefix "Dropped Rule" and
// include information about which Rules have been dropped. In this
// state, the "Accepted" condition MUST be set to "True" with the latest
// generation of the resource.
// 2) Fall Back: With this approach, implementations will fall back to the
// last known good state of the entire Route. The message for this
// condition MUST start with the prefix "Fall Back" and include
// information about why the current Rule(s) are invalid. To represent
// this, the "Accepted" condition MUST be set to "True" with the
// generation of the last known good state of the resource.
//
// Reverting to the last known good state should only be done by
// implementations that have a means of restoring that state if/when they
// are restarted.
//
// This condition MUST NOT be set if a Route is fully valid, fully invalid,
// or not accepted. By extension, that means that this condition MUST only
// be set when it is "True".
//
// Possible reasons for this condition to be True are:
//
// * "UnsupportedValue"
//
// Controllers may raise this condition with other reasons, but should
// prefer to use the reasons listed above to improve interoperability.
RouteConditionPartiallyInvalid RouteConditionType = "PartiallyInvalid"
)

// RouteParentStatus describes the status of a route with respect to an
// associated Parent.
type RouteParentStatus struct {
Expand Down

0 comments on commit 4cdcb13

Please sign in to comment.