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

Backport of Fix incorrect protocol for transparent proxy upstreams. into release/1.16.x #18010

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #17894 to be assessed for backporting due to the inclusion of the label backport/1.16.

The below text is copied from the body of the original PR.


This PR fixes a bug that was introduced in: #16021

A user setting a protocol in proxy-defaults would cause tproxy implicit upstreams to not honor the upstream service's protocol set in its ServiceDefaults.Protocol field, and would instead always use the proxy-defaults value.

Due to the fact that upstreams configured with "tcp" can successfully contact upstream "http" services, this issue was not recognized until recently (a proxy-defaults with "tcp" and a listening service with "http" would make successful requests, but not the opposite).

As a temporary work-around, users experiencing this issue can explicitly set the protocol on the ServiceDefaults.UpstreamConfig.Overrides, which should take precedence.

The fix in this PR removes the proxy-defaults protocol from the wildcard upstream that tproxy uses to configure implicit upstreams. When the protocol was included, it would always overwrite the value during discovery chain compilation, which was not correct. The discovery chain compiler also consumes proxy defaults to determine the protocol, so simply excluding it from the wildcard upstream config map resolves the issue.


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/derekm/NET-4679/fix-tproxy-protocol/nationally-splendid-ladybug branch from 3bd4e4f to 521889d Compare July 5, 2023 14:32
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/derekm/NET-4679/fix-tproxy-protocol/nationally-splendid-ladybug branch from 49f978d to 39e997e Compare July 5, 2023 14:32
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@hc-github-team-consul-core hc-github-team-consul-core merged commit 628b318 into release/1.16.x Jul 5, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/derekm/NET-4679/fix-tproxy-protocol/nationally-splendid-ladybug branch July 5, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants