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 Sep 23, 2023
1 parent 58dfa4d commit 6eb3950
Showing 1 changed file with 45 additions and 3 deletions.
48 changes: 45 additions & 3 deletions apis/v1beta1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,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 @@ -314,15 +314,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 @@ -353,6 +355,46 @@ const (
RouteReasonBackendNotFound RouteConditionReason = "BackendNotFound"
)

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.
//
// Possible reasons for this condition to be True are:
//
// * "UnsupportedValue"
//
// Possible reasons for this condition to be False are:
//
// * "PartiallyInvalid"
//
// 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 6eb3950

Please sign in to comment.