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

Gateway API: set TCPRoute and UDPRoute status #4143

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

skriss
Copy link
Member

@skriss skriss commented Oct 28, 2021

Contour does not support Gateway API's
TCPRoute or UDPRoute. This PR sets a
condition of "Accepted: false" on all
TCPRoutes & UDPRoutes referencing a
Contour Gateway.

Closes #3441.
Closes #3442.

Signed-off-by: Steve Kriss krisss@vmware.com

Contour does not support Gateway API's
TCPRoute or UDPRoute. This PR sets a
condition of "Accepted: false" on all
TCPRoutes & UDPRoutes referencing a
Contour Gateway.

Closes projectcontour#3441.
Closes projectcontour#3442.

Signed-off-by: Steve Kriss <krisss@vmware.com>
@skriss skriss requested a review from a team as a code owner October 28, 2021 19:13
@skriss skriss requested review from stevesloka and youngnick and removed request for a team October 28, 2021 19:13
@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #4143 (8d966b4) into main (3ee57ac) will decrease coverage by 1.83%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4143      +/-   ##
==========================================
- Coverage   74.64%   72.81%   -1.84%     
==========================================
  Files         112      115       +3     
  Lines        9722     9964     +242     
==========================================
- Hits         7257     7255       -2     
- Misses       2309     2553     +244     
  Partials      156      156              
Impacted Files Coverage Δ
cmd/contour/serve.go 12.65% <0.00%> (-0.38%) ⬇️
internal/controller/gateway.go 0.00% <0.00%> (ø)
internal/controller/helpers.go 0.00% <0.00%> (ø)
internal/controller/tcproute.go 0.00% <0.00%> (ø)
internal/controller/udproute.go 0.00% <0.00%> (ø)
internal/dag/cache.go 93.91% <ø> (-0.34%) ⬇️
internal/envoy/v3/listener.go 98.45% <0.00%> (+0.02%) ⬆️
internal/envoy/v3/bootstrap.go 92.44% <0.00%> (+0.31%) ⬆️
internal/sorter/sorter.go 98.78% <0.00%> (+1.21%) ⬆️

Signed-off-by: Steve Kriss <krisss@vmware.com>
@skriss skriss added the release-note/small A small change that needs one line of explanation in the release notes. label Oct 28, 2021
Signed-off-by: Steve Kriss <krisss@vmware.com>
Copy link
Member

@stevesloka stevesloka left a comment

Choose a reason for hiding this comment

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

It makes sense to me to set this to tell the user what's going on (but doesn't mean that upstream agrees).

The docs (https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.RouteParentStatus) say that we shouldn't set a status. 🤷

There are a number of cases where the “Accepted” condition may not be set due to lack of controller visibility, that includes when:

- The Route is of a type that the controller does not support.

@skriss
Copy link
Member Author

skriss commented Oct 28, 2021

Heh, hadn't noticed that. I do think setting it is useful, and to be fair the API spec says "may not be set" rather than "must not be set", so I think it's probably OK if we do, just not required.

@youngnick
Copy link
Member

Yeah, I think that upstream direction is suffering from overload of MAY - in this case it's pointing out that it's not always possible to guarantee that you'll see everything that you don't support. I agree that it could use clarification to say that if you have Routes attached to a Gateway whose controller doesn't support them, that controller must update the status to tell you so. I'll work on an upstream change for that.

Copy link
Member

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

This LGTM with a couple of small doc and style nits. Those are definitely non-blocking though.

internal/controller/helpers.go Outdated Show resolved Hide resolved
internal/controller/helpers.go Outdated Show resolved Hide resolved
Signed-off-by: Steve Kriss <krisss@vmware.com>
@skriss skriss added this to the 1.20.0 milestone Nov 1, 2021
@skriss skriss merged commit bbb7417 into projectcontour:main Nov 1, 2021
@skriss skriss deleted the gateway-tcpudproute-status branch November 1, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/small A small change that needs one line of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set Status on UDPRoute Set Status on TCPRoute
3 participants