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

api: add RouteConditionReason to v1alpha2 #1114

Merged

Conversation

mikemorris
Copy link
Contributor

@mikemorris mikemorris commented Apr 14, 2022

What type of PR is this?
/kind documentation
/kind feature
/kind api-change
/kind deprecation

What this PR does / why we need it:

Adds a RouteConditionReason type with known required reasons and renames two RouteConditionType constants. Not sure if the release note formatting would make more sense to split this into two separate PRs.

Which issue(s) this PR fixes:

Fixes #1109, refs #1112

Does this PR introduce a user-facing change?:

adds RouteConditionReason type with RouteReasonAccepted, RouteReasonResolvedRefs and RouteReasonRefNotPermitted constants
deprecates ConditionRouteAccepted and ConditionRouteResolvedRefs constants, adds RouteConditionAccepted and RouteConditionResolvedRefs constants

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 14, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @mikemorris. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 14, 2022
@rainest
Copy link
Contributor

rainest commented Apr 15, 2022

In the course of writing our Gateway.Listeners[].allowedRoutes implementation @shaneutt noted that there was no way we could indicate rejections on the resource. He originally suggested a ConditionRouteRejected in line with the existing constants, but assuming this is accepted it looks like we should instead add a false RouteConditionReason for RouteConditionAccepted.

Not sure if we could piggyback off this PR to do so; I submitted mikemorris#1 if so, or can retarget it to this repo after this is merged.

@mikemorris
Copy link
Contributor Author

mikemorris commented Apr 15, 2022

Agreed that's a valid case that's difficult to communicate currently @rainest, and I do think communicating this through a RouteConditionReason feels safer than crossing a disallowed namespace boundary to set a ListenerStatus condition (the not accepted case I wrote up in #1112 basically describes the same need you identified!)

I think I'd lean towards retargeting after merging this though given that it's somewhat new/unspecified scope - might be nice to add a conformance test (or augment the existing HTTPInvalidCrossNamespace test) illustrating expected usage too.

@robscott
Copy link
Member

@mikemorris A few tiny comments but otherwise LGTM. @rainest I like the change you proposed in mikemorris#1, do you mind filing a follow up PR here once this one merges?

apis/v1alpha2/shared_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/shared_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/shared_types.go Outdated Show resolved Hide resolved
@robscott
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 18, 2022
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Found one more very tiny nit, but does not need to block.

/approve

apis/v1alpha2/shared_types.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikemorris, robscott

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 19, 2022
@robscott
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 19, 2022
@k8s-ci-robot k8s-ci-robot merged commit 03f50b4 into kubernetes-sigs:master Apr 19, 2022
@mikemorris mikemorris deleted the api/route-condition-reason branch April 21, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: add RouteConditionReason to v1alpha2 docs, enumerate possible reasons for each RouteConditionType
4 participants