contour icon indicating copy to clipboard operation
contour copied to clipboard

Add support for AppProtocol as well as service annotations

Open evankanderson opened this issue 3 years ago • 8 comments


name: Pull request about: Support using AppProtocol to detect backend protocol (pass-through current "tls", "h2", "h2c" values) in addition to projectcontour.io/upstream-protocol.X annotations labels: ["release-note/small"]

Fixes #2431

Note that this does not do any particular validation of the AppProtocol field, but it does add tests. :grin:

evankanderson avatar Jun 29 '22 08:06 evankanderson

Codecov Report

Merging #4603 (3dd4269) into main (26aa541) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4603   +/-   ##
=======================================
  Coverage   76.81%   76.81%           
=======================================
  Files         140      140           
  Lines       12993    12995    +2     
=======================================
+ Hits         9980     9982    +2     
  Misses       2751     2751           
  Partials      262      262           
Impacted Files Coverage Δ
internal/dag/accessors.go 98.59% <100.00%> (+0.02%) :arrow_up:
internal/status/gatewaystatus.go 75.00% <0.00%> (ø)
internal/status/routeconditions.go 20.58% <0.00%> (ø)
internal/status/gatewayclassconditions.go 95.00% <0.00%> (ø)

codecov[bot] avatar Jun 29 '22 19:06 codecov[bot]

I think we might want to add some validation here since the AppProtocol field could be a wide range of values and we assume internally that protocol really only is one of tls h2 or h2c

sunjayBhatia avatar Jun 29 '22 19:06 sunjayBhatia

I think we might want to add some validation here since the AppProtocol field could be a wide range of values and we assume internally that protocol really only is one of tls h2 or h2c

This seems to only be used here: https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/cluster.go#L81

Which only uses certain specific values, and ignores the rest. I suppose we might be able to save a little memory by not copying these strings around.

evankanderson avatar Jun 29 '22 21:06 evankanderson

(hit the wrong button again)

evankanderson avatar Jun 29 '22 21:06 evankanderson

(Let me know if I should continue with this, or try a different avenue)

evankanderson avatar Jul 14 '22 23:07 evankanderson

Marking this PR stale since there has been no activity for 14 days. It will be closed if there is no activity for another 30 days.

github-actions[bot] avatar Jul 29 '22 02:07 github-actions[bot]

We may want to reconsider whether we want to do this at all since this provision Gateway API GEP implies that appProtocol is a pretty broad field that Gateway API does not intend to use to configure backend app details: https://github.com/kubernetes-sigs/gateway-api/pull/1333 (https://github.com/kubernetes-sigs/gateway-api/pull/1333/files#diff-5ea234dff68be219d19428c1c6cee202f7df6a867a11d294bb16b0dff0c081aeR26-R30)

sunjayBhatia avatar Aug 17 '22 20:08 sunjayBhatia

Marking this PR stale since there has been no activity for 14 days. It will be closed if there is no activity for another 30 days.

github-actions[bot] avatar Sep 01 '22 00:09 github-actions[bot]

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

github-actions[bot] avatar Oct 01 '22 00:10 github-actions[bot]