Commit Graph

19800 Commits (c5b6a0811c49dda6369b6a11c2a36d137a8f4dd6)

Author SHA1 Message Date
hc-github-team-consul-core c5b6a0811c
backport of commit ac9cd49a09 (#17447)
Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-05-24 21:04:36 -04:00
hc-github-team-consul-core 6c7c0cf66d
Backport of Fix namespaced peer service updates / deletes. into release/1.15.x (#17458)
* backport of commit dc995c18fd

* backport of commit 169a3279b6

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-05-24 21:55:16 +00:00
hc-github-team-consul-core 58806aa0a8
backport of commit a6322d8c94 (#17444)
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
2023-05-24 16:05:01 +00:00
hc-github-team-consul-core a5960414a1
Backport of [OSS] gRPC Blocking Queries into release/1.15.x (#17441)
* backport of feat: initial grpc blocking queries (11b1dd2)

* backport of changelog and docs update (5ceef20)

---------

Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-24 11:35:45 -04:00
cskh 5526290892
[Release/1.15.x] net 3914 gha consul container test no splitting (#17425) 2023-05-23 14:06:48 -04:00
hc-github-team-consul-core 1cc9457e29
Backport of Only synthesize anonymous token in primary DC into release/1.15.x (#17431)
* backport of commit 1e48592aaa

* Add integration test for wan fed issue

* Add changelog

---------

Co-authored-by: Paul Glass <pglass@hashicorp.com>
2023-05-23 15:30:09 +00:00
John Murret 10d12cf3df
ci:upload test results to datadog (#17206) (#17302)
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
2023-05-23 03:29:21 -07:00
R.B. Boyer 16334439b0
[1.15.x] prototest: fix early return condition in AssertElementsMatch (#17417)
manual backport of #17416 to 1.15.x
2023-05-22 13:49:55 -05:00
hc-github-team-consul-core e2d9d3992f
Backport of docs: Reference pages for service-router and service-resolver config entries into release/1.15.x (#17397)
* no-op commit due to failed cherry-picking

* docs: Reference pages for service-router and service-resolver config entries (#17145)

* service-resolve configuration entry reference

* Updates

* missing backtick

* service router configuration entry reference

* link fixes + tab fixes

* link and tab fixes

* link fixes

* service resolver improvements

* hierarchy fixes

* spacing

* links + formatting

* proofing fixes

* mmore fixes

* Apply suggestions from code review

suggestions from code review for service resolver

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* policy sections edits

* service router code review

* Tables to sections - service router HCL

* YAML tables to sections

* formatting fixes

* converting tables to sections - service resolver

* final tables to sections

* Adjustments/alignments

* nanosecond fix

* Update website/content/docs/connect/config-entries/service-router.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* link to filter example config

---------

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/connect/config-entries/service-resolver.mdx

* merge fix

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
Co-authored-by: boruszak <jeffrey.boruszak@hashicorp.com>
2023-05-19 11:23:45 -07:00
Ashvitha 87d3f45ab5
Rename hcp-metrics-collector to consul-telemetry-collector (#17327) (#17412)
* Rename hcp-metrics-collector to consul-telemetry-collector

* Fix docs

* Fix doc comment

---------

Co-authored-by: Connor <connor.kelly@hashicorp.com>
2023-05-19 11:33:36 -04:00
hc-github-team-consul-core b345f184c2
backport of commit 5a29f9b4f7 (#17408)
Co-authored-by: trujillo-adam <ajosetru@gmail.com>
2023-05-18 17:15:21 +00:00
Jeff Boruszak ee06276cd4
docs: Fix merge conflicts (#17405)
* no-op commit due to failed cherry-picking

* docs: connect-service-upstreams annotation fixes (#17312)

* corrections

* fixes

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Switching order of labeled/unlabeled

---------

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Fix merge conflict

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-18 10:06:50 -07:00
hc-github-team-consul-core e01469b68d
Backport of docs: connect-service-upstreams annotation fixes into release/1.15.x (#17338)
* no-op commit due to failed cherry-picking

* docs: connect-service-upstreams annotation fixes (#17312)

* corrections

* fixes

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Update website/content/docs/k8s/annotations-and-labels.mdx

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

* Switching order of labeled/unlabeled

---------

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-17 15:12:59 -07:00
hc-github-team-consul-core ccf3af708d
Backport of Docs/igw docs day refactor into release/1.15.x (#17396)
* backport of commit 0afff9e337

* backport of commit fe56513759

* backport of commit 49a4951d89

* backport of commit 1995a5f37d

* backport of commit 1f39bdf3f4

* backport of commit 5a2e89f281

---------

Co-authored-by: trujillo-adam <ajosetru@gmail.com>
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
2023-05-17 14:00:57 -07:00
hc-github-team-consul-core 7dccf73d21
backport of commit ccf91c7b7f (#17384)
Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-05-16 10:17:02 +00:00
hc-github-team-consul-core 0beb371485
manual backport of docs/krastin/retitle (#17350)
Co-authored-by: Krastin Krastev <krastin@hashicorp.com>
2023-05-16 12:28:19 +03:00
hc-github-team-consul-core 50a7a07690
backport of commit 4e721eccac (#17314) 2023-05-15 14:56:16 -07:00
hc-github-team-consul-core b081268fc1
Backport of fix(connect envoy): set initial_fetch_timeout to wait for initial xDS… into release/1.15.x (#17361)
* backport of commit 530d192d7c

* backport of commit 13f9965316

---------

Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-15 20:00:05 +00:00
malizz 6a2c87739e
fix test on 1.15.x branch (#17374) 2023-05-15 12:15:21 -07:00
Eric Haberkorn ef072a84b8
sidecar-proxy refactor (#17336) 2023-05-15 10:50:29 -04:00
Dan Bond 71651953ef
agent: prevent very old servers re-joining a cluster with stale data (#17357)
Signed-off-by: Dan Bond <danbond@protonmail.com>
2023-05-15 13:14:13 +00:00
Hans Hasselberg 3967e33d7b
Manual backport 1.15.x of #17311 (#17356)
* [CC-4856] Add cloud stanza documentation

* Add environment variables to cloud descriptions

* reorder

---------

Co-authored-by: Jeremy Jacobson <jeremy.jacobson@hashicorp.com>
2023-05-15 14:21:16 +02:00
hc-github-team-consul-core 64c29e59fb
Backport of grpc: fix data race in balancer registration into release/1.15.x (#17351)
Registering gRPC balancers is thread-unsafe because they are stored in a
global map variable that is accessed without holding a lock. Therefore,
it's expected that balancers are registered _once_ at the beginning of
your program (e.g. in a package `init` function) and certainly not after
you've started dialing connections, etc.

> NOTE: this function must only be called during initialization time
> (i.e. in an init() function), and is not thread-safe.

While this is fine for us in production, it's challenging for tests that
spin up multiple agents in-memory. We currently register a balancer per-
agent which holds agent-specific state that cannot safely be shared.

This commit introduces our own registry that _is_ thread-safe, and
implements the Builder interface such that we can call gRPC's `Register`
method once, on start-up. It uses the same pattern as our resolver
registry where we use the dial target's host (aka "authority"), which is
unique per-agent, to determine which builder to use.
2023-05-15 12:34:17 +01:00
Hans Hasselberg 85fbc59e29
manual backport of #17296 to release/1.15.x (#17343)
* update hcp-sdk-go

* add version, datacenter and acl info

* fewer changes

* go mod tidy and lint

* less code

* remove duplicated dep

* fmt

* trigger ci
2023-05-13 23:18:46 +02:00
Hans Hasselberg 42eec33b0e
Update HCP bootstrapping to support existing clusters 1.15.x version (#17305)
* Persist HCP management token from server config

We want to move away from injecting an initial management token into
Consul clusters linked to HCP. The reasoning is that by using a separate
class of token we can have more flexibility in terms of allowing HCP's
token to co-exist with the user's management token.

Down the line we can also more easily adjust the permissions attached to
HCP's token to limit it's scope.

With these changes, the cloud management token is like the initial
management token in that iit has the same global management policy and
if it is created it effectively bootstraps the ACL system.

* Update SDK and mock HCP server

The HCP management token will now be sent in a special field rather than
as Consul's "initial management" token configuration.

This commit also updates the mock HCP server to more accurately reflect
the behavior of the CCM backend.

* Refactor HCP bootstrapping logic and add tests

We want to allow users to link Consul clusters that already exist to
HCP. Existing clusters need care when bootstrapped by HCP, since we do
not want to do things like change ACL/TLS settings for a running
cluster.

Additional changes:

* Deconstruct MaybeBootstrap so that it can be tested. The HCP Go SDK
  requires HTTPS to fetch a token from the Auth URL, even if the backend
  server is mocked. By pulling the hcp.Client creation out we can modify
  its TLS configuration in tests while keeping the secure behavior in
  production code.

* Add light validation for data received/loaded.

* Sanitize initial_management token from received config, since HCP will
  only ever use the CloudConfig.MangementToken.

* Add changelog entry

---------

Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-05-12 23:01:18 +02:00
Derek Menteer 4f99d24a29
Backport flaky-test fix to 1.15 (#17309)
* De-flake snapshot test (#17120)

* Add missing import to test.

* Swap retry t reference.

---------

Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2023-05-11 14:49:12 -05:00
R.B. Boyer 48a620cd68
[1.15.x] grpc: ensure grpc resolver correctly uses lan/wan addresses on servers (#17285)
The grpc resolver implementation is fed from changes to the
router.Router. Within the router there is a map of various areas storing
the addressing information for servers in those areas. All map entries
are of the WAN variety except a single special entry for the LAN.

Addressing information in the LAN "area" are local addresses intended
for use when making a client-to-server or server-to-server request.

The client agent correctly updates this LAN area when receiving lan serf
events, so by extension the grpc resolver works fine in that scenario.

The server agent only initially populates a single entry in the LAN area
(for itself) on startup, and then never mutates that area map again.
For normal RPCs a different structure is used for LAN routing.

Additionally when selecting a server to contact in the local datacenter
it will randomly select addresses from either the LAN or WAN addressed
entries in the map.

Unfortunately this means that the grpc resolver stack as it exists on
server agents is either broken or only accidentally functions by having
servers dial each other over the WAN-accessible address. If the operator
disables the serf wan port completely likely this incidental functioning
would break.

This PR enforces that local requests for servers (both for stale reads
or leader forwarded requests) exclusively use the LAN "area" information
and also fixes it so that servers keep that area up to date in the
router.

A test for the grpc resolver logic was added, as well as a higher level
full-stack test to ensure the externally perceived bug does not return.
2023-05-11 11:11:05 -05:00
hc-github-team-consul-core 49e8ae7b80
backport of commit 868926374a (#17307)
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
2023-05-11 16:09:11 +00:00
hc-github-team-consul-core 9b5f872ee7
backport of commit ec7a800577 (#17282)
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-05-10 08:13:37 -05:00
malizz 734d7a27f4
backport PR 15979 to 1.15.x (#17208)
* backport PR 15979 to 1.15.x

* fix test file

* fix proto generated file

* update unit tests

* fix merge conflict

* fix test
2023-05-09 17:25:50 -07:00
hc-github-team-consul-core 1aa4b3b9ba
Backport of snapshot: some improvments to the snapshot process into release/1.15.x (#17277)
* backport of commit 99c3322dc1

* backport of commit 757f22b518

* backport of commit 7eda9c7f22

* backport of commit 8124fb33ae

* backport of commit 164cada247

---------

Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-05-09 21:18:38 +00:00
hc-github-team-consul-core 5feb71e20c
Backport of Hash namespace+proxy ID when creating socket path into release/1.15.x (#17271)
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
2023-05-09 14:24:45 -06:00
hc-github-team-consul-core 2ad834ddb6
backport of commit 22f985470b (#17265)
Co-authored-by: Dan Bond <danbond@protonmail.com>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-05-09 20:17:25 +00:00
hc-github-team-consul-core e835cf81c0
Backport of Fix multiple issues related to proxycfg health queries. into release/1.15.x (#17268)
* backport of commit 464f79a5d3

* backport of commit ff4ba957b6

* backport of commit ab3e904470

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-05-09 19:33:17 +00:00
hc-github-team-consul-core 3348ff77a3
backport of commit 061804f941 (#17274)
Co-authored-by: freddygv <freddy@hashicorp.com>
2023-05-09 19:01:50 +00:00
John Murret 500178acfc
ci: remove test splitting for compatibility tests (#17166) (#17255)
* remove test splitting from compatibility-integration-tests

* enable on push

* remove ipv6 loopback fix

* re-add ipv6 loopback fix

* remove test splitting from upgrade-integration-tests

* remove test splitting from upgrade-integration-tests

* put test splitting back in for upgrade tests

* upgrade-integration tests-o
ne runner no retries
2023-05-09 04:26:41 -07:00
hc-github-team-consul-core bf7e8c30cf
Backport of upgrade test: use docker.mirror.hashicorp.services to avoid docker login into release/1.15.x (#17242)
* backport of commit 72decfe4cf

* backport of commit b86c1eb345

---------

Co-authored-by: cskh <hui.kang@hashicorp.com>
Co-authored-by: Dan Bond <danbond@protonmail.com>
2023-05-08 22:18:32 +00:00
hc-github-team-consul-core 2ab3184c61
manually import the change (#17239) 2023-05-08 17:54:23 -04:00
hc-github-team-consul-core 05e9af3fa5
backport of commit 3d11110c57 (#17253)
Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-05-08 21:44:54 +00:00
hc-github-team-consul-core 3a1ea224f3
Backport of Fix issue with peer stream node cleanup. into release/1.15.x (#17247)
* backport of commit 61a281a4d8

* backport of commit 28a83da088

* backport of commit 4feb116d11

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-05-08 15:32:35 -05:00
hc-github-team-consul-core 9cba115aa2
Backport of security: update go version to 1.20.4 into release/1.15.x (#17245)
* no-op commit due to failed cherry-picking

* security: update go version to 1.20.4 (#17240)

* update go version to 1.20.3

* add changelog

* rename changelog file to remove underscore

* update to use 1.20.4

* update change log entry to reflect 1.20.4

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-05-08 13:46:47 -06:00
Jared Kirschner b99de087c0
Docs/clarify connect language 2 backport 1.15 (#17233)
Remove outdated usage of "Consul Connect" instead of Consul service mesh.

The connect subsystem in Consul provides Consul's service mesh capabilities.
However, the term "Consul Connect" should not be used as an alternative to
the name "Consul service mesh".
2023-05-08 12:27:55 -04:00
hc-github-team-consul-core 4fd91e87ce
backport of commit 4bb7d00c22 (#17210)
Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
2023-05-02 20:46:53 +00:00
hc-github-team-consul-core 0045304ff5
backport of commit b7866911a7 (#17189)
Co-authored-by: Eric <eric@haberkorn.co>
2023-04-30 16:45:33 +00:00
hc-github-team-consul-core 3b069103b2
backport of commit 503134b3c7 (#17196)
Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
2023-04-29 00:33:06 +00:00
Freddy a1b3d0cc7f
Revert "[1.15.x][CC-4519] Include Consul NodeID in Envoy bootstrap metadata" (#17192) 2023-04-28 15:24:01 -06:00
R.B. Boyer ac4298aeba
[1.15.x] peering: ensure that merged central configs of peered upstreams for partitioned downstreams work (#17181)
Backport of #17179 into release/1.15.x
2023-04-28 16:04:51 -05:00
hc-github-team-consul-core 65f48d96ca
Backport of Sync .golangci.yml from ENT into release/1.15.x (#17182)
* no-op commit due to failed cherry-picking

* Manually fix backport

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Semir Patel <semir.patel@hashicorp.com>
2023-04-28 13:14:27 -05:00
hc-github-team-consul-core f048d35ef0
backport of commit 64dd11b00a (#17165)
Co-authored-by: Anita Akaeze <anita.akaeze@hashicorp.com>
2023-04-27 01:08:39 +00:00
Anita Akaeze 0232c6959b
Merge pull request #5288 from hashicorp/NET-3648_fix (#17164)
NET-3648: perform envoy version verification
2023-04-26 20:43:37 -04:00