Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Backport of Support routing to Consul services imported from a peer into release/0.5.x #465

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

hc-github-team-consul-api-gateway
Copy link
Contributor

Backport

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

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

merge conflict error: POST https://api.github.com/repos/hashicorp/consul-api-gateway/merges: 409 Merge conflict []

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


Changes proposed in this PR:

  • Add peer to the MeshService CRD enabling users to target a Consul service imported from a peering connection
  • Use peering endpoint instead of local catalog to resolve route backends that specify a peer

How I've tested this PR:

  • Follow Cluster Peering on Kubernetes guide
  • Install services into one datacenter and export one or all of them to the other datacenter (the local track of this guide is handy)
  • In the other datacenter (the one not containing the services), create a Gateway and HTTPRoute with a MeshService backend referencing one of the services imported from the other datacenter
  • Verify that you can reach the imported service through the Gateway

How I expect reviewers to test this PR:

See above

Checklist:

  • Tests added
  • CHANGELOG entry added

    Run make changelog-entry for guidance in authoring a changelog entry, and
    commit the resulting file, which should have a name matching your PR number.
    Entries should use imperative present tense (e.g. Add support for...)


Overview of commits

@hashicorp-cla
Copy link

hashicorp-cla commented Nov 22, 2022

CLA assistant check
All committers have signed the CLA.

@andrewstucki andrewstucki added pr/no-changelog Skip the CI check that requires a changelog entry pr/conformance Run conformance tests from kubernetes-sigs/gateway-api labels Nov 22, 2022
@andrewstucki andrewstucki marked this pull request as ready for review November 22, 2022 01:54
nathancoleman and others added 2 commits November 21, 2022 20:55
* Stub func for finding service imported from peer

* Add peerName to MeshService CRD, fork service lookup when specified

* Use "Peer" instead of "PeerName" for consistency

* Add changelog entry

* Return Consul resolution error when no matching service name from peer

* Add unit test coverage for resolving of imported service from peer

* Remove unnecessary mock generation target

* go mod tidy

* Consume latest tag of consul/api containing dependencies

* Resolve dependency issues from merge

* Add Peerings to Consul client interface

* Adjust testing strategy to account for hot swap of Consul client
@andrewstucki andrewstucki force-pushed the backport/peering/blatantly-amazed-goat branch from 4324f70 to 6adc133 Compare November 22, 2022 01:55
@andrewstucki andrewstucki merged commit 50fb333 into release/0.5.x Nov 22, 2022
@andrewstucki andrewstucki deleted the backport/peering/blatantly-amazed-goat branch November 22, 2022 02:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr/conformance Run conformance tests from kubernetes-sigs/gateway-api pr/no-changelog Skip the CI check that requires a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants