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 [NET-5217] Apply K8s node locality to services and sidecars into release/1.2.x #2752

Conversation

hc-github-team-consul-core

Backport

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

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


Locality-aware routing is based on proxy locality rather than the proxied service. Ensure we propagate locality to both when registering services.

Backporting only to 1.2.x since this feature was introduced in Consul 1.16.0.

Changes proposed in this PR:

  • Apply K8s node locality to sidecar proxies in addition to services

How I've tested this PR:

  • Added coverage for proxy config field to existing test
  • Hand-tested w/ HashiCups demo:
❯ kubectl label node kind-control-plane topology.kubernetes.io/region="us-east-2" --overwrite
node/kind-control-plane labeled
❯ kubectl label node kind-control-plane topology.kubernetes.io/zone="us-east-2a" --overwrite
node/kind-control-plane labeled
Service: (*structs.NodeService)(0x4002ff6900)({
	Kind: (structs.ServiceKind) (len=13) "connect-proxy",
	ID: (string) (len=55) "products-api-cf494ccb9-m97kf-products-api-sidecar-proxy",
	Service: (string) (len=26) "products-api-sidecar-proxy",
	...
	EnableTagOverride: (bool) false,
	Locality: (*structs.Locality)(0x4002771fe0)({
		Region: (string) (len=9) "us-east-2",
		Zone: (string) (len=10) "us-east-2a"
	}),

How I expect reviewers to test this PR: 👀

Checklist:


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/zalimeni/net-5217-derive-proxy-locality-from-parent-service/suitably-charmed-goat branch from e7f74fc to 1c17f15 Compare August 10, 2023 15:29
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/zalimeni/net-5217-derive-proxy-locality-from-parent-service/suitably-charmed-goat branch from 777e731 to 5f1442a Compare August 10, 2023 15:29
@zalimeni
Copy link
Member

Closing as prior changes to apply locality were not backported

@zalimeni zalimeni closed this Aug 17, 2023
auto-merge was automatically disabled August 17, 2023 19:01

Pull request was closed

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.

2 participants