Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Accepted condition type on Gateway status #633

Merged
merged 2 commits into from
May 17, 2023
Merged

Conversation

kate-osborn
Copy link
Contributor

Closes #368

Sets Accepted condition type on Gateway status. Accepted can be true/false and the following reasons are used: ListenersNotValid, Invalid, GatewayConflict, and Accepted.

The Invalid reason is used when the GatewayClass for the Gateway is missing or invalid. In this case, both the Gateway and all its listeners are considered invalid. No additional validation is performed for the listeners. The Gateway and its listeners will have the condition Accepted/false/Invalid set on their statuses.

This PR also replaces the ListenerUnsupportedAddress Condition reason with the ListenerUnsupportedValue reason to be consistent with the rest of our unsupported fields.

@kate-osborn kate-osborn requested a review from a team as a code owner May 9, 2023 18:23
@github-actions github-actions bot added the enhancement New feature or request label May 9, 2023
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update gateway API compatibility doc. Make sure to callout the GatewayReasonGatewayConflict reason and explain that we only support one Gateway

are docs update missing?

internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/graph/gateway_listener.go Show resolved Hide resolved
internal/state/statuses.go Show resolved Hide resolved
@kate-osborn
Copy link
Contributor Author

kate-osborn commented May 10, 2023

Update gateway API compatibility doc. Make sure to callout the GatewayReasonGatewayConflict reason and explain that we only support one Gateway

are docs update missing?

@pleshakov I updated the docs

@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 16, 2023
docs/gateway-api-compatibility.md Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/conditions/conditions.go Outdated Show resolved Hide resolved
internal/state/graph/gateway.go Show resolved Hide resolved
@kate-osborn kate-osborn requested a review from sjberman May 17, 2023 18:26
Copy link
Contributor

@sjberman sjberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The gocyclo linter complained about the complexity of the
bindRouteToListeners function. This commit refactors this
function to reduce its complexity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Conformance: Set Accepted Condition Type on Gateway Status
4 participants