Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/gateway-api-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ Fields:
* `conditions` - partially supported. Supported (Condition/Status/Reason):
* `Accepted/True/Accepted`
* `Accepted/False/NoMatchingListenerHostname`
* `Accepted/False/UnsupportedValue`: Custom reason for when the HTTPRoute includes an invalid or unsupported value.
* `Accepted/False/InvalidListener`: Custom reason for when the HTTPRoute references an invalid listener.
* `ResolvedRefs/True/ResolvedRefs`
* `ResolvedRefs/False/InvalidKind`
* `ResolvedRefs/False/RefNotPermitted`
* `ResolvedRefs/False/BackendNotFound`
* `ResolvedRefs/False/UnsupportedValue`: Custom reason for when one of the HTTPRoute rules has a backendRef with an unsupported value.

### TLSRoute

Expand Down
2 changes: 2 additions & 0 deletions internal/state/change_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,15 @@ var _ = Describe("ChangeProcessor", func() {
SectionName: helpers.GetPointer[v1beta1.SectionName]("listener-80-1"),
Conditions: []conditions.Condition{
conditions.NewRouteInvalidListener(),
conditions.NewRouteResolvedRefs(),
},
},
{
GatewayNsName: client.ObjectKeyFromObject(gw1),
SectionName: helpers.GetPointer[v1beta1.SectionName]("listener-443-1"),
Conditions: []conditions.Condition{
conditions.NewRouteInvalidListener(),
conditions.NewRouteResolvedRefs(),
},
},
},
Expand Down
11 changes: 11 additions & 0 deletions internal/state/conditions/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func DeduplicateConditions(conds []Condition) []Condition {
func NewDefaultRouteConditions() []Condition {
return []Condition{
NewRouteAccepted(),
NewRouteResolvedRefs(),
}
}

Expand Down Expand Up @@ -294,6 +295,16 @@ func NewRouteBackendRefUnsupportedValue(msg string) Condition {
}
}

// NewRouteResolvedRefs returns a Condition that indicates that all the references on the Route are resolved.
func NewRouteResolvedRefs() Condition {
return Condition{
Type: string(v1beta1.RouteConditionResolvedRefs),
Status: metav1.ConditionTrue,
Reason: string(v1beta1.RouteReasonResolvedRefs),
Message: "All references are resolved",
}
}

// NewGatewayClassInvalidParameters returns a Condition that indicates that the GatewayClass has invalid parameters.
func NewGatewayClassInvalidParameters(msg string) Condition {
return Condition{
Expand Down