8000 GEP-957: Add `RouteConditionReason` which could indicate a route not matching parentRefs Ports · Issue #1511 · kubernetes-sigs/gateway-api · GitHub
[go: up one dir, main page]

Skip to content

GEP-957: Add RouteConditionReason which could indicate a route not matching parentRefs Ports #1511

@pmalek

Description

@pmalek

What would you like to be added:

https://gateway-api.sigs.k8s.io/geps/gep-957/ introduce a concept of port matching, so that a route can specify parentRef.port.

Unfortunately, an appropriate reason which could be used for Accepted condition does not exist among the predefined list of reasons:

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:
//
// * "Accepted"
//
// Possible reasons for this condition to be False are:
//
// * "NotAllowedByListeners"
// * "NoMatchingListenerHostname"
// * "UnsupportedValue"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
RouteConditionAccepted RouteConditionType = "Accepted"
// This reason is used with the "Accepted" condition when the Route has been
// accepted by the Gateway.
RouteReasonAccepted RouteConditionReason = "Accepted"
// This reason is used with the "Accepted" condition when the route has not
// been accepted by a Gateway because the Gateway has no Listener whose
// allowedRoutes criteria permit the route
RouteReasonNotAllowedByListeners RouteConditionReason = "NotAllowedByListeners"
// This reason is used with the "Accepted" condition when the Gateway has no
// compatible Listeners whose Hostname matches the route
RouteReasonNoMatchingListenerHostname RouteConditionReason = "NoMatchingListenerHostname"

This probably should also be mentioned in the GEP itself.

Why this is needed:

To indicate that a route couldn't be matched with a parent because a matching port wasn't found.

Proposal:

Introduce something along the lines (similar to RouteReasonNoMatchingListenerHostname):

const (
	// This reason is used with the "Accepted" condition when the Gateway has no
	// compatible Listeners whose Port matches the route
	RouteReasonNoMatchingListenerPort RouteConditionReason = "NoMatchingListenerPort"
)

#1511 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0