Backport of Improve Transparent Proxy Virtual Services and Failovers into release/1.16.x#17768
Merged
hc-github-team-consul-core merged 1 commit intorelease/1.16.xfrom Jun 15, 2023
Conversation
4210218 to
077399b
Compare
github-team-consul-core-pr-approver
approved these changes
Jun 15, 2023
Collaborator
github-team-consul-core-pr-approver
left a comment
There was a problem hiding this comment.
Auto approved Consul Bot automated PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #17757 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 is intended to document some of the transparent proxy enhancements that were made for the 1.16 release.
Prior to these changes, transparent proxy deployments would not function properly for several failover scenarios. Most notably, when the number of service instances reached zero, the discovery chain watch would disappear for the corresponding service, causing the resolver to also disappear from proxycfg. This would result in the failover not applying.
With these changes, discovery chains will now continue to exist in the proxy configuration as long as one of the following config entry types also exists and shares a name with the targeted upstream service:
For example, when the following service-resolver exists:
It can be called via
http://my-primary-svc.virtual.consulvia tproxy. Traffic will be routed tomy-failover-svcduring failures, even when the number ofmy-primary-svcinstances is zero.Virtual services are now better supported as well:
In the above example, calls to
http://my-virtual-svc.virtual.consulwill redirect to themy-svcservice (provided an intention exists that allows access from the calling service source to the destinationmy-virtual-svc).Related issues:
#17375
#17099
#17533
Overview of commits