diff --git a/.changelog/17155.txt b/.changelog/17155.txt deleted file mode 100644 index 03cec33e991af..0000000000000 --- a/.changelog/17155.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:improvement -config: Add new `tls.defaults.verify_server_hostname` configuration option. This specifies the default value for any interfaces that support the `verify_server_hostname` option. -``` diff --git a/.changelog/17481.txt b/.changelog/17481.txt deleted file mode 100644 index 89ad16998e836..0000000000000 --- a/.changelog/17481.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -tlsutil: Default setting of ServerName field in outgoing TLS configuration for checks now handled by crypto/tls. -``` diff --git a/.changelog/17593.txt b/.changelog/17593.txt deleted file mode 100644 index 1f84e75f57427..0000000000000 --- a/.changelog/17593.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -docs: fix list of telemetry metrics -``` diff --git a/.changelog/17694.txt b/.changelog/17694.txt deleted file mode 100644 index 703b100d1d3a3..0000000000000 --- a/.changelog/17694.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -Windows: support consul connect envoy command on Windows -``` diff --git a/.changelog/17754.txt b/.changelog/17754.txt index 32272ec1ae911..56ab20dc213ef 100644 --- a/.changelog/17754.txt +++ b/.changelog/17754.txt @@ -1,3 +1,3 @@ ```release-note:feature -ui: Display the Consul agent version in the nodes list, and allow filtering and sorting of nodes based on versions. -``` \ No newline at end of file +ui: consul version is displayed in nodes list with filtering and sorting based on versions +``` diff --git a/.changelog/17831.txt b/.changelog/17831.txt deleted file mode 100644 index 2833bda1d5765..0000000000000 --- a/.changelog/17831.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:improvement -ca: Vault CA provider config no longer requires root_pki_path for secondary datacenters -``` diff --git a/.changelog/18007.txt b/.changelog/18007.txt deleted file mode 100644 index b963d2f77fcd6..0000000000000 --- a/.changelog/18007.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:improvement -Windows: Integration tests for Consul Windows VMs -``` diff --git a/.changelog/18300.txt b/.changelog/18300.txt deleted file mode 100644 index 717a697777e26..0000000000000 --- a/.changelog/18300.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:improvement -connect: update supported envoy versions to 1.24.10, 1.25.9, 1.26.4, 1.27.0 -``` diff --git a/.changelog/18303.txt b/.changelog/18303.txt new file mode 100644 index 0000000000000..4afc4473b7c90 --- /dev/null +++ b/.changelog/18303.txt @@ -0,0 +1,3 @@ +```release-note:improvement +connect: update supported envoy versions to 1.23.12, 1.24.10, 1.25.9, 1.26.4 +``` diff --git a/.changelog/18324.txt b/.changelog/18324.txt deleted file mode 100644 index 6d1f11a92e969..0000000000000 --- a/.changelog/18324.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -api-gateway: add retry and timeout filters -``` \ No newline at end of file diff --git a/.changelog/18367.txt b/.changelog/18367.txt deleted file mode 100644 index 578cf7091853f..0000000000000 --- a/.changelog/18367.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -dev-mode: Fix dev mode has new line in responses. Now new line is added only when url has pretty query parameter. -``` diff --git a/.changelog/18439.txt b/.changelog/18439.txt deleted file mode 100644 index dd12738d5c387..0000000000000 --- a/.changelog/18439.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -Support custom watches on the Consul Controller framework. -``` diff --git a/.changelog/18560.txt b/.changelog/18560.txt deleted file mode 100644 index 118fad95306d7..0000000000000 --- a/.changelog/18560.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:improvement -ui: Use Community verbiage -``` \ No newline at end of file diff --git a/.changelog/_18366.txt b/.changelog/_18366.txt deleted file mode 100644 index 02a3599c2c27c..0000000000000 --- a/.changelog/_18366.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -config-entry(api-gateway): (Enterprise only) Add GatewayPolicy to APIGateway Config Entry listeners -``` diff --git a/.changelog/_18422.txt b/.changelog/_18422.txt deleted file mode 100644 index 4f0efbbe3b278..0000000000000 --- a/.changelog/_18422.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -config-entry(api-gateway): (Enterprise only) Add JWTFilter to HTTPRoute Filters -``` diff --git a/.copywrite.hcl b/.copywrite.hcl index dbe52115c27ea..fa06f76e2ac69 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -1,8 +1,8 @@ schema_version = 1 project { - license = "BUSL-1.1" - copyright_year = 2023 + license = "MPL-2.0" + copyright_year = 2013 # (OPTIONAL) A list of globs that should not have copyright/license headers. # Supports doublestar glob patterns for more flexibility in defining which @@ -19,18 +19,11 @@ project { # ignore specific test data files "agent/uiserver/testdata/**", - "internal/resourcehcl/testdata/**", # generated files "agent/structs/structs.deepcopy.go", "agent/proxycfg/proxycfg.deepcopy.go", "agent/grpc-middleware/rate_limit_mappings.gen.go", "agent/uiserver/dist/**", - - # licensed under MPL - ignoring for now until the copywrite tool can support - # multiple licenses per repo. - "sdk/**", - "api/**", - "proto-public/**", ] } diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 16480bb6f4f94..36f9456693ff3 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 blank_issues_enabled: false contact_links: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d618028e100bd..05387a7c9b803 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 version: 2 updates: diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index fd39f2ccab423..e10f3c1376ef0 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 pr/dependencies: - vendor/**/* diff --git a/.github/scripts/changelog_checker.sh b/.github/scripts/changelog_checker.sh index a214ef2477979..e6b4d7f85dcc0 100755 --- a/.github/scripts/changelog_checker.sh +++ b/.github/scripts/changelog_checker.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/get_runner_classes.sh b/.github/scripts/get_runner_classes.sh index abd3f1bce2d01..59748ab579c57 100755 --- a/.github/scripts/get_runner_classes.sh +++ b/.github/scripts/get_runner_classes.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # # This script generates tag-sets that can be used as runs-on: values to select runners. diff --git a/.github/scripts/get_runner_classes_windows.sh b/.github/scripts/get_runner_classes_windows.sh deleted file mode 100755 index d9f46488798f9..0000000000000 --- a/.github/scripts/get_runner_classes_windows.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -# -# This script generates tag-sets that can be used as runs-on: values to select runners. - -set -euo pipefail - -case "$GITHUB_REPOSITORY" in - *-enterprise) - # shellcheck disable=SC2129 - echo "compute-small=['self-hosted', 'windows', 'small']" >> "$GITHUB_OUTPUT" - echo "compute-medium=['self-hosted', 'windows', 'medium']" >> "$GITHUB_OUTPUT" - echo "compute-large=['self-hosted', 'windows', 'large']" >> "$GITHUB_OUTPUT" - # m5d.8xlarge is equivalent to our xl custom runner in CE - echo "compute-xl=['self-hosted', 'ondemand', 'windows', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT" - ;; - *) - # shellcheck disable=SC2129 - echo "compute-small=['windows-2019']" >> "$GITHUB_OUTPUT" - echo "compute-medium=['windows-2019']" >> "$GITHUB_OUTPUT" - echo "compute-large=['windows-2019']" >> "$GITHUB_OUTPUT" - echo "compute-xl=['windows-2019']" >> "$GITHUB_OUTPUT" - ;; -esac diff --git a/.github/scripts/metrics_checker.sh b/.github/scripts/metrics_checker.sh index 37659de4df8bd..a34cdf12fbec3 100755 --- a/.github/scripts/metrics_checker.sh +++ b/.github/scripts/metrics_checker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -uo pipefail diff --git a/.github/scripts/notify_slack.sh b/.github/scripts/notify_slack.sh index f52e67f2fc267..eacefaa91a439 100755 --- a/.github/scripts/notify_slack.sh +++ b/.github/scripts/notify_slack.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -uo pipefail diff --git a/.github/scripts/rerun_fails_report.sh b/.github/scripts/rerun_fails_report.sh index 90bae7a03a59d..ac6b7cf2ff9da 100755 --- a/.github/scripts/rerun_fails_report.sh +++ b/.github/scripts/rerun_fails_report.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # # Add a comment on the github PR if there were any rerun tests. diff --git a/.github/scripts/set_test_package_matrix.sh b/.github/scripts/set_test_package_matrix.sh index da8b6d563c37a..5608a83974024 100755 --- a/.github/scripts/set_test_package_matrix.sh +++ b/.github/scripts/set_test_package_matrix.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail export RUNNER_COUNT=$1 diff --git a/.github/scripts/verify_artifact.sh b/.github/scripts/verify_artifact.sh index 3aa9e0848dfb3..48bfede1cb33f 100755 --- a/.github/scripts/verify_artifact.sh +++ b/.github/scripts/verify_artifact.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/verify_bin.sh b/.github/scripts/verify_bin.sh index dc5ac9f9f0e34..ff572d87fae9e 100755 --- a/.github/scripts/verify_bin.sh +++ b/.github/scripts/verify_bin.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/verify_deb.sh b/.github/scripts/verify_deb.sh index c6b6926c5d1a2..84a9a10c85639 100755 --- a/.github/scripts/verify_deb.sh +++ b/.github/scripts/verify_deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/verify_docker.sh b/.github/scripts/verify_docker.sh index ea9180920f8ae..fbbeb7dff464a 100755 --- a/.github/scripts/verify_docker.sh +++ b/.github/scripts/verify_docker.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/verify_envoy_version.sh b/.github/scripts/verify_envoy_version.sh index f9067eaa37f71..773431f50bc85 100755 --- a/.github/scripts/verify_envoy_version.sh +++ b/.github/scripts/verify_envoy_version.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/scripts/verify_rpm.sh b/.github/scripts/verify_rpm.sh index 96cd658eef3d5..17709a1d90e1b 100755 --- a/.github/scripts/verify_rpm.sh +++ b/.github/scripts/verify_rpm.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/.github/workflows/bot-auto-approve.yaml b/.github/workflows/bot-auto-approve.yaml index 911fc27f46968..2b652388999c2 100644 --- a/.github/workflows/bot-auto-approve.yaml +++ b/.github/workflows/bot-auto-approve.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest if: github.actor == 'hc-github-team-consul-core' steps: - - uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1 + - uses: hmarr/auto-approve-action@v3 with: review-message: "Auto approved Consul Bot automated PR" github-token: ${{ secrets.MERGE_APPROVE_TOKEN }} diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 2a8d77c5880fd..b7c89ff3e75dc 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -12,11 +12,11 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v3 - name: Run lychee link checker id: lychee - uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421 # v1.8.0 + uses: lycheeverse/lychee-action@v1.6.1 with: args: ./website/content/docs/ --base https://developer.hashicorp.com/ --exclude-all-private --exclude '\.(svg|gif|jpg|png)' --exclude 'manage\.auth0\.com' --accept 403 --max-concurrency=24 --no-progress --verbose # Fail GitHub action when broken links are found? @@ -26,7 +26,7 @@ jobs: - name: Create GitHub Issue From lychee output file if: env.lychee_exit_code != 0 - uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v4.0.1 + uses: peter-evans/create-issue-from-file@v4 with: title: Link Checker Report content-filepath: ./lychee/out.md diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 2977a73b6eb07..f57ea3527d485 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -13,7 +13,7 @@ permissions: contents: read env: - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + GOPRIVATE: github.com/hashicorp jobs: setup: @@ -25,7 +25,7 @@ jobs: compute-large: ${{ steps.setup-outputs.outputs.compute-large }} compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 - id: setup-outputs name: Setup outputs run: ./.github/scripts/get_runner_classes.sh @@ -56,14 +56,14 @@ jobs: kv/data/github/${{ github.repository }}/dockerhub username | DOCKERHUB_USERNAME; kv/data/github/${{ github.repository }}/dockerhub token | DOCKERHUB_TOKEN; - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 # NOTE: ENT specific step as we need to set elevated GitHub permissions. - name: Setup Git if: ${{ endsWith(github.repository, '-enterprise') }} run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 with: go-version-file: 'go.mod' @@ -78,17 +78,17 @@ jobs: echo "GITHUB_BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 + uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # pin@v2.4.1 # NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in CE. - name: Login to Docker Hub - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # pin@v2.1.0 with: username: ${{ endsWith(github.repository, '-enterprise') && steps.secrets.outputs.DOCKERHUB_USERNAME || secrets.DOCKERHUB_USERNAME }} password: ${{ endsWith(github.repository, '-enterprise') && steps.secrets.outputs.DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN }} - name: Docker build and push - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # pin@v4.0.0 with: context: ./bin file: ./build-support/docker/Consul-Dev.dockerfile diff --git a/.github/workflows/build-distros.yml b/.github/workflows/build-distros.yml index 602acb18c1a9b..10c5208933412 100644 --- a/.github/workflows/build-distros.yml +++ b/.github/workflows/build-distros.yml @@ -27,7 +27,7 @@ jobs: compute-large: ${{ steps.setup-outputs.outputs.compute-large }} compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - id: setup-outputs name: Setup outputs run: ./.github/scripts/get_runner_classes.sh @@ -50,7 +50,7 @@ jobs: XC_OS: "freebsd linux windows" runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git @@ -74,7 +74,7 @@ jobs: XC_OS: "darwin freebsd linux solaris windows" runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git @@ -99,7 +99,7 @@ jobs: CGO_ENABLED: 1 GOOS: linux steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git @@ -125,7 +125,7 @@ jobs: - check-go-mod runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8af561716a21b..2d357acfb9e14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: pre-version: ${{ steps.set-product-version.outputs.prerelease-product-version }} shared-ldflags: ${{ steps.shared-ldflags.outputs.shared-ldflags }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: set product version id: set-product-version uses: hashicorp/actions-set-product-version@v1 @@ -66,7 +66,7 @@ jobs: filepath: ${{ steps.generate-metadata-file.outputs.filepath }} steps: - name: 'Checkout directory' - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Generate metadata file id: generate-metadata-file uses: hashicorp/actions-generate-metadata@v1 @@ -98,10 +98,10 @@ jobs: name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup with node and yarn - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: '14' cache: 'yarn' @@ -187,10 +187,10 @@ jobs: name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup with node and yarn - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: '14' cache: 'yarn' @@ -238,10 +238,10 @@ jobs: name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup with node and yarn - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: '14' cache: 'yarn' @@ -293,7 +293,7 @@ jobs: version: ${{needs.set-product-version.outputs.product-version}} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # Strip everything but MAJOR.MINOR from the version string and add a `-dev` suffix # This naming convention will be used ONLY for per-commit dev images @@ -327,7 +327,7 @@ jobs: version: ${{needs.set-product-version.outputs.product-version}} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: hashicorp/actions-docker-build@v1 with: version: ${{env.version}} @@ -347,7 +347,7 @@ jobs: version: ${{needs.set-product-version.outputs.product-version}} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # Strip everything but MAJOR.MINOR from the version string and add a `-dev` suffix # This naming convention will be used ONLY for per-commit dev images @@ -388,7 +388,7 @@ jobs: name: Verify ${{ matrix.arch }} linux binary steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 if: ${{ endsWith(github.repository, '-enterprise') || matrix.arch != 's390x' }} - name: Download ${{ matrix.arch }} zip @@ -398,7 +398,7 @@ jobs: name: ${{ env.zip_name }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0 if: ${{ matrix.arch == 'arm' || matrix.arch == 'arm64' }} with: # this should be a comma-separated string as opposed to an array @@ -421,7 +421,7 @@ jobs: name: Verify amd64 darwin binary steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Download amd64 darwin zip uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 @@ -452,7 +452,7 @@ jobs: name: Verify ${{ matrix.arch }} debian package steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Set package version run: | @@ -468,7 +468,7 @@ jobs: name: ${{ env.pkg_name }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0 with: platforms: all @@ -493,7 +493,7 @@ jobs: name: Verify ${{ matrix.arch }} rpm steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Set package version run: | @@ -509,7 +509,7 @@ jobs: name: ${{ env.pkg_name }} - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0 with: platforms: all diff --git a/.github/workflows/ce-merge-trigger.yml b/.github/workflows/ce-merge-trigger.yml index 30a6b5fd90dff..4de4751660d1c 100644 --- a/.github/workflows/ce-merge-trigger.yml +++ b/.github/workflows/ce-merge-trigger.yml @@ -8,7 +8,7 @@ on: - closed branches: - main - - release/** + - 'release/*.*.x' jobs: trigger-ce-merge: diff --git a/.github/workflows/changelog-checker.yml b/.github/workflows/changelog-checker.yml index 62b906eda3e66..d00717e2f0492 100644 --- a/.github/workflows/changelog-checker.yml +++ b/.github/workflows/changelog-checker.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 # by default the checkout action doesn't checkout all branches diff --git a/.github/workflows/embedded-asset-checker.yml b/.github/workflows/embedded-asset-checker.yml index 38879945e209c..4bb07771bd68f 100644 --- a/.github/workflows/embedded-asset-checker.yml +++ b/.github/workflows/embedded-asset-checker.yml @@ -20,7 +20,7 @@ jobs: if: "! ( contains(github.event.pull_request.labels.*.name, 'pr/update-ui-assets') || github.event.pull_request.user.login == 'hc-github-team-consul-core' )" runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 # by default the checkout action doesn't checkout all branches diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 63d02962fb013..d8b260360462b 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -23,7 +23,7 @@ jobs: compute-large: ${{ steps.setup-outputs.outputs.compute-large }} compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 - id: setup-outputs name: Setup outputs run: ./.github/scripts/get_runner_classes.sh @@ -35,9 +35,9 @@ jobs: run: working-directory: ui steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0 with: node-version: '16' @@ -55,9 +55,9 @@ jobs: needs: setup runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0 with: node-version: '16' @@ -84,9 +84,9 @@ jobs: CONSUL_NSPACES_ENABLED: ${{ endsWith(github.repository, '-enterprise') && 1 || 0 }} # NOTE: this should be 1 in ENT. JOBS: 2 # limit parallelism for broccoli-babel-transpiler steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0 with: node-version: '16' @@ -94,7 +94,7 @@ jobs: run: npm install -g yarn - name: Install Chrome - uses: browser-actions/setup-chrome@c485fa3bab6be59dce18dbc18ef6ab7cbc8ff5f1 # v1.2.0 + uses: browser-actions/setup-chrome@29abc1a83d1d71557708563b4bc962d0f983a376 # pin@v1.2.1 - name: Install dependencies working-directory: ui diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 9db458ed5d51d..ce23819306657 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -48,7 +48,7 @@ jobs: compute-large: ${{ steps.setup-outputs.outputs.compute-large }} compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - id: setup-outputs name: Setup outputs run: ./.github/scripts/get_runner_classes.sh @@ -68,7 +68,7 @@ jobs: - setup runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(github.repository, '-enterprise') }} @@ -91,36 +91,35 @@ jobs: - name: Notify Slack if: ${{ failure() }} run: .github/scripts/notify_slack.sh - # Temporarily changing until the situation with license headers in the generated code can be worked out - # check-generated-deep-copy: - # needs: - # - setup - # runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} - # steps: - # - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - # # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - # - name: Setup Git - # if: ${{ endsWith(github.repository, '-enterprise') }} - # run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - # - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - # with: - # go-version-file: 'go.mod' - # - run: make --always-make deep-copy - # - run: | - # if ! git diff --exit-code; then - # echo "Generated code was not updated correctly" - # exit 1 - # fi - # - name: Notify Slack - # if: ${{ failure() }} - # run: .github/scripts/notify_slack.sh + check-generated-deep-copy: + needs: + - setup + runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} + steps: + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. + - name: Setup Git + if: ${{ endsWith(github.repository, '-enterprise') }} + run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + with: + go-version-file: 'go.mod' + - run: make --always-make deep-copy + - run: | + if ! git diff --exit-code; then + echo "Generated code was not updated correctly" + exit 1 + fi + - name: Notify Slack + if: ${{ failure() }} + run: .github/scripts/notify_slack.sh lint-enums: needs: - setup runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(github.repository, '-enterprise') }} @@ -138,7 +137,7 @@ jobs: - setup runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" @@ -155,7 +154,7 @@ jobs: - setup runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(github.repository, '-enterprise') }} @@ -481,8 +480,7 @@ jobs: needs: - conditional-skip - setup - # Reenable later - #- check-generated-deep-copy + - check-generated-deep-copy - check-generated-protobuf - check-go-mod - lint-consul-retry diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index 42483d92b1645..01e7e13f8bc44 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -11,8 +11,8 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 + - uses: actions/checkout@v2 + - uses: actions-ecosystem/action-remove-labels@v1 with: labels: | waiting-reply diff --git a/.github/workflows/jira-issues.yaml b/.github/workflows/jira-issues.yaml index c136dfd69a78c..d595e5f5af8c6 100644 --- a/.github/workflows/jira-issues.yaml +++ b/.github/workflows/jira-issues.yaml @@ -16,7 +16,7 @@ jobs: name: Jira Community Issue sync steps: - name: Login - uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3 + uses: atlassian/gajira-login@v3.0.0 env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -40,7 +40,7 @@ jobs: - name: Create ticket if an issue is filed, or if PR not by a team member is opened if: github.event.action == 'opened' - uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1 + uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: NET issuetype: "${{ steps.set-ticket-type.outputs.TYPE }}" @@ -60,7 +60,7 @@ jobs: # Education Jira - name: Create ticket in Education board an issue is filed, or if PR not by a team member is opened if: github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'type/docs') - uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1 + uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: CE issuetype: "${{ steps.set-ticket-type.outputs.TYPE }}" @@ -77,28 +77,28 @@ jobs: - name: Search if: github.event.action != 'opened' id: search - uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2 + uses: tomhjp/gh-action-jira-search@v0.2.2 with: # cf[10089] is Issue Link (use JIRA API to retrieve) jql: 'issuetype = "${{ steps.set-ticket-type.outputs.TYPE }}" and cf[10089] = "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"' - name: Sync comment if: github.event.action == 'created' && steps.search.outputs.issue - uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0 + uses: tomhjp/gh-action-jira-comment@v0.2.0 with: issue: ${{ steps.search.outputs.issue }} comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}" - name: Close ticket if: ( github.event.action == 'closed' || github.event.action == 'deleted' ) && steps.search.outputs.issue - uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # v3 + uses: atlassian/gajira-transition@v3.0.1 with: issue: ${{ steps.search.outputs.issue }} transition: "Closed" - name: Reopen ticket if: github.event.action == 'reopened' && steps.search.outputs.issue - uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # v3 + uses: atlassian/gajira-transition@v3.0.1 with: issue: ${{ steps.search.outputs.issue }} transition: "To Do" diff --git a/.github/workflows/jira-pr.yaml b/.github/workflows/jira-pr.yaml index f63f7af531620..9bce26588ebdd 100644 --- a/.github/workflows/jira-pr.yaml +++ b/.github/workflows/jira-pr.yaml @@ -14,7 +14,7 @@ jobs: name: Jira sync steps: - name: Login - uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3 + uses: atlassian/gajira-login@v3.0.0 env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -59,7 +59,7 @@ jobs: - name: Create ticket if an issue is filed, or if PR not by a team member is opened if: ( github.event.action == 'opened' && steps.is-team-member.outputs.MESSAGE == 'false' ) - uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1 + uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: NET issuetype: "${{ steps.set-ticket-type.outputs.TYPE }}" @@ -79,7 +79,7 @@ jobs: # Education Jira - name: Create ticket in Education board an issue is filed, or if PR not by a team member is opened if: github.event.action == 'opened' && steps.is-team-member.outputs.MESSAGE == 'false' && contains(github.event.issue.labels.*.name, 'type/docs') - uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1 + uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: CE issuetype: "${{ steps.set-ticket-type.outputs.TYPE }}" @@ -91,28 +91,28 @@ jobs: - name: Search if: github.event.action != 'opened' id: search - uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2 + uses: tomhjp/gh-action-jira-search@v0.2.2 with: # cf[10089] is Issue Link (use JIRA API to retrieve) jql: 'issuetype = "${{ steps.set-ticket-type.outputs.TYPE }}" and cf[10089] = "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"' - name: Sync comment if: github.event.action == 'created' && steps.search.outputs.issue - uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0 + uses: tomhjp/gh-action-jira-comment@v0.2.0 with: issue: ${{ steps.search.outputs.issue }} comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}" - name: Close ticket if: ( github.event.action == 'closed' || github.event.action == 'deleted' ) && steps.search.outputs.issue - uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # v3 + uses: atlassian/gajira-transition@v3.0.1 with: issue: ${{ steps.search.outputs.issue }} transition: "Closed" - name: Reopen ticket if: github.event.action == 'reopened' && steps.search.outputs.issue - uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # v3 + uses: atlassian/gajira-transition@v3.0.1 with: issue: ${{ steps.search.outputs.issue }} transition: "To Do" diff --git a/.github/workflows/nightly-test-1.16.x.yaml b/.github/workflows/nightly-test-1.12.x.yaml similarity index 75% rename from .github/workflows/nightly-test-1.16.x.yaml rename to .github/workflows/nightly-test-1.12.x.yaml index b441eca5d0f59..c09cc4864b89d 100644 --- a/.github/workflows/nightly-test-1.16.x.yaml +++ b/.github/workflows/nightly-test-1.12.x.yaml @@ -1,28 +1,27 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Nightly Frontend Test 1.16.x +name: Nightly Test 1.12.x on: schedule: - cron: '0 4 * * *' workflow_dispatch: {} env: - EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition - BRANCH: "release/1.16.x" - BRANCH_NAME: "release-1.16.x" # Used for naming artifacts - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition + BRANCH: "release/1.12.x" + BRANCH_NAME: "release-1.12.x" # Used for naming artifacts jobs: frontend-test-workspace-node: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -49,12 +48,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 0 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -71,7 +70,7 @@ jobs: run: make build-ci - name: Upload CE Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -88,12 +87,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -105,7 +104,7 @@ jobs: run: make deps - name: Download CE Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -121,12 +120,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 1 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -143,7 +142,7 @@ jobs: run: make build-ci - name: Upload ENT Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -160,12 +159,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -177,7 +176,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -191,12 +190,12 @@ jobs: runs-on: ubuntu-latest needs: [frontend-build-ent] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -208,7 +207,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -224,7 +223,7 @@ jobs: steps: - name: Slack Notification id: slack - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@v1.19 with: payload: | { diff --git a/.github/workflows/nightly-test-1.13.x.yaml b/.github/workflows/nightly-test-1.13.x.yaml index f314a475dfbd7..6139eb4bc1e1a 100644 --- a/.github/workflows/nightly-test-1.13.x.yaml +++ b/.github/workflows/nightly-test-1.13.x.yaml @@ -1,28 +1,27 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Nightly Frontend Test 1.13.x +name: Nightly Test 1.13.x on: schedule: - cron: '0 4 * * *' workflow_dispatch: {} env: - EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition + EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition BRANCH: "release/1.13.x" - BRANCH_NAME: "release-1.13.x" # Used for naming artifacts - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + BRANCH_NAME: "release-1.13.x" # Used for naming artifacts jobs: frontend-test-workspace-node: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -49,12 +48,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 0 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -71,7 +70,7 @@ jobs: run: make build-ci - name: Upload CE Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -88,12 +87,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -105,7 +104,7 @@ jobs: run: make deps - name: Download CE Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -121,12 +120,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 1 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -143,7 +142,7 @@ jobs: run: make build-ci - name: Upload ENT Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -160,12 +159,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -177,7 +176,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -191,12 +190,12 @@ jobs: runs-on: ubuntu-latest needs: [frontend-build-ent] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -208,7 +207,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -224,7 +223,7 @@ jobs: steps: - name: Slack Notification id: slack - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@v1.19 with: payload: | { diff --git a/.github/workflows/nightly-test-1.14.x.yaml b/.github/workflows/nightly-test-1.14.x.yaml index 11fb011d13571..9b310f59065dc 100644 --- a/.github/workflows/nightly-test-1.14.x.yaml +++ b/.github/workflows/nightly-test-1.14.x.yaml @@ -1,28 +1,27 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Nightly Frontend Test 1.14.x +name: Nightly Test 1.14.x on: schedule: - cron: '0 4 * * *' workflow_dispatch: {} env: - EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition + EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition BRANCH: "release/1.14.x" - BRANCH_NAME: "release-1.14.x" # Used for naming artifacts - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + BRANCH_NAME: "release-1.14.x" # Used for naming artifacts jobs: frontend-test-workspace-node: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -49,12 +48,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 0 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -71,7 +70,7 @@ jobs: run: make build-ci - name: Upload CE Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -88,12 +87,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -105,7 +104,7 @@ jobs: run: make deps - name: Download CE Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -121,12 +120,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 1 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -143,7 +142,7 @@ jobs: run: make build-ci - name: Upload ENT Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -160,12 +159,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -177,7 +176,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -191,12 +190,12 @@ jobs: runs-on: ubuntu-latest needs: [frontend-build-ent] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -208,7 +207,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -224,7 +223,7 @@ jobs: steps: - name: Slack Notification id: slack - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@v1.19 with: payload: | { diff --git a/.github/workflows/nightly-test-1.15.x.yaml b/.github/workflows/nightly-test-1.15.x.yaml index a98eb73070b36..9048abb4a04e4 100644 --- a/.github/workflows/nightly-test-1.15.x.yaml +++ b/.github/workflows/nightly-test-1.15.x.yaml @@ -1,28 +1,27 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Nightly Frontend Test 1.15.x +name: Nightly Test 1.15.x on: schedule: - cron: '0 4 * * *' workflow_dispatch: {} env: - EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition + EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition BRANCH: "release/1.15.x" - BRANCH_NAME: "release-1.15.x" # Used for naming artifacts - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + BRANCH_NAME: "release-1.15.x" # Used for naming artifacts jobs: frontend-test-workspace-node: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -49,12 +48,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 0 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -71,7 +70,7 @@ jobs: run: make build-ci - name: Upload CE Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -88,12 +87,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -105,7 +104,7 @@ jobs: run: make deps - name: Download CE Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -121,12 +120,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 1 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -143,7 +142,7 @@ jobs: run: make build-ci - name: Upload ENT Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -160,12 +159,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -177,7 +176,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -191,12 +190,12 @@ jobs: runs-on: ubuntu-latest needs: [frontend-build-ent] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -208,7 +207,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -224,7 +223,7 @@ jobs: steps: - name: Slack Notification id: slack - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@v1.19 with: payload: | { diff --git a/.github/workflows/nightly-test-integrations-1.15.x.yml b/.github/workflows/nightly-test-integrations-1.15.x.yml deleted file mode 100644 index b6cdda4650c71..0000000000000 --- a/.github/workflows/nightly-test-integrations-1.15.x.yml +++ /dev/null @@ -1,309 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -name: Nightly test-integrations 1.15.x - -on: - schedule: - # Run nightly at 1AM UTC/9PM EST/6PM PST - - cron: '* 1 * * *' - workflow_dispatch: {} - -env: - TEST_RESULTS_DIR: /tmp/test-results - TEST_RESULTS_ARTIFACT_NAME: test-results - CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }} - GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }} - GOTESTSUM_VERSION: "1.10.1" - CONSUL_BINARY_UPLOAD_NAME: consul-bin - # strip the hashicorp/ off the front of github.repository for consul - CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps - BRANCH: "release/1.15.x" - BRANCH_NAME: "release-1.15.x" # Used for naming artifacts - -jobs: - setup: - runs-on: ubuntu-latest - name: Setup - outputs: - compute-small: ${{ steps.runners.outputs.compute-small }} - compute-medium: ${{ steps.runners.outputs.compute-medium }} - compute-large: ${{ steps.runners.outputs.compute-large }} - compute-xl: ${{ steps.runners.outputs.compute-xl }} - enterprise: ${{ steps.runners.outputs.enterprise }} - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - id: runners - run: .github/scripts/get_runner_classes.sh - - dev-build: - needs: [setup] - uses: ./.github/workflows/reusable-dev-build.yml - with: - runs-on: ${{ needs.setup.outputs.compute-large }} - repository-name: ${{ github.repository }} - uploaded-binary-name: 'consul-bin' - branch-name: "release/1.15.x" - secrets: - elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} - - generate-envoy-job-matrices: - needs: [setup] - runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} - name: Generate Envoy Job Matrices - outputs: - envoy-matrix: ${{ steps.set-matrix.outputs.envoy-matrix }} - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - name: Generate Envoy Job Matrix - id: set-matrix - env: - # this is further going to multiplied in envoy-integration tests by the - # other dimensions in the matrix. Currently TOTAL_RUNNERS would be - # multiplied by 8 based on these values: - # envoy-version: ["1.22.11", "1.23.12", "1.24.10", "1.25.9"] - # xds-target: ["server", "client"] - TOTAL_RUNNERS: 4 - JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]' - run: | - NUM_RUNNERS=$TOTAL_RUNNERS - NUM_DIRS=$(find ./test/integration/connect/envoy -mindepth 1 -maxdepth 1 -type d | wc -l) - - if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then - echo "TOTAL_RUNNERS is larger than the number of tests/packages to split." - NUM_RUNNERS=$((NUM_DIRS-1)) - fi - # fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS. - NUM_RUNNERS=$((NUM_RUNNERS-1)) - { - echo -n "envoy-matrix=" - find ./test/integration/connect/envoy -maxdepth 1 -type d -print0 \ - | xargs -0 -n 1 basename \ - | jq --raw-input --argjson runnercount "$NUM_RUNNERS" "$JQ_SLICER" \ - | jq --compact-output 'map(join("|"))' - } >> "$GITHUB_OUTPUT" - - envoy-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} - needs: - - setup - - generate-envoy-job-matrices - - dev-build - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - matrix: - envoy-version: ["1.22.11", "1.23.12", "1.24.10", "1.25.9"] - xds-target: ["server", "client"] - test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }} - env: - ENVOY_VERSION: ${{ matrix.envoy-version }} - XDS_TARGET: ${{ matrix.xds-target }} - AWS_LAMBDA_REGION: us-west-2 - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - - name: fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: ./bin - - name: restore mode+x - run: chmod +x ./bin/consul - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 - - name: Docker build - run: docker build -t consul:local -f ./build-support/docker/Consul-Dev.dockerfile ./bin - - name: Envoy Integration Tests - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running $(sed 's,|, ,g' <<< "${{ matrix.test-cases }}" |wc -w) subtests" - # shellcheck disable=SC2001 - sed 's,|,\n,g' <<< "${{ matrix.test-cases }}" - go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \ - --debug \ - --rerun-fails \ - --rerun-fails-report=/tmp/gotestsum-rerun-fails \ - --jsonfile /tmp/jsonfile/go-test.log \ - --packages=./test/integration/connect/envoy \ - -- -timeout=30m -tags integration -run="TestEnvoy/(${{ matrix.test-cases }})" - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" - chmod +x /usr/local/bin/datadog-ci - - - name: upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - - upgrade-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} - needs: - - setup - - dev-build - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - matrix: - consul-version: ["1.14", "1.15"] - env: - CONSUL_LATEST_VERSION: ${{ matrix.consul-version }} - ENVOY_VERSION: "1.24.6" - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - - name: Setup Git - if: ${{ endsWith(github.repository, '-enterprise') }} - run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - run: go env - - # Get go binary from workspace - - name: fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: . - - name: restore mode+x - run: chmod +x consul - - name: Build consul:local image - run: docker build -t ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local -f ./build-support/docker/Consul-Dev.dockerfile . - - name: Configure GH workaround for ipv6 loopback - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - cat /etc/hosts && echo "-----------" - sudo sed -i 's/::1 *localhost ip6-localhost ip6-loopback/::1 ip6-localhost ip6-loopback/g' /etc/hosts - cat /etc/hosts - - name: Upgrade Integration Tests - run: | - mkdir -p "${{ env.TEST_RESULTS_DIR }}" - cd ./test/integration/consul-container/test/upgrade - docker run --rm ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local consul version - go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \ - --raw-command \ - --format=short-verbose \ - --debug \ - --rerun-fails=2 \ - --packages="./..." \ - -- \ - go test \ - -p=4 \ - -tags "${{ env.GOTAGS }}" \ - -timeout=30m \ - -json \ - ./... \ - --follow-log=false \ - --target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --target-version local \ - --latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --latest-version "${{ env.CONSUL_LATEST_VERSION }}" - ls -lrt - env: - # this is needed because of incompatibility between RYUK container and GHA - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - # tput complains if this isn't set to something. - TERM: ansi - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" - chmod +x /usr/local/bin/datadog-ci - - - name: upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - - test-integrations-success: - needs: - - setup - - dev-build - - generate-envoy-job-matrices - - envoy-integration-test - - upgrade-integration-test - runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} - if: ${{ always() }} - steps: - - name: evaluate upstream job results - run: | - # exit 1 if failure or cancelled result for any upstream job - if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure|cancelled)\"'; then - printf "Tests failed or workflow cancelled:\n\n${{ toJSON(needs) }}" - exit 1 - fi diff --git a/.github/workflows/nightly-test-integrations-1.16.x.yml b/.github/workflows/nightly-test-integrations-1.16.x.yml deleted file mode 100644 index 45bee2d3ea4b4..0000000000000 --- a/.github/workflows/nightly-test-integrations-1.16.x.yml +++ /dev/null @@ -1,331 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -name: Nightly test-integrations 1.16.x - -on: - schedule: - # Run nightly at 1AM UTC/9PM EST/6PM PST - - cron: '* 1 * * *' - workflow_dispatch: {} - -env: - TEST_RESULTS_DIR: /tmp/test-results - TEST_RESULTS_ARTIFACT_NAME: test-results - CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }} - GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }} - GOTESTSUM_VERSION: "1.10.1" - CONSUL_BINARY_UPLOAD_NAME: consul-bin - # strip the hashicorp/ off the front of github.repository for consul - CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps - BRANCH: "release/1.16.x" - BRANCH_NAME: "release-1.16.x" # Used for naming artifacts - -jobs: - setup: - runs-on: ubuntu-latest - name: Setup - outputs: - compute-small: ${{ steps.runners.outputs.compute-small }} - compute-medium: ${{ steps.runners.outputs.compute-medium }} - compute-large: ${{ steps.runners.outputs.compute-large }} - compute-xl: ${{ steps.runners.outputs.compute-xl }} - enterprise: ${{ steps.runners.outputs.enterprise }} - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - id: runners - run: .github/scripts/get_runner_classes.sh - - dev-build: - needs: [setup] - uses: ./.github/workflows/reusable-dev-build.yml - with: - runs-on: ${{ needs.setup.outputs.compute-large }} - repository-name: ${{ github.repository }} - uploaded-binary-name: 'consul-bin' - branch-name: "release/1.16.x" - secrets: - elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} - - generate-envoy-job-matrices: - needs: [setup] - runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} - name: Generate Envoy Job Matrices - outputs: - envoy-matrix: ${{ steps.set-matrix.outputs.envoy-matrix }} - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - name: Generate Envoy Job Matrix - id: set-matrix - env: - # this is further going to multiplied in envoy-integration tests by the - # other dimensions in the matrix. Currently TOTAL_RUNNERS would be - # multiplied by 8 based on these values: - # envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"] - # xds-target: ["server", "client"] - TOTAL_RUNNERS: 4 - JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]' - run: | - NUM_RUNNERS=$TOTAL_RUNNERS - NUM_DIRS=$(find ./test/integration/connect/envoy -mindepth 1 -maxdepth 1 -type d | wc -l) - - if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then - echo "TOTAL_RUNNERS is larger than the number of tests/packages to split." - NUM_RUNNERS=$((NUM_DIRS-1)) - fi - # fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS. - NUM_RUNNERS=$((NUM_RUNNERS-1)) - { - echo -n "envoy-matrix=" - find ./test/integration/connect/envoy -maxdepth 1 -type d -print0 \ - | xargs -0 -n 1 basename \ - | jq --raw-input --argjson runnercount "$NUM_RUNNERS" "$JQ_SLICER" \ - | jq --compact-output 'map(join("|"))' - } >> "$GITHUB_OUTPUT" - - envoy-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} - needs: - - setup - - generate-envoy-job-matrices - - dev-build - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - matrix: - envoy-version: ["1.23.12", "1.24.10", "1.25.9", "1.26.4"] - xds-target: ["server", "client"] - test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }} - env: - ENVOY_VERSION: ${{ matrix.envoy-version }} - XDS_TARGET: ${{ matrix.xds-target }} - AWS_LAMBDA_REGION: us-west-2 - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - - name: fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: ./bin - - name: restore mode+x - run: chmod +x ./bin/consul - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 - - - name: Docker build - run: docker build -t consul:local -f ./build-support/docker/Consul-Dev.dockerfile ./bin - - - name: Envoy Integration Tests - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running $(sed 's,|, ,g' <<< "${{ matrix.test-cases }}" |wc -w) subtests" - # shellcheck disable=SC2001 - sed 's,|,\n,g' <<< "${{ matrix.test-cases }}" - go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \ - --debug \ - --rerun-fails \ - --rerun-fails-report=/tmp/gotestsum-rerun-fails \ - --jsonfile /tmp/jsonfile/go-test.log \ - --packages=./test/integration/connect/envoy \ - -- -timeout=30m -tags integration -run="TestEnvoy/(${{ matrix.test-cases }})" - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" - chmod +x /usr/local/bin/datadog-ci - - - name: upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - - upgrade-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} - needs: - - setup - - dev-build - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - matrix: - consul-version: ["1.14", "1.15", "1.16"] - env: - CONSUL_LATEST_VERSION: ${{ matrix.consul-version }} - ENVOY_VERSION: "1.24.6" - steps: - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env.BRANCH }} - # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - - name: Setup Git - if: ${{ endsWith(github.repository, '-enterprise') }} - run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - run: go env - - # Get go binary from workspace - - name: fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: . - - name: restore mode+x - run: chmod +x consul - - name: Build consul:local image - run: docker build -t ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local -f ./build-support/docker/Consul-Dev.dockerfile . - - name: Build consul-envoy:latest-version image - id: buildConsulEnvoyLatestImage - run: | - if ${{ endsWith(github.repository, '-enterprise') }} == 'true' - then - docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }}-ent --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - else - docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }} --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - fi - - name: Build consul-envoy:target-version image - id: buildConsulEnvoyTargetImage - continue-on-error: true - run: docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - - name: Retry Build consul-envoy:target-version image - if: steps.buildConsulEnvoyTargetImage.outcome == 'failure' - run: docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - - name: Build sds image - run: docker build -t consul-sds-server ./test/integration/connect/envoy/test-sds-server/ - - name: Configure GH workaround for ipv6 loopback - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - cat /etc/hosts && echo "-----------" - sudo sed -i 's/::1 *localhost ip6-localhost ip6-loopback/::1 ip6-localhost ip6-loopback/g' /etc/hosts - cat /etc/hosts - - name: Upgrade Integration Tests - run: | - mkdir -p "${{ env.TEST_RESULTS_DIR }}" - cd ./test/integration/consul-container/test/upgrade - docker run --rm ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local consul version - go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \ - --raw-command \ - --format=short-verbose \ - --debug \ - --rerun-fails=2 \ - --packages="./..." \ - -- \ - go test \ - -p=4 \ - -tags "${{ env.GOTAGS }}" \ - -timeout=30m \ - -json \ - ./... \ - --follow-log=false \ - --target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --target-version local \ - --latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --latest-version "${{ env.CONSUL_LATEST_VERSION }}" - ls -lrt - env: - # this is needed because of incompatibility between RYUK container and GHA - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - # tput complains if this isn't set to something. - TERM: ansi - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" - chmod +x /usr/local/bin/datadog-ci - - - name: upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - - - test-integrations-success: - needs: - - setup - - dev-build - - generate-envoy-job-matrices - - envoy-integration-test - - upgrade-integration-test - runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} - if: ${{ always() }} - steps: - - name: evaluate upstream job results - run: | - # exit 1 if failure or cancelled result for any upstream job - if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure|cancelled)\"'; then - printf "Tests failed or workflow cancelled:\n\n${{ toJSON(needs) }}" - exit 1 - fi diff --git a/.github/workflows/nightly-test-integrations.yml b/.github/workflows/nightly-test-integrations.yml index 0481fadedac21..b8f8a1818e277 100644 --- a/.github/workflows/nightly-test-integrations.yml +++ b/.github/workflows/nightly-test-integrations.yml @@ -99,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"] + envoy-version: ["1.23.12", "1.24.10", "1.25.9", "1.26.4"] xds-target: ["server", "client"] test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }} env: @@ -193,7 +193,7 @@ jobs: strategy: fail-fast: false matrix: - consul-version: [ "1.15", "1.16"] + consul-version: ["1.14", "1.15", "1.16"] env: CONSUL_LATEST_VERSION: ${{ matrix.consul-version }} ENVOY_VERSION: "1.24.6" @@ -223,13 +223,11 @@ jobs: run: docker build -t ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local -f ./build-support/docker/Consul-Dev.dockerfile . - name: Build consul-envoy:latest-version image id: buildConsulEnvoyLatestImage - run: | - if ${{ endsWith(github.repository, '-enterprise') }} == 'true' - then - docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }}-ent --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - else - docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }} --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - fi + continue-on-error: true + run: docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }} --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets + - name: Retry Build consul-envoy:latest-version image + if: steps.buildConsulEnvoyLatestImage.outcome == 'failure' + run: docker build -t consul-envoy:latest-version --build-arg CONSUL_IMAGE=docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }}:${{ env.CONSUL_LATEST_VERSION }} --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - name: Build consul-envoy:target-version image id: buildConsulEnvoyTargetImage continue-on-error: true diff --git a/.github/workflows/nightly-test-main.yaml b/.github/workflows/nightly-test-main.yaml index 2846f5b71c39e..16160175b6815 100644 --- a/.github/workflows/nightly-test-main.yaml +++ b/.github/workflows/nightly-test-main.yaml @@ -1,28 +1,27 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Nightly Frontend Test Main +name: Nightly Test Main on: schedule: - cron: '0 4 * * *' workflow_dispatch: {} env: - EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition + EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition BRANCH: "main" - BRANCH_NAME: "main" # Used for naming artifacts - GOPRIVATE: github.com/hashicorp # Required for enterprise deps + BRANCH_NAME: "main" # Used for naming artifacts jobs: frontend-test-workspace-node: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -49,12 +48,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 0 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -71,7 +70,7 @@ jobs: run: make build-ci - name: Upload CE Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -88,12 +87,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -105,7 +104,7 @@ jobs: run: make deps - name: Download CE Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -121,12 +120,12 @@ jobs: JOBS: 2 CONSUL_NSPACES_ENABLED: 1 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -143,7 +142,7 @@ jobs: run: make build-ci - name: Upload ENT Frontend - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -160,12 +159,12 @@ jobs: EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -177,7 +176,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -191,12 +190,12 @@ jobs: runs-on: ubuntu-latest needs: [frontend-build-ent] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ env.BRANCH }} # Not necessary to use yarn, but enables caching - - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + - uses: actions/setup-node@v3 with: node-version: 14 cache: 'yarn' @@ -208,7 +207,7 @@ jobs: run: make deps - name: Download ENT Frontend - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@v3 with: name: frontend-ent-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist @@ -224,7 +223,7 @@ jobs: steps: - name: Slack Notification id: slack - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@v1.19 with: payload: | { diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 0d6b71c9f0618..a29cadcb685b4 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -10,7 +10,7 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/labeler@0967ca812e7fdc8f5f71402a1b486d5bd061fe20 # v4.2.0 + - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/pr-labeler.yml diff --git a/.github/workflows/pr-metrics-test-checker.yml b/.github/workflows/pr-metrics-test-checker.yml index d0bdac04f7e3f..a73f4fbb3ff5a 100644 --- a/.github/workflows/pr-metrics-test-checker.yml +++ b/.github/workflows/pr-metrics-test-checker.yml @@ -14,7 +14,7 @@ jobs: if: "! ( contains(github.event.pull_request.labels.*.name, 'pr/no-metrics-test') || github.event.pull_request.user.login == 'hc-github-team-consul-core' )" runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 name: "checkout repo" with: ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/reusable-check-go-mod.yml b/.github/workflows/reusable-check-go-mod.yml index 7fffb616879ef..2078b0c3217d6 100644 --- a/.github/workflows/reusable-check-go-mod.yml +++ b/.github/workflows/reusable-check-go-mod.yml @@ -18,12 +18,12 @@ jobs: runs-on: ${{ fromJSON(inputs.runs-on) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(inputs.repository-name, '-enterprise') }} run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 with: go-version-file: 'go.mod' - run: go mod tidy diff --git a/.github/workflows/reusable-dev-build-windows.yml b/.github/workflows/reusable-dev-build-windows.yml deleted file mode 100644 index 01247c477878c..0000000000000 --- a/.github/workflows/reusable-dev-build-windows.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: reusable-dev-build-windows - -on: - workflow_call: - inputs: - uploaded-binary-name: - required: false - type: string - default: "consul.exe" - runs-on: - description: An expression indicating which kind of runners to use. - required: true - type: string - repository-name: - required: true - type: string - go-arch: - required: false - type: string - default: "" - secrets: - elevated-github-token: - required: true -jobs: - build: - runs-on: 'windows-2019' - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - - name: Setup Git - if: ${{ endsWith(inputs.repository-name, '-enterprise') }} - run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - name: Build - env: - GOARCH: ${{ inputs.goarch }} - run: go build . - # save dev build to pass to downstream jobs - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: ${{inputs.uploaded-binary-name}} - path: consul.exe - - name: Notify Slack - if: ${{ failure() }} - run: .github/scripts/notify_slack.sh diff --git a/.github/workflows/reusable-dev-build.yml b/.github/workflows/reusable-dev-build.yml index 99bcb96592c3a..2db9670655e46 100644 --- a/.github/workflows/reusable-dev-build.yml +++ b/.github/workflows/reusable-dev-build.yml @@ -14,10 +14,6 @@ on: repository-name: required: true type: string - branch-name: - required: false - type: string - default: "" go-arch: required: false type: string @@ -29,15 +25,7 @@ jobs: build: runs-on: ${{ fromJSON(inputs.runs-on) }} steps: - # NOTE: This is used for nightly job of building release branch. - - name: Checkout branch ${{ inputs.branch-name }} - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ inputs.branch-name }} - if: inputs.branch-name != '' - - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - if: inputs.branch-name == '' + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(inputs.repository-name, '-enterprise') }} diff --git a/.github/workflows/reusable-lint.yml b/.github/workflows/reusable-lint.yml index 903855d99c85c..f7032f9866633 100644 --- a/.github/workflows/reusable-lint.yml +++ b/.github/workflows/reusable-lint.yml @@ -20,7 +20,6 @@ on: env: GOTAGS: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}" GOARCH: ${{inputs.go-arch}} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps jobs: lint: @@ -34,21 +33,20 @@ jobs: - "envoyextensions" - "troubleshoot" - "test/integration/consul-container" - - "testing/deployer" fail-fast: true name: lint ${{ matrix.directory }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(inputs.repository-name, '-enterprise') }} run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 with: go-version-file: 'go.mod' - run: go env - name: lint-${{ matrix.directory }} - uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0 + uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # pin@v3.4.0 with: working-directory: ${{ matrix.directory }} version: v1.51.1 diff --git a/.github/workflows/reusable-unit-split.yml b/.github/workflows/reusable-unit-split.yml index 0ec639c28ff20..6c13670e742ed 100644 --- a/.github/workflows/reusable-unit-split.yml +++ b/.github/workflows/reusable-unit-split.yml @@ -51,7 +51,6 @@ env: TOTAL_RUNNERS: ${{inputs.runner-count}} CONSUL_LICENSE: ${{secrets.consul-license}} GOTAGS: ${{ inputs.go-tags}} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps DATADOG_API_KEY: ${{secrets.datadog-api-key}} jobs: @@ -60,8 +59,8 @@ jobs: outputs: package-matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 with: go-version-file: 'go.mod' - id: set-matrix @@ -83,12 +82,12 @@ jobs: ulimit -Sa echo "Hard limits" ulimit -Ha - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(inputs.repository-name, '-enterprise') }} run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 with: go-version-file: 'go.mod' cache: true @@ -97,7 +96,7 @@ jobs: working-directory: ${{inputs.directory}} run: go mod download - name: Download consul - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2 with: name: ${{inputs.uploaded-binary-name}} path: ${{inputs.directory}} @@ -164,11 +163,11 @@ jobs: DD_ENV: ci run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" ${{env.TEST_RESULTS}}/gotestsum-report.xml - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: name: test-results path: ${{env.TEST_RESULTS}} - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: name: jsonfile path: /tmp/jsonfile diff --git a/.github/workflows/reusable-unit.yml b/.github/workflows/reusable-unit.yml index 42943954475d3..c49a6291fa2e2 100644 --- a/.github/workflows/reusable-unit.yml +++ b/.github/workflows/reusable-unit.yml @@ -50,14 +50,13 @@ env: GOARCH: ${{inputs.go-arch}} CONSUL_LICENSE: ${{secrets.consul-license}} GOTAGS: ${{ inputs.go-tags}} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps DATADOG_API_KEY: ${{secrets.datadog-api-key}} jobs: go-test: runs-on: ${{ fromJSON(inputs.runs-on) }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(inputs.repository-name, '-enterprise') }} @@ -77,7 +76,7 @@ jobs: working-directory: ${{inputs.directory}} run: go mod download - name: Download consul - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2 with: name: ${{inputs.uploaded-binary-name}} path: ${{inputs.directory}} @@ -142,11 +141,11 @@ jobs: DD_ENV: ci run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" ${{env.TEST_RESULTS}}/gotestsum-report.xml - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: name: test-results path: ${{env.TEST_RESULTS}} - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: name: jsonfile path: /tmp/jsonfile diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ff07a961a4e48..f3da6d422b6b1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 + - uses: actions/stale@v4 with: days-before-stale: -1 days-before-close: -1 diff --git a/.github/workflows/test-integrations-windows.yml b/.github/workflows/test-integrations-windows.yml deleted file mode 100644 index c3e977e97d589..0000000000000 --- a/.github/workflows/test-integrations-windows.yml +++ /dev/null @@ -1,1209 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -name: test-integrations-windows - -on: - schedule: - # * is a special character in YAML so you have to quote this string - # Run nightly at 12AM UTC/8PM EST/5PM PST. - - cron: '0 0 * * *' - -env: - TEST_RESULTS_DIR: /tmp/test-results - TEST_RESULTS_ARTIFACT_NAME: test-results - CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }} - GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }} - GOTESTSUM_VERSION: "1.9.0" - CONSUL_BINARY_UPLOAD_NAME: consul.exe - # strip the hashicorp/ off the front of github.repository for consul - CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'consul' }} - GOPRIVATE: github.com/hashicorp # Required for enterprise deps - -jobs: - setup: - runs-on: ubuntu-latest - name: Setup - outputs: - compute-small: ${{ steps.runners.outputs.compute-small }} - compute-medium: ${{ steps.runners.outputs.compute-medium }} - compute-large: ${{ steps.runners.outputs.compute-large }} - compute-xl: ${{ steps.runners.outputs.compute-xl }} - enterprise: ${{ steps.runners.outputs.enterprise }} - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - id: runners - run: .github/scripts/get_runner_classes_windows.sh - - dev-build: - uses: ./.github/workflows/reusable-dev-build-windows.yml - with: - runs-on: ${{ needs.setup.outputs.compute-xl }} - repository-name: ${{ github.repository }} - uploaded-binary-name: 'consul.exe' - secrets: - elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} - - # NOTE: Jobs needs to be added here manually. Jobs when run together on windows fails intermittently. - # So they are run independently of each other. - envoy-integration-test: - needs: - - setup - - dev-build - runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - matrix: - envoy-version: [ "1.24.10", "1.25.9", "1.26.4", "1.27.0" ] - xds-target: [ "server", "client" ] - env: - ENVOY_VERSION: ${{ matrix.envoy-version }} - XDS_TARGET: ${{ matrix.xds-target }} - AWS_LAMBDA_REGION: us-west-2 - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - - name: Fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: ${{ github.workspace }} - - - name: Restore mode+x - run: icacls ${{ github.workspace }}\consul.exe /grant:rx Everyone:RX - - - name: Setup TcpDump Docker Image - shell: bash - run: | - cd test/integration/connect/envoy - curl -sSL "https://asheshvidyut-bucket.s3.ap-southeast-2.amazonaws.com/tcpdump.exe" -o tcpdump.exe - docker build -t envoy-tcpdump -f Dockerfile-tcpdump-windows . - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 - - - name: Docker build consul - run: docker build -t windows/consul -f Dockerfile-windows . - - - name: Docker build consul local - shell: bash - run: cd build-support/windows && ./build-consul-local-images.sh - - - name: Docker build consul dev - shell: bash - run: cd build-support/windows && ./build-consul-dev-image.sh - - # https://hashicorp.atlassian.net/browse/NET-4973 - # ^ Ticket to figure out why grouping test case is failing on Windows Machine - - - name: Envoy Integration Tests for windows case-api-gateway-http-hostnames - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-http-hostnames" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-http-hostnames" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-http-simple - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-http-simple" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-http-simple" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-http-splitter-targets - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-http-splitter-targets" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-http-splitter-targets" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-http-tls-overlapping-hosts - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-http-tls-overlapping-hosts" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-http-tls-overlapping-hosts" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-tcp-conflicted - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-tcp-conflicted" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-tcp-conflicted" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-tcp-simple - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-tcp-simple" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-tcp-simple" -win=true - - - name: Envoy Integration Tests for windows case-api-gateway-tcp-tls-overlapping-hosts - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-api-gateway-tcp-tls-overlapping-hosts" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-api-gateway-tcp-tls-overlapping-hosts" -win=true - - - name: Envoy Integration Tests for windows case-badauthz - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-badauthz" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true - - - name: Envoy Integration Tests for windows case-basic - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-basic" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-basic" -win=true - - - name: Envoy Integration Tests for windows case-centralconf - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-centralconf" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-centralconf" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-cluster-peering-failover - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-cluster-peering-failover" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-cluster-peering-failover" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-dc-failover-gateways-none - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-dc-failover-gateways-none" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-dc-failover-gateways-none" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-dc-failover-gateways-remote - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-dc-failover-gateways-remote" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-dc-failover-gateways-remote" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-defaultsubset - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-defaultsubset" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-defaultsubset" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-features - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-features" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-features" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-subset-onlypassing - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-subset-onlypassing" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-onlypassing" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-subset-redirect - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-subset-redirect" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-subset-redirect" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-svc-failover - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-svc-failover" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-failover" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-svc-redirect-http - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-svc-redirect-http" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-http" -win=true - - - name: Envoy Integration Tests for windows case-cfg-resolver-svc-redirect-tcp - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-resolver-svc-redirect-tcp" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-resolver-svc-redirect-tcp" -win=true - - - name: Envoy Integration Tests for windows case-cfg-router-features - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-router-features" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-router-features" -win=true - - - name: Envoy Integration Tests for windows case-cfg-splitter-cluster-peering - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-splitter-cluster-peering" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-cluster-peering" -win=true - - - name: Envoy Integration Tests for windows case-cfg-splitter-features - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-splitter-features" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-features" -win=true - - - name: Envoy Integration Tests for windows case-cfg-splitter-peering-ingress-gateways - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cfg-splitter-peering-ingress-gateways" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cfg-splitter-peering-ingress-gateways" -win=true - - # This test runs fine on windows machine but fails on CI - # Task to be picked later on - https://hashicorp.atlassian.net/browse/NET-4972 - # - name: Envoy Integration Tests for windows case-consul-exec - # if: always() - # shell: bash - # env: - # GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - # GOTESTSUM_FORMAT: standard-verbose - # COMPOSE_INTERACTIVE_NO_CLI: 1 - # LAMBDA_TESTS_ENABLED: "true" - # # tput complains if this isn't set to something. - # TERM: ansi - # run: | - # #shellcheck disable=SC2001 - # echo "Running Integration Test case-consul-exec" - # # shellcheck disable=SC2001 - # go test -v -timeout=30m -tags integration \ - # ./test/integration/connect/envoy -run="TestEnvoy/case-consul-exec" -win=true - - - name: Envoy Integration Tests for windows case-cross-peer-control-plane-mgw - if: always() - shell: bash - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cross-peer-control-plane-mgw" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cross-peer-control-plane-mgw" -win=true - - - name: Envoy Integration Tests for windows case-cross-peers - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cross-peers" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cross-peers" -win=true - - - name: Envoy Integration Tests for windows case-cross-peers-http - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cross-peers-http" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cross-peers-http" -win=true - - - name: Envoy Integration Tests for windows case-cross-peers-http-router - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cross-peers-http-router" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cross-peers-http-router" -win=true - - - name: Envoy Integration Tests for windows case-cross-peers-resolver-redirect-tcp - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-cross-peers-resolver-redirect-tcp" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-cross-peers-resolver-redirect-tcp" -win=true - - - name: Envoy Integration Tests for windows case-dogstatsd-udp - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-dogstatsd-udp" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-dogstatsd-udp" -win=true - - - name: Envoy Integration Tests for windows case-envoyext-ratelimit - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-envoyext-ratelimit" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-envoyext-ratelimit" -win=true - - - name: Envoy Integration Tests for windows case-expose-checks - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-expose-checks" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-expose-checks" -win=true - - - name: Envoy Integration Tests for windows case-gateway-without-services - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-gateway-without-services" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-gateway-without-services" -win=true - - - name: Envoy Integration Tests for windows case-gateways-local - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-gateways-local" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-gateways-local" -win=true - - - name: Envoy Integration Tests for windows case-gateways-remote - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-gateways-remote" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-gateways-remote" -win=true - - - name: Envoy Integration Tests for windows case-grpc - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-grpc" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-grpc" -win=true - - - name: Envoy Integration Tests for windows case-http - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-http" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-http" -win=true - - - name: Envoy Integration Tests for windows case-http-badauthz - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-http-badauthz" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-http-badauthz" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-grpc - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-grpc" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-grpc" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-http - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-http" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-http" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-multiple-services - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-multiple-services" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-multiple-services" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-peering-failover - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-peering-failover" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-peering-failover" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-simple - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-simple" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-simple" -win=true - - - name: Envoy Integration Tests for windows case-ingress-mesh-gateways-resolver - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-mesh-gateways-resolver" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-mesh-gateways-resolver" -win=true - - - name: Envoy Integration Tests for windows case-l7-intentions - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-l7-intentions" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-l7-intentions" -win=true - - - name: Envoy Integration Tests for windows case-multidc-rsa-ca - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-multidc-rsa-ca" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-multidc-rsa-ca" -win=true - - - name: Envoy Integration Tests for windows case-prometheus - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-prometheus" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-prometheus" -win=true - - - name: Envoy Integration Tests for windows case-property-override - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-property-override" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-property-override" -win=true - - - name: Envoy Integration Tests for windows case-stats-proxy - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-stats-proxy" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-stats-proxy" -win=true - - - name: Envoy Integration Tests for windows case-statsd-udp - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-statsd-udp" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-statsd-udp" -win=true - - - name: Envoy Integration Tests for windows case-terminating-gateway-hostnames - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-terminating-gateway-hostnames" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-hostnames" -win=true - - - name: Envoy Integration Tests for windows case-terminating-gateway-simple - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-terminating-gateway-simple" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-simple" -win=true - - - name: Envoy Integration Tests for windows case-terminating-gateway-without-services - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-terminating-gateway-without-services" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-without-services" -win=true - - - name: Envoy Integration Tests for windows case-upstream-config - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-upstream-config" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-upstream-config" -win=true - - - name: Envoy Integration Tests for windows case-wanfed-gw - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-wanfed-gw" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-wanfed-gw" -win=true - - - name: Envoy Integration Tests for windows case-ingress-gateway-sds - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-ingress-gateway-sds" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-sds" -win=true - - - name: Envoy Integration Tests for windows case-lua - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-lua" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-lua" -win=true - - - name: Envoy Integration Tests for windows case-terminating-gateway-subsets - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-terminating-gateway-subsets" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-terminating-gateway-subsets" -win=true - - # Skipping this because - https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/wasm_filter - # - name: Envoy Integration Tests for windows case-wasm - # shell: bash - # env: - # GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - # GOTESTSUM_FORMAT: standard-verbose - # COMPOSE_INTERACTIVE_NO_CLI: 1 - # LAMBDA_TESTS_ENABLED: "true" - # # tput complains if this isn't set to something. - # TERM: ansi - # run: | - # # shellcheck disable=SC2001 - # echo "Running Integration Test case-wasm" - # # shellcheck disable=SC2001 - # go test -v -timeout=30m -tags integration \ - # ./test/integration/connect/envoy -run="TestEnvoy/case-wasm" -win=true - - # Skipping because of - cacert is not available in curl windows - # https://www.phillipsj.net/posts/windows-curl-and-self-signed-certs/ - # - name: Envoy Integration Tests for windows case-ingress-gateway-tls - # shell: bash - # if: always() - # env: - # GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - # GOTESTSUM_FORMAT: standard-verbose - # COMPOSE_INTERACTIVE_NO_CLI: 1 - # LAMBDA_TESTS_ENABLED: "true" - # # tput complains if this isn't set to something. - # TERM: ansi - # run: | - # # shellcheck disable=SC2001 - # echo "Running Integration Test case-ingress-gateway-tls" - # # shellcheck disable=SC2001 - # go test -v -timeout=30m -tags integration \ - # ./test/integration/connect/envoy -run="TestEnvoy/case-ingress-gateway-tls" -win=true - - - name: Envoy Integration Tests for windows case-mesh-to-lambda - shell: bash - if: always() - env: - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - LAMBDA_TESTS_ENABLED: "true" - # tput complains if this isn't set to something. - TERM: ansi - run: | - # shellcheck disable=SC2001 - echo "Running Integration Test case-mesh-to-lambda" - # shellcheck disable=SC2001 - go test -v -timeout=30m -tags integration \ - ./test/integration/connect/envoy -run="TestEnvoy/case-mesh-to-lambda" -win=true - - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: Prepare datadog-ci - shell: bash - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/download/v2.17.2/datadog-ci_win-x64.exe" --output "C:/datadog-ci" - icacls C:/datadog-ci /grant:rx Everyone:RX - - - name: Upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: C:/datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - - test-integrations-success: - needs: - - envoy-integration-test - runs-on: 'ubuntu-latest' - if: ${{ always() }} - steps: - - name: evaluate upstream job results - run: | - # exit 1 if failure or cancelled result for any upstream job - if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure|cancelled)\"'; then - printf "Tests failed or workflow cancelled:\n\n${{ toJSON(needs) }}" - exit 1 - fi \ No newline at end of file diff --git a/.github/workflows/test-integrations.yml b/.github/workflows/test-integrations.yml index 71394bba918dd..510eaf2be20d7 100644 --- a/.github/workflows/test-integrations.yml +++ b/.github/workflows/test-integrations.yml @@ -51,7 +51,7 @@ jobs: compute-xl: ${{ steps.runners.outputs.compute-xl }} enterprise: ${{ steps.runners.outputs.enterprise }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - id: runners run: .github/scripts/get_runner_classes.sh @@ -78,13 +78,13 @@ jobs: nomad-version: ['v1.3.3', 'v1.2.10', 'v1.1.16'] steps: - name: Checkout Nomad - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: hashicorp/nomad ref: ${{ matrix.nomad-version }} - name: Install Go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: go-version-file: 'go.mod' @@ -158,14 +158,14 @@ jobs: env: VAULT_BINARY_VERSION: ${{ matrix.vault-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - name: Setup Git if: ${{ endsWith(github.repository, '-enterprise') }} run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: go-version-file: 'go.mod' @@ -248,14 +248,14 @@ jobs: outputs: envoy-matrix: ${{ steps.set-matrix.outputs.envoy-matrix }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Generate Envoy Job Matrix id: set-matrix env: # this is further going to multiplied in envoy-integration tests by the # other dimensions in the matrix. Currently TOTAL_RUNNERS would be # multiplied by 8 based on these values: - # envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"] + # envoy-version: ["1.23.12", "1.24.10", "1.25.9", "1.26.4"] # xds-target: ["server", "client"] TOTAL_RUNNERS: 4 JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]' @@ -289,7 +289,7 @@ jobs: strategy: fail-fast: false matrix: - envoy-version: ["1.27.0"] + envoy-version: ["1.26.4"] xds-target: ["server", "client"] test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }} env: @@ -297,8 +297,8 @@ jobs: XDS_TARGET: ${{ matrix.xds-target }} AWS_LAMBDA_REGION: us-west-2 steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: go-version-file: 'go.mod' @@ -311,7 +311,7 @@ jobs: run: chmod +x ./bin/consul - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 + uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1 - name: Docker build run: docker build -t consul:local -f ./build-support/docker/Consul-Dev.dockerfile ./bin @@ -380,12 +380,8 @@ jobs: env: ENVOY_VERSION: "1.25.4" steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - - name: Setup Git - if: ${{ endsWith(github.repository, '-enterprise') }} - run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: go-version-file: 'go.mod' - run: go env @@ -433,7 +429,7 @@ jobs: -tags "${{ env.GOTAGS }}" \ -timeout=30m \ -json \ - `go list -tags "${{ env.GOTAGS }}" ./... | grep -v upgrade | grep -v peering_commontopo` \ + `go list ./... | grep -v upgrade` \ --target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \ --target-version local \ --latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \ @@ -479,98 +475,6 @@ jobs: DD_ENV: ci run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - peering_commontopo-integration-test: - runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} - needs: - - setup - - dev-build - permissions: - id-token: write # NOTE: this permission is explicitly required for Vault auth. - contents: read - strategy: - fail-fast: false - env: - ENVOY_VERSION: "1.24.6" - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. - - name: Setup Git - if: ${{ endsWith(github.repository, '-enterprise') }} - run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version-file: 'go.mod' - - run: go env - - # Get go binary from workspace - - name: fetch binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}' - path: . - - name: restore mode+x - run: chmod +x consul - - name: Build consul:local image - run: docker build -t ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local -f ./build-support/docker/Consul-Dev.dockerfile . - - name: Peering commonTopo Integration Tests - run: | - mkdir -p "${{ env.TEST_RESULTS_DIR }}" - cd ./test-integ/peering_commontopo - docker run --rm ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local consul version - go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \ - --raw-command \ - --format=short-verbose \ - --debug \ - --packages="./..." \ - -- \ - go test \ - -tags "${{ env.GOTAGS }}" \ - -timeout=30m \ - -json . \ - --target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --target-version local \ - --latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \ - --latest-version latest - ls -lrt - env: - # this is needed because of incompatibility between RYUK container and GHA - GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml - GOTESTSUM_FORMAT: standard-verbose - COMPOSE_INTERACTIVE_NO_CLI: 1 - # tput complains if this isn't set to something. - TERM: ansi - # NOTE: ENT specific step as we store secrets in Vault. - - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} - id: vault-auth - run: vault-auth - - # NOTE: ENT specific step as we store secrets in Vault. - - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} - id: secrets - uses: hashicorp/vault-action@v2.5.0 - with: - url: ${{ steps.vault-auth.outputs.addr }} - caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} - token: ${{ steps.vault-auth.outputs.token }} - secrets: | - kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - - - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} - run: | - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" - chmod +x /usr/local/bin/datadog-ci - - - name: upload coverage - # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository - env: - DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" - DD_ENV: ci - run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml - test-integrations-success: needs: - conditional-skip @@ -581,7 +485,6 @@ jobs: - generate-envoy-job-matrices - envoy-integration-test - compatibility-integration-test - - peering_commontopo-integration-test runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} if: always() && needs.conditional-skip.outputs.trigger-ci == 'true' steps: diff --git a/.github/workflows/verify-envoy-version.yml b/.github/workflows/verify-envoy-version.yml index 9e8b7e7e89b36..d097e335d37b2 100644 --- a/.github/workflows/verify-envoy-version.yml +++ b/.github/workflows/verify-envoy-version.yml @@ -18,7 +18,7 @@ jobs: verify-envoy-version: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 # by default the checkout action doesn't checkout all branches diff --git a/.gitignore b/.gitignore index 793354db02d52..a48d19b74cc22 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ .vagrant/ /pkg bin/ -workdir/ changelog.tmp exit-code Thumbs.db @@ -69,4 +68,3 @@ override.tf.json terraform.rc /go.work /go.work.sum -.docker diff --git a/.golangci.yml b/.golangci.yml index b0730c9577083..3e45ef464c14c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 linters: disable-all: true diff --git a/.release/ci.hcl b/.release/ci.hcl index d11983b460574..dfe69d2fc1ebd 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 schema = "1" diff --git a/.release/docker/docker-entrypoint-ubi.sh b/.release/docker/docker-entrypoint-ubi.sh index 96e70df925672..a932ad7286e28 100755 --- a/.release/docker/docker-entrypoint-ubi.sh +++ b/.release/docker/docker-entrypoint-ubi.sh @@ -1,6 +1,6 @@ #!/usr/bin/dumb-init /bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -e diff --git a/.release/docker/docker-entrypoint-windows.sh b/.release/docker/docker-entrypoint-windows.sh deleted file mode 100644 index f6aac9afaeca7..0000000000000 --- a/.release/docker/docker-entrypoint-windows.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/dumb-init /bin/sh -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -set -e - -# Note above that we run dumb-init as PID 1 in order to reap zombie processes -# as well as forward signals to all processes in its session. Normally, sh -# wouldn't do either of these functions so we'd leak zombies as well as do -# unclean termination of all our sub-processes. -# As of docker 1.13, using docker run --init achieves the same outcome. - -# You can set CONSUL_BIND_INTERFACE to the name of the interface you'd like to -# bind to and this will look up the IP and pass the proper -bind= option along -# to Consul. -CONSUL_BIND= -if [ -n "$CONSUL_BIND_INTERFACE" ]; then - CONSUL_BIND_ADDRESS=$(ip -o -4 addr list $CONSUL_BIND_INTERFACE | head -n1 | awk '{print $4}' | cut -d/ -f1) - if [ -z "$CONSUL_BIND_ADDRESS" ]; then - echo "Could not find IP for interface '$CONSUL_BIND_INTERFACE', exiting" - exit 1 - fi - - CONSUL_BIND="-bind=$CONSUL_BIND_ADDRESS" - echo "==> Found address '$CONSUL_BIND_ADDRESS' for interface '$CONSUL_BIND_INTERFACE', setting bind option..." -fi - -# You can set CONSUL_CLIENT_INTERFACE to the name of the interface you'd like to -# bind client intefaces (HTTP, DNS, and RPC) to and this will look up the IP and -# pass the proper -client= option along to Consul. -CONSUL_CLIENT= -if [ -n "$CONSUL_CLIENT_INTERFACE" ]; then - CONSUL_CLIENT_ADDRESS=$(ip -o -4 addr list $CONSUL_CLIENT_INTERFACE | head -n1 | awk '{print $4}' | cut -d/ -f1) - if [ -z "$CONSUL_CLIENT_ADDRESS" ]; then - echo "Could not find IP for interface '$CONSUL_CLIENT_INTERFACE', exiting" - exit 1 - fi - - CONSUL_CLIENT="-client=$CONSUL_CLIENT_ADDRESS" - echo "==> Found address '$CONSUL_CLIENT_ADDRESS' for interface '$CONSUL_CLIENT_INTERFACE', setting client option..." -fi - -# CONSUL_DATA_DIR is exposed as a volume for possible persistent storage. The -# CONSUL_CONFIG_DIR isn't exposed as a volume but you can compose additional -# config files in there if you use this image as a base, or use CONSUL_LOCAL_CONFIG -# below. -CONSUL_DATA_DIR=C:\\consul\\data -CONSUL_CONFIG_DIR=C:\\consul\\config - -# You can also set the CONSUL_LOCAL_CONFIG environemnt variable to pass some -# Consul configuration JSON without having to bind any volumes. -if [ -n "$CONSUL_LOCAL_CONFIG" ]; then - echo "$CONSUL_LOCAL_CONFIG" > "$CONSUL_CONFIG_DIR/local.json" -fi - -# If the user is trying to run Consul directly with some arguments, then -# pass them to Consul. -if [ "${1:0:1}" = '-' ]; then - set -- consul "$@" -fi - -# Look for Consul subcommands. -if [ "$1" = 'agent' ]; then - shift - set -- consul agent \ - -data-dir="$CONSUL_DATA_DIR" \ - -config-dir="$CONSUL_CONFIG_DIR" \ - $CONSUL_BIND \ - $CONSUL_CLIENT \ - "$@" -elif [ "$1" = 'version' ]; then - # This needs a special case because there's no help output. - set -- consul "$@" -elif consul --help "$1" 2>&1 | grep -q "consul $1"; then - # We can't use the return code to check for the existence of a subcommand, so - # we have to use grep to look for a pattern in the help output. - set -- consul "$@" -fi - -# NOTE: Unlike in the regular Consul Docker image, we don't have code here -# for changing data-dir directory ownership or using su-exec because OpenShift -# won't run this container as root and so we can't change data dir ownership, -# and there's no need to use su-exec. - -exec "$@" \ No newline at end of file diff --git a/.release/docker/docker-entrypoint.sh b/.release/docker/docker-entrypoint.sh index a544809643e00..c169576b6cf85 100755 --- a/.release/docker/docker-entrypoint.sh +++ b/.release/docker/docker-entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/dumb-init /bin/sh # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -e diff --git a/.release/linux/package/etc/consul.d/consul.hcl b/.release/linux/package/etc/consul.d/consul.hcl index b25f186858564..b54644b2f9ccd 100644 --- a/.release/linux/package/etc/consul.d/consul.hcl +++ b/.release/linux/package/etc/consul.d/consul.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # Full configuration options can be found at https://www.consul.io/docs/agent/config diff --git a/.release/release-metadata.hcl b/.release/release-metadata.hcl index 963192fc4b80e..8de2623fdee4e 100644 --- a/.release/release-metadata.hcl +++ b/.release/release-metadata.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 url_docker_registry_dockerhub = "https://hub.docker.com/r/hashicorp/consul" url_docker_registry_ecr = "https://gallery.ecr.aws/hashicorp/consul" diff --git a/.release/security-scan.hcl b/.release/security-scan.hcl index 0dd5116c6ecef..3029b33273b06 100644 --- a/.release/security-scan.hcl +++ b/.release/security-scan.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 container { dependencies = true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd1efb50646e..c882dfaef0f68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,83 +57,6 @@ we now reject those earlier in the process when we validate the certificate. [[G https://github.com/rboyer/safeio/pull/3 [[GH-18302](https://github.com/hashicorp/consul/issues/18302)] * xds: Prevent partial application of non-Required Envoy extensions in the case of failure. [[GH-18068](https://github.com/hashicorp/consul/issues/18068)] -## 1.15.5 (August 8, 2023) - -SECURITY: - -* Update `golang.org/x/net` to v0.13.0 to address [CVE-2023-3978](https://nvd.nist.gov/vuln/detail/CVE-2023-3978). [[GH-18358](https://github.com/hashicorp/consul/issues/18358)] -* Upgrade golang.org/x/net to address [CVE-2023-29406](https://nvd.nist.gov/vuln/detail/CVE-2023-29406) [[GH-18186](https://github.com/hashicorp/consul/issues/18186)] -* Upgrade to use Go 1.20.6. -This resolves [CVE-2023-29406](https://github.com/advisories/GHSA-f8f7-69v5-w4vx)(`net/http`) for uses of the standard library. -A separate change updates dependencies on `golang.org/x/net` to use `0.12.0`. [[GH-18190](https://github.com/hashicorp/consul/issues/18190)] -* Upgrade to use Go 1.20.7. -This resolves vulnerability [CVE-2023-29409](https://nvd.nist.gov/vuln/detail/CVE-2023-29409)(`crypto/tls`). [[GH-18358](https://github.com/hashicorp/consul/issues/18358)] - -FEATURES: - -* cli: `consul members` command uses `-filter` expression to filter members based on bexpr. [[GH-18223](https://github.com/hashicorp/consul/issues/18223)] -* cli: `consul watch` command uses `-filter` expression to filter response from checks, services, nodes, and service. [[GH-17780](https://github.com/hashicorp/consul/issues/17780)] -* reloadable config: Made enable_debug config reloadable and enable pprof command to work when config toggles to true [[GH-17565](https://github.com/hashicorp/consul/issues/17565)] - -IMPROVEMENTS: - -* Fix some typos in metrics docs [[GH-18080](https://github.com/hashicorp/consul/issues/18080)] -* acl: added builtin ACL policy that provides global read-only access (builtin/global-read-only) [[GH-18319](https://github.com/hashicorp/consul/issues/18319)] -* acl: allow for a single slash character in policy names [[GH-18319](https://github.com/hashicorp/consul/issues/18319)] -* connect: Add capture group labels from Envoy cluster FQDNs to Envoy exported metric labels [[GH-17888](https://github.com/hashicorp/consul/issues/17888)] -* connect: update supported envoy versions to 1.22.11, 1.23.12, 1.24.10, 1.25.9 [[GH-18304](https://github.com/hashicorp/consul/issues/18304)] -* hcp: Add dynamic configuration support for the export of server metrics to HCP. [[GH-18168](https://github.com/hashicorp/consul/issues/18168)] -* hcp: Removes requirement for HCP to provide a management token [[GH-18140](https://github.com/hashicorp/consul/issues/18140)] -* xds: Explicitly enable WebSocket connection upgrades in HTTP connection manager [[GH-18150](https://github.com/hashicorp/consul/issues/18150)] - -BUG FIXES: - -* Fix a bug that wrongly trims domains when there is an overlap with DC name. [[GH-17160](https://github.com/hashicorp/consul/issues/17160)] -* api-gateway: fix race condition in proxy config generation when Consul is notified of the bound-api-gateway config entry before it is notified of the api-gateway config entry. [[GH-18291](https://github.com/hashicorp/consul/issues/18291)] -* connect/ca: Fixes a bug preventing CA configuration updates in secondary datacenters [[GH-17846](https://github.com/hashicorp/consul/issues/17846)] -* connect: Fix incorrect protocol config merging for transparent proxy implicit upstreams. [[GH-17894](https://github.com/hashicorp/consul/issues/17894)] -* connect: Removes the default health check from the `consul connect envoy` command when starting an API Gateway. -This health check would always fail. [[GH-18011](https://github.com/hashicorp/consul/issues/18011)] -* connect: fix a bug with Envoy potentially starting with incomplete configuration by not waiting enough for initial xDS configuration. [[GH-18024](https://github.com/hashicorp/consul/issues/18024)] -* snapshot: fix access denied and handle is invalid when we call snapshot save on windows - skip sync() for folders in windows in -https://github.com/rboyer/safeio/pull/3 [[GH-18302](https://github.com/hashicorp/consul/issues/18302)] - -## 1.14.9 (August 8, 2023) - -SECURITY: - -* Update `golang.org/x/net` to v0.13.0 to address [CVE-2023-3978](https://nvd.nist.gov/vuln/detail/CVE-2023-3978). [[GH-18358](https://github.com/hashicorp/consul/issues/18358)] -* Upgrade golang.org/x/net to address [CVE-2023-29406](https://nvd.nist.gov/vuln/detail/CVE-2023-29406) [[GH-18186](https://github.com/hashicorp/consul/issues/18186)] -* Upgrade to use Go 1.20.6. -This resolves [CVE-2023-29406](https://github.com/advisories/GHSA-f8f7-69v5-w4vx)(`net/http`) for uses of the standard library. -A separate change updates dependencies on `golang.org/x/net` to use `0.12.0`. [[GH-18190](https://github.com/hashicorp/consul/issues/18190)] -* Upgrade to use Go 1.20.7. -This resolves vulnerability [CVE-2023-29409](https://nvd.nist.gov/vuln/detail/CVE-2023-29409)(`crypto/tls`). [[GH-18358](https://github.com/hashicorp/consul/issues/18358)] - -FEATURES: - -* cli: `consul members` command uses `-filter` expression to filter members based on bexpr. [[GH-18223](https://github.com/hashicorp/consul/issues/18223)] -* cli: `consul watch` command uses `-filter` expression to filter response from checks, services, nodes, and service. [[GH-17780](https://github.com/hashicorp/consul/issues/17780)] -* reloadable config: Made enable_debug config reloadable and enable pprof command to work when config toggles to true [[GH-17565](https://github.com/hashicorp/consul/issues/17565)] - -IMPROVEMENTS: - -* Fix some typos in metrics docs [[GH-18080](https://github.com/hashicorp/consul/issues/18080)] -* acl: added builtin ACL policy that provides global read-only access (builtin/global-read-only) [[GH-18319](https://github.com/hashicorp/consul/issues/18319)] -* acl: allow for a single slash character in policy names [[GH-18319](https://github.com/hashicorp/consul/issues/18319)] -* connect: update supported envoy versions to 1.21.6, 1.22.11, 1.23.12, 1.24.10 [[GH-18305](https://github.com/hashicorp/consul/issues/18305)] -* hcp: Removes requirement for HCP to provide a management token [[GH-18140](https://github.com/hashicorp/consul/issues/18140)] -* xds: Explicitly enable WebSocket connection upgrades in HTTP connection manager [[GH-18150](https://github.com/hashicorp/consul/issues/18150)] - -BUG FIXES: - -* Fix a bug that wrongly trims domains when there is an overlap with DC name. [[GH-17160](https://github.com/hashicorp/consul/issues/17160)] -* connect/ca: Fixes a bug preventing CA configuration updates in secondary datacenters [[GH-17846](https://github.com/hashicorp/consul/issues/17846)] -* connect: Fix incorrect protocol config merging for transparent proxy implicit upstreams. [[GH-17894](https://github.com/hashicorp/consul/issues/17894)] -* connect: fix a bug with Envoy potentially starting with incomplete configuration by not waiting enough for initial xDS configuration. [[GH-18024](https://github.com/hashicorp/consul/issues/18024)] -* snapshot: fix access denied and handle is invalid when we call snapshot save on windows - skip sync() for folders in windows in -https://github.com/rboyer/safeio/pull/3 [[GH-18302](https://github.com/hashicorp/consul/issues/18302)] - ## 1.16.0 (June 26, 2023) BREAKING CHANGES: @@ -207,100 +130,6 @@ BUG FIXES: * ui: fixes ui tests run on CI [[GH-16428](https://github.com/hashicorp/consul/issues/16428)] * xds: Fixed a bug where modifying ACLs on a token being actively used for an xDS connection caused all xDS updates to fail. [[GH-17566](https://github.com/hashicorp/consul/issues/17566)] -## 1.15.4 (June 26, 2023) -FEATURES: - -* cli: `consul operator raft list-peers` command shows the number of commits each follower is trailing the leader by to aid in troubleshooting. [[GH-17582](https://github.com/hashicorp/consul/issues/17582)] -* server: **(Enterprise Only)** allow automatic license utilization reporting. [[GH-5102](https://github.com/hashicorp/consul/issues/5102)] - -IMPROVEMENTS: - -* connect: update supported envoy versions to 1.22.11, 1.23.9, 1.24.7, 1.25.6 [[GH-17545](https://github.com/hashicorp/consul/issues/17545)] -* debug: change default setting of consul debug command. now default duration is 5ms and default log level is 'TRACE' [[GH-17596](https://github.com/hashicorp/consul/issues/17596)] -* fix metric names in /docs/agent/telemetry [[GH-17577](https://github.com/hashicorp/consul/issues/17577)] -* gateway: Change status condition reason for invalid certificate on a listener from "Accepted" to "ResolvedRefs". [[GH-17115](https://github.com/hashicorp/consul/issues/17115)] -* systemd: set service type to notify. [[GH-16845](https://github.com/hashicorp/consul/issues/16845)] - -BUG FIXES: - -* cache: fix a few minor goroutine leaks in leaf certs and the agent cache [[GH-17636](https://github.com/hashicorp/consul/issues/17636)] -* docs: fix list of telemetry metrics [[GH-17593](https://github.com/hashicorp/consul/issues/17593)] -* gateways: **(Enterprise only)** Fixed a bug in API gateways where gateway configuration objects in non-default partitions did not reconcile properly. [[GH-17581](https://github.com/hashicorp/consul/issues/17581)] -* gateways: Fixed a bug in API gateways where binding a route that only targets a service imported from a peer results - in the programmed gateway having no routes. [[GH-17609](https://github.com/hashicorp/consul/issues/17609)] -* gateways: Fixed a bug where API gateways were not being taken into account in determining xDS rate limits. [[GH-17631](https://github.com/hashicorp/consul/issues/17631)] -* http: fixed API endpoint `PUT /acl/token/:AccessorID` (update token), no longer requires `AccessorID` in the request body. Web UI can now update tokens. [[GH-17739](https://github.com/hashicorp/consul/issues/17739)] -* namespaces: **(Enterprise only)** fixes a bug where agent health checks stop syncing for all services on a node if the namespace of any service has been removed from the server. -* namespaces: **(Enterprise only)** fixes a bug where namespaces are stuck in a deferred deletion state indefinitely under some conditions. - Also fixes the Consul query metadata present in the HTTP headers of the namespace read and list endpoints. -* peering: Fix a bug that caused server agents to continue cleaning up peering resources even after loss of leadership. [[GH-17483](https://github.com/hashicorp/consul/issues/17483)] -* xds: Fixed a bug where modifying ACLs on a token being actively used for an xDS connection caused all xDS updates to fail. [[GH-17566](https://github.com/hashicorp/consul/issues/17566)] - -## 1.14.8 (June 26, 2023) - -SECURITY: - -* Update to UBI base image to 9.2. [[GH-17513](https://github.com/hashicorp/consul/issues/17513)] - -FEATURES: - -* cli: `consul operator raft list-peers` command shows the number of commits each follower is trailing the leader by to aid in troubleshooting. [[GH-17582](https://github.com/hashicorp/consul/issues/17582)] -* server: **(Enterprise Only)** allow automatic license utilization reporting. [[GH-5102](https://github.com/hashicorp/consul/issues/5102)] - -IMPROVEMENTS: - -* connect: update supported envoy versions to 1.21.6, 1.22.11, 1.23.9, 1.24.7 [[GH-17547](https://github.com/hashicorp/consul/issues/17547)] -* debug: change default setting of consul debug command. now default duration is 5ms and default log level is 'TRACE' [[GH-17596](https://github.com/hashicorp/consul/issues/17596)] -* fix metric names in /docs/agent/telemetry [[GH-17577](https://github.com/hashicorp/consul/issues/17577)] -* peering: gRPC queries for TrustBundleList, TrustBundleRead, PeeringList, and PeeringRead now support blocking semantics, - reducing network and CPU demand. - The HTTP APIs for Peering List and Read have been updated to support blocking. [[GH-17426](https://github.com/hashicorp/consul/issues/17426)] -* raft: Remove expensive reflection from raft/mesh hot path [[GH-16552](https://github.com/hashicorp/consul/issues/16552)] -* systemd: set service type to notify. [[GH-16845](https://github.com/hashicorp/consul/issues/16845)] - -BUG FIXES: - -* cache: fix a few minor goroutine leaks in leaf certs and the agent cache [[GH-17636](https://github.com/hashicorp/consul/issues/17636)] -* connect: reverts #17317 fix that caused a downstream error for Ingress/Mesh/Terminating GWs when their respective config entry does not already exist. [[GH-17541](https://github.com/hashicorp/consul/issues/17541)] -* namespaces: **(Enterprise only)** fixes a bug where agent health checks stop syncing for all services on a node if the namespace of any service has been removed from the server. -* namespaces: **(Enterprise only)** fixes a bug where namespaces are stuck in a deferred deletion state indefinitely under some conditions. - Also fixes the Consul query metadata present in the HTTP headers of the namespace read and list endpoints. -* namespaces: adjusts the return type from HTTP list API to return the `api` module representation of a namespace. - This fixes an error with the `consul namespace list` command when a namespace has a deferred deletion timestamp. -* peering: Fix a bug that caused server agents to continue cleaning up peering resources even after loss of leadership. [[GH-17483](https://github.com/hashicorp/consul/issues/17483)] -* peering: Fix issue where modifying the list of exported services did not correctly replicate changes for services that exist in a non-default namespace. [[GH-17456](https://github.com/hashicorp/consul/issues/17456)] - -## 1.13.9 (June 26, 2023) -BREAKING CHANGES: - -* connect: Disable peering by default in connect proxies for Consul 1.13. This change was made to prevent inefficient polling - queries from having a negative impact on server performance. Peering in Consul 1.13 is an experimental feature and is not - recommended for use in production environments. If you still wish to use the experimental peering feature, ensure - [`peering.enabled = true`](https://developer.hashicorp.com/consul/docs/v1.13.x/agent/config/config-files#peering_enabled) - is set on all clients and servers. [[GH-17731](https://github.com/hashicorp/consul/issues/17731)] - -SECURITY: - -* Update to UBI base image to 9.2. [[GH-17513](https://github.com/hashicorp/consul/issues/17513)] - -FEATURES: - -* server: **(Enterprise Only)** allow automatic license utilization reporting. [[GH-5102](https://github.com/hashicorp/consul/issues/5102)] - -IMPROVEMENTS: - -* debug: change default setting of consul debug command. now default duration is 5ms and default log level is 'TRACE' [[GH-17596](https://github.com/hashicorp/consul/issues/17596)] -* systemd: set service type to notify. [[GH-16845](https://github.com/hashicorp/consul/issues/16845)] - -BUG FIXES: - -* cache: fix a few minor goroutine leaks in leaf certs and the agent cache [[GH-17636](https://github.com/hashicorp/consul/issues/17636)] -* namespaces: **(Enterprise only)** fixes a bug where namespaces are stuck in a deferred deletion state indefinitely under some conditions. - Also fixes the Consul query metadata present in the HTTP headers of the namespace read and list endpoints. -* namespaces: adjusts the return type from HTTP list API to return the `api` module representation of a namespace. - This fixes an error with the `consul namespace list` command when a namespace has a deferred deletion timestamp. -* peering: Fix a bug that caused server agents to continue cleaning up peering resources even after loss of leadership. [[GH-17483](https://github.com/hashicorp/consul/issues/17483)] - ## 1.16.0-rc1 (June 12, 2023) BREAKING CHANGES: diff --git a/Dockerfile b/Dockerfile index 1926c521299a7..7599ec7b35b80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # This Dockerfile contains multiple targets. # Use 'docker build --target= .' to build one. diff --git a/Dockerfile-windows b/Dockerfile-windows deleted file mode 100644 index 14582908db550..0000000000000 --- a/Dockerfile-windows +++ /dev/null @@ -1,51 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2019 -ARG VERSION=1.16.0 - -ENV chocolateyVersion=1.4.0 - -LABEL org.opencontainers.image.authors="Consul Team " \ - org.opencontainers.image.url="https://www.consul.io/" \ - org.opencontainers.image.documentation="https://www.consul.io/docs" \ - org.opencontainers.image.source="https://github.com/hashicorp/consul" \ - org.opencontainers.image.version=$VERSION \ - org.opencontainers.image.vendor="HashiCorp" \ - org.opencontainers.image.title="consul" \ - org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \ - version=${VERSION} - -RUN ["powershell", "Set-ExecutionPolicy", "Bypass", "-Scope", "Process", "-Force;"] -RUN ["powershell", "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"] - -RUN choco install git.install -yf -RUN SETX /M path "%PATH%;C:\Program Files\Git\bin" - -RUN mkdir C:\\consul -RUN mkdir C:\\consul\\data -RUN mkdir C:\\consul\\config - -# Server RPC is used for communication between Consul clients and servers for internal -# request forwarding. -EXPOSE 8300 - -# Serf LAN and WAN (WAN is used only by Consul servers) are used for gossip between -# Consul agents. LAN is within the datacenter and WAN is between just the Consul -# servers in all datacenters. -EXPOSE 8301 8301/udp 8302 8302/udp - -# HTTP and DNS (both TCP and UDP) are the primary interfaces that applications -# use to interact with Consul. -EXPOSE 8500 8600 8600/udp - -#ENV CONSUL_URL=https://releases.hashicorp.com/consul/${VERSION}/consul_${VERSION}_windows_amd64.zip -#RUN curl %CONSUL_URL% -L -o consul.zip -#RUN tar -xf consul.zip -C consul - -COPY consul.exe C:\\consul - -COPY .release/docker/docker-entrypoint-windows.sh C:\\docker-entrypoint-windows.sh -ENTRYPOINT ["bash.exe", "docker-entrypoint-windows.sh"] - -# By default you'll get an insecure single-node development server that stores -# everything in RAM, exposes a web UI and HTTP endpoints, and bootstraps itself. -# Don't use this configuration for production. -CMD ["agent", "-dev", "-client", "0.0.0.0"] diff --git a/Makefile b/GNUmakefile similarity index 73% rename from Makefile rename to GNUmakefile index 1fe0d1b75afd7..ae691d2f0e8aa 100644 --- a/Makefile +++ b/GNUmakefile @@ -3,7 +3,6 @@ SHELL = bash - GO_MODULES := $(shell find . -name go.mod -exec dirname {} \; | grep -v "proto-gen-rpc-glue/e2e" | sort) ### @@ -12,7 +11,7 @@ GO_MODULES := $(shell find . -name go.mod -exec dirname {} \; | grep -v "proto-g ### GOLANGCI_LINT_VERSION='v1.51.1' MOCKERY_VERSION='v2.20.0' -BUF_VERSION='v1.26.0' +BUF_VERSION='v1.14.0' PROTOC_GEN_GO_GRPC_VERSION="v1.2.0" MOG_VERSION='v0.4.0' @@ -66,7 +65,13 @@ BUILD_CONTAINER_NAME?=consul-builder CONSUL_IMAGE_VERSION?=latest ENVOY_VERSION?='1.25.4' -CONSUL_VERSION?=$(shell cat version/VERSION) +################ +# CI Variables # +################ +CI_DEV_DOCKER_NAMESPACE?=hashicorpdev +CI_DEV_DOCKER_IMAGE_NAME?=consul +CI_DEV_DOCKER_WORKDIR?=bin/ +################ TEST_MODCACHE?=1 TEST_BUILDCACHE?=1 @@ -146,27 +151,23 @@ ifdef SKIP_DOCKER_BUILD ENVOY_INTEG_DEPS=noop endif -##@ Build - -.PHONY: all -all: dev-build ## Command running by default +all: dev-build # used to make integration dependencies conditional noop: ; -.PHONY: dev -dev: dev-build ## Dev creates binaries for testing locally - these are put into ./bin +# dev creates binaries for testing locally - these are put into ./bin +dev: dev-build -.PHONY: dev-build -dev-build: ## Same as dev +dev-build: mkdir -p bin CGO_ENABLED=0 go install -ldflags "$(GOLDFLAGS)" -tags "$(GOTAGS)" # rm needed due to signature caching (https://apple.stackexchange.com/a/428388) rm -f ./bin/consul cp ${MAIN_GOPATH}/bin/consul ./bin/consul -.PHONY: dev-docker-dbg -dev-docker-dbg: dev-docker ## Build containers for debug mode + +dev-docker-dbg: dev-docker @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)" @docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null @echo "Building Consul Development container - $(CONSUL_DEV_IMAGE)" @@ -178,8 +179,7 @@ dev-docker-dbg: dev-docker ## Build containers for debug mode --load \ -f $(CURDIR)/build-support/docker/Consul-Dev-Dbg.dockerfile $(CURDIR)/pkg/bin/ -.PHONY: dev-docker -dev-docker: linux dev-build ## Build and tag docker images in dev env +dev-docker: linux dev-build @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)" @docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null @echo "Building Consul Development container - $(CONSUL_DEV_IMAGE)" @@ -188,20 +188,15 @@ dev-docker: linux dev-build ## Build and tag docker images in dev env @docker buildx use default && docker buildx build -t 'consul:local' -t '$(CONSUL_DEV_IMAGE)' \ --platform linux/$(GOARCH) \ --build-arg CONSUL_IMAGE_VERSION=$(CONSUL_IMAGE_VERSION) \ - --label org.opencontainers.image.version=$(CONSUL_VERSION) \ - --label version=$(CONSUL_VERSION) \ --load \ -f $(CURDIR)/build-support/docker/Consul-Dev-Multiarch.dockerfile $(CURDIR)/pkg/bin/ - docker tag 'consul:local' '$(CONSUL_COMPAT_TEST_IMAGE):local' -.PHONY: check-remote-dev-image-env -check-remote-dev-image-env: ## Check remote dev image env +check-remote-dev-image-env: ifndef REMOTE_DEV_IMAGE $(error REMOTE_DEV_IMAGE is undefined: set this image to /:, e.g. hashicorp/consul-k8s-dev:latest) endif -.PHONY: remote-docker -remote-docker: check-remote-dev-image-env ## Remote docker +remote-docker: check-remote-dev-image-env $(MAKE) GOARCH=amd64 linux $(MAKE) GOARCH=arm64 linux @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)" @@ -213,63 +208,39 @@ remote-docker: check-remote-dev-image-env ## Remote docker @docker buildx use consul-builder && docker buildx build -t '$(REMOTE_DEV_IMAGE)' \ --platform linux/amd64,linux/arm64 \ --build-arg CONSUL_IMAGE_VERSION=$(CONSUL_IMAGE_VERSION) \ - --label org.opencontainers.image.version=$(CONSUL_VERSION) \ - --label version=$(CONSUL_VERSION) \ --push \ -f $(CURDIR)/build-support/docker/Consul-Dev-Multiarch.dockerfile $(CURDIR)/pkg/bin/ -linux: ## Linux builds a linux binary compatible with the source platform +# In CI, the linux binary will be attached from a previous step at bin/. This make target +# should only run in CI and not locally. +ci.dev-docker: + @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)" + @docker pull hashicorp/consul:$(CONSUL_IMAGE_VERSION) >/dev/null + @echo "Building Consul Development container - $(CI_DEV_DOCKER_IMAGE_NAME)" + @docker build $(NOCACHE) $(QUIET) -t '$(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):$(GIT_COMMIT)' \ + --build-arg CONSUL_IMAGE_VERSION=$(CONSUL_IMAGE_VERSION) \ + --label COMMIT_SHA=$(CIRCLE_SHA1) \ + --label PULL_REQUEST=$(CIRCLE_PULL_REQUEST) \ + --label CIRCLE_BUILD_URL=$(CIRCLE_BUILD_URL) \ + $(CI_DEV_DOCKER_WORKDIR) -f $(CURDIR)/build-support/docker/Consul-Dev.dockerfile + @echo $(DOCKER_PASS) | docker login -u="$(DOCKER_USER)" --password-stdin + @echo "Pushing dev image to: https://cloud.docker.com/u/hashicorpdev/repository/docker/hashicorpdev/consul" + @docker push $(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):$(GIT_COMMIT) +ifeq ($(CIRCLE_BRANCH), main) + @docker tag $(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):$(GIT_COMMIT) $(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):latest + @docker push $(CI_DEV_DOCKER_NAMESPACE)/$(CI_DEV_DOCKER_IMAGE_NAME):latest +endif + +# linux builds a linux binary compatible with the source platform +linux: @mkdir -p ./pkg/bin/linux_$(GOARCH) CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) go build -o ./pkg/bin/linux_$(GOARCH) -ldflags "$(GOLDFLAGS)" -tags "$(GOTAGS)" -.PHONY: go-mod-tidy -go-mod-tidy: $(foreach mod,$(GO_MODULES),go-mod-tidy/$(mod)) ## Run go mod tidy in every module - -.PHONY: mod-tidy/% -go-mod-tidy/%: - @echo "--> Running go mod tidy ($*)" - @cd $* && go mod tidy - -##@ Checks - -.PHONY: fmt -fmt: $(foreach mod,$(GO_MODULES),fmt/$(mod)) ## Format go modules - -.PHONY: fmt/% -fmt/%: - @echo "--> Running go fmt ($*)" - @cd $* && gofmt -s -l -w . - -.PHONY: lint -lint: $(foreach mod,$(GO_MODULES),lint/$(mod)) lint-container-test-deps ## Lint go modules and test deps - -.PHONY: lint/% -lint/%: - @echo "--> Running golangci-lint ($*)" - @cd $* && GOWORK=off golangci-lint run --build-tags '$(GOTAGS)' - @echo "--> Running lint-consul-retry ($*)" - @cd $* && GOWORK=off lint-consul-retry - @echo "--> Running enumcover ($*)" - @cd $* && GOWORK=off enumcover ./... - -# check that the test-container module only imports allowlisted packages -# from the root consul module. Generally we don't want to allow these imports. -# In a few specific instances though it is okay to import test definitions and -# helpers from some of the packages in the root module. -.PHONY: lint-container-test-deps -lint-container-test-deps: ## Check that the test-container module only imports allowlisted packages from the root consul module. - @echo "--> Checking container tests for bad dependencies" - @cd test/integration/consul-container && \ - $(CURDIR)/build-support/scripts/check-allowed-imports.sh \ - github.com/hashicorp/consul \ - internal/catalog/catalogtest - -##@ Testing - -.PHONY: cover -cover: cov ## Run tests and generate coverage report +# dist builds binaries for all platforms and packages them for distribution +dist: + @$(SHELL) $(CURDIR)/build-support/scripts/release.sh -t '$(DIST_TAG)' -b '$(DIST_BUILD)' -S '$(DIST_SIGN)' $(DIST_VERSION_ARG) $(DIST_DATE_ARG) $(DIST_REL_ARG) -.PHONY: cov +cover: cov cov: other-consul dev-build go test -tags '$(GOTAGS)' ./... -coverprofile=coverage.out cd sdk && go test -tags '$(GOTAGS)' ./... -coverprofile=../coverage.sdk.part @@ -278,11 +249,17 @@ cov: other-consul dev-build rm -f coverage.{sdk,api}.part go tool cover -html=coverage.out -.PHONY: test test: other-consul dev-build lint test-internal -.PHONY: test-internal -test-internal: ## Test internal +.PHONY: go-mod-tidy +go-mod-tidy: $(foreach mod,$(GO_MODULES),go-mod-tidy/$(mod)) + +.PHONY: mod-tidy/% +go-mod-tidy/%: + @echo "--> Running go mod tidy ($*)" + @cd $* && go mod tidy + +test-internal: @echo "--> Running go test" @rm -f test.log exit-code @# Dump verbose output to test.log so we can surface test names on failure but @@ -311,141 +288,112 @@ test-internal: ## Test internal @grep '^FAIL' test.log || true @if [ "$$(cat exit-code)" == "0" ] ; then echo "PASS" ; exit 0 ; else exit 1 ; fi -.PHONY: test-all -test-all: other-consul dev-build lint $(foreach mod,$(GO_MODULES),test-module/$(mod)) ## Test all +test-all: other-consul dev-build lint $(foreach mod,$(GO_MODULES),test-module/$(mod)) -.PHONY: test-module/% test-module/%: @echo "--> Running go test ($*)" cd $* && go test $(GOTEST_FLAGS) -tags '$(GOTAGS)' ./... -.PHONY: test-race -test-race: ## Test race +test-race: $(MAKE) GOTEST_FLAGS=-race -.PHONY: other-consul -other-consul: ## Checking for other consul instances +test-docker: linux go-build-image + @# -ti run in the foreground showing stdout + @# --rm removes the container once its finished running + @# GO_MODCACHE_VOL - args for mapping in the go module cache + @# GO_BUILD_CACHE_VOL - args for mapping in the go build cache + @# All the env vars are so we pass through all the relevant bits of information + @# Needed for running the tests + @# We map in our local linux_amd64 bin directory as thats where the linux dep + @# target dropped the binary. We could build the binary in the container too + @# but that might take longer as caching gets weird + @# Lastly we map the source dir here to the /consul workdir + @echo "Running tests within a docker container" + @docker run -ti --rm \ + -e 'GOTEST_FLAGS=$(GOTEST_FLAGS)' \ + -e 'GOTAGS=$(GOTAGS)' \ + -e 'GIT_COMMIT=$(GIT_COMMIT)' \ + -e 'GIT_COMMIT_YEAR=$(GIT_COMMIT_YEAR)' \ + -e 'GIT_DIRTY=$(GIT_DIRTY)' \ + $(TEST_PARALLELIZATION) \ + $(TEST_DOCKER_RESOURCE_CONSTRAINTS) \ + $(TEST_MODCACHE_VOL) \ + $(TEST_BUILDCACHE_VOL) \ + -v $(MAIN_GOPATH)/bin/linux_amd64/:/go/bin \ + -v $(shell pwd):/consul \ + $(GO_BUILD_TAG) \ + make test-internal + +other-consul: @echo "--> Checking for other consul instances" @if ps -ef | grep 'consul agent' | grep -v grep ; then \ echo "Found other running consul agents. This may affect your tests." ; \ exit 1 ; \ fi + +.PHONY: fmt +fmt: $(foreach mod,$(GO_MODULES),fmt/$(mod)) -# Use GO_TEST_FLAGS to run specific tests: -# make test-envoy-integ GO_TEST_FLAGS="-run TestEnvoy/case-basic" -# NOTE: Always uses amd64 images, even when running on M1 macs, to match CI/CD environment. -.PHONY: test-envoy-integ -test-envoy-integ: $(ENVOY_INTEG_DEPS) ## Run integration tests. - @go test -v -timeout=30m -tags integration $(GO_TEST_FLAGS) ./test/integration/connect/envoy - -# NOTE: Use DOCKER_BUILDKIT=0, if docker build fails to resolve consul:local base image -.PHONY: test-compat-integ-setup -test-compat-integ-setup: dev-docker - @docker tag consul-dev:latest $(CONSUL_COMPAT_TEST_IMAGE):local - @docker run --rm -t $(CONSUL_COMPAT_TEST_IMAGE):local consul version - @# 'consul-envoy:target-version' is needed by compatibility integ test - @docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=$(CONSUL_COMPAT_TEST_IMAGE):local --build-arg ENVOY_VERSION=${ENVOY_VERSION} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - -.PHONY: test-compat-integ -test-compat-integ: test-compat-integ-setup ## Test compat integ -ifeq ("$(GOTESTSUM_PATH)","") - @cd ./test/integration/consul-container && \ - go test \ - -v \ - -timeout=30m \ - ./... \ - --tags $(GOTAGS) \ - --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --target-version local \ - --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --latest-version latest -else - @cd ./test/integration/consul-container && \ - gotestsum \ - --format=short-verbose \ - --debug \ - --rerun-fails=3 \ - --packages="./..." \ - -- \ - --tags $(GOTAGS) \ - -timeout=30m \ - ./... \ - --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --target-version local \ - --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --latest-version latest -endif +.PHONY: fmt/% +fmt/%: + @echo "--> Running go fmt ($*)" + @cd $* && gofmt -s -l -w . -.PHONY: test-metrics-integ -test-metrics-integ: test-compat-integ-setup ## Test metrics integ - @cd ./test/integration/consul-container && \ - go test -v -timeout=7m ./test/metrics \ - --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --target-version local \ - --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ - --latest-version latest +.PHONY: lint +lint: $(foreach mod,$(GO_MODULES),lint/$(mod)) lint-container-test-deps -.PHONY: test-connect-ca-providers -test-connect-ca-providers: ## Running /agent/connect/ca tests in verbose mode - @echo "Running /agent/connect/ca tests in verbose mode" - @go test -v ./agent/connect/ca - @go test -v ./agent/consul -run Vault - @go test -v ./agent -run Vault +.PHONY: lint/% +lint/%: + @echo "--> Running golangci-lint ($*)" + @cd $* && GOWORK=off golangci-lint run --build-tags '$(GOTAGS)' + @echo "--> Running lint-consul-retry ($*)" + @cd $* && GOWORK=off lint-consul-retry + @echo "--> Running enumcover ($*)" + @cd $* && GOWORK=off enumcover ./... -##@ UI +.PHONY: lint-container-test-deps +lint-container-test-deps: + @echo "--> Checking container tests for bad dependencies" + @cd test/integration/consul-container && ( \ + found="$$(go list -m all | grep -c '^github.com/hashicorp/consul ')" ; \ + if [[ "$$found" != "0" ]]; then \ + echo "test/integration/consul-container: This project should not depend on the root consul module" >&2 ; \ + exit 1 ; \ + fi \ + ) -.PHONY: ui -ui: ui-docker ## Build the static web ui inside a Docker container. For local testing only; do not commit these assets. +# Build the static web ui inside a Docker container. For local testing only; do not commit these assets. +ui: ui-docker +# Build the static web ui with yarn. This is the version to commit. .PHONY: ui-regen -ui-regen: ## Build the static web ui with yarn. This is the version to commit. +ui-regen: cd $(CURDIR)/ui && make && cd .. rm -rf $(CURDIR)/agent/uiserver/dist mv $(CURDIR)/ui/packages/consul-ui/dist $(CURDIR)/agent/uiserver/ -.PHONY: ui-build-image -ui-build-image: ## Building UI build container - @echo "Building UI build container" - @docker build $(NOCACHE) $(QUIET) -t $(UI_BUILD_TAG) - < build-support/docker/Build-UI.dockerfile - -.PHONY: ui-docker -ui-docker: ui-build-image ## Builds ui within docker container and copy all the relevant artifacts out of the containers back to the source - @$(SHELL) $(CURDIR)/build-support/scripts/build-docker.sh ui - -##@ Tools - -.PHONY: tools -tools: ## Installs various supporting Go tools. +tools: @$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh .PHONY: lint-tools -lint-tools: ## Install tools for linting +lint-tools: @$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh -lint +.PHONY: proto-tools +proto-tools: + @$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh -protobuf + .PHONY: codegen-tools -codegen-tools: ## Install tools for codegen +codegen-tools: @$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh -codegen .PHONY: deep-copy -deep-copy: codegen-tools ## Deep copy +deep-copy: codegen-tools @$(SHELL) $(CURDIR)/agent/structs/deep-copy.sh @$(SHELL) $(CURDIR)/agent/proxycfg/deep-copy.sh @$(SHELL) $(CURDIR)/agent/consul/state/deep-copy.sh -print-% : ; @echo $($*) ## utility to echo a makefile variable (i.e. 'make print-GOPATH') - -.PHONY: module-versions -module-versions: ## Print a list of modules which can be updated. Columns are: module current_version date_of_current_version latest_version - @go list -m -u -f '{{if .Update}} {{printf "%-50v %-40s" .Path .Version}} {{with .Time}} {{ .Format "2006-01-02" -}} {{else}} {{printf "%9s" ""}} {{end}} {{ .Update.Version}} {{end}}' all - -.PHONY: docs -docs: ## Point your web browser to http://localhost:3000/consul to live render docs from ./website/ - make -C website - -##@ Release - -.PHONY: version -version: ## Current Consul version +version: @echo -n "Version: " @$(SHELL) $(CURDIR)/build-support/scripts/version.sh @echo -n "Version + release: " @@ -455,20 +403,26 @@ version: ## Current Consul version @echo -n "Version + release + git: " @$(SHELL) $(CURDIR)/build-support/scripts/version.sh -r -g -.PHONY: docker-images + docker-images: go-build-image ui-build-image -.PHONY: go-build-image -go-build-image: ## Building Golang build container +go-build-image: @echo "Building Golang build container" @docker build $(NOCACHE) $(QUIET) -t $(GO_BUILD_TAG) - < build-support/docker/Build-Go.dockerfile -.PHONY: consul-docker -consul-docker: go-build-image ## Builds consul in a docker container and then dumps executable into ./pkg/bin/... +ui-build-image: + @echo "Building UI build container" + @docker build $(NOCACHE) $(QUIET) -t $(UI_BUILD_TAG) - < build-support/docker/Build-UI.dockerfile + +# Builds consul in a docker container and then dumps executable into ./pkg/bin/... +consul-docker: go-build-image @$(SHELL) $(CURDIR)/build-support/scripts/build-docker.sh consul -.PHONY: docker-envoy-integ -docker-envoy-integ: ## Build image used to run integration tests locally. +ui-docker: ui-build-image + @$(SHELL) $(CURDIR)/build-support/scripts/build-docker.sh ui + +# Build image used to run integration tests locally. +docker-envoy-integ: $(MAKE) GOARCH=amd64 linux docker build \ --platform linux/amd64 $(NOCACHE) $(QUIET) \ @@ -477,21 +431,75 @@ docker-envoy-integ: ## Build image used to run integration tests locally. $(CURDIR)/pkg/bin/linux_amd64 \ -f $(CURDIR)/build-support/docker/Consul-Dev.dockerfile -##@ Proto +# Run integration tests. +# Use GO_TEST_FLAGS to run specific tests: +# make test-envoy-integ GO_TEST_FLAGS="-run TestEnvoy/case-basic" +# NOTE: Always uses amd64 images, even when running on M1 macs, to match CI/CD environment. +test-envoy-integ: $(ENVOY_INTEG_DEPS) + @go test -v -timeout=30m -tags integration $(GO_TEST_FLAGS) ./test/integration/connect/envoy -.PHONY: proto -proto: proto-tools proto-gen proto-mocks ## Protobuf setup command +.PHONY: test-compat-integ +test-compat-integ: test-compat-integ-setup +ifeq ("$(GOTESTSUM_PATH)","") + @cd ./test/integration/consul-container && \ + go test \ + -v \ + -timeout=30m \ + ./... \ + --tags $(GOTAGS) \ + --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --target-version local \ + --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --latest-version latest +else + @cd ./test/integration/consul-container && \ + gotestsum \ + --format=short-verbose \ + --debug \ + --rerun-fails=3 \ + --packages="./..." \ + -- \ + --tags $(GOTAGS) \ + -timeout=30m \ + ./... \ + --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --target-version local \ + --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --latest-version latest +endif -.PHONY: proto-tools -proto-tools: ## Install tools for protobuf - @$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh -protobuf +# NOTE: Use DOCKER_BUILDKIT=0, if docker build fails to resolve consul:local base image +.PHONY: test-compat-integ-setup +test-compat-integ-setup: dev-docker + @docker tag consul-dev:latest $(CONSUL_COMPAT_TEST_IMAGE):local + @docker run --rm -t $(CONSUL_COMPAT_TEST_IMAGE):local consul version + @# 'consul-envoy:target-version' is needed by compatibility integ test + @docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=$(CONSUL_COMPAT_TEST_IMAGE):local --build-arg ENVOY_VERSION=${ENVOY_VERSION} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets + +.PHONY: test-metrics-integ +test-metrics-integ: test-compat-integ-setup + @cd ./test/integration/consul-container && \ + go test -v -timeout=7m ./test/metrics \ + --target-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --target-version local \ + --latest-image $(CONSUL_COMPAT_TEST_IMAGE) \ + --latest-version latest + +test-connect-ca-providers: + @echo "Running /agent/connect/ca tests in verbose mode" + @go test -v ./agent/connect/ca + @go test -v ./agent/consul -run Vault + @go test -v ./agent -run Vault + +.PHONY: proto +proto: proto-tools proto-gen proto-mocks .PHONY: proto-gen -proto-gen: proto-tools ## Regenerates all Go files from protobuf definitions +proto-gen: proto-tools @$(SHELL) $(CURDIR)/build-support/scripts/protobuf.sh .PHONY: proto-mocks -proto-mocks: ## Proto mocks +proto-mocks: for dir in $(MOCKED_PB_DIRS) ; do \ cd proto-public && \ rm -f $$dir/mock*.go && \ @@ -499,11 +507,11 @@ proto-mocks: ## Proto mocks done .PHONY: proto-format -proto-format: proto-tools ## Proto format +proto-format: proto-tools @buf format -w .PHONY: proto-lint -proto-lint: proto-tools ## Proto lint +proto-lint: proto-tools @buf lint @for fn in $$(find proto -name '*.proto'); do \ if [[ "$$fn" = "proto/private/pbsubscribe/subscribe.proto" ]]; then \ @@ -518,14 +526,21 @@ proto-lint: proto-tools ## Proto lint fi \ done -##@ Envoy +# utility to echo a makefile variable (i.e. 'make print-PROTOC_VERSION') +print-% : ; @echo $($*) + +.PHONY: module-versions +# Print a list of modules which can be updated. +# Columns are: module current_version date_of_current_version latest_version +module-versions: + @go list -m -u -f '{{if .Update}} {{printf "%-50v %-40s" .Path .Version}} {{with .Time}} {{ .Format "2006-01-02" -}} {{else}} {{printf "%9s" ""}} {{end}} {{ .Update.Version}} {{end}}' all .PHONY: envoy-library -envoy-library: ## Ensures that all of the protobuf packages present in the github.com/envoyproxy/go-control-plane library are referenced in the consul codebase +envoy-library: @$(SHELL) $(CURDIR)/build-support/scripts/envoy-library-references.sh .PHONY: envoy-regen -envoy-regen: ## Regenerating envoy golden files +envoy-regen: $(info regenerating envoy golden files) @for d in endpoints listeners routes clusters rbac; do \ if [[ -d "agent/xds/testdata/$${d}" ]]; then \ @@ -536,18 +551,17 @@ envoy-regen: ## Regenerating envoy golden files @find "command/connect/envoy/testdata" -name '*.golden' -delete @go test -tags '$(GOTAGS)' ./command/connect/envoy -update -##@ Help - -# The help target prints out all targets with their descriptions organized -# beneath their categories. The categories are represented by '##@' and the -# target descriptions by '##'. The awk commands is responsible for reading the -# entire set of makefiles included in this invocation, looking for lines of the -# file as xyz: ## something, and then pretty-format the target and help. Then, -# if there's a line with ##@ something, that gets pretty-printed as a category. -# More info on the usage of ANSI control characters for terminal formatting: -# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters -# More info on the awk command: -# http://linuxcommand.org/lc3_adv_awk.php +# Point your web browser to http://localhost:3000/consul to live render docs from ./website/ +.PHONY: docs +docs: + make -C website + .PHONY: help -help: ## Display this help. - @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) +help: + $(info available make targets) + $(info ----------------------) + @grep "^[a-z0-9-][a-z0-9.-]*:" GNUmakefile | cut -d':' -f1 | sort + +.PHONY: all bin dev dist cov test test-internal cover lint ui tools +.PHONY: docker-images go-build-image ui-build-image consul-docker ui-docker +.PHONY: version test-envoy-integ diff --git a/LICENSE b/LICENSE index 1f38fcdd11e2d..c72625e4cc88b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,61 +1,356 @@ -License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved. -“Business Source License” is a trademark of MariaDB Corporation Ab. - -Parameters - -Licensor: HashiCorp, Inc. -Licensed Work: Consul 1.17.0. The Licensed Work is (c) 2023 HashiCorp, Inc. -Additional Use Grant: You may make production use of the Licensed Work, - provided such use does not include offering the Licensed Work - to third parties on a hosted or embedded basis which is - competitive with HashiCorp's products. -Change Date: Four years from the date the Licensed Work is published. -Change License: MPL 2.0 - -For information about alternative licensing arrangements for the Licensed Work, -please contact licensing@hashicorp.com. - -Notice - -Business Source License 1.1 - -Terms - -The Licensor hereby grants you the right to copy, modify, create derivative -works, redistribute, and make non-production use of the Licensed Work. The -Licensor may make an Additional Use Grant, above, permitting limited production use. - -Effective on the Change Date, or the fourth anniversary of the first publicly -available distribution of a specific version of the Licensed Work under this -License, whichever comes first, the Licensor hereby grants you rights under -the terms of the Change License, and the rights granted in the paragraph -above terminate. - -If your use of the Licensed Work does not comply with the requirements -currently in effect as described in this License, you must purchase a -commercial license from the Licensor, its affiliated entities, or authorized -resellers, or you must refrain from using the Licensed Work. - -All copies of the original and modified Licensed Work, and derivative works -of the Licensed Work, are subject to this License. This License applies -separately for each version of the Licensed Work and the Change Date may vary -for each version of the Licensed Work released by Licensor. - -You must conspicuously display this License on each original or modified copy -of the Licensed Work. If you receive the Licensed Work in original or -modified form from a third party, the terms and conditions set forth in this -License apply to your use of that work. - -Any use of the Licensed Work in violation of this License will automatically -terminate your rights under this License for the current and all other -versions of the Licensed Work. - -This License does not grant you any right in any trademark or logo of -Licensor or its affiliates (provided that you may use a trademark or logo of -Licensor as expressly required by this License). - -TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -TITLE. +Copyright (c) 2013 HashiCorp, Inc. + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/README.md b/README.md index 870e00f76c761..93e3176cc048a 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,7 @@ Consul provides several key features: discovery prevents routing traffic to unhealthy hosts and enables service level circuit breakers. -* **Dynamic App Configuration** - An HTTP API that allows users to store indexed objects within Consul, - for storing configuration parameters and application metadata. +* **Dynamic App Configuration** - An HTTP API that allows users to store indexed objects, like configuration parameters and application metadata, within Consul. Consul runs on Linux, macOS, FreeBSD, Solaris, and Windows and includes an optional [browser based UI](https://demo.consul.io). A commercial version diff --git a/acl/MockAuthorizer.go b/acl/MockAuthorizer.go index cabdf1b812435..01afb5fea6654 100644 --- a/acl/MockAuthorizer.go +++ b/acl/MockAuthorizer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/acl.go b/acl/acl.go index 753db01516e8c..75789dd17498c 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/acl_ce.go b/acl/acl_ce.go index 76e77f3b8f46c..58f92022ba55b 100644 --- a/acl/acl_ce.go +++ b/acl/acl_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/acl_test.go b/acl/acl_test.go index de95e91f1264c..3734eb1572fd3 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/authorizer.go b/acl/authorizer.go index 21a7dbc80170e..f4515f11c92ac 100644 --- a/acl/authorizer.go +++ b/acl/authorizer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/authorizer_ce.go b/acl/authorizer_ce.go index 06ec22dae7b43..ed77d5e81d3f7 100644 --- a/acl/authorizer_ce.go +++ b/acl/authorizer_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/authorizer_test.go b/acl/authorizer_test.go index 09cba85fa6b5f..20774841ba8dc 100644 --- a/acl/authorizer_test.go +++ b/acl/authorizer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/chained_authorizer.go b/acl/chained_authorizer.go index 333ad7e90fd0c..9a681187bc1ed 100644 --- a/acl/chained_authorizer.go +++ b/acl/chained_authorizer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/chained_authorizer_test.go b/acl/chained_authorizer_test.go index a198ab67788b3..c17cbc907bf50 100644 --- a/acl/chained_authorizer_test.go +++ b/acl/chained_authorizer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/enterprisemeta_ce.go b/acl/enterprisemeta_ce.go index 791776e09b137..8b93fd6807968 100644 --- a/acl/enterprisemeta_ce.go +++ b/acl/enterprisemeta_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/errors.go b/acl/errors.go index 7f4548ed95d62..7302e0392f178 100644 --- a/acl/errors.go +++ b/acl/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/errors_ce.go b/acl/errors_ce.go index 57b0eb32479d9..8c2e84ac5c415 100644 --- a/acl/errors_ce.go +++ b/acl/errors_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/errors_test.go b/acl/errors_test.go index b4e645c073122..4988f695994f6 100644 --- a/acl/errors_test.go +++ b/acl/errors_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/policy.go b/acl/policy.go index ef821563b0ad7..e26c8871314c3 100644 --- a/acl/policy.go +++ b/acl/policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/policy_authorizer.go b/acl/policy_authorizer.go index 9043dc40cdbf0..e87635a036df1 100644 --- a/acl/policy_authorizer.go +++ b/acl/policy_authorizer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/policy_authorizer_ce.go b/acl/policy_authorizer_ce.go index ccdb2e758557b..89708a5be9c31 100644 --- a/acl/policy_authorizer_ce.go +++ b/acl/policy_authorizer_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/policy_authorizer_test.go b/acl/policy_authorizer_test.go index d144bc8d8cce3..1c6959527899d 100644 --- a/acl/policy_authorizer_test.go +++ b/acl/policy_authorizer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/policy_ce.go b/acl/policy_ce.go index ed7eed9917cef..b33c3243364ba 100644 --- a/acl/policy_ce.go +++ b/acl/policy_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/policy_merger.go b/acl/policy_merger.go index 7707c4f9a51e2..df065a9cb1b95 100644 --- a/acl/policy_merger.go +++ b/acl/policy_merger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/policy_merger_ce.go b/acl/policy_merger_ce.go index 207051f3482ab..b221f25875399 100644 --- a/acl/policy_merger_ce.go +++ b/acl/policy_merger_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/acl/policy_test.go b/acl/policy_test.go index 2ce0b32892fbe..ac23e3c0df3b0 100644 --- a/acl/policy_test.go +++ b/acl/policy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/resolver/danger.go b/acl/resolver/danger.go index c2ae1a3c40c7a..a72efa9278449 100644 --- a/acl/resolver/danger.go +++ b/acl/resolver/danger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resolver diff --git a/acl/resolver/result.go b/acl/resolver/result.go index 1e52b1c573168..190d15eca5b8a 100644 --- a/acl/resolver/result.go +++ b/acl/resolver/result.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resolver diff --git a/acl/static_authorizer.go b/acl/static_authorizer.go index 2b62320b0a11c..a6678925695c9 100644 --- a/acl/static_authorizer.go +++ b/acl/static_authorizer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/static_authorizer_test.go b/acl/static_authorizer_test.go index cdaf91ef71020..e94ac44e500f0 100644 --- a/acl/static_authorizer_test.go +++ b/acl/static_authorizer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/testing.go b/acl/testing.go index ef4d0343c6b9e..1c67458b174f8 100644 --- a/acl/testing.go +++ b/acl/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/validation.go b/acl/validation.go index c0017effa15d7..96119dcc0fbaa 100644 --- a/acl/validation.go +++ b/acl/validation.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/acl/validation_test.go b/acl/validation_test.go index 3bf14719b12ae..d5d01e0e9054e 100644 --- a/acl/validation_test.go +++ b/acl/validation_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/acl.go b/agent/acl.go index 0f64ee62c79e9..381f2c028e4fc 100644 --- a/agent/acl.go +++ b/agent/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/acl_ce.go b/agent/acl_ce.go index 32d076fe1ed16..aa505da1ef49b 100644 --- a/agent/acl_ce.go +++ b/agent/acl_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/acl_endpoint.go b/agent/acl_endpoint.go index 9f38f41f15dbd..60aa13a1490c5 100644 --- a/agent/acl_endpoint.go +++ b/agent/acl_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/acl_endpoint_test.go b/agent/acl_endpoint_test.go index 82b2a9574fcfe..4a84ef3155fdb 100644 --- a/agent/acl_endpoint_test.go +++ b/agent/acl_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/acl_test.go b/agent/acl_test.go index 0958db8db6fb0..40662231ac367 100644 --- a/agent/acl_test.go +++ b/agent/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -22,7 +22,6 @@ import ( "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/lib" - "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/sdk/testutil" "github.com/hashicorp/consul/types" @@ -164,9 +163,6 @@ func (a *TestACLAgent) Stats() map[string]map[string]string { func (a *TestACLAgent) ReloadConfig(_ consul.ReloadableConfig) error { return fmt.Errorf("Unimplemented") } -func (a *TestACLAgent) ResourceServiceClient() pbresource.ResourceServiceClient { - return nil -} func TestACL_Version8EnabledByDefault(t *testing.T) { t.Parallel() diff --git a/agent/ae/ae.go b/agent/ae/ae.go index 65b38e00e4b4c..8c4d8c9972966 100644 --- a/agent/ae/ae.go +++ b/agent/ae/ae.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package ae provides tools to synchronize state between local and remote consul servers. package ae diff --git a/agent/ae/ae_test.go b/agent/ae/ae_test.go index 9e9593f4f92d2..873cd4128db34 100644 --- a/agent/ae/ae_test.go +++ b/agent/ae/ae_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ae diff --git a/agent/ae/trigger.go b/agent/ae/trigger.go index 29bdd988907eb..a320bda526d1f 100644 --- a/agent/ae/trigger.go +++ b/agent/ae/trigger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ae diff --git a/agent/agent.go b/agent/agent.go index 229ec5b8fd3d1..d1d4616471163 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -71,7 +71,6 @@ import ( "github.com/hashicorp/consul/lib/mutex" "github.com/hashicorp/consul/lib/routine" "github.com/hashicorp/consul/logging" - "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/proto/private/pboperator" "github.com/hashicorp/consul/proto/private/pbpeering" "github.com/hashicorp/consul/tlsutil" @@ -199,9 +198,6 @@ type delegate interface { RPC(ctx context.Context, method string, args interface{}, reply interface{}) error - // ResourceServiceClient is a client for the gRPC Resource Service. - ResourceServiceClient() pbresource.ResourceServiceClient - SnapshotRPC(args *structs.SnapshotRequest, in io.Reader, out io.Writer, replyFn structs.SnapshotReplyFn) error Shutdown() error Stats() map[string]map[string]string diff --git a/agent/agent_ce.go b/agent/agent_ce.go index 37a1804fe2706..e8cfea681b3cb 100644 --- a/agent/agent_ce.go +++ b/agent/agent_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/agent_ce_test.go b/agent/agent_ce_test.go index 07882c7b1eed9..ceb90beb0634c 100644 --- a/agent/agent_ce_test.go +++ b/agent/agent_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/agent_endpoint.go b/agent/agent_endpoint.go index 96857409ce777..23bfa49c88444 100644 --- a/agent/agent_endpoint.go +++ b/agent/agent_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -11,12 +11,16 @@ import ( "strings" "time" - "github.com/hashicorp/go-bexpr" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + "github.com/mitchellh/hashstructure" + + "github.com/hashicorp/consul/envoyextensions/xdscommon" + "github.com/hashicorp/consul/version" + + "github.com/hashicorp/go-bexpr" "github.com/hashicorp/serf/coordinate" "github.com/hashicorp/serf/serf" - "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -28,13 +32,11 @@ import ( "github.com/hashicorp/consul/agent/structs" token_store "github.com/hashicorp/consul/agent/token" "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/ipaddr" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/logging" "github.com/hashicorp/consul/logging/monitor" "github.com/hashicorp/consul/types" - "github.com/hashicorp/consul/version" ) type Self struct { diff --git a/agent/agent_endpoint_ce.go b/agent/agent_endpoint_ce.go index cf2984ab5f1d3..48b9c439cac47 100644 --- a/agent/agent_endpoint_ce.go +++ b/agent/agent_endpoint_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/agent_endpoint_ce_test.go b/agent/agent_endpoint_ce_test.go index 6608f40f40417..763a5a006049c 100644 --- a/agent/agent_endpoint_ce_test.go +++ b/agent/agent_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/agent_endpoint_test.go b/agent/agent_endpoint_test.go index 32516a76cb464..0a37ae174a190 100644 --- a/agent/agent_endpoint_test.go +++ b/agent/agent_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -21,6 +21,10 @@ import ( "time" "github.com/armon/go-metrics" + + "github.com/hashicorp/consul/api" + "github.com/hashicorp/consul/version" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-uuid" "github.com/hashicorp/serf/serf" @@ -40,14 +44,12 @@ import ( "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/token" tokenStore "github.com/hashicorp/consul/agent/token" - "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/sdk/testutil" "github.com/hashicorp/consul/sdk/testutil/retry" "github.com/hashicorp/consul/testrpc" "github.com/hashicorp/consul/types" - "github.com/hashicorp/consul/version" ) func createACLTokenWithAgentReadPolicy(t *testing.T, srv *HTTPHandlers) string { @@ -1601,37 +1603,14 @@ func TestAgent_Metrics_ACLDeny(t *testing.T) { }) } -func newDefaultBaseDeps(t *testing.T) BaseDeps { - dataDir := testutil.TempDir(t, "acl-agent") - logBuffer := testutil.NewLogBuffer(t) - logger := hclog.NewInterceptLogger(nil) - loader := func(source config.Source) (config.LoadResult, error) { - dataDir := fmt.Sprintf(`data_dir = "%s"`, dataDir) - opts := config.LoadOpts{ - HCL: []string{TestConfigHCL(NodeID()), "", dataDir}, - DefaultConfig: source, - } - result, err := config.Load(opts) - if result.RuntimeConfig != nil { - result.RuntimeConfig.Telemetry.Disable = true - } - return result, err - } - bd, err := NewBaseDeps(loader, logBuffer, logger) - require.NoError(t, err) - return bd -} - func TestHTTPHandlers_AgentMetricsStream_ACLDeny(t *testing.T) { - bd := newDefaultBaseDeps(t) + bd := BaseDeps{} bd.Tokens = new(tokenStore.Store) sink := metrics.NewInmemSink(30*time.Millisecond, time.Second) bd.MetricsConfig = &lib.MetricsConfig{ Handler: sink, } - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - d := fakeResolveTokenDelegate{delegate: &mockDelegate, authorizer: acl.DenyAll()} + d := fakeResolveTokenDelegate{authorizer: acl.DenyAll()} agent := &Agent{ baseDeps: bd, delegate: d, @@ -1654,15 +1633,13 @@ func TestHTTPHandlers_AgentMetricsStream_ACLDeny(t *testing.T) { } func TestHTTPHandlers_AgentMetricsStream(t *testing.T) { - bd := newDefaultBaseDeps(t) + bd := BaseDeps{} bd.Tokens = new(tokenStore.Store) sink := metrics.NewInmemSink(20*time.Millisecond, time.Second) bd.MetricsConfig = &lib.MetricsConfig{ Handler: sink, } - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - d := fakeResolveTokenDelegate{delegate: &mockDelegate, authorizer: acl.ManageAll()} + d := fakeResolveTokenDelegate{authorizer: acl.ManageAll()} agent := &Agent{ baseDeps: bd, delegate: d, diff --git a/agent/agent_test.go b/agent/agent_test.go index 96dd1de12555e..a2e27feaf4fd3 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -57,7 +57,6 @@ import ( "github.com/hashicorp/consul/agent/token" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/internal/go-sso/oidcauth/oidcauthtest" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/ipaddr" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/proto/private/pbautoconf" @@ -323,7 +322,6 @@ func TestAgent_HTTPMaxHeaderBytes(t *testing.T) { Tokens: new(token.Store), TLSConfigurator: tlsConf, GRPCConnPool: &fakeGRPCConnPool{}, - Registry: resource.NewRegistry(), }, RuntimeConfig: &config.RuntimeConfig{ HTTPAddrs: []net.Addr{ @@ -346,9 +344,6 @@ func TestAgent_HTTPMaxHeaderBytes(t *testing.T) { require.NoError(t, err) a, err := New(bd) - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - a.delegate = &mockDelegate require.NoError(t, err) a.startLicenseManager(testutil.TestContext(t)) @@ -5482,7 +5477,6 @@ func TestAgent_ListenHTTP_MultipleAddresses(t *testing.T) { Tokens: new(token.Store), TLSConfigurator: tlsConf, GRPCConnPool: &fakeGRPCConnPool{}, - Registry: resource.NewRegistry(), }, RuntimeConfig: &config.RuntimeConfig{ HTTPAddrs: []net.Addr{ @@ -5505,9 +5499,6 @@ func TestAgent_ListenHTTP_MultipleAddresses(t *testing.T) { require.NoError(t, err) agent, err := New(bd) - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - agent.delegate = &mockDelegate require.NoError(t, err) agent.startLicenseManager(testutil.TestContext(t)) @@ -6082,7 +6073,6 @@ func TestAgent_startListeners(t *testing.T) { Logger: hclog.NewInterceptLogger(nil), Tokens: new(token.Store), GRPCConnPool: &fakeGRPCConnPool{}, - Registry: resource.NewRegistry(), }, RuntimeConfig: &config.RuntimeConfig{ HTTPAddrs: []net.Addr{}, @@ -6101,9 +6091,6 @@ func TestAgent_startListeners(t *testing.T) { require.NoError(t, err) agent, err := New(bd) - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - agent.delegate = &mockDelegate require.NoError(t, err) // use up an address @@ -6226,7 +6213,6 @@ func TestAgent_startListeners_scada(t *testing.T) { HCP: hcp.Deps{ Provider: pvd, }, - Registry: resource.NewRegistry(), }, RuntimeConfig: &config.RuntimeConfig{}, Cache: cache.New(cache.Options{}), @@ -6244,9 +6230,6 @@ func TestAgent_startListeners_scada(t *testing.T) { require.NoError(t, err) agent, err := New(bd) - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - agent.delegate = &mockDelegate require.NoError(t, err) _, err = agent.startListeners([]net.Addr{c}) @@ -6290,7 +6273,6 @@ func TestAgent_checkServerLastSeen(t *testing.T) { Logger: hclog.NewInterceptLogger(nil), Tokens: new(token.Store), GRPCConnPool: &fakeGRPCConnPool{}, - Registry: resource.NewRegistry(), }, RuntimeConfig: &config.RuntimeConfig{}, Cache: cache.New(cache.Options{}), @@ -6302,9 +6284,6 @@ func TestAgent_checkServerLastSeen(t *testing.T) { Config: leafcert.Config{}, }) agent, err := New(bd) - mockDelegate := delegateMock{} - mockDelegate.On("LicenseCheck").Return() - agent.delegate = &mockDelegate require.NoError(t, err) // Test that an ErrNotExist OS error is treated as ok. diff --git a/agent/apiserver.go b/agent/apiserver.go index 1f386e3f6b171..a45e16a630b1a 100644 --- a/agent/apiserver.go +++ b/agent/apiserver.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/apiserver_test.go b/agent/apiserver_test.go index 848487a78154c..69188c4248176 100644 --- a/agent/apiserver_test.go +++ b/agent/apiserver_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/auto-config/auto_config.go b/agent/auto-config/auto_config.go index a1a5848f623f0..b73951df70d18 100644 --- a/agent/auto-config/auto_config.go +++ b/agent/auto-config/auto_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/auto_config_ce.go b/agent/auto-config/auto_config_ce.go index 5e5d799634637..78c9ee66d97ba 100644 --- a/agent/auto-config/auto_config_ce.go +++ b/agent/auto-config/auto_config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/auto-config/auto_config_ce_test.go b/agent/auto-config/auto_config_ce_test.go index ff7cbf7472f49..b075ca7686b6e 100644 --- a/agent/auto-config/auto_config_ce_test.go +++ b/agent/auto-config/auto_config_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/auto-config/auto_config_test.go b/agent/auto-config/auto_config_test.go index 7c5c629be2f73..a5ab97e0f45d7 100644 --- a/agent/auto-config/auto_config_test.go +++ b/agent/auto-config/auto_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/auto_encrypt.go b/agent/auto-config/auto_encrypt.go index 1b77c089f6f60..59af662ee033f 100644 --- a/agent/auto-config/auto_encrypt.go +++ b/agent/auto-config/auto_encrypt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/auto_encrypt_test.go b/agent/auto-config/auto_encrypt_test.go index 10a7c8da46888..2c94b6a5540a0 100644 --- a/agent/auto-config/auto_encrypt_test.go +++ b/agent/auto-config/auto_encrypt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/config.go b/agent/auto-config/config.go index 69eee08bc061b..d0f1670ab73a7 100644 --- a/agent/auto-config/config.go +++ b/agent/auto-config/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/config_ce.go b/agent/auto-config/config_ce.go index 6e7e470f298f5..4162bda4c4896 100644 --- a/agent/auto-config/config_ce.go +++ b/agent/auto-config/config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/auto-config/config_translate.go b/agent/auto-config/config_translate.go index b60b3388eb2a8..31aeb7cbdb22f 100644 --- a/agent/auto-config/config_translate.go +++ b/agent/auto-config/config_translate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/config_translate_test.go b/agent/auto-config/config_translate_test.go index 8e2cef8c46ea9..9b37c9870e318 100644 --- a/agent/auto-config/config_translate_test.go +++ b/agent/auto-config/config_translate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/mock_ce_test.go b/agent/auto-config/mock_ce_test.go index cb741b6d47540..872aa5e5438f5 100644 --- a/agent/auto-config/mock_ce_test.go +++ b/agent/auto-config/mock_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/auto-config/mock_test.go b/agent/auto-config/mock_test.go index 0ef5084af2640..263befae112cb 100644 --- a/agent/auto-config/mock_test.go +++ b/agent/auto-config/mock_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/persist.go b/agent/auto-config/persist.go index 66cda1c41438c..0abaa235451d9 100644 --- a/agent/auto-config/persist.go +++ b/agent/auto-config/persist.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/run.go b/agent/auto-config/run.go index ed3389c1880cb..74a78fde9f0d8 100644 --- a/agent/auto-config/run.go +++ b/agent/auto-config/run.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/server_addr.go b/agent/auto-config/server_addr.go index 6bca15d42fb8d..c70a6431fb33e 100644 --- a/agent/auto-config/server_addr.go +++ b/agent/auto-config/server_addr.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/tls.go b/agent/auto-config/tls.go index 8142a1eeb809b..e39022bc959b7 100644 --- a/agent/auto-config/tls.go +++ b/agent/auto-config/tls.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/auto-config/tls_test.go b/agent/auto-config/tls_test.go index 667c7dfa96e5c..b09ee295e60be 100644 --- a/agent/auto-config/tls_test.go +++ b/agent/auto-config/tls_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autoconf diff --git a/agent/blockingquery/blockingquery.go b/agent/blockingquery/blockingquery.go index 3e073a1ffab2b..cb46110222de0 100644 --- a/agent/blockingquery/blockingquery.go +++ b/agent/blockingquery/blockingquery.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package blockingquery import ( diff --git a/agent/blockingquery/blockingquery_test.go b/agent/blockingquery/blockingquery_test.go index 5861ed3991641..6cfc07c114aa7 100644 --- a/agent/blockingquery/blockingquery_test.go +++ b/agent/blockingquery/blockingquery_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package blockingquery // TODO: move tests from the consul package, rpc_test.go, TestServer_blockingQuery diff --git a/agent/cache-types/catalog_datacenters.go b/agent/cache-types/catalog_datacenters.go index 2a4e64c9e5c1c..12da6e9878e3d 100644 --- a/agent/cache-types/catalog_datacenters.go +++ b/agent/cache-types/catalog_datacenters.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_datacenters_test.go b/agent/cache-types/catalog_datacenters_test.go index f04bfb4c7b421..bef374d131cda 100644 --- a/agent/cache-types/catalog_datacenters_test.go +++ b/agent/cache-types/catalog_datacenters_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_list_services.go b/agent/cache-types/catalog_list_services.go index 0a14ed3ef120a..a605c7431388c 100644 --- a/agent/cache-types/catalog_list_services.go +++ b/agent/cache-types/catalog_list_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_list_services_test.go b/agent/cache-types/catalog_list_services_test.go index 623cda2cee3ce..b5da270f962d3 100644 --- a/agent/cache-types/catalog_list_services_test.go +++ b/agent/cache-types/catalog_list_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_service_list.go b/agent/cache-types/catalog_service_list.go index 37ac4ba0f8131..521ed1d3b1ada 100644 --- a/agent/cache-types/catalog_service_list.go +++ b/agent/cache-types/catalog_service_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_service_list_test.go b/agent/cache-types/catalog_service_list_test.go index eb686193cc3ca..995f7e8b6c8c0 100644 --- a/agent/cache-types/catalog_service_list_test.go +++ b/agent/cache-types/catalog_service_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_services.go b/agent/cache-types/catalog_services.go index 8e04997b9f62d..21b472ba3124f 100644 --- a/agent/cache-types/catalog_services.go +++ b/agent/cache-types/catalog_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/catalog_services_test.go b/agent/cache-types/catalog_services_test.go index c084de67ccaad..8723b9015d719 100644 --- a/agent/cache-types/catalog_services_test.go +++ b/agent/cache-types/catalog_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/config_entry.go b/agent/cache-types/config_entry.go index 98443363c1b87..9748c176d1033 100644 --- a/agent/cache-types/config_entry.go +++ b/agent/cache-types/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/config_entry_test.go b/agent/cache-types/config_entry_test.go index d892b069e4c7b..11b109d6634a5 100644 --- a/agent/cache-types/config_entry_test.go +++ b/agent/cache-types/config_entry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/connect_ca_root.go b/agent/cache-types/connect_ca_root.go index 1df3f7c78d837..0d6c8b700ca72 100644 --- a/agent/cache-types/connect_ca_root.go +++ b/agent/cache-types/connect_ca_root.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/connect_ca_root_test.go b/agent/cache-types/connect_ca_root_test.go index 74aa53c31a4c7..c1e906a8b810f 100644 --- a/agent/cache-types/connect_ca_root_test.go +++ b/agent/cache-types/connect_ca_root_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/discovery_chain.go b/agent/cache-types/discovery_chain.go index e27b621061e1d..8f0f177914887 100644 --- a/agent/cache-types/discovery_chain.go +++ b/agent/cache-types/discovery_chain.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/discovery_chain_test.go b/agent/cache-types/discovery_chain_test.go index a9c9783e882bb..b2b279faf7ddd 100644 --- a/agent/cache-types/discovery_chain_test.go +++ b/agent/cache-types/discovery_chain_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/exported_peered_services.go b/agent/cache-types/exported_peered_services.go index 69bd2d92ba71f..3e8f336281446 100644 --- a/agent/cache-types/exported_peered_services.go +++ b/agent/cache-types/exported_peered_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/exported_peered_services_test.go b/agent/cache-types/exported_peered_services_test.go index a2d618bb60c52..4848c2fce9dbe 100644 --- a/agent/cache-types/exported_peered_services_test.go +++ b/agent/cache-types/exported_peered_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/federation_state_list_gateways.go b/agent/cache-types/federation_state_list_gateways.go index 501a8bcead289..50658777b8d83 100644 --- a/agent/cache-types/federation_state_list_gateways.go +++ b/agent/cache-types/federation_state_list_gateways.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/federation_state_list_gateways_test.go b/agent/cache-types/federation_state_list_gateways_test.go index 04bd661e80fc6..7aaad80ed3b2e 100644 --- a/agent/cache-types/federation_state_list_gateways_test.go +++ b/agent/cache-types/federation_state_list_gateways_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/gateway_services.go b/agent/cache-types/gateway_services.go index 9c13800beeee0..030cec59ef88d 100644 --- a/agent/cache-types/gateway_services.go +++ b/agent/cache-types/gateway_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/gateway_services_test.go b/agent/cache-types/gateway_services_test.go index 49be4edf47808..babc30ead3c14 100644 --- a/agent/cache-types/gateway_services_test.go +++ b/agent/cache-types/gateway_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/health_services.go b/agent/cache-types/health_services.go index ae8369364743e..dc1a5e6648ad5 100644 --- a/agent/cache-types/health_services.go +++ b/agent/cache-types/health_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/health_services_test.go b/agent/cache-types/health_services_test.go index 6e83ec9a40181..e3680eb2d5adb 100644 --- a/agent/cache-types/health_services_test.go +++ b/agent/cache-types/health_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_match.go b/agent/cache-types/intention_match.go index fd69eab65c75a..16671328fd2da 100644 --- a/agent/cache-types/intention_match.go +++ b/agent/cache-types/intention_match.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_match_test.go b/agent/cache-types/intention_match_test.go index 26788b679befb..68a467a29d511 100644 --- a/agent/cache-types/intention_match_test.go +++ b/agent/cache-types/intention_match_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_upstreams.go b/agent/cache-types/intention_upstreams.go index a0e1ea0c0fd35..b918a553526ca 100644 --- a/agent/cache-types/intention_upstreams.go +++ b/agent/cache-types/intention_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_upstreams_destination.go b/agent/cache-types/intention_upstreams_destination.go index 1b5200a163c2c..8adba2d7e7426 100644 --- a/agent/cache-types/intention_upstreams_destination.go +++ b/agent/cache-types/intention_upstreams_destination.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_upstreams_destination_test.go b/agent/cache-types/intention_upstreams_destination_test.go index 32852891846f0..d4f8602c7d7e9 100644 --- a/agent/cache-types/intention_upstreams_destination_test.go +++ b/agent/cache-types/intention_upstreams_destination_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/intention_upstreams_test.go b/agent/cache-types/intention_upstreams_test.go index 3259969f03a8f..6f695576d0639 100644 --- a/agent/cache-types/intention_upstreams_test.go +++ b/agent/cache-types/intention_upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/node_services.go b/agent/cache-types/node_services.go index 44dd5624f5658..2b51de9f62f89 100644 --- a/agent/cache-types/node_services.go +++ b/agent/cache-types/node_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/node_services_test.go b/agent/cache-types/node_services_test.go index 6f16f93d5d61f..a1412bbe935be 100644 --- a/agent/cache-types/node_services_test.go +++ b/agent/cache-types/node_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/options.go b/agent/cache-types/options.go index cd46060f8bce4..cbfa2ff178ef8 100644 --- a/agent/cache-types/options.go +++ b/agent/cache-types/options.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/peered_upstreams.go b/agent/cache-types/peered_upstreams.go index 964b350eb1505..49997ecdf9675 100644 --- a/agent/cache-types/peered_upstreams.go +++ b/agent/cache-types/peered_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/peered_upstreams_test.go b/agent/cache-types/peered_upstreams_test.go index 07be6e4188082..1e9dc29fdf4a5 100644 --- a/agent/cache-types/peered_upstreams_test.go +++ b/agent/cache-types/peered_upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/peerings.go b/agent/cache-types/peerings.go index 53138e5512d8e..e72b43d563129 100644 --- a/agent/cache-types/peerings.go +++ b/agent/cache-types/peerings.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/peerings_test.go b/agent/cache-types/peerings_test.go index 088a077c4f504..75fc21371eb7d 100644 --- a/agent/cache-types/peerings_test.go +++ b/agent/cache-types/peerings_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/prepared_query.go b/agent/cache-types/prepared_query.go index 8a9ec7720959c..995214a1b45b4 100644 --- a/agent/cache-types/prepared_query.go +++ b/agent/cache-types/prepared_query.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/prepared_query_test.go b/agent/cache-types/prepared_query_test.go index 50850c20fe9bc..26ea4d4c0b028 100644 --- a/agent/cache-types/prepared_query_test.go +++ b/agent/cache-types/prepared_query_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/resolved_service_config.go b/agent/cache-types/resolved_service_config.go index 76c333840f5d3..589afbcc6bd1b 100644 --- a/agent/cache-types/resolved_service_config.go +++ b/agent/cache-types/resolved_service_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/resolved_service_config_test.go b/agent/cache-types/resolved_service_config_test.go index a71cdb7834362..4c8376447ad5f 100644 --- a/agent/cache-types/resolved_service_config_test.go +++ b/agent/cache-types/resolved_service_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/rpc.go b/agent/cache-types/rpc.go index 13bfdb3e5a5d7..905547d20fe82 100644 --- a/agent/cache-types/rpc.go +++ b/agent/cache-types/rpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_checks.go b/agent/cache-types/service_checks.go index 55ea3896f33cb..88a065c94b865 100644 --- a/agent/cache-types/service_checks.go +++ b/agent/cache-types/service_checks.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_checks_test.go b/agent/cache-types/service_checks_test.go index 898ea4aa9c937..b936990d91a33 100644 --- a/agent/cache-types/service_checks_test.go +++ b/agent/cache-types/service_checks_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_dump.go b/agent/cache-types/service_dump.go index 60c2895aff1f5..3bab11239f04b 100644 --- a/agent/cache-types/service_dump.go +++ b/agent/cache-types/service_dump.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_dump_test.go b/agent/cache-types/service_dump_test.go index 3570fc9720a16..8fe39e63b268e 100644 --- a/agent/cache-types/service_dump_test.go +++ b/agent/cache-types/service_dump_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_gateways.go b/agent/cache-types/service_gateways.go index a080fc77451ce..d096d136fa2fb 100644 --- a/agent/cache-types/service_gateways.go +++ b/agent/cache-types/service_gateways.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/service_gateways_test.go b/agent/cache-types/service_gateways_test.go index 9f615162b6fb3..c8c62e7c9ad5f 100644 --- a/agent/cache-types/service_gateways_test.go +++ b/agent/cache-types/service_gateways_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/testing.go b/agent/cache-types/testing.go index 3789eff4e2a5e..459feaba9fa37 100644 --- a/agent/cache-types/testing.go +++ b/agent/cache-types/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/trust_bundle.go b/agent/cache-types/trust_bundle.go index 0bac27e2b8c23..301b18977d95c 100644 --- a/agent/cache-types/trust_bundle.go +++ b/agent/cache-types/trust_bundle.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/trust_bundle_test.go b/agent/cache-types/trust_bundle_test.go index f39a15bdc6622..dc39c3555bd51 100644 --- a/agent/cache-types/trust_bundle_test.go +++ b/agent/cache-types/trust_bundle_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/trust_bundles.go b/agent/cache-types/trust_bundles.go index 7098c01af47ad..a485ee53414c0 100644 --- a/agent/cache-types/trust_bundles.go +++ b/agent/cache-types/trust_bundles.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache-types/trust_bundles_test.go b/agent/cache-types/trust_bundles_test.go index f565bab18fdbf..373ba2a8d71f0 100644 --- a/agent/cache-types/trust_bundles_test.go +++ b/agent/cache-types/trust_bundles_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cachetype diff --git a/agent/cache/cache.go b/agent/cache/cache.go index 29f1296f79b92..ed1e4f911ada0 100644 --- a/agent/cache/cache.go +++ b/agent/cache/cache.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package cache provides caching features for data from a Consul server. // diff --git a/agent/cache/cache_test.go b/agent/cache/cache_test.go index 6a4216c85929a..4ab66a29d0bf0 100644 --- a/agent/cache/cache_test.go +++ b/agent/cache/cache_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/entry.go b/agent/cache/entry.go index 9ee1fc0007fa9..fb8008d8c15ee 100644 --- a/agent/cache/entry.go +++ b/agent/cache/entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/request.go b/agent/cache/request.go index 9af73d99687bd..7f66f4ce58819 100644 --- a/agent/cache/request.go +++ b/agent/cache/request.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/testing.go b/agent/cache/testing.go index b754dae3e76a2..7f0df113bc839 100644 --- a/agent/cache/testing.go +++ b/agent/cache/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/type.go b/agent/cache/type.go index ccab3216ca837..d58362fd470d7 100644 --- a/agent/cache/type.go +++ b/agent/cache/type.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/watch.go b/agent/cache/watch.go index 300001240312e..d8693ad032f99 100644 --- a/agent/cache/watch.go +++ b/agent/cache/watch.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/cache/watch_test.go b/agent/cache/watch_test.go index 41c30f4dbb5cf..e6a5848f4ccdd 100644 --- a/agent/cache/watch_test.go +++ b/agent/cache/watch_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cache diff --git a/agent/catalog_endpoint.go b/agent/catalog_endpoint.go index 1dac61befa475..ad72c4b47f353 100644 --- a/agent/catalog_endpoint.go +++ b/agent/catalog_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/catalog_endpoint_ce.go b/agent/catalog_endpoint_ce.go index a3c8595fbe273..fcd8311356d87 100644 --- a/agent/catalog_endpoint_ce.go +++ b/agent/catalog_endpoint_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/catalog_endpoint_test.go b/agent/catalog_endpoint_test.go index 1b92e29a84d2a..da65097dbb581 100644 --- a/agent/catalog_endpoint_test.go +++ b/agent/catalog_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/check.go b/agent/check.go index 078361be66010..79c030d932424 100644 --- a/agent/check.go +++ b/agent/check.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/checks/alias.go b/agent/checks/alias.go index f75c05b9580bb..5e394105cf1c9 100644 --- a/agent/checks/alias.go +++ b/agent/checks/alias.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/alias_test.go b/agent/checks/alias_test.go index 1f5662019929a..70a301d1180ff 100644 --- a/agent/checks/alias_test.go +++ b/agent/checks/alias_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/check.go b/agent/checks/check.go index 0c730b5109424..3d8b58489656d 100644 --- a/agent/checks/check.go +++ b/agent/checks/check.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/check_test.go b/agent/checks/check_test.go index ae53b477f5554..389b4cb14100a 100644 --- a/agent/checks/check_test.go +++ b/agent/checks/check_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/check_windows_test.go b/agent/checks/check_windows_test.go index 05643539be51c..b7c14dd18e853 100644 --- a/agent/checks/check_windows_test.go +++ b/agent/checks/check_windows_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/agent/checks/docker.go b/agent/checks/docker.go index e3483e073b037..11bcac7e01c84 100644 --- a/agent/checks/docker.go +++ b/agent/checks/docker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/docker_unix.go b/agent/checks/docker_unix.go index 976344aa82d2e..33c8a2b817223 100644 --- a/agent/checks/docker_unix.go +++ b/agent/checks/docker_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/agent/checks/docker_windows.go b/agent/checks/docker_windows.go index 6008b695ba1b0..edcb4f380a988 100644 --- a/agent/checks/docker_windows.go +++ b/agent/checks/docker_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/grpc.go b/agent/checks/grpc.go index b3bcba20b5a61..87378521c9dfa 100644 --- a/agent/checks/grpc.go +++ b/agent/checks/grpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/grpc_test.go b/agent/checks/grpc_test.go index e67b453bda62a..4500bcd67f3b5 100644 --- a/agent/checks/grpc_test.go +++ b/agent/checks/grpc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/os_service.go b/agent/checks/os_service.go index 3350c73a2c3b4..af4e9b03ee873 100644 --- a/agent/checks/os_service.go +++ b/agent/checks/os_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package checks diff --git a/agent/checks/os_service_unix.go b/agent/checks/os_service_unix.go index a02c8b54a741f..ab004e29fd9c3 100644 --- a/agent/checks/os_service_unix.go +++ b/agent/checks/os_service_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/agent/checks/os_service_windows.go b/agent/checks/os_service_windows.go index fd9cc1bd33ecc..8b73ce4ad2091 100644 --- a/agent/checks/os_service_windows.go +++ b/agent/checks/os_service_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/agent/config/agent_limits.go b/agent/config/agent_limits.go index 7abbb075d3166..fff5e267f203c 100644 --- a/agent/config/agent_limits.go +++ b/agent/config/agent_limits.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/builder.go b/agent/config/builder.go index a3ca1abfd0c17..5d191ce8b3ac3 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config @@ -1290,10 +1290,6 @@ func (b *builder) validate(rt RuntimeConfig) error { "1 and 63 bytes.", rt.NodeName) } - if err := rt.StructLocality().Validate(); err != nil { - return fmt.Errorf("locality is invalid: %s", err) - } - if ipaddr.IsAny(rt.AdvertiseAddrLAN.IP) { return fmt.Errorf("Advertise address cannot be 0.0.0.0, :: or [::]") } @@ -1473,7 +1469,7 @@ func (b *builder) validate(rt RuntimeConfig) error { return err } case structs.VaultCAProvider: - if _, err := ca.ParseVaultCAConfig(rt.ConnectCAConfig, rt.PrimaryDatacenter == rt.Datacenter); err != nil { + if _, err := ca.ParseVaultCAConfig(rt.ConnectCAConfig); err != nil { return err } case structs.AWSCAProvider: @@ -2653,10 +2649,10 @@ func (b *builder) buildTLSConfig(rt RuntimeConfig, t TLS) (tlsutil.Config, error return c, errors.New("verify_outgoing is not valid in the tls.grpc stanza") } - // Similarly, only the internal RPC and defaults configuration honor VerifyServerHostname + // Similarly, only the internal RPC configuration honors VerifyServerHostname // so we call it out here too. - if t.GRPC.VerifyServerHostname != nil || t.HTTPS.VerifyServerHostname != nil { - return c, errors.New("verify_server_hostname is only valid in the tls.defaults and tls.internal_rpc stanzas") + if t.Defaults.VerifyServerHostname != nil || t.GRPC.VerifyServerHostname != nil || t.HTTPS.VerifyServerHostname != nil { + return c, errors.New("verify_server_hostname is only valid in the tls.internal_rpc stanza") } // And UseAutoCert right now only applies to external gRPC interface. @@ -2706,11 +2702,8 @@ func (b *builder) buildTLSConfig(rt RuntimeConfig, t TLS) (tlsutil.Config, error } mapCommon("internal_rpc", t.InternalRPC, &c.InternalRPC) + c.InternalRPC.VerifyServerHostname = boolVal(t.InternalRPC.VerifyServerHostname) - c.InternalRPC.VerifyServerHostname = boolVal(t.Defaults.VerifyServerHostname) - if t.InternalRPC.VerifyServerHostname != nil { - c.InternalRPC.VerifyServerHostname = boolVal(t.InternalRPC.VerifyServerHostname) - } // Setting only verify_server_hostname is documented to imply verify_outgoing. // If it doesn't then we risk sending communication over plain TCP when we // documented it as forcing TLS for RPCs. Enforce this here rather than in diff --git a/agent/config/builder_ce.go b/agent/config/builder_ce.go index ab7e1ece5a870..dae1e275c96a6 100644 --- a/agent/config/builder_ce.go +++ b/agent/config/builder_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/builder_ce_test.go b/agent/config/builder_ce_test.go index 3b3a220278c7e..100f905859da6 100644 --- a/agent/config/builder_ce_test.go +++ b/agent/config/builder_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/builder_test.go b/agent/config/builder_test.go index 2cc3e3148c37a..3eb81fdee4de6 100644 --- a/agent/config/builder_test.go +++ b/agent/config/builder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/config.go b/agent/config/config.go index baaa1805191a9..8917a60858d68 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/config_ce.go b/agent/config/config_ce.go index aaf743919b97a..2fc8da58e6da8 100644 --- a/agent/config/config_ce.go +++ b/agent/config/config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/default.go b/agent/config/default.go index 275a32a33fd6c..536ac7ac33407 100644 --- a/agent/config/default.go +++ b/agent/config/default.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/default_ce.go b/agent/config/default_ce.go index 4f5adf0de724f..f91bb9c7d3600 100644 --- a/agent/config/default_ce.go +++ b/agent/config/default_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/deprecated.go b/agent/config/deprecated.go index 921e3329ffa6b..597095f8e2642 100644 --- a/agent/config/deprecated.go +++ b/agent/config/deprecated.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/deprecated_test.go b/agent/config/deprecated_test.go index 8d03e431f7afb..785c9555084f2 100644 --- a/agent/config/deprecated_test.go +++ b/agent/config/deprecated_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/doc.go b/agent/config/doc.go index 5bfc77d902528..4cbc2c41cfdcb 100644 --- a/agent/config/doc.go +++ b/agent/config/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package config contains the command line and config file code for the // consul agent. diff --git a/agent/config/file_watcher.go b/agent/config/file_watcher.go index 2afe19b1a659a..c91bb1dd50cc7 100644 --- a/agent/config/file_watcher.go +++ b/agent/config/file_watcher.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/file_watcher_test.go b/agent/config/file_watcher_test.go index f937d1401195a..02b1cd14117be 100644 --- a/agent/config/file_watcher_test.go +++ b/agent/config/file_watcher_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/flags.go b/agent/config/flags.go index b56a162287c0c..21e1ac612a530 100644 --- a/agent/config/flags.go +++ b/agent/config/flags.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/flags_test.go b/agent/config/flags_test.go index a6c9ee23bd4aa..10df0d6d7f005 100644 --- a/agent/config/flags_test.go +++ b/agent/config/flags_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/flagset.go b/agent/config/flagset.go index af1b06d70ce9a..3b2abe6fdf9a2 100644 --- a/agent/config/flagset.go +++ b/agent/config/flagset.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/golden_test.go b/agent/config/golden_test.go index a9ce20d7bd1af..fb4401efbf4d7 100644 --- a/agent/config/golden_test.go +++ b/agent/config/golden_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/limits.go b/agent/config/limits.go index 46b6d45a1e52f..6b5d466ab639a 100644 --- a/agent/config/limits.go +++ b/agent/config/limits.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/agent/config/limits_windows.go b/agent/config/limits_windows.go index 538d84721f4f9..d9d3499397b56 100644 --- a/agent/config/limits_windows.go +++ b/agent/config/limits_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/agent/config/merge.go b/agent/config/merge.go index 64c7c1e974964..f40efdaa87793 100644 --- a/agent/config/merge.go +++ b/agent/config/merge.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/merge_test.go b/agent/config/merge_test.go index 9c2e2a1a07363..13e3cbb186ece 100644 --- a/agent/config/merge_test.go +++ b/agent/config/merge_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/ratelimited_file_watcher.go b/agent/config/ratelimited_file_watcher.go index 41f894837035f..33de08cf2b62e 100644 --- a/agent/config/ratelimited_file_watcher.go +++ b/agent/config/ratelimited_file_watcher.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/ratelimited_file_watcher_test.go b/agent/config/ratelimited_file_watcher_test.go index 8e4415aaa8712..d6a43b6be82be 100644 --- a/agent/config/ratelimited_file_watcher_test.go +++ b/agent/config/ratelimited_file_watcher_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/runtime.go b/agent/config/runtime.go index 18278b08b1ac8..1a8dc13794d3e 100644 --- a/agent/config/runtime.go +++ b/agent/config/runtime.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/config/runtime_ce.go b/agent/config/runtime_ce.go index ccc139a86b042..94a6b7fa6a62c 100644 --- a/agent/config/runtime_ce.go +++ b/agent/config/runtime_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/runtime_ce_test.go b/agent/config/runtime_ce_test.go index bab33fca55c82..99a2f6789e134 100644 --- a/agent/config/runtime_ce_test.go +++ b/agent/config/runtime_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 54074bc195610..c4d598c10fc3d 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config @@ -1038,13 +1038,6 @@ func TestLoad_IntegrationWithFlags(t *testing.T) { }, }, }) - run(t, testCase{ - desc: "locality invalid", - args: []string{`-data-dir=` + dataDir}, - json: []string{`{"locality": {"zone": "us-west-1a"}}`}, - hcl: []string{`locality { zone = "us-west-1a" }`}, - expectedErr: "locality is invalid: zone cannot be set without region", - }) run(t, testCase{ desc: "client addr and ports == 0", args: []string{`-data-dir=` + dataDir}, @@ -2736,44 +2729,7 @@ func TestLoad_IntegrationWithFlags(t *testing.T) { } } `}, - expected: func(rt *RuntimeConfig) { - rt.DataDir = dataDir - rt.TLS.InternalRPC.VerifyServerHostname = true - rt.TLS.InternalRPC.VerifyOutgoing = true - }, - }) - run(t, testCase{ - desc: "verify_server_hostname in the defaults stanza and internal_rpc", - args: []string{ - `-data-dir=` + dataDir, - }, - hcl: []string{` - tls { - defaults { - verify_server_hostname = false - }, - internal_rpc { - verify_server_hostname = true - } - } - `}, - json: []string{` - { - "tls": { - "defaults": { - "verify_server_hostname": false - }, - "internal_rpc": { - "verify_server_hostname": true - } - } - } - `}, - expected: func(rt *RuntimeConfig) { - rt.DataDir = dataDir - rt.TLS.InternalRPC.VerifyServerHostname = true - rt.TLS.InternalRPC.VerifyOutgoing = true - }, + expectedErr: "verify_server_hostname is only valid in the tls.internal_rpc stanza", }) run(t, testCase{ desc: "verify_server_hostname in the grpc stanza", @@ -2796,7 +2752,7 @@ func TestLoad_IntegrationWithFlags(t *testing.T) { } } `}, - expectedErr: "verify_server_hostname is only valid in the tls.defaults and tls.internal_rpc stanza", + expectedErr: "verify_server_hostname is only valid in the tls.internal_rpc stanza", }) run(t, testCase{ desc: "verify_server_hostname in the https stanza", @@ -2819,7 +2775,7 @@ func TestLoad_IntegrationWithFlags(t *testing.T) { } } `}, - expectedErr: "verify_server_hostname is only valid in the tls.defaults and tls.internal_rpc stanza", + expectedErr: "verify_server_hostname is only valid in the tls.internal_rpc stanza", }) run(t, testCase{ desc: "translated keys", @@ -5760,74 +5716,6 @@ func TestLoad_IntegrationWithFlags(t *testing.T) { rt.TLS.InternalRPC.VerifyOutgoing = true }, }) - run(t, testCase{ - desc: "tls.defaults.verify_server_hostname implies tls.internal_rpc.verify_outgoing", - args: []string{ - `-data-dir=` + dataDir, - }, - json: []string{` - { - "tls": { - "defaults": { - "verify_server_hostname": true - } - } - } - `}, - hcl: []string{` - tls { - defaults { - verify_server_hostname = true - } - } - `}, - expected: func(rt *RuntimeConfig) { - rt.DataDir = dataDir - - rt.TLS.Domain = "consul." - rt.TLS.NodeName = "thehostname" - - rt.TLS.InternalRPC.VerifyServerHostname = true - rt.TLS.InternalRPC.VerifyOutgoing = true - }, - }) - run(t, testCase{ - desc: "tls.internal_rpc.verify_server_hostname overwrites tls.defaults.verify_server_hostname", - args: []string{ - `-data-dir=` + dataDir, - }, - json: []string{` - { - "tls": { - "defaults": { - "verify_server_hostname": false - }, - "internal_rpc": { - "verify_server_hostname": true - } - } - } - `}, - hcl: []string{` - tls { - defaults { - verify_server_hostname = false - }, - internal_rpc { - verify_server_hostname = true - } - } - `}, - expected: func(rt *RuntimeConfig) { - rt.DataDir = dataDir - - rt.TLS.Domain = "consul." - rt.TLS.NodeName = "thehostname" - - rt.TLS.InternalRPC.VerifyServerHostname = true - rt.TLS.InternalRPC.VerifyOutgoing = true - }, - }) run(t, testCase{ desc: "tls.grpc.use_auto_cert defaults to false", args: []string{ diff --git a/agent/config/segment_ce.go b/agent/config/segment_ce.go index 3baee7076b142..5f8e8cff7d8fc 100644 --- a/agent/config/segment_ce.go +++ b/agent/config/segment_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/segment_ce_test.go b/agent/config/segment_ce_test.go index 20e6564778258..1fbaf3c2ae0bb 100644 --- a/agent/config/segment_ce_test.go +++ b/agent/config/segment_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/config/testdata/full-config.hcl b/agent/config/testdata/full-config.hcl index 1c1fb0158aa5c..6029d2ea2e6bb 100644 --- a/agent/config/testdata/full-config.hcl +++ b/agent/config/testdata/full-config.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 acl_agent_master_token = "furuQD0b" acl_agent_token = "cOshLOQ2" diff --git a/agent/config_endpoint.go b/agent/config_endpoint.go index e1b3f0eeef415..396215d78d990 100644 --- a/agent/config_endpoint.go +++ b/agent/config_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/config_endpoint_test.go b/agent/config_endpoint_test.go index 141e1e8f4d0d7..f8c0c01e329a1 100644 --- a/agent/config_endpoint_test.go +++ b/agent/config_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/configentry/compare.go b/agent/configentry/compare.go index 3bf761dba828d..f28d5c9b03d94 100644 --- a/agent/configentry/compare.go +++ b/agent/configentry/compare.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package configentry import ( diff --git a/agent/configentry/compare_test.go b/agent/configentry/compare_test.go index eeeec32f853b4..fcb63d0fa86e7 100644 --- a/agent/configentry/compare_test.go +++ b/agent/configentry/compare_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package configentry import ( diff --git a/agent/configentry/config_entry.go b/agent/configentry/config_entry.go index b10989aa95d79..a4ebb254e0407 100644 --- a/agent/configentry/config_entry.go +++ b/agent/configentry/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/discoverychain.go b/agent/configentry/discoverychain.go index 58bdb81fc20ca..d66b6590e0a42 100644 --- a/agent/configentry/discoverychain.go +++ b/agent/configentry/discoverychain.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/doc.go b/agent/configentry/doc.go index 7dff4a06621b5..18fd1405ab18c 100644 --- a/agent/configentry/doc.go +++ b/agent/configentry/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package configentry contains structs and logic related to the Configuration // Entry subsystem. Currently this is restricted to structs used during diff --git a/agent/configentry/merge_service_config.go b/agent/configentry/merge_service_config.go index d0d33b0d6527b..cc692e789b372 100644 --- a/agent/configentry/merge_service_config.go +++ b/agent/configentry/merge_service_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/merge_service_config_test.go b/agent/configentry/merge_service_config_test.go index e8ed84ad7b16d..4f6dbb55488a2 100644 --- a/agent/configentry/merge_service_config_test.go +++ b/agent/configentry/merge_service_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/resolve.go b/agent/configentry/resolve.go index 76ea794dee5e3..882f1d16b5489 100644 --- a/agent/configentry/resolve.go +++ b/agent/configentry/resolve.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/resolve_test.go b/agent/configentry/resolve_test.go index f93649df8ae7b..f0457730eaa06 100644 --- a/agent/configentry/resolve_test.go +++ b/agent/configentry/resolve_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/configentry/service_config.go b/agent/configentry/service_config.go index 83e24e27c390b..4b7e5e2a27c1d 100644 --- a/agent/configentry/service_config.go +++ b/agent/configentry/service_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/connect/authz.go b/agent/connect/authz.go index cc14dd0cb61d1..74b306354faf1 100644 --- a/agent/connect/authz.go +++ b/agent/connect/authz.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/authz_test.go b/agent/connect/authz_test.go index 1cbf17517d819..6428acfc4722e 100644 --- a/agent/connect/authz_test.go +++ b/agent/connect/authz_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/ca/common.go b/agent/connect/ca/common.go index f52b030ed977e..b83a196a8a235 100644 --- a/agent/connect/ca/common.go +++ b/agent/connect/ca/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider.go b/agent/connect/ca/provider.go index 898da46af7290..2ef34228bc483 100644 --- a/agent/connect/ca/provider.go +++ b/agent/connect/ca/provider.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca @@ -152,7 +152,7 @@ type PrimaryProvider interface { SignIntermediate(*x509.CertificateRequest) (string, error) // CrossSignCA must accept a CA certificate from another CA provider and cross - // sign it exactly as it is such that it forms a chain back the + // sign it exactly as it is such that it forms a chain back the the // CAProvider's current root. Specifically, the Distinguished Name, Subject // Alternative Name, SubjectKeyID and other relevant extensions must be kept. // The resulting certificate must have a distinct Serial Number and the diff --git a/agent/connect/ca/provider_aws.go b/agent/connect/ca/provider_aws.go index 1ce5a5eba57d8..d45f3295a8e74 100644 --- a/agent/connect/ca/provider_aws.go +++ b/agent/connect/ca/provider_aws.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_aws_test.go b/agent/connect/ca/provider_aws_test.go index d46221af1fce9..cba2897fa26a4 100644 --- a/agent/connect/ca/provider_aws_test.go +++ b/agent/connect/ca/provider_aws_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_consul.go b/agent/connect/ca/provider_consul.go index a4aba91942bf4..01c4987e07d81 100644 --- a/agent/connect/ca/provider_consul.go +++ b/agent/connect/ca/provider_consul.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_consul_config.go b/agent/connect/ca/provider_consul_config.go index c7e8b0346cdb9..b0998a0aa11b6 100644 --- a/agent/connect/ca/provider_consul_config.go +++ b/agent/connect/ca/provider_consul_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_consul_test.go b/agent/connect/ca/provider_consul_test.go index 658a97d39bd97..0c6959c7f5d41 100644 --- a/agent/connect/ca/provider_consul_test.go +++ b/agent/connect/ca/provider_consul_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_test.go b/agent/connect/ca/provider_test.go index 85deedbf4cb57..b7ed9e29b412d 100644 --- a/agent/connect/ca/provider_test.go +++ b/agent/connect/ca/provider_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca @@ -113,7 +113,7 @@ func TestStructs_CAConfiguration_MsgpackEncodeDecode(t *testing.T) { TLSSkipVerify: true, }, parseFunc: func(t *testing.T, raw map[string]interface{}) interface{} { - config, err := ParseVaultCAConfig(raw, true) + config, err := ParseVaultCAConfig(raw) require.NoError(t, err) return config }, diff --git a/agent/connect/ca/provider_vault.go b/agent/connect/ca/provider_vault.go index 8c77f032e83dc..d48a38ce320cb 100644 --- a/agent/connect/ca/provider_vault.go +++ b/agent/connect/ca/provider_vault.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca @@ -101,7 +101,7 @@ func vaultTLSConfig(config *structs.VaultCAProviderConfig) *vaultapi.TLSConfig { // Configure sets up the provider using the given configuration. // Configure supports being called multiple times to re-configure the provider. func (v *VaultProvider) Configure(cfg ProviderConfig) error { - config, err := ParseVaultCAConfig(cfg.RawConfig, v.isPrimary) + config, err := ParseVaultCAConfig(cfg.RawConfig) if err != nil { return err } @@ -192,11 +192,11 @@ func (v *VaultProvider) Configure(cfg ProviderConfig) error { } func (v *VaultProvider) ValidateConfigUpdate(prevRaw, nextRaw map[string]interface{}) error { - prev, err := ParseVaultCAConfig(prevRaw, v.isPrimary) + prev, err := ParseVaultCAConfig(prevRaw) if err != nil { return fmt.Errorf("failed to parse existing CA config: %w", err) } - next, err := ParseVaultCAConfig(nextRaw, v.isPrimary) + next, err := ParseVaultCAConfig(nextRaw) if err != nil { return fmt.Errorf("failed to parse new CA config: %w", err) } @@ -789,7 +789,7 @@ func (v *VaultProvider) Cleanup(providerTypeChange bool, otherConfig map[string] v.Stop() if !providerTypeChange { - newConfig, err := ParseVaultCAConfig(otherConfig, v.isPrimary) + newConfig, err := ParseVaultCAConfig(otherConfig) if err != nil { return err } @@ -889,7 +889,7 @@ func (v *VaultProvider) autotidyIssuers(path string) (bool, string) { return tidySet, errStr } -func ParseVaultCAConfig(raw map[string]interface{}, isPrimary bool) (*structs.VaultCAProviderConfig, error) { +func ParseVaultCAConfig(raw map[string]interface{}) (*structs.VaultCAProviderConfig, error) { config := structs.VaultCAProviderConfig{ CommonCAProviderConfig: defaultCommonConfig(), } @@ -920,10 +920,10 @@ func ParseVaultCAConfig(raw map[string]interface{}, isPrimary bool) (*structs.Va return nil, fmt.Errorf("only one of Vault token or Vault auth method can be provided, but not both") } - if isPrimary && config.RootPKIPath == "" { + if config.RootPKIPath == "" { return nil, fmt.Errorf("must provide a valid path to a root PKI backend") } - if config.RootPKIPath != "" && !strings.HasSuffix(config.RootPKIPath, "/") { + if !strings.HasSuffix(config.RootPKIPath, "/") { config.RootPKIPath += "/" } diff --git a/agent/connect/ca/provider_vault_auth.go b/agent/connect/ca/provider_vault_auth.go index 70176cc3c328a..ddfbde34070c7 100644 --- a/agent/connect/ca/provider_vault_auth.go +++ b/agent/connect/ca/provider_vault_auth.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_alicloud.go b/agent/connect/ca/provider_vault_auth_alicloud.go index d6ae5b185ed38..1c30583179254 100644 --- a/agent/connect/ca/provider_vault_auth_alicloud.go +++ b/agent/connect/ca/provider_vault_auth_alicloud.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_approle.go b/agent/connect/ca/provider_vault_auth_approle.go index c3d7d8f9c8ac8..150c463aea9aa 100644 --- a/agent/connect/ca/provider_vault_auth_approle.go +++ b/agent/connect/ca/provider_vault_auth_approle.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_aws.go b/agent/connect/ca/provider_vault_auth_aws.go index 61762b36fd618..02abf39824cb5 100644 --- a/agent/connect/ca/provider_vault_auth_aws.go +++ b/agent/connect/ca/provider_vault_auth_aws.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_azure.go b/agent/connect/ca/provider_vault_auth_azure.go index ac8d326b32790..8025977007f4d 100644 --- a/agent/connect/ca/provider_vault_auth_azure.go +++ b/agent/connect/ca/provider_vault_auth_azure.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_gcp.go b/agent/connect/ca/provider_vault_auth_gcp.go index 10dfbf4b294a7..5eefc7143663f 100644 --- a/agent/connect/ca/provider_vault_auth_gcp.go +++ b/agent/connect/ca/provider_vault_auth_gcp.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_jwt.go b/agent/connect/ca/provider_vault_auth_jwt.go index e80751cd59c3d..2560f856d82af 100644 --- a/agent/connect/ca/provider_vault_auth_jwt.go +++ b/agent/connect/ca/provider_vault_auth_jwt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_k8s.go b/agent/connect/ca/provider_vault_auth_k8s.go index acd6f68bc5ddc..c3a69c6ccd44b 100644 --- a/agent/connect/ca/provider_vault_auth_k8s.go +++ b/agent/connect/ca/provider_vault_auth_k8s.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_auth_test.go b/agent/connect/ca/provider_vault_auth_test.go index 361d89400e22c..74507acb39e7b 100644 --- a/agent/connect/ca/provider_vault_auth_test.go +++ b/agent/connect/ca/provider_vault_auth_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/ca/provider_vault_test.go b/agent/connect/ca/provider_vault_test.go index c76ea1c28a6c4..e75d02984262f 100644 --- a/agent/connect/ca/provider_vault_test.go +++ b/agent/connect/ca/provider_vault_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca @@ -60,7 +60,6 @@ func TestVaultCAProvider_ParseVaultCAConfig(t *testing.T) { cases := map[string]struct { rawConfig map[string]interface{} expConfig *structs.VaultCAProviderConfig - isPrimary bool expError string }{ "no token and no auth method provided": { @@ -71,26 +70,15 @@ func TestVaultCAProvider_ParseVaultCAConfig(t *testing.T) { rawConfig: map[string]interface{}{"Token": "test", "AuthMethod": map[string]interface{}{"Type": "test"}}, expError: "only one of Vault token or Vault auth method can be provided, but not both", }, - "primary no root PKI path": { - rawConfig: map[string]interface{}{"Token": "test", "IntermediatePKIPath": "test"}, - isPrimary: true, + "no root PKI path": { + rawConfig: map[string]interface{}{"Token": "test"}, expError: "must provide a valid path to a root PKI backend", }, - "secondary no root PKI path": { - rawConfig: map[string]interface{}{"Token": "test", "IntermediatePKIPath": "test"}, - isPrimary: false, - expConfig: &structs.VaultCAProviderConfig{ - CommonCAProviderConfig: defaultCommonConfig(), - Token: "test", - IntermediatePKIPath: "test/", - }, - }, "no root intermediate path": { rawConfig: map[string]interface{}{"Token": "test", "RootPKIPath": "test"}, expError: "must provide a valid path for the intermediate PKI backend", }, "adds a slash to RootPKIPath and IntermediatePKIPath": { - isPrimary: true, rawConfig: map[string]interface{}{"Token": "test", "RootPKIPath": "test", "IntermediatePKIPath": "test"}, expConfig: &structs.VaultCAProviderConfig{ CommonCAProviderConfig: defaultCommonConfig(), @@ -103,7 +91,7 @@ func TestVaultCAProvider_ParseVaultCAConfig(t *testing.T) { for name, c := range cases { t.Run(name, func(t *testing.T) { - config, err := ParseVaultCAConfig(c.rawConfig, c.isPrimary) + config, err := ParseVaultCAConfig(c.rawConfig) if c.expError != "" { require.EqualError(t, err, c.expError) } else { diff --git a/agent/connect/ca/testing.go b/agent/connect/ca/testing.go index 28d077e34e5ad..d7458bcda8d62 100644 --- a/agent/connect/ca/testing.go +++ b/agent/connect/ca/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/agent/connect/common_names.go b/agent/connect/common_names.go index c52df9f10fb49..3c4c30633d533 100644 --- a/agent/connect/common_names.go +++ b/agent/connect/common_names.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/csr.go b/agent/connect/csr.go index 0a491b0b65522..9cf0d884dea7b 100644 --- a/agent/connect/csr.go +++ b/agent/connect/csr.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/csr_test.go b/agent/connect/csr_test.go index 1833b78a77985..6aef985f006fe 100644 --- a/agent/connect/csr_test.go +++ b/agent/connect/csr_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/generate.go b/agent/connect/generate.go index 84c91a246846b..819428d147a9c 100644 --- a/agent/connect/generate.go +++ b/agent/connect/generate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/generate_test.go b/agent/connect/generate_test.go index ca956b702f165..67be6081fe08c 100644 --- a/agent/connect/generate_test.go +++ b/agent/connect/generate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/parsing.go b/agent/connect/parsing.go index f1e89fe0255bc..a89544532fbb1 100644 --- a/agent/connect/parsing.go +++ b/agent/connect/parsing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect @@ -148,7 +148,7 @@ func ParseSigner(pemValue string) (crypto.Signer, error) { } // ParseCSR parses a CSR from a PEM-encoded value. The certificate request -// must be the first block in the PEM value. +// must be the the first block in the PEM value. func ParseCSR(pemValue string) (*x509.CertificateRequest, error) { // The _ result below is not an error but the remaining PEM bytes. block, _ := pem.Decode([]byte(pemValue)) diff --git a/agent/connect/sni.go b/agent/connect/sni.go index f7d14800a922f..339116b64c038 100644 --- a/agent/connect/sni.go +++ b/agent/connect/sni.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/sni_test.go b/agent/connect/sni_test.go index ed0bd07280417..acbfd49ce028e 100644 --- a/agent/connect/sni_test.go +++ b/agent/connect/sni_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/testing_ca.go b/agent/connect/testing_ca.go index a852d9130c87b..7b30d85176478 100644 --- a/agent/connect/testing_ca.go +++ b/agent/connect/testing_ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/testing_ca_test.go b/agent/connect/testing_ca_test.go index 9b62a2baee54b..492ca9e32d93b 100644 --- a/agent/connect/testing_ca_test.go +++ b/agent/connect/testing_ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/testing_spiffe.go b/agent/connect/testing_spiffe.go index fdbff5eda67d7..f48222c443f9c 100644 --- a/agent/connect/testing_spiffe.go +++ b/agent/connect/testing_spiffe.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri.go b/agent/connect/uri.go index d9d5aa037d8ae..ce44967432f61 100644 --- a/agent/connect/uri.go +++ b/agent/connect/uri.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_agent.go b/agent/connect/uri_agent.go index 1babf99873809..c3d3a86bf115c 100644 --- a/agent/connect/uri_agent.go +++ b/agent/connect/uri_agent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_agent_ce.go b/agent/connect/uri_agent_ce.go index 5cfad14a7d973..2a87d108432fb 100644 --- a/agent/connect/uri_agent_ce.go +++ b/agent/connect/uri_agent_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_agent_ce_test.go b/agent/connect/uri_agent_ce_test.go index 241d804841d5e..57f1286fd1e1a 100644 --- a/agent/connect/uri_agent_ce_test.go +++ b/agent/connect/uri_agent_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_mesh_gateway.go b/agent/connect/uri_mesh_gateway.go index d5cf155bf8d7c..ec474efa40851 100644 --- a/agent/connect/uri_mesh_gateway.go +++ b/agent/connect/uri_mesh_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_mesh_gateway_ce.go b/agent/connect/uri_mesh_gateway_ce.go index a0c0cdba0541a..876e05101b6b6 100644 --- a/agent/connect/uri_mesh_gateway_ce.go +++ b/agent/connect/uri_mesh_gateway_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_mesh_gateway_ce_test.go b/agent/connect/uri_mesh_gateway_ce_test.go index 4a8e8ada3701b..593de8ef31053 100644 --- a/agent/connect/uri_mesh_gateway_ce_test.go +++ b/agent/connect/uri_mesh_gateway_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_server.go b/agent/connect/uri_server.go index 5a2b9c2429283..894ad63784bfe 100644 --- a/agent/connect/uri_server.go +++ b/agent/connect/uri_server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_service.go b/agent/connect/uri_service.go index 3be7cf4797a33..31bd3e5df62ba 100644 --- a/agent/connect/uri_service.go +++ b/agent/connect/uri_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_service_ce.go b/agent/connect/uri_service_ce.go index a1e1dd43c3f26..4106fc811b38c 100644 --- a/agent/connect/uri_service_ce.go +++ b/agent/connect/uri_service_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_service_ce_test.go b/agent/connect/uri_service_ce_test.go index 774632063e94b..7d73151edc032 100644 --- a/agent/connect/uri_service_ce_test.go +++ b/agent/connect/uri_service_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/connect/uri_signing.go b/agent/connect/uri_signing.go index 4c4dd6ef67e82..24330a3d70b12 100644 --- a/agent/connect/uri_signing.go +++ b/agent/connect/uri_signing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_signing_test.go b/agent/connect/uri_signing_test.go index edd3d468931ba..ba426173160ea 100644 --- a/agent/connect/uri_signing_test.go +++ b/agent/connect/uri_signing_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/uri_test.go b/agent/connect/uri_test.go index fcbcf42ab3a28..2ea439f53668c 100644 --- a/agent/connect/uri_test.go +++ b/agent/connect/uri_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/x509_patch.go b/agent/connect/x509_patch.go index 54a33ce07834f..f448154f8d9f0 100644 --- a/agent/connect/x509_patch.go +++ b/agent/connect/x509_patch.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect/x509_patch_test.go b/agent/connect/x509_patch_test.go index bdcb99045b578..1447802a5b879 100644 --- a/agent/connect/x509_patch_test.go +++ b/agent/connect/x509_patch_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/agent/connect_auth.go b/agent/connect_auth.go index 3b07013d3919b..7060d10b599f5 100644 --- a/agent/connect_auth.go +++ b/agent/connect_auth.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/connect_ca_endpoint.go b/agent/connect_ca_endpoint.go index 0a60f37662473..913836f8c8757 100644 --- a/agent/connect_ca_endpoint.go +++ b/agent/connect_ca_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/connect_ca_endpoint_test.go b/agent/connect_ca_endpoint_test.go index f83d7328863c9..575250de4cadc 100644 --- a/agent/connect_ca_endpoint_test.go +++ b/agent/connect_ca_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/consul/acl.go b/agent/consul/acl.go index 84646912a5fd4..c0107a6aa5a2c 100644 --- a/agent/consul/acl.go +++ b/agent/consul/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_authmethod.go b/agent/consul/acl_authmethod.go index 217007f2b5ee4..42f5b6e2404df 100644 --- a/agent/consul/acl_authmethod.go +++ b/agent/consul/acl_authmethod.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_authmethod_ce.go b/agent/consul/acl_authmethod_ce.go index 0587d0dc2a633..94bf78bd25693 100644 --- a/agent/consul/acl_authmethod_ce.go +++ b/agent/consul/acl_authmethod_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/acl_ce.go b/agent/consul/acl_ce.go index 7e55a90ca9509..aafe26a13ef91 100644 --- a/agent/consul/acl_ce.go +++ b/agent/consul/acl_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/acl_ce_test.go b/agent/consul/acl_ce_test.go index 27f55a0efc05d..69660f9da8044 100644 --- a/agent/consul/acl_ce_test.go +++ b/agent/consul/acl_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/acl_client.go b/agent/consul/acl_client.go index e6ff70720cfc8..d133807604bf3 100644 --- a/agent/consul/acl_client.go +++ b/agent/consul/acl_client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_endpoint.go b/agent/consul/acl_endpoint.go index 97189bb45d27d..7d2d1028cc858 100644 --- a/agent/consul/acl_endpoint.go +++ b/agent/consul/acl_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_endpoint_ce.go b/agent/consul/acl_endpoint_ce.go index 75a6c84ed36e4..9d45f0fd7d890 100644 --- a/agent/consul/acl_endpoint_ce.go +++ b/agent/consul/acl_endpoint_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/acl_endpoint_test.go b/agent/consul/acl_endpoint_test.go index 73f7f6230d679..20deb56aa4b00 100644 --- a/agent/consul/acl_endpoint_test.go +++ b/agent/consul/acl_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_replication.go b/agent/consul/acl_replication.go index 79e4e5d7a7d89..849e81adf697a 100644 --- a/agent/consul/acl_replication.go +++ b/agent/consul/acl_replication.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_replication_test.go b/agent/consul/acl_replication_test.go index 7a8e8efa12cb5..a81bfca039121 100644 --- a/agent/consul/acl_replication_test.go +++ b/agent/consul/acl_replication_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_replication_types.go b/agent/consul/acl_replication_types.go index de9e8cf763a0f..c5aeaaead2936 100644 --- a/agent/consul/acl_replication_types.go +++ b/agent/consul/acl_replication_types.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_server.go b/agent/consul/acl_server.go index 8fe1f45fd0984..f91cb77620238 100644 --- a/agent/consul/acl_server.go +++ b/agent/consul/acl_server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_server_ce.go b/agent/consul/acl_server_ce.go index bd7f34e776fc3..f2de1486a28af 100644 --- a/agent/consul/acl_server_ce.go +++ b/agent/consul/acl_server_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/acl_test.go b/agent/consul/acl_test.go index 275316786bbf9..386c60e38e39f 100644 --- a/agent/consul/acl_test.go +++ b/agent/consul/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_token_exp.go b/agent/consul/acl_token_exp.go index 06559ce71d566..7f5de395c7a9d 100644 --- a/agent/consul/acl_token_exp.go +++ b/agent/consul/acl_token_exp.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/acl_token_exp_test.go b/agent/consul/acl_token_exp_test.go index 031c150dabb0c..949d54510ba54 100644 --- a/agent/consul/acl_token_exp_test.go +++ b/agent/consul/acl_token_exp_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/auth/binder.go b/agent/consul/auth/binder.go index aed1e0f371ac6..354fedc8f1854 100644 --- a/agent/consul/auth/binder.go +++ b/agent/consul/auth/binder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package auth diff --git a/agent/consul/auth/binder_ce.go b/agent/consul/auth/binder_ce.go index 19528ffedb172..f6fa5e5e841c1 100644 --- a/agent/consul/auth/binder_ce.go +++ b/agent/consul/auth/binder_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/auth/binder_test.go b/agent/consul/auth/binder_test.go index 7eedc89afcd81..b86d4526dd006 100644 --- a/agent/consul/auth/binder_test.go +++ b/agent/consul/auth/binder_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package auth diff --git a/agent/consul/auth/login.go b/agent/consul/auth/login.go index 7ca1f70d3431b..9592e5a841d6f 100644 --- a/agent/consul/auth/login.go +++ b/agent/consul/auth/login.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package auth diff --git a/agent/consul/auth/token_writer.go b/agent/consul/auth/token_writer.go index 8321b78610225..857a2e3d13213 100644 --- a/agent/consul/auth/token_writer.go +++ b/agent/consul/auth/token_writer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package auth diff --git a/agent/consul/auth/token_writer_ce.go b/agent/consul/auth/token_writer_ce.go index 224eee669ad85..b0ad9e833bb0e 100644 --- a/agent/consul/auth/token_writer_ce.go +++ b/agent/consul/auth/token_writer_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/auth/token_writer_test.go b/agent/consul/auth/token_writer_test.go index 45cd4c99ce8d5..51a2b3cc45a83 100644 --- a/agent/consul/auth/token_writer_test.go +++ b/agent/consul/auth/token_writer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package auth diff --git a/agent/consul/authmethod/authmethods.go b/agent/consul/authmethod/authmethods.go index d03e2b410cb4f..946fce927e697 100644 --- a/agent/consul/authmethod/authmethods.go +++ b/agent/consul/authmethod/authmethods.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethod diff --git a/agent/consul/authmethod/authmethods_ce.go b/agent/consul/authmethod/authmethods_ce.go index 8eb430401a3ea..0839b4aba5a74 100644 --- a/agent/consul/authmethod/authmethods_ce.go +++ b/agent/consul/authmethod/authmethods_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/authmethod/awsauth/aws.go b/agent/consul/authmethod/awsauth/aws.go index 3381a893fa5da..d2cd73482cde5 100644 --- a/agent/consul/authmethod/awsauth/aws.go +++ b/agent/consul/authmethod/awsauth/aws.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package awsauth diff --git a/agent/consul/authmethod/awsauth/aws_test.go b/agent/consul/authmethod/awsauth/aws_test.go index 279e4b3e46d48..7a894cc217878 100644 --- a/agent/consul/authmethod/awsauth/aws_test.go +++ b/agent/consul/authmethod/awsauth/aws_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package awsauth diff --git a/agent/consul/authmethod/kubeauth/k8s.go b/agent/consul/authmethod/kubeauth/k8s.go index 274dd2ec9d03a..f71157cbeccb7 100644 --- a/agent/consul/authmethod/kubeauth/k8s.go +++ b/agent/consul/authmethod/kubeauth/k8s.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kubeauth diff --git a/agent/consul/authmethod/kubeauth/k8s_ce.go b/agent/consul/authmethod/kubeauth/k8s_ce.go index e8ad4485069d8..b2b7e8a2d8715 100644 --- a/agent/consul/authmethod/kubeauth/k8s_ce.go +++ b/agent/consul/authmethod/kubeauth/k8s_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/authmethod/kubeauth/k8s_test.go b/agent/consul/authmethod/kubeauth/k8s_test.go index 48ef6e61c4839..95decce11597c 100644 --- a/agent/consul/authmethod/kubeauth/k8s_test.go +++ b/agent/consul/authmethod/kubeauth/k8s_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kubeauth diff --git a/agent/consul/authmethod/kubeauth/testing.go b/agent/consul/authmethod/kubeauth/testing.go index 38b7d9c330a3f..e5538bb90998f 100644 --- a/agent/consul/authmethod/kubeauth/testing.go +++ b/agent/consul/authmethod/kubeauth/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kubeauth diff --git a/agent/consul/authmethod/ssoauth/sso.go b/agent/consul/authmethod/ssoauth/sso.go index 398f5689799b3..6215c0eafe719 100644 --- a/agent/consul/authmethod/ssoauth/sso.go +++ b/agent/consul/authmethod/ssoauth/sso.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ssoauth diff --git a/agent/consul/authmethod/ssoauth/sso_ce.go b/agent/consul/authmethod/ssoauth/sso_ce.go index c8f760049f3de..74e3be3082ccb 100644 --- a/agent/consul/authmethod/ssoauth/sso_ce.go +++ b/agent/consul/authmethod/ssoauth/sso_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/authmethod/ssoauth/sso_test.go b/agent/consul/authmethod/ssoauth/sso_test.go index 357612fad6894..840e37b86fd46 100644 --- a/agent/consul/authmethod/ssoauth/sso_test.go +++ b/agent/consul/authmethod/ssoauth/sso_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ssoauth diff --git a/agent/consul/authmethod/testauth/testing.go b/agent/consul/authmethod/testauth/testing.go index ead9ae081a7ea..9f6c85ae23d5e 100644 --- a/agent/consul/authmethod/testauth/testing.go +++ b/agent/consul/authmethod/testauth/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testauth diff --git a/agent/consul/authmethod/testauth/testing_ce.go b/agent/consul/authmethod/testauth/testing_ce.go index 6f38c0250298b..f4b909b4b8127 100644 --- a/agent/consul/authmethod/testauth/testing_ce.go +++ b/agent/consul/authmethod/testauth/testing_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/authmethod/testing.go b/agent/consul/authmethod/testing.go index 0f43e5e5201fc..933082a5b4295 100644 --- a/agent/consul/authmethod/testing.go +++ b/agent/consul/authmethod/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethod diff --git a/agent/consul/auto_config_backend.go b/agent/consul/auto_config_backend.go index 0aaccfa35d99b..78413fe0121c1 100644 --- a/agent/consul/auto_config_backend.go +++ b/agent/consul/auto_config_backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -34,7 +34,7 @@ func (b autoConfigBackend) GetCARoots() (*structs.IndexedCARoots, error) { } // DatacenterJoinAddresses will return all the strings suitable for usage in -// retry join operations to connect to the LAN or LAN segment gossip pool. +// retry join operations to connect to the the LAN or LAN segment gossip pool. func (b autoConfigBackend) DatacenterJoinAddresses(partition, segment string) ([]string, error) { members, err := b.Server.LANMembers(LANMemberFilter{ Segment: segment, diff --git a/agent/consul/auto_config_backend_test.go b/agent/consul/auto_config_backend_test.go index 00c0dc10d80d7..6a4a202fceb8e 100644 --- a/agent/consul/auto_config_backend_test.go +++ b/agent/consul/auto_config_backend_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/auto_config_endpoint.go b/agent/consul/auto_config_endpoint.go index f491bcbad832a..808aa63304dcd 100644 --- a/agent/consul/auto_config_endpoint.go +++ b/agent/consul/auto_config_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/auto_config_endpoint_test.go b/agent/consul/auto_config_endpoint_test.go index 39c4f3a7a5efa..a3f485ee60c2a 100644 --- a/agent/consul/auto_config_endpoint_test.go +++ b/agent/consul/auto_config_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/auto_encrypt_endpoint.go b/agent/consul/auto_encrypt_endpoint.go index dbd39355cfbf3..b893e783215ad 100644 --- a/agent/consul/auto_encrypt_endpoint.go +++ b/agent/consul/auto_encrypt_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/auto_encrypt_endpoint_test.go b/agent/consul/auto_encrypt_endpoint_test.go index f3b2320116340..d8124f9fb3623 100644 --- a/agent/consul/auto_encrypt_endpoint_test.go +++ b/agent/consul/auto_encrypt_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/autopilot.go b/agent/consul/autopilot.go index 70391f6b99107..f682ffed6f164 100644 --- a/agent/consul/autopilot.go +++ b/agent/consul/autopilot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/autopilot_ce.go b/agent/consul/autopilot_ce.go index e20b31a626f38..92f9b4ccae41d 100644 --- a/agent/consul/autopilot_ce.go +++ b/agent/consul/autopilot_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/autopilot_test.go b/agent/consul/autopilot_test.go index 8d1d214b17104..4429340eda5a8 100644 --- a/agent/consul/autopilot_test.go +++ b/agent/consul/autopilot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/autopilotevents/ready_servers_events.go b/agent/consul/autopilotevents/ready_servers_events.go index 16e064aa7905d..404276f3ec2d5 100644 --- a/agent/consul/autopilotevents/ready_servers_events.go +++ b/agent/consul/autopilotevents/ready_servers_events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autopilotevents diff --git a/agent/consul/autopilotevents/ready_servers_events_test.go b/agent/consul/autopilotevents/ready_servers_events_test.go index 16d78b52e3b5f..994020c290c0d 100644 --- a/agent/consul/autopilotevents/ready_servers_events_test.go +++ b/agent/consul/autopilotevents/ready_servers_events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autopilotevents diff --git a/agent/consul/catalog_endpoint.go b/agent/consul/catalog_endpoint.go index 0f1527c7e13de..446037a313109 100644 --- a/agent/consul/catalog_endpoint.go +++ b/agent/consul/catalog_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/catalog_endpoint_test.go b/agent/consul/catalog_endpoint_test.go index 628ad83ae4db0..192a3d6d7d275 100644 --- a/agent/consul/catalog_endpoint_test.go +++ b/agent/consul/catalog_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/client.go b/agent/consul/client.go index fa5f1239e134e..23e96be002875 100644 --- a/agent/consul/client.go +++ b/agent/consul/client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -25,7 +25,6 @@ import ( "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/logging" - "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/tlsutil" "github.com/hashicorp/consul/types" ) @@ -94,9 +93,6 @@ type Client struct { EnterpriseClient tlsConfigurator *tlsutil.Configurator - - // resourceServiceClient is a client for the gRPC Resource Service. - resourceServiceClient pbresource.ResourceServiceClient } // NewClient creates and returns a Client @@ -155,13 +151,6 @@ func NewClient(config *Config, deps Deps) (*Client, error) { } c.router = deps.Router - conn, err := deps.GRPCConnPool.ClientConn(deps.ConnPool.Datacenter) - if err != nil { - c.Shutdown() - return nil, fmt.Errorf("Failed to get gRPC client connection: %w", err) - } - c.resourceServiceClient = pbresource.NewResourceServiceClient(conn) - // Start LAN event handlers after the router is complete since the event // handlers depend on the router and the router depends on Serf. go c.lanEventHandler() @@ -462,7 +451,3 @@ func (c *Client) AgentEnterpriseMeta() *acl.EnterpriseMeta { func (c *Client) agentSegmentName() string { return c.config.Segment } - -func (c *Client) ResourceServiceClient() pbresource.ResourceServiceClient { - return c.resourceServiceClient -} diff --git a/agent/consul/client_serf.go b/agent/consul/client_serf.go index c92fdd1726c30..7d68b50395e49 100644 --- a/agent/consul/client_serf.go +++ b/agent/consul/client_serf.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/client_test.go b/agent/consul/client_test.go index 9683d313041f0..4b8f5c433d8e7 100644 --- a/agent/consul/client_test.go +++ b/agent/consul/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -14,8 +14,6 @@ import ( "testing" "time" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/go-hclog" "github.com/hashicorp/serf/serf" "github.com/stretchr/testify/require" @@ -578,7 +576,6 @@ func newDefaultDeps(t *testing.T, c *Config) Deps { GetNetRPCInterceptorFunc: middleware.GetNetRPCInterceptor, EnterpriseDeps: newDefaultDepsEnterprise(t, logger, c), XDSStreamLimiter: limiter.NewSessionLimiter(), - Registry: resource.NewRegistry(), } } diff --git a/agent/consul/cluster_test.go b/agent/consul/cluster_test.go index 7cc266908198c..925d32a610692 100644 --- a/agent/consul/cluster_test.go +++ b/agent/consul/cluster_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config.go b/agent/consul/config.go index cdda407c406c9..eef4bc4376f4e 100644 --- a/agent/consul/config.go +++ b/agent/consul/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config_ce.go b/agent/consul/config_ce.go index bed1211696bdf..e91d0981e86ee 100644 --- a/agent/consul/config_ce.go +++ b/agent/consul/config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/config_cloud.go b/agent/consul/config_cloud.go index 5b62574c811b4..b0780052f668a 100644 --- a/agent/consul/config_cloud.go +++ b/agent/consul/config_cloud.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package consul type CloudConfig struct { diff --git a/agent/consul/config_endpoint.go b/agent/consul/config_endpoint.go index a78859c35058e..4108eb20b95c6 100644 --- a/agent/consul/config_endpoint.go +++ b/agent/consul/config_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config_endpoint_test.go b/agent/consul/config_endpoint_test.go index 49a10dce21797..7dc7632fade71 100644 --- a/agent/consul/config_endpoint_test.go +++ b/agent/consul/config_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config_replication.go b/agent/consul/config_replication.go index d9573ad58bf99..1b9ac0284939a 100644 --- a/agent/consul/config_replication.go +++ b/agent/consul/config_replication.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config_replication_test.go b/agent/consul/config_replication_test.go index 41ccf53362d5d..a0eb8cf52a6e1 100644 --- a/agent/consul/config_replication_test.go +++ b/agent/consul/config_replication_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/config_test.go b/agent/consul/config_test.go index 8e61b8fe96806..e2706e00b4065 100644 --- a/agent/consul/config_test.go +++ b/agent/consul/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/connect_ca_endpoint.go b/agent/consul/connect_ca_endpoint.go index 180f7ccc47b61..771eae2464b95 100644 --- a/agent/consul/connect_ca_endpoint.go +++ b/agent/consul/connect_ca_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/connect_ca_endpoint_test.go b/agent/consul/connect_ca_endpoint_test.go index 587ed42b5a10e..3911db1923109 100644 --- a/agent/consul/connect_ca_endpoint_test.go +++ b/agent/consul/connect_ca_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/context.go b/agent/consul/context.go index d85124f74881a..7de4157d8f401 100644 --- a/agent/consul/context.go +++ b/agent/consul/context.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/context_test.go b/agent/consul/context_test.go index 42e6feb744868..264dcdd988611 100644 --- a/agent/consul/context_test.go +++ b/agent/consul/context_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/controller/controller.go b/agent/consul/controller/controller.go index 1eccb7e7aba04..f8d6a50c7f827 100644 --- a/agent/consul/controller/controller.go +++ b/agent/consul/controller/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller diff --git a/agent/consul/controller/controller_test.go b/agent/consul/controller/controller_test.go index 1d1002e8abede..97d110222b3e3 100644 --- a/agent/consul/controller/controller_test.go +++ b/agent/consul/controller/controller_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller diff --git a/agent/consul/controller/doc.go b/agent/consul/controller/doc.go index ba30d95a546fd..638eb5c5d9a2e 100644 --- a/agent/consul/controller/doc.go +++ b/agent/consul/controller/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package controller contains a re-implementation of the Kubernetes // [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) diff --git a/agent/consul/controller/queue/defer.go b/agent/consul/controller/queue/defer.go index e9b8a9c3ad751..01666219c2919 100644 --- a/agent/consul/controller/queue/defer.go +++ b/agent/consul/controller/queue/defer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package queue diff --git a/agent/consul/controller/queue/queue.go b/agent/consul/controller/queue/queue.go index 92c624cc2a734..6d9f0a657125d 100644 --- a/agent/consul/controller/queue/queue.go +++ b/agent/consul/controller/queue/queue.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package queue diff --git a/agent/consul/controller/queue/rate.go b/agent/consul/controller/queue/rate.go index 615047fdeb39b..471601f85a270 100644 --- a/agent/consul/controller/queue/rate.go +++ b/agent/consul/controller/queue/rate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package queue diff --git a/agent/consul/controller/queue/rate_test.go b/agent/consul/controller/queue/rate_test.go index 166111d5c7508..40dc540138e2a 100644 --- a/agent/consul/controller/queue/rate_test.go +++ b/agent/consul/controller/queue/rate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package queue diff --git a/agent/consul/controller/queue_test.go b/agent/consul/controller/queue_test.go index cb6f609829100..11e1bc82b7626 100644 --- a/agent/consul/controller/queue_test.go +++ b/agent/consul/controller/queue_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller diff --git a/agent/consul/controller/reconciler.go b/agent/consul/controller/reconciler.go index fa948f81f6e62..dc4222508b57b 100644 --- a/agent/consul/controller/reconciler.go +++ b/agent/consul/controller/reconciler.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller diff --git a/agent/consul/controller/reconciler_test.go b/agent/consul/controller/reconciler_test.go index c3b8a450b18bb..56ae022ea263b 100644 --- a/agent/consul/controller/reconciler_test.go +++ b/agent/consul/controller/reconciler_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller diff --git a/agent/consul/coordinate_endpoint.go b/agent/consul/coordinate_endpoint.go index f0e69332ee686..28bf63b0bfd80 100644 --- a/agent/consul/coordinate_endpoint.go +++ b/agent/consul/coordinate_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/coordinate_endpoint_test.go b/agent/consul/coordinate_endpoint_test.go index 1c693ba83bbfe..fbb3e13aa76d6 100644 --- a/agent/consul/coordinate_endpoint_test.go +++ b/agent/consul/coordinate_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/discovery_chain_endpoint.go b/agent/consul/discovery_chain_endpoint.go index c70cebb094e68..4d1f9959c96e8 100644 --- a/agent/consul/discovery_chain_endpoint.go +++ b/agent/consul/discovery_chain_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/discovery_chain_endpoint_test.go b/agent/consul/discovery_chain_endpoint_test.go index 62d90e9020af6..b0197f00d493d 100644 --- a/agent/consul/discovery_chain_endpoint_test.go +++ b/agent/consul/discovery_chain_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/discoverychain/compile.go b/agent/consul/discoverychain/compile.go index 32a6408be5445..20227db3ef195 100644 --- a/agent/consul/discoverychain/compile.go +++ b/agent/consul/discoverychain/compile.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/compile_ce.go b/agent/consul/discoverychain/compile_ce.go index 2c280120b5017..d980c71f38f05 100644 --- a/agent/consul/discoverychain/compile_ce.go +++ b/agent/consul/discoverychain/compile_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/discoverychain/compile_test.go b/agent/consul/discoverychain/compile_test.go index dda28780431d1..ca39aa236fc95 100644 --- a/agent/consul/discoverychain/compile_test.go +++ b/agent/consul/discoverychain/compile_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/gateway.go b/agent/consul/discoverychain/gateway.go index 559d17844f7bb..e43e4b631f613 100644 --- a/agent/consul/discoverychain/gateway.go +++ b/agent/consul/discoverychain/gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/gateway_httproute.go b/agent/consul/discoverychain/gateway_httproute.go index 100fe980acdab..fcd2dc440259f 100644 --- a/agent/consul/discoverychain/gateway_httproute.go +++ b/agent/consul/discoverychain/gateway_httproute.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain @@ -161,28 +161,6 @@ func httpRouteToDiscoveryChain(route structs.HTTPRouteConfigEntry) (*structs.Ser } } - if rule.Filters.RetryFilter != nil { - if rule.Filters.RetryFilter.NumRetries != nil { - destination.NumRetries = *rule.Filters.RetryFilter.NumRetries - } - if rule.Filters.RetryFilter.RetryOnConnectFailure != nil { - destination.RetryOnConnectFailure = *rule.Filters.RetryFilter.RetryOnConnectFailure - } - - if len(rule.Filters.RetryFilter.RetryOn) > 0 { - destination.RetryOn = rule.Filters.RetryFilter.RetryOn - } - - if len(rule.Filters.RetryFilter.RetryOnStatusCodes) > 0 { - destination.RetryOnStatusCodes = rule.Filters.RetryFilter.RetryOnStatusCodes - } - } - - if rule.Filters.TimeoutFilter != nil { - destination.IdleTimeout = rule.Filters.TimeoutFilter.IdleTimeout - destination.RequestTimeout = rule.Filters.TimeoutFilter.RequestTimeout - } - // for each match rule a ServiceRoute is created for the service-router // if there are no rules a single route with the destination is set if len(rule.Matches) == 0 { @@ -195,7 +173,6 @@ func httpRouteToDiscoveryChain(route structs.HTTPRouteConfigEntry) (*structs.Ser Destination: &destination, }) } - } return router, splitters, defaults diff --git a/agent/consul/discoverychain/gateway_tcproute.go b/agent/consul/discoverychain/gateway_tcproute.go index 910fd517551c0..21afef3ec1846 100644 --- a/agent/consul/discoverychain/gateway_tcproute.go +++ b/agent/consul/discoverychain/gateway_tcproute.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/gateway_test.go b/agent/consul/discoverychain/gateway_test.go index 4e56a3925463a..42bbed65ebfb6 100644 --- a/agent/consul/discoverychain/gateway_test.go +++ b/agent/consul/discoverychain/gateway_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/string_stack.go b/agent/consul/discoverychain/string_stack.go index d5f842f3dc615..e47743a3f3861 100644 --- a/agent/consul/discoverychain/string_stack.go +++ b/agent/consul/discoverychain/string_stack.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/string_stack_test.go b/agent/consul/discoverychain/string_stack_test.go index 9867b91795206..84f58203d43b2 100644 --- a/agent/consul/discoverychain/string_stack_test.go +++ b/agent/consul/discoverychain/string_stack_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/discoverychain/testing.go b/agent/consul/discoverychain/testing.go index 8992870f9c457..37a3bb4ec1162 100644 --- a/agent/consul/discoverychain/testing.go +++ b/agent/consul/discoverychain/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discoverychain diff --git a/agent/consul/enterprise_client_ce.go b/agent/consul/enterprise_client_ce.go index b19705f65b7e4..3d432213bd848 100644 --- a/agent/consul/enterprise_client_ce.go +++ b/agent/consul/enterprise_client_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/enterprise_config_ce.go b/agent/consul/enterprise_config_ce.go index d057012af1511..15af4ea1603e7 100644 --- a/agent/consul/enterprise_config_ce.go +++ b/agent/consul/enterprise_config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/enterprise_server_ce.go b/agent/consul/enterprise_server_ce.go index d14cb7bac33c5..8e56a8108cb35 100644 --- a/agent/consul/enterprise_server_ce.go +++ b/agent/consul/enterprise_server_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/enterprise_server_ce_test.go b/agent/consul/enterprise_server_ce_test.go index bd49bae1b10b9..9bd3eb8c0c9b0 100644 --- a/agent/consul/enterprise_server_ce_test.go +++ b/agent/consul/enterprise_server_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/federation_state_endpoint.go b/agent/consul/federation_state_endpoint.go index 4afa481a397b6..db842e666d65d 100644 --- a/agent/consul/federation_state_endpoint.go +++ b/agent/consul/federation_state_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/federation_state_endpoint_test.go b/agent/consul/federation_state_endpoint_test.go index 2ada2fc17a469..977de1c9c193c 100644 --- a/agent/consul/federation_state_endpoint_test.go +++ b/agent/consul/federation_state_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/federation_state_replication.go b/agent/consul/federation_state_replication.go index 2f5a6dd150f31..f56c3c6089c73 100644 --- a/agent/consul/federation_state_replication.go +++ b/agent/consul/federation_state_replication.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/federation_state_replication_test.go b/agent/consul/federation_state_replication_test.go index 97a34b8dc8c16..5100e45926a13 100644 --- a/agent/consul/federation_state_replication_test.go +++ b/agent/consul/federation_state_replication_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/filter.go b/agent/consul/filter.go index 920b8e843676f..18643463690ee 100644 --- a/agent/consul/filter.go +++ b/agent/consul/filter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/filter_test.go b/agent/consul/filter_test.go index 1ca34b0ed0726..d8f6ba54c3232 100644 --- a/agent/consul/filter_test.go +++ b/agent/consul/filter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/flood.go b/agent/consul/flood.go index e01b5ed97eb83..ee7dfbc1dd5ec 100644 --- a/agent/consul/flood.go +++ b/agent/consul/flood.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/fsm/commands_ce.go b/agent/consul/fsm/commands_ce.go index c5e7fd968238b..e9f9f66e3361e 100644 --- a/agent/consul/fsm/commands_ce.go +++ b/agent/consul/fsm/commands_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/commands_ce_test.go b/agent/consul/fsm/commands_ce_test.go index 445f4c0190760..cea6f05f54f3f 100644 --- a/agent/consul/fsm/commands_ce_test.go +++ b/agent/consul/fsm/commands_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/fsm.go b/agent/consul/fsm/fsm.go index 92a3931b5b331..4357ad7c39e2b 100644 --- a/agent/consul/fsm/fsm.go +++ b/agent/consul/fsm/fsm.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/fsm_test.go b/agent/consul/fsm/fsm_test.go index 839401014b52e..aa31615a5aa7a 100644 --- a/agent/consul/fsm/fsm_test.go +++ b/agent/consul/fsm/fsm_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/log_verification_chunking_shim.go b/agent/consul/fsm/log_verification_chunking_shim.go index 4f40c1820b74d..a74b92b5684d3 100644 --- a/agent/consul/fsm/log_verification_chunking_shim.go +++ b/agent/consul/fsm/log_verification_chunking_shim.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/snapshot.go b/agent/consul/fsm/snapshot.go index c01d2c9f2dd4b..c49cefd3a9937 100644 --- a/agent/consul/fsm/snapshot.go +++ b/agent/consul/fsm/snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/snapshot_ce.go b/agent/consul/fsm/snapshot_ce.go index bbe5e0693eaa7..f563ba21a19f3 100644 --- a/agent/consul/fsm/snapshot_ce.go +++ b/agent/consul/fsm/snapshot_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/fsm/snapshot_ce_test.go b/agent/consul/fsm/snapshot_ce_test.go index 5bc389dffa4ac..b08e75716f385 100644 --- a/agent/consul/fsm/snapshot_ce_test.go +++ b/agent/consul/fsm/snapshot_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/fsm/snapshot_test.go b/agent/consul/fsm/snapshot_test.go index ff975aaf9f034..3e16efb190728 100644 --- a/agent/consul/fsm/snapshot_test.go +++ b/agent/consul/fsm/snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package fsm diff --git a/agent/consul/gateway_locator.go b/agent/consul/gateway_locator.go index 6503ca0c979d5..8f8ca29fbb469 100644 --- a/agent/consul/gateway_locator.go +++ b/agent/consul/gateway_locator.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/gateway_locator_test.go b/agent/consul/gateway_locator_test.go index a3e9da3d69007..f9b1daf26d825 100644 --- a/agent/consul/gateway_locator_test.go +++ b/agent/consul/gateway_locator_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/gateways/controller_gateways.go b/agent/consul/gateways/controller_gateways.go index fe8ddbcedc6fc..cf4f25aa5d46d 100644 --- a/agent/consul/gateways/controller_gateways.go +++ b/agent/consul/gateways/controller_gateways.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package gateways diff --git a/agent/consul/gateways/controller_gateways_test.go b/agent/consul/gateways/controller_gateways_test.go index 7877ab357ed9a..07d85357acdc7 100644 --- a/agent/consul/gateways/controller_gateways_test.go +++ b/agent/consul/gateways/controller_gateways_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package gateways diff --git a/agent/consul/grpc_integration_test.go b/agent/consul/grpc_integration_test.go index 6ae49e09fa3aa..678403a450409 100644 --- a/agent/consul/grpc_integration_test.go +++ b/agent/consul/grpc_integration_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/health_endpoint.go b/agent/consul/health_endpoint.go index d26bbcd3b6f2f..c1286cce172fd 100644 --- a/agent/consul/health_endpoint.go +++ b/agent/consul/health_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/health_endpoint_test.go b/agent/consul/health_endpoint_test.go index b47159c229424..21a83ea90db2e 100644 --- a/agent/consul/health_endpoint_test.go +++ b/agent/consul/health_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/helper_test.go b/agent/consul/helper_test.go index d21523b8fecff..0619004c546e6 100644 --- a/agent/consul/helper_test.go +++ b/agent/consul/helper_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/intention_endpoint.go b/agent/consul/intention_endpoint.go index a3e4ad678b1d3..b00ebfbb46f0d 100644 --- a/agent/consul/intention_endpoint.go +++ b/agent/consul/intention_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/intention_endpoint_test.go b/agent/consul/intention_endpoint_test.go index d7e469b80326f..fb7dcaebf5737 100644 --- a/agent/consul/intention_endpoint_test.go +++ b/agent/consul/intention_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/internal_endpoint.go b/agent/consul/internal_endpoint.go index 1a8a0fca3028e..16dab8c22f87b 100644 --- a/agent/consul/internal_endpoint.go +++ b/agent/consul/internal_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/internal_endpoint_test.go b/agent/consul/internal_endpoint_test.go index 3f853df7ceb22..d7da66244336b 100644 --- a/agent/consul/internal_endpoint_test.go +++ b/agent/consul/internal_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/issue_test.go b/agent/consul/issue_test.go index 17624400fe3f1..14928a9db99d1 100644 --- a/agent/consul/issue_test.go +++ b/agent/consul/issue_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/kvs_endpoint.go b/agent/consul/kvs_endpoint.go index 65dc2cd56d40f..183f95f7f8bf0 100644 --- a/agent/consul/kvs_endpoint.go +++ b/agent/consul/kvs_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/kvs_endpoint_test.go b/agent/consul/kvs_endpoint_test.go index dc4272c4bd55d..ca9960f4b6e4e 100644 --- a/agent/consul/kvs_endpoint_test.go +++ b/agent/consul/kvs_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader.go b/agent/consul/leader.go index fcbf794541f3d..17408d4ef4419 100644 --- a/agent/consul/leader.go +++ b/agent/consul/leader.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_ce_test.go b/agent/consul/leader_ce_test.go index 9e5e2d34ffdd8..7ff6f64ee193d 100644 --- a/agent/consul/leader_ce_test.go +++ b/agent/consul/leader_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/leader_connect.go b/agent/consul/leader_connect.go index 794820786f576..f872508bbcf90 100644 --- a/agent/consul/leader_connect.go +++ b/agent/consul/leader_connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_connect_ca.go b/agent/consul/leader_connect_ca.go index 00b3712028429..717c9ff0b2544 100644 --- a/agent/consul/leader_connect_ca.go +++ b/agent/consul/leader_connect_ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_connect_ca_test.go b/agent/consul/leader_connect_ca_test.go index 42dcdd447d493..e1c2cf8506c29 100644 --- a/agent/consul/leader_connect_ca_test.go +++ b/agent/consul/leader_connect_ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_connect_test.go b/agent/consul/leader_connect_test.go index d9150c3a4545b..539226b297d3d 100644 --- a/agent/consul/leader_connect_test.go +++ b/agent/consul/leader_connect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_federation_state_ae.go b/agent/consul/leader_federation_state_ae.go index 870dc5460e2b0..fa46bea770b3a 100644 --- a/agent/consul/leader_federation_state_ae.go +++ b/agent/consul/leader_federation_state_ae.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_federation_state_ae_test.go b/agent/consul/leader_federation_state_ae_test.go index ca5ac47b7a974..ef3333da31dac 100644 --- a/agent/consul/leader_federation_state_ae_test.go +++ b/agent/consul/leader_federation_state_ae_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_intentions.go b/agent/consul/leader_intentions.go index 52736838aec81..cf0844d3ff5cd 100644 --- a/agent/consul/leader_intentions.go +++ b/agent/consul/leader_intentions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_intentions_ce.go b/agent/consul/leader_intentions_ce.go index 98acecf918fdd..83880d31de371 100644 --- a/agent/consul/leader_intentions_ce.go +++ b/agent/consul/leader_intentions_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/leader_intentions_ce_test.go b/agent/consul/leader_intentions_ce_test.go index 3e689d40a8067..7d144fb2e98e7 100644 --- a/agent/consul/leader_intentions_ce_test.go +++ b/agent/consul/leader_intentions_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/leader_intentions_test.go b/agent/consul/leader_intentions_test.go index fc868bc747fc1..2de1b97dd7e10 100644 --- a/agent/consul/leader_intentions_test.go +++ b/agent/consul/leader_intentions_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_log_verification.go b/agent/consul/leader_log_verification.go index 32a23dd3f5c06..ef32ce17904ea 100644 --- a/agent/consul/leader_log_verification.go +++ b/agent/consul/leader_log_verification.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_metrics.go b/agent/consul/leader_metrics.go index e210b2ffd9333..188e409e3bbd1 100644 --- a/agent/consul/leader_metrics.go +++ b/agent/consul/leader_metrics.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_metrics_test.go b/agent/consul/leader_metrics_test.go index e3636e1bcf8c9..96e7a0d75d971 100644 --- a/agent/consul/leader_metrics_test.go +++ b/agent/consul/leader_metrics_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_peering.go b/agent/consul/leader_peering.go index 0f58ed08f491e..32f220164b64c 100644 --- a/agent/consul/leader_peering.go +++ b/agent/consul/leader_peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_peering_test.go b/agent/consul/leader_peering_test.go index 8db496273d281..0787115ca70ac 100644 --- a/agent/consul/leader_peering_test.go +++ b/agent/consul/leader_peering_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/leader_test.go b/agent/consul/leader_test.go index 6cd30f38c9876..8a5a158ce34a3 100644 --- a/agent/consul/leader_test.go +++ b/agent/consul/leader_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/logging.go b/agent/consul/logging.go index cfafe62b0d31f..da07daa8febfa 100644 --- a/agent/consul/logging.go +++ b/agent/consul/logging.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/logging_test.go b/agent/consul/logging_test.go index 3b756c0bb6226..7f090992a7a26 100644 --- a/agent/consul/logging_test.go +++ b/agent/consul/logging_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/merge.go b/agent/consul/merge.go index f6771d110f0ce..21b59f1aa92d6 100644 --- a/agent/consul/merge.go +++ b/agent/consul/merge.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/merge_ce.go b/agent/consul/merge_ce.go index 83e8f5343d4ca..59704f6533203 100644 --- a/agent/consul/merge_ce.go +++ b/agent/consul/merge_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/merge_ce_test.go b/agent/consul/merge_ce_test.go index 5213907d1bcb8..8b0a7514ab264 100644 --- a/agent/consul/merge_ce_test.go +++ b/agent/consul/merge_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/merge_test.go b/agent/consul/merge_test.go index bc9d1f2cb4da8..f5f5c6d88ff1c 100644 --- a/agent/consul/merge_test.go +++ b/agent/consul/merge_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/multilimiter/multilimiter.go b/agent/consul/multilimiter/multilimiter.go index a0b9a6044f0df..f40e6c501abe6 100644 --- a/agent/consul/multilimiter/multilimiter.go +++ b/agent/consul/multilimiter/multilimiter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package multilimiter diff --git a/agent/consul/multilimiter/multilimiter_test.go b/agent/consul/multilimiter/multilimiter_test.go index e7cdab4e14824..b649bdb6c9c95 100644 --- a/agent/consul/multilimiter/multilimiter_test.go +++ b/agent/consul/multilimiter/multilimiter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package multilimiter diff --git a/agent/consul/operator_autopilot_endpoint.go b/agent/consul/operator_autopilot_endpoint.go index 39bd5b648ddb8..b6ef7d38e6565 100644 --- a/agent/consul/operator_autopilot_endpoint.go +++ b/agent/consul/operator_autopilot_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_autopilot_endpoint_test.go b/agent/consul/operator_autopilot_endpoint_test.go index 4cef3f0960d42..c9258e9aa2705 100644 --- a/agent/consul/operator_autopilot_endpoint_test.go +++ b/agent/consul/operator_autopilot_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_backend.go b/agent/consul/operator_backend.go index 136baa1a22ab1..a72128735ab3c 100644 --- a/agent/consul/operator_backend.go +++ b/agent/consul/operator_backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_backend_test.go b/agent/consul/operator_backend_test.go index 0a4650359ec1e..2189fe00630c7 100644 --- a/agent/consul/operator_backend_test.go +++ b/agent/consul/operator_backend_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_endpoint.go b/agent/consul/operator_endpoint.go index 67259c9408a95..33e73e6ee1df9 100644 --- a/agent/consul/operator_endpoint.go +++ b/agent/consul/operator_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_raft_endpoint.go b/agent/consul/operator_raft_endpoint.go index b8a16fc2c3ec9..7b0bcbc5cc035 100644 --- a/agent/consul/operator_raft_endpoint.go +++ b/agent/consul/operator_raft_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_raft_endpoint_test.go b/agent/consul/operator_raft_endpoint_test.go index bb2dc88fc89e3..7242c40e6c45a 100644 --- a/agent/consul/operator_raft_endpoint_test.go +++ b/agent/consul/operator_raft_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/operator_usage_endpoint.go b/agent/consul/operator_usage_endpoint.go index 68f3137d0a61f..d23815b147c7d 100644 --- a/agent/consul/operator_usage_endpoint.go +++ b/agent/consul/operator_usage_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/options.go b/agent/consul/options.go index fa2781b83d095..26cb2471a89bc 100644 --- a/agent/consul/options.go +++ b/agent/consul/options.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/consul/agent/router" "github.com/hashicorp/consul/agent/rpc/middleware" "github.com/hashicorp/consul/agent/token" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/tlsutil" ) @@ -30,7 +29,6 @@ type Deps struct { GRPCConnPool GRPCClientConner LeaderForwarder LeaderForwarder XDSStreamLimiter *limiter.SessionLimiter - Registry resource.Registry // GetNetRPCInterceptorFunc, if not nil, sets the net/rpc rpc.ServerServiceCallInterceptor on // the server side to record metrics around the RPC requests. If nil, no interceptor is added to // the rpc server. diff --git a/agent/consul/options_ce.go b/agent/consul/options_ce.go index 0b4d04a66a74b..7604ddd87f925 100644 --- a/agent/consul/options_ce.go +++ b/agent/consul/options_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/peering_backend.go b/agent/consul/peering_backend.go index 5a27bc6442a1d..1771be10fbaac 100644 --- a/agent/consul/peering_backend.go +++ b/agent/consul/peering_backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/peering_backend_ce.go b/agent/consul/peering_backend_ce.go index 7b00e1907b695..81a133b3425a0 100644 --- a/agent/consul/peering_backend_ce.go +++ b/agent/consul/peering_backend_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/peering_backend_ce_test.go b/agent/consul/peering_backend_ce_test.go index a8eae8f067de7..410bf5f234273 100644 --- a/agent/consul/peering_backend_ce_test.go +++ b/agent/consul/peering_backend_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/peering_backend_test.go b/agent/consul/peering_backend_test.go index adfe6fe228f95..648052b7a15fe 100644 --- a/agent/consul/peering_backend_test.go +++ b/agent/consul/peering_backend_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/prepared_query/template.go b/agent/consul/prepared_query/template.go index 03cf9d2f58505..ef2e2abd4cae4 100644 --- a/agent/consul/prepared_query/template.go +++ b/agent/consul/prepared_query/template.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package prepared_query diff --git a/agent/consul/prepared_query/template_test.go b/agent/consul/prepared_query/template_test.go index 7c9b2f1a3af29..d4f78402140de 100644 --- a/agent/consul/prepared_query/template_test.go +++ b/agent/consul/prepared_query/template_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package prepared_query diff --git a/agent/consul/prepared_query/walk.go b/agent/consul/prepared_query/walk.go index 72296c0c7fe64..da53ce105b5f3 100644 --- a/agent/consul/prepared_query/walk.go +++ b/agent/consul/prepared_query/walk.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package prepared_query diff --git a/agent/consul/prepared_query/walk_ce_test.go b/agent/consul/prepared_query/walk_ce_test.go index 8d19b951c5bfe..dec84b241b0a3 100644 --- a/agent/consul/prepared_query/walk_ce_test.go +++ b/agent/consul/prepared_query/walk_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/prepared_query/walk_test.go b/agent/consul/prepared_query/walk_test.go index b788571e4af5f..9ff380248bd2b 100644 --- a/agent/consul/prepared_query/walk_test.go +++ b/agent/consul/prepared_query/walk_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package prepared_query diff --git a/agent/consul/prepared_query_endpoint.go b/agent/consul/prepared_query_endpoint.go index 139556bb1af8c..101839708ea2f 100644 --- a/agent/consul/prepared_query_endpoint.go +++ b/agent/consul/prepared_query_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/prepared_query_endpoint_ce.go b/agent/consul/prepared_query_endpoint_ce.go index 4f7087806cfe6..612b81b2e6880 100644 --- a/agent/consul/prepared_query_endpoint_ce.go +++ b/agent/consul/prepared_query_endpoint_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/prepared_query_endpoint_ce_test.go b/agent/consul/prepared_query_endpoint_ce_test.go index 3c30daf0a92cb..876f91d42cd5d 100644 --- a/agent/consul/prepared_query_endpoint_ce_test.go +++ b/agent/consul/prepared_query_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/prepared_query_endpoint_test.go b/agent/consul/prepared_query_endpoint_test.go index f0d63dc277c18..af1fd65a876d1 100644 --- a/agent/consul/prepared_query_endpoint_test.go +++ b/agent/consul/prepared_query_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -2808,7 +2808,7 @@ func TestPreparedQuery_Wrapper(t *testing.T) { t.Fatalf("bad: %v", ret) } // Since we have no idea when the joinWAN operation completes - // we keep on querying until the join operation completes. + // we keep on querying until the the join operation completes. retry.Run(t, func(r *retry.R) { r.Check(s1.forwardDC("Status.Ping", "dc2", &struct{}{}, &struct{}{})) }) diff --git a/agent/consul/raft_handle.go b/agent/consul/raft_handle.go index 2906fe7115f19..bf38f0ee9e767 100644 --- a/agent/consul/raft_handle.go +++ b/agent/consul/raft_handle.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/raft_rpc.go b/agent/consul/raft_rpc.go index 1a0d6caa64d4a..7928ad31e2b9a 100644 --- a/agent/consul/raft_rpc.go +++ b/agent/consul/raft_rpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/rate/handler.go b/agent/consul/rate/handler.go index bb3aef63931dd..c18ec85eddc8d 100644 --- a/agent/consul/rate/handler.go +++ b/agent/consul/rate/handler.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package rate implements server-side RPC rate limiting. package rate diff --git a/agent/consul/rate/handler_ce.go b/agent/consul/rate/handler_ce.go index b9ec451869a3a..fc33a69487f88 100644 --- a/agent/consul/rate/handler_ce.go +++ b/agent/consul/rate/handler_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/rate/handler_test.go b/agent/consul/rate/handler_test.go index 268568ce9599c..54a8b86a4b989 100644 --- a/agent/consul/rate/handler_test.go +++ b/agent/consul/rate/handler_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rate diff --git a/agent/consul/rate/metrics.go b/agent/consul/rate/metrics.go index ac69c14661776..cbf796fa935c6 100644 --- a/agent/consul/rate/metrics.go +++ b/agent/consul/rate/metrics.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rate diff --git a/agent/consul/replication.go b/agent/consul/replication.go index 08b8811129bea..0d85d082653cb 100644 --- a/agent/consul/replication.go +++ b/agent/consul/replication.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/replication_test.go b/agent/consul/replication_test.go index 27000fc563b78..e37e19b1f2933 100644 --- a/agent/consul/replication_test.go +++ b/agent/consul/replication_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/reporting/reporting.go b/agent/consul/reporting/reporting.go index d6c480f6bace4..fec7050f695ba 100644 --- a/agent/consul/reporting/reporting.go +++ b/agent/consul/reporting/reporting.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package reporting diff --git a/agent/consul/reporting/reporting_ce.go b/agent/consul/reporting/reporting_ce.go index 669ca264afdc0..a1e95a177416c 100644 --- a/agent/consul/reporting/reporting_ce.go +++ b/agent/consul/reporting/reporting_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/rpc.go b/agent/consul/rpc.go index dbb781951e348..f97a5ff886746 100644 --- a/agent/consul/rpc.go +++ b/agent/consul/rpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/rpc_test.go b/agent/consul/rpc_test.go index 39351c98ca92a..f1b05fa528287 100644 --- a/agent/consul/rpc_test.go +++ b/agent/consul/rpc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/rtt.go b/agent/consul/rtt.go index 1599301e158df..5db0a634b4352 100644 --- a/agent/consul/rtt.go +++ b/agent/consul/rtt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/rtt_test.go b/agent/consul/rtt_test.go index aeed0b66f50d5..9420f36c83657 100644 --- a/agent/consul/rtt_test.go +++ b/agent/consul/rtt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/segment_ce.go b/agent/consul/segment_ce.go index fd3fce459f49a..a3c0162d2a1e2 100644 --- a/agent/consul/segment_ce.go +++ b/agent/consul/segment_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/serf_filter.go b/agent/consul/serf_filter.go index 7b09c2b9e8020..fd6911bf0ab8a 100644 --- a/agent/consul/serf_filter.go +++ b/agent/consul/serf_filter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/serf_test.go b/agent/consul/serf_test.go index 4d4bc4926a46d..62cc6d0a0ba3f 100644 --- a/agent/consul/serf_test.go +++ b/agent/consul/serf_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server.go b/agent/consul/server.go index e440c6c27da9c..6bb424c67535d 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul @@ -20,7 +20,6 @@ import ( "time" "github.com/armon/go-metrics" - "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/go-connlimit" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" @@ -35,7 +34,8 @@ import ( "golang.org/x/time/rate" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/reflection" + + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/acl/resolver" @@ -81,7 +81,6 @@ import ( "github.com/hashicorp/consul/lib/routine" "github.com/hashicorp/consul/lib/stringslice" "github.com/hashicorp/consul/logging" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/proto/private/pbsubscribe" "github.com/hashicorp/consul/tlsutil" @@ -243,7 +242,7 @@ type Server struct { // serf cluster that spans datacenters eventChWAN chan serf.Event - // wanMembershipNotifyCh is used to receive notifications that the + // wanMembershipNotifyCh is used to receive notifications that the the // serfWAN wan pool may have changed. // // If this is nil, notification is skipped. @@ -440,20 +439,13 @@ type Server struct { // run by the Server routineManager *routine.Manager - // resourceServiceServer implements the Resource Service. - resourceServiceServer *resourcegrpc.Server + // typeRegistry contains Consul's registered resource types. + typeRegistry resource.Registry - // insecureResourceServiceClient is a client that can be used to communicate - // with the Resource Service in-process (i.e. not via the network) *without* - // auth. It should only be used for purely-internal workloads, such as - // controllers. - insecureResourceServiceClient pbresource.ResourceServiceClient - - // secureResourceServiceClient is a client that can be used to communicate - // with the Resource Service in-process (i.e. not via the network) *with* auth. - // It can be used to make requests to the Resource Service on behalf of the user - // (e.g. from the HTTP API). - secureResourceServiceClient pbresource.ResourceServiceClient + // internalResourceServiceClient is a client that can be used to communicate + // with the Resource Service in-process (i.e. not via the network) without auth. + // It should only be used for purely-internal workloads, such as controllers. + internalResourceServiceClient pbresource.ResourceServiceClient // controllerManager schedules the execution of controllers. controllerManager *controller.Manager @@ -534,6 +526,7 @@ func NewServer(config *Config, flat Deps, externalGRPCServer *grpc.Server, incom publisher: flat.EventPublisher, incomingRPCLimiter: incomingRPCLimiter, routineManager: routine.NewManager(logger.Named(logging.ConsulServer)), + typeRegistry: resource.NewRegistry(), } incomingRPCLimiter.Register(s) @@ -801,7 +794,7 @@ func NewServer(config *Config, flat Deps, externalGRPCServer *grpc.Server, incom go s.reportingManager.Run(&lib.StopChannelContext{StopCh: s.shutdownCh}) // Initialize external gRPC server - s.setupExternalGRPC(config, flat.Registry, logger) + s.setupExternalGRPC(config, logger) // Initialize internal gRPC server. // @@ -810,19 +803,14 @@ func NewServer(config *Config, flat Deps, externalGRPCServer *grpc.Server, incom s.grpcHandler = newGRPCHandlerFromConfig(flat, config, s) s.grpcLeaderForwarder = flat.LeaderForwarder - if err := s.setupSecureResourceServiceClient(); err != nil { - return nil, err - } - - if err := s.setupInsecureResourceServiceClient(flat.Registry, logger); err != nil { + if err := s.setupInternalResourceService(logger); err != nil { return nil, err } - s.controllerManager = controller.NewManager( - s.insecureResourceServiceClient, + s.internalResourceServiceClient, logger.Named(logging.ControllerRuntime), ) - s.registerControllers(flat) + s.registerResources(flat) go s.controllerManager.Run(&lib.StopChannelContext{StopCh: shutdownCh}) go s.trackLeaderChanges() @@ -873,28 +861,18 @@ func NewServer(config *Config, flat Deps, externalGRPCServer *grpc.Server, incom return s, nil } -func (s *Server) registerControllers(deps Deps) { +func (s *Server) registerResources(deps Deps) { if stringslice.Contains(deps.Experiments, catalogResourceExperimentName) { + catalog.RegisterTypes(s.typeRegistry) catalog.RegisterControllers(s.controllerManager, catalog.DefaultControllerDependencies()) - mesh.RegisterControllers(s.controllerManager, mesh.ControllerDependencies{ - TrustBundleFetcher: func() (*pbproxystate.TrustBundle, error) { - var bundle pbproxystate.TrustBundle - roots, err := s.getCARoots(nil, s.GetState()) - if err != nil { - return nil, err - } - bundle.TrustDomain = roots.TrustDomain - for _, root := range roots.Roots { - bundle.Roots = append(bundle.Roots, root.RootCert) - } - return &bundle, nil - }, - }) + + mesh.RegisterTypes(s.typeRegistry) } reaper.RegisterControllers(s.controllerManager) if s.config.DevMode { + demo.RegisterTypes(s.typeRegistry) demo.RegisterControllers(s.controllerManager) } } @@ -951,7 +929,6 @@ func newGRPCHandlerFromConfig(deps Deps, config *Config, s *Server) connHandler s.peerStreamServer.Register(srv) s.externalACLServer.Register(srv) s.externalConnectCAServer.Register(srv) - s.resourceServiceServer.Register(srv) } return agentgrpc.NewHandler(deps.Logger, config.RPCAddr, register, nil, s.incomingRPCLimiter) @@ -1292,7 +1269,7 @@ func (s *Server) setupRPC() error { } // Initialize and register services on external gRPC server. -func (s *Server) setupExternalGRPC(config *Config, typeRegistry resource.Registry, logger hclog.Logger) { +func (s *Server) setupExternalGRPC(config *Config, logger hclog.Logger) { s.externalACLServer = aclgrpc.NewServer(aclgrpc.Config{ ACLsEnabled: s.config.ACLsEnabled, ForwardRPC: func(info structs.RPCInfo, fn func(*grpc.ClientConn) error) (bool, error) { @@ -1357,54 +1334,23 @@ func (s *Server) setupExternalGRPC(config *Config, typeRegistry resource.Registr }) s.peerStreamServer.Register(s.externalGRPCServer) - s.resourceServiceServer = resourcegrpc.NewServer(resourcegrpc.Config{ - Registry: typeRegistry, - Backend: s.raftStorageBackend, - ACLResolver: s.ACLResolver, - Logger: logger.Named("grpc-api.resource"), - V1TenancyBridge: NewV1TenancyBridge(s), - }) - s.resourceServiceServer.Register(s.externalGRPCServer) - - reflection.Register(s.externalGRPCServer) -} - -func (s *Server) setupInsecureResourceServiceClient(typeRegistry resource.Registry, logger hclog.Logger) error { - server := resourcegrpc.NewServer(resourcegrpc.Config{ - Registry: typeRegistry, - Backend: s.raftStorageBackend, - ACLResolver: resolver.DANGER_NO_AUTH{}, - Logger: logger.Named("grpc-api.resource"), - V1TenancyBridge: NewV1TenancyBridge(s), - }) - - conn, err := s.runInProcessGRPCServer(server.Register) - if err != nil { - return err - } - s.insecureResourceServiceClient = pbresource.NewResourceServiceClient(conn) - - return nil -} - -func (s *Server) setupSecureResourceServiceClient() error { - conn, err := s.runInProcessGRPCServer(s.resourceServiceServer.Register) - if err != nil { - return err - } - s.secureResourceServiceClient = pbresource.NewResourceServiceClient(conn) - - return nil + resourcegrpc.NewServer(resourcegrpc.Config{ + Registry: s.typeRegistry, + Backend: s.raftStorageBackend, + ACLResolver: s.ACLResolver, + Logger: logger.Named("grpc-api.resource"), + }).Register(s.externalGRPCServer) } -// runInProcessGRPCServer runs a gRPC server that can only be accessed in the -// same process, rather than over the network, using a pipe listener. -func (s *Server) runInProcessGRPCServer(registerFn ...func(*grpc.Server)) (*grpc.ClientConn, error) { +func (s *Server) setupInternalResourceService(logger hclog.Logger) error { server := grpc.NewServer() - for _, fn := range registerFn { - fn(server) - } + resourcegrpc.NewServer(resourcegrpc.Config{ + Registry: s.typeRegistry, + Backend: s.raftStorageBackend, + ACLResolver: resolver.DANGER_NO_AUTH{}, + Logger: logger.Named("grpc-api.resource"), + }).Register(server) pipe := agentgrpc.NewPipeListener() go server.Serve(pipe) @@ -1421,14 +1367,15 @@ func (s *Server) runInProcessGRPCServer(registerFn ...func(*grpc.Server)) (*grpc ) if err != nil { server.Stop() - return nil, err + return err } go func() { <-s.shutdownCh conn.Close() }() + s.internalResourceServiceClient = pbresource.NewResourceServiceClient(conn) - return conn, nil + return nil } // Shutdown is used to shutdown the server @@ -2148,10 +2095,6 @@ func (s *Server) hcpServerStatus(deps Deps) hcp.StatusCallback { } } -func (s *Server) ResourceServiceClient() pbresource.ResourceServiceClient { - return s.secureResourceServiceClient -} - func fileExists(name string) (bool, error) { _, err := os.Stat(name) if err == nil { diff --git a/agent/consul/server_ce.go b/agent/consul/server_ce.go index ab586a0292c04..22660f490b7f2 100644 --- a/agent/consul/server_ce.go +++ b/agent/consul/server_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/server_ce_test.go b/agent/consul/server_ce_test.go index 472560f2b925d..c1760589a9e14 100644 --- a/agent/consul/server_ce_test.go +++ b/agent/consul/server_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/server_connect.go b/agent/consul/server_connect.go index d76e4fc8c425e..496d059cb4941 100644 --- a/agent/consul/server_connect.go +++ b/agent/consul/server_connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_log_verification.go b/agent/consul/server_log_verification.go index 2bde7dbc81b40..5646e78760989 100644 --- a/agent/consul/server_log_verification.go +++ b/agent/consul/server_log_verification.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_lookup.go b/agent/consul/server_lookup.go index 60b9c076bf148..e1952d671d07d 100644 --- a/agent/consul/server_lookup.go +++ b/agent/consul/server_lookup.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_lookup_test.go b/agent/consul/server_lookup_test.go index 52e3605de719b..5d3d3d4e0e42f 100644 --- a/agent/consul/server_lookup_test.go +++ b/agent/consul/server_lookup_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_metadata.go b/agent/consul/server_metadata.go index 03e4751a290c2..742391e0b6a1f 100644 --- a/agent/consul/server_metadata.go +++ b/agent/consul/server_metadata.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_metadata_test.go b/agent/consul/server_metadata_test.go index bf993bc1be57c..d091bfdf3630e 100644 --- a/agent/consul/server_metadata_test.go +++ b/agent/consul/server_metadata_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_overview.go b/agent/consul/server_overview.go index a94749d53498a..62bdb34406121 100644 --- a/agent/consul/server_overview.go +++ b/agent/consul/server_overview.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_overview_test.go b/agent/consul/server_overview_test.go index 7780b5ce83967..ebb930a1e2bf2 100644 --- a/agent/consul/server_overview_test.go +++ b/agent/consul/server_overview_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_register.go b/agent/consul/server_register.go index 90d95f061956f..61f1daefc7dfa 100644 --- a/agent/consul/server_register.go +++ b/agent/consul/server_register.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_serf.go b/agent/consul/server_serf.go index aea50aa6dd199..1dc6c25b1cce5 100644 --- a/agent/consul/server_serf.go +++ b/agent/consul/server_serf.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/server_test.go b/agent/consul/server_test.go index 1ad333c613210..ebff789b14a5d 100644 --- a/agent/consul/server_test.go +++ b/agent/consul/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/servercert/manager.go b/agent/consul/servercert/manager.go index 664753439477d..75c2a4f276082 100644 --- a/agent/consul/servercert/manager.go +++ b/agent/consul/servercert/manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package servercert diff --git a/agent/consul/servercert/manager_test.go b/agent/consul/servercert/manager_test.go index e9cc0c81c58c1..dfadfe4b953fb 100644 --- a/agent/consul/servercert/manager_test.go +++ b/agent/consul/servercert/manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package servercert diff --git a/agent/consul/session_endpoint.go b/agent/consul/session_endpoint.go index f2f8ab7740234..6e41138f983c6 100644 --- a/agent/consul/session_endpoint.go +++ b/agent/consul/session_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/session_endpoint_test.go b/agent/consul/session_endpoint_test.go index 408cd7b058c59..ae04d2658f9a7 100644 --- a/agent/consul/session_endpoint_test.go +++ b/agent/consul/session_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/session_timers.go b/agent/consul/session_timers.go index f1c62b08a8196..b4c1b425cb267 100644 --- a/agent/consul/session_timers.go +++ b/agent/consul/session_timers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/session_timers_test.go b/agent/consul/session_timers_test.go index f944cc76745d8..d44ed2b366fed 100644 --- a/agent/consul/session_timers_test.go +++ b/agent/consul/session_timers_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/session_ttl.go b/agent/consul/session_ttl.go index 8f5440e14dffa..7866ec8fed198 100644 --- a/agent/consul/session_ttl.go +++ b/agent/consul/session_ttl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/session_ttl_test.go b/agent/consul/session_ttl_test.go index e552f0ff6cdff..5cd720f3f8933 100644 --- a/agent/consul/session_ttl_test.go +++ b/agent/consul/session_ttl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/snapshot_endpoint.go b/agent/consul/snapshot_endpoint.go index c9a6e9ace47c8..7e5f21113aebd 100644 --- a/agent/consul/snapshot_endpoint.go +++ b/agent/consul/snapshot_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // The snapshot endpoint is a special non-RPC endpoint that supports streaming // for taking and restoring snapshots for disaster recovery. This gets wired diff --git a/agent/consul/snapshot_endpoint_test.go b/agent/consul/snapshot_endpoint_test.go index 40bede9149743..f401bb72e38d0 100644 --- a/agent/consul/snapshot_endpoint_test.go +++ b/agent/consul/snapshot_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/state/acl.go b/agent/consul/state/acl.go index f82b671b18b6a..22c8a6164e429 100644 --- a/agent/consul/state/acl.go +++ b/agent/consul/state/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/acl_ce.go b/agent/consul/state/acl_ce.go index ee0a8eb5ee64b..62bf5c1dc8fae 100644 --- a/agent/consul/state/acl_ce.go +++ b/agent/consul/state/acl_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/acl_ce_test.go b/agent/consul/state/acl_ce_test.go index 38cf2ebcda1fa..4d3bcdcfc00b7 100644 --- a/agent/consul/state/acl_ce_test.go +++ b/agent/consul/state/acl_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/acl_events.go b/agent/consul/state/acl_events.go index d00062c23bac9..3767d2d2d1542 100644 --- a/agent/consul/state/acl_events.go +++ b/agent/consul/state/acl_events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/acl_events_test.go b/agent/consul/state/acl_events_test.go index 3c6e3fdfab174..303d54a25be1b 100644 --- a/agent/consul/state/acl_events_test.go +++ b/agent/consul/state/acl_events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/acl_schema.go b/agent/consul/state/acl_schema.go index cdee3ed9fff4e..b4e7fc6dcd906 100644 --- a/agent/consul/state/acl_schema.go +++ b/agent/consul/state/acl_schema.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/acl_test.go b/agent/consul/state/acl_test.go index 330c0689aafc0..4bf42954dd20a 100644 --- a/agent/consul/state/acl_test.go +++ b/agent/consul/state/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/autopilot.go b/agent/consul/state/autopilot.go index 608f08f5215c2..472ce4bfc31c2 100644 --- a/agent/consul/state/autopilot.go +++ b/agent/consul/state/autopilot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/autopilot_test.go b/agent/consul/state/autopilot_test.go index a2877e2df5ffa..f26163bc4ec1b 100644 --- a/agent/consul/state/autopilot_test.go +++ b/agent/consul/state/autopilot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go index f5007a893fd6f..040a9608142ba 100644 --- a/agent/consul/state/catalog.go +++ b/agent/consul/state/catalog.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state @@ -3972,7 +3972,7 @@ func updateGatewayService(tx WriteTxn, idx uint64, mapping *structs.GatewayServi } // checkWildcardForGatewaysAndUpdate checks whether a service matches a -// wildcard definition in gateway config entries and if so adds it the +// wildcard definition in gateway config entries and if so adds it the the // gateway-services table. func checkGatewayWildcardsAndUpdate(tx WriteTxn, idx uint64, svc *structs.ServiceName, ns *structs.NodeService, kind structs.GatewayServiceKind) error { sn := structs.ServiceName{Name: structs.WildcardSpecifier, EnterpriseMeta: svc.EnterpriseMeta} @@ -4020,7 +4020,7 @@ func checkGatewayWildcardsAndUpdate(tx WriteTxn, idx uint64, svc *structs.Servic } // checkGatewayAndUpdate checks whether a service matches a -// wildcard definition in gateway config entries and if so adds it the +// wildcard definition in gateway config entries and if so adds it the the // gateway-services table. func checkGatewayAndUpdate(tx WriteTxn, idx uint64, svc *structs.ServiceName, kind structs.GatewayServiceKind) error { sn := structs.ServiceName{Name: svc.Name, EnterpriseMeta: svc.EnterpriseMeta} diff --git a/agent/consul/state/catalog_ce.go b/agent/consul/state/catalog_ce.go index 1c8062567d74f..bec9a6a619771 100644 --- a/agent/consul/state/catalog_ce.go +++ b/agent/consul/state/catalog_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/catalog_ce_test.go b/agent/consul/state/catalog_ce_test.go index f0ad6ffbc9289..e8c71812f860f 100644 --- a/agent/consul/state/catalog_ce_test.go +++ b/agent/consul/state/catalog_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/catalog_events.go b/agent/consul/state/catalog_events.go index 7b2057c6f43a0..0cd7258d5e806 100644 --- a/agent/consul/state/catalog_events.go +++ b/agent/consul/state/catalog_events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state @@ -645,7 +645,7 @@ func getPayloadCheckServiceNode(payload stream.Payload) *structs.CheckServiceNod } // newServiceHealthEventsForNode returns health events for all services on the -// given node. This mirrors some of the logic in the oddly-named +// given node. This mirrors some of the the logic in the oddly-named // parseCheckServiceNodes but is more efficient since we know they are all on // the same node. func newServiceHealthEventsForNode(tx ReadTxn, idx uint64, node string, entMeta *acl.EnterpriseMeta, peerName string) ([]stream.Event, error) { diff --git a/agent/consul/state/catalog_events_ce.go b/agent/consul/state/catalog_events_ce.go index 25e9dc149b1a1..72e3993b5d56d 100644 --- a/agent/consul/state/catalog_events_ce.go +++ b/agent/consul/state/catalog_events_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/catalog_events_ce_test.go b/agent/consul/state/catalog_events_ce_test.go index 75f9a6ddeb234..0de8286c44c85 100644 --- a/agent/consul/state/catalog_events_ce_test.go +++ b/agent/consul/state/catalog_events_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/catalog_events_test.go b/agent/consul/state/catalog_events_test.go index 94406e34f9aee..46e0b269617fa 100644 --- a/agent/consul/state/catalog_events_test.go +++ b/agent/consul/state/catalog_events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/catalog_schema.deepcopy.go b/agent/consul/state/catalog_schema.deepcopy.go index af4d430d2f971..406a7fdce796f 100644 --- a/agent/consul/state/catalog_schema.deepcopy.go +++ b/agent/consul/state/catalog_schema.deepcopy.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - // generated by deep-copy -pointer-receiver -o ./catalog_schema.deepcopy.go -type upstreamDownstream ./; DO NOT EDIT. package state diff --git a/agent/consul/state/catalog_schema.go b/agent/consul/state/catalog_schema.go index b8da7c0999361..8702cc2e0cf5f 100644 --- a/agent/consul/state/catalog_schema.go +++ b/agent/consul/state/catalog_schema.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/catalog_test.go b/agent/consul/state/catalog_test.go index 6fc79a5a7c0fa..e6b279580b030 100644 --- a/agent/consul/state/catalog_test.go +++ b/agent/consul/state/catalog_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry.go b/agent/consul/state/config_entry.go index b298b6122080d..9abaafc390d3a 100644 --- a/agent/consul/state/config_entry.go +++ b/agent/consul/state/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_ce.go b/agent/consul/state/config_entry_ce.go index 091a5be157688..ec01e0c09aaea 100644 --- a/agent/consul/state/config_entry_ce.go +++ b/agent/consul/state/config_entry_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_ce_test.go b/agent/consul/state/config_entry_ce_test.go index 736ede4e54fe8..02fb3be78a2c5 100644 --- a/agent/consul/state/config_entry_ce_test.go +++ b/agent/consul/state/config_entry_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_events.go b/agent/consul/state/config_entry_events.go index c6c19fce3453e..5681362dbe16e 100644 --- a/agent/consul/state/config_entry_events.go +++ b/agent/consul/state/config_entry_events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_events_test.go b/agent/consul/state/config_entry_events_test.go index e8ceb10f65d85..1ee92770bc65b 100644 --- a/agent/consul/state/config_entry_events_test.go +++ b/agent/consul/state/config_entry_events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_exported_services.go b/agent/consul/state/config_entry_exported_services.go index 7534613ae137a..b758adc09eafb 100644 --- a/agent/consul/state/config_entry_exported_services.go +++ b/agent/consul/state/config_entry_exported_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_exported_services_ce.go b/agent/consul/state/config_entry_exported_services_ce.go index 0dfbf95ecf058..9dfc4751d2d61 100644 --- a/agent/consul/state/config_entry_exported_services_ce.go +++ b/agent/consul/state/config_entry_exported_services_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_intention.go b/agent/consul/state/config_entry_intention.go index 459d8c4276e6f..301baf9c09093 100644 --- a/agent/consul/state/config_entry_intention.go +++ b/agent/consul/state/config_entry_intention.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_intention_ce.go b/agent/consul/state/config_entry_intention_ce.go index b0eb69b355f92..6d479f9ad6bfb 100644 --- a/agent/consul/state/config_entry_intention_ce.go +++ b/agent/consul/state/config_entry_intention_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_sameness_group.go b/agent/consul/state/config_entry_sameness_group.go index d8308008dfbb4..7f02787b6553b 100644 --- a/agent/consul/state/config_entry_sameness_group.go +++ b/agent/consul/state/config_entry_sameness_group.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package state import ( diff --git a/agent/consul/state/config_entry_sameness_group_ce.go b/agent/consul/state/config_entry_sameness_group_ce.go index 76c285b5e33e0..16437cd8fd187 100644 --- a/agent/consul/state/config_entry_sameness_group_ce.go +++ b/agent/consul/state/config_entry_sameness_group_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_sameness_group_ce_test.go b/agent/consul/state/config_entry_sameness_group_ce_test.go index 6397e90699d0b..ce4aeb8394f8b 100644 --- a/agent/consul/state/config_entry_sameness_group_ce_test.go +++ b/agent/consul/state/config_entry_sameness_group_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/config_entry_schema.go b/agent/consul/state/config_entry_schema.go index c662415252966..e420d657cae8a 100644 --- a/agent/consul/state/config_entry_schema.go +++ b/agent/consul/state/config_entry_schema.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/config_entry_test.go b/agent/consul/state/config_entry_test.go index af9dc0997156d..d72f12c876890 100644 --- a/agent/consul/state/config_entry_test.go +++ b/agent/consul/state/config_entry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/connect_ca.go b/agent/consul/state/connect_ca.go index 4b1eeeab783d4..99e99637b6aa9 100644 --- a/agent/consul/state/connect_ca.go +++ b/agent/consul/state/connect_ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/connect_ca_events.go b/agent/consul/state/connect_ca_events.go index a285b9d07cb75..554a867dcd59c 100644 --- a/agent/consul/state/connect_ca_events.go +++ b/agent/consul/state/connect_ca_events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/connect_ca_events_test.go b/agent/consul/state/connect_ca_events_test.go index 79df8df5be879..bf13eefcb9376 100644 --- a/agent/consul/state/connect_ca_events_test.go +++ b/agent/consul/state/connect_ca_events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/connect_ca_test.go b/agent/consul/state/connect_ca_test.go index 2a49723d65cbc..124392cf1a432 100644 --- a/agent/consul/state/connect_ca_test.go +++ b/agent/consul/state/connect_ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/coordinate.go b/agent/consul/state/coordinate.go index bcd71e5a0f08d..f2eb7b30425e6 100644 --- a/agent/consul/state/coordinate.go +++ b/agent/consul/state/coordinate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/coordinate_ce.go b/agent/consul/state/coordinate_ce.go index 05568e40b09d8..17956e964eee6 100644 --- a/agent/consul/state/coordinate_ce.go +++ b/agent/consul/state/coordinate_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/coordinate_ce_test.go b/agent/consul/state/coordinate_ce_test.go index 520f8b5d83f1e..a4608245060ea 100644 --- a/agent/consul/state/coordinate_ce_test.go +++ b/agent/consul/state/coordinate_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/coordinate_test.go b/agent/consul/state/coordinate_test.go index dad0ce3e32ec6..0fe582eab5aa9 100644 --- a/agent/consul/state/coordinate_test.go +++ b/agent/consul/state/coordinate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/deep-copy.sh b/agent/consul/state/deep-copy.sh index 809e20432b624..d976d921f3c83 100755 --- a/agent/consul/state/deep-copy.sh +++ b/agent/consul/state/deep-copy.sh @@ -1,7 +1,4 @@ #!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - readonly PACKAGE_DIR="$(dirname "${BASH_SOURCE[0]}")" cd $PACKAGE_DIR diff --git a/agent/consul/state/delay_ce.go b/agent/consul/state/delay_ce.go index ca55c465fd9f3..a2471ae636241 100644 --- a/agent/consul/state/delay_ce.go +++ b/agent/consul/state/delay_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/delay_test.go b/agent/consul/state/delay_test.go index 6a2d0fa80c2d6..40f1842efd679 100644 --- a/agent/consul/state/delay_test.go +++ b/agent/consul/state/delay_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/events.go b/agent/consul/state/events.go index 0d4f4eb4fe403..666dc60035d1e 100644 --- a/agent/consul/state/events.go +++ b/agent/consul/state/events.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/events_test.go b/agent/consul/state/events_test.go index c2a4ad399d641..3da9a26549b2a 100644 --- a/agent/consul/state/events_test.go +++ b/agent/consul/state/events_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/federation_state.go b/agent/consul/state/federation_state.go index a02a38ed3b532..556caa4b48549 100644 --- a/agent/consul/state/federation_state.go +++ b/agent/consul/state/federation_state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/graveyard.go b/agent/consul/state/graveyard.go index 45398584356cf..5b6a95dafbaa2 100644 --- a/agent/consul/state/graveyard.go +++ b/agent/consul/state/graveyard.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/graveyard_ce.go b/agent/consul/state/graveyard_ce.go index b02659b74c3f3..963ed6632e5be 100644 --- a/agent/consul/state/graveyard_ce.go +++ b/agent/consul/state/graveyard_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/graveyard_test.go b/agent/consul/state/graveyard_test.go index 66aaaf92fb143..af50673e9e741 100644 --- a/agent/consul/state/graveyard_test.go +++ b/agent/consul/state/graveyard_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/index_connect_test.go b/agent/consul/state/index_connect_test.go index 7b5404b5b2a8e..a598fab68ac44 100644 --- a/agent/consul/state/index_connect_test.go +++ b/agent/consul/state/index_connect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/indexer.go b/agent/consul/state/indexer.go index c752b3af55cfc..f360eb2befe97 100644 --- a/agent/consul/state/indexer.go +++ b/agent/consul/state/indexer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/intention.go b/agent/consul/state/intention.go index f360555228586..4341590e4ec20 100644 --- a/agent/consul/state/intention.go +++ b/agent/consul/state/intention.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/intention_ce.go b/agent/consul/state/intention_ce.go index 43b80a47ad454..e82177eb1a563 100644 --- a/agent/consul/state/intention_ce.go +++ b/agent/consul/state/intention_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/intention_test.go b/agent/consul/state/intention_test.go index 72455565d5821..3545527b790c2 100644 --- a/agent/consul/state/intention_test.go +++ b/agent/consul/state/intention_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/kvs.go b/agent/consul/state/kvs.go index b0b4f6c1e52dc..0d0a419ae5c29 100644 --- a/agent/consul/state/kvs.go +++ b/agent/consul/state/kvs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/kvs_ce.go b/agent/consul/state/kvs_ce.go index 6243bbd71b061..10528e3be6dbb 100644 --- a/agent/consul/state/kvs_ce.go +++ b/agent/consul/state/kvs_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/kvs_ce_test.go b/agent/consul/state/kvs_ce_test.go index a7a1034c6a8d0..adf41fe7dbe86 100644 --- a/agent/consul/state/kvs_ce_test.go +++ b/agent/consul/state/kvs_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/kvs_test.go b/agent/consul/state/kvs_test.go index b85a08f98d181..4ced02586f0c0 100644 --- a/agent/consul/state/kvs_test.go +++ b/agent/consul/state/kvs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/memdb.go b/agent/consul/state/memdb.go index 93707d0e0751d..0a3b66c6a6275 100644 --- a/agent/consul/state/memdb.go +++ b/agent/consul/state/memdb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/memdb_test.go b/agent/consul/state/memdb_test.go index e603fc5bb1691..7e893619be5de 100644 --- a/agent/consul/state/memdb_test.go +++ b/agent/consul/state/memdb_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/operations_ce.go b/agent/consul/state/operations_ce.go index acf1cd38b801c..08de08015b449 100644 --- a/agent/consul/state/operations_ce.go +++ b/agent/consul/state/operations_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/peering.go b/agent/consul/state/peering.go index 1763777cff838..90db748458847 100644 --- a/agent/consul/state/peering.go +++ b/agent/consul/state/peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/peering_ce.go b/agent/consul/state/peering_ce.go index 40e207729dfac..a54e2d37ddffb 100644 --- a/agent/consul/state/peering_ce.go +++ b/agent/consul/state/peering_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/peering_ce_test.go b/agent/consul/state/peering_ce_test.go index 927fa1c71db96..41d1bce452db0 100644 --- a/agent/consul/state/peering_ce_test.go +++ b/agent/consul/state/peering_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/peering_test.go b/agent/consul/state/peering_test.go index 764286bb77b8e..8125b96860aac 100644 --- a/agent/consul/state/peering_test.go +++ b/agent/consul/state/peering_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/prepared_query.go b/agent/consul/state/prepared_query.go index 62cf39588d17a..7638d925170f0 100644 --- a/agent/consul/state/prepared_query.go +++ b/agent/consul/state/prepared_query.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/prepared_query_index.go b/agent/consul/state/prepared_query_index.go index 83bb5dc738251..ac76846366699 100644 --- a/agent/consul/state/prepared_query_index.go +++ b/agent/consul/state/prepared_query_index.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/prepared_query_index_test.go b/agent/consul/state/prepared_query_index_test.go index aaaa62692f1cf..a486047f57e33 100644 --- a/agent/consul/state/prepared_query_index_test.go +++ b/agent/consul/state/prepared_query_index_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/prepared_query_test.go b/agent/consul/state/prepared_query_test.go index dc902de4ad309..f0b0cd95f4469 100644 --- a/agent/consul/state/prepared_query_test.go +++ b/agent/consul/state/prepared_query_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/query.go b/agent/consul/state/query.go index 288e715e83314..2256aab995fb0 100644 --- a/agent/consul/state/query.go +++ b/agent/consul/state/query.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/query_ce.go b/agent/consul/state/query_ce.go index 178dc60b77e1e..98108d6ff02b2 100644 --- a/agent/consul/state/query_ce.go +++ b/agent/consul/state/query_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/schema.go b/agent/consul/state/schema.go index 0934ca483e5eb..9e0e6db2fee42 100644 --- a/agent/consul/state/schema.go +++ b/agent/consul/state/schema.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/schema_ce.go b/agent/consul/state/schema_ce.go index 15a3ec44788ae..eecde09aab619 100644 --- a/agent/consul/state/schema_ce.go +++ b/agent/consul/state/schema_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/schema_ce_test.go b/agent/consul/state/schema_ce_test.go index eb8a1e079574e..55fc3ee54c194 100644 --- a/agent/consul/state/schema_ce_test.go +++ b/agent/consul/state/schema_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/schema_test.go b/agent/consul/state/schema_test.go index a0af2223e27ce..f67b18e8c3beb 100644 --- a/agent/consul/state/schema_test.go +++ b/agent/consul/state/schema_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/session.go b/agent/consul/state/session.go index d57b05947d396..5e666f80fd894 100644 --- a/agent/consul/state/session.go +++ b/agent/consul/state/session.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/session_ce.go b/agent/consul/state/session_ce.go index 6bd13c0132dc0..1854fb3e1448b 100644 --- a/agent/consul/state/session_ce.go +++ b/agent/consul/state/session_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/session_test.go b/agent/consul/state/session_test.go index 08f7ad09d0c1f..eab4299581637 100644 --- a/agent/consul/state/session_test.go +++ b/agent/consul/state/session_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/state_store.go b/agent/consul/state/state_store.go index dff3441535bb5..fce3b3c96155f 100644 --- a/agent/consul/state/state_store.go +++ b/agent/consul/state/state_store.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/state_store_ce_test.go b/agent/consul/state/state_store_ce_test.go index 81f25ed1e8b2c..5515b193f688c 100644 --- a/agent/consul/state/state_store_ce_test.go +++ b/agent/consul/state/state_store_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/state_store_test.go b/agent/consul/state/state_store_test.go index 751ecee779dee..587f15c03d948 100644 --- a/agent/consul/state/state_store_test.go +++ b/agent/consul/state/state_store_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/store_integration_test.go b/agent/consul/state/store_integration_test.go index 25a91c558646f..9395aa1cb1820 100644 --- a/agent/consul/state/store_integration_test.go +++ b/agent/consul/state/store_integration_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/system_metadata.go b/agent/consul/state/system_metadata.go index 06e2d3cc598b9..ed802efbd1cd8 100644 --- a/agent/consul/state/system_metadata.go +++ b/agent/consul/state/system_metadata.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/system_metadata_test.go b/agent/consul/state/system_metadata_test.go index c2ac97b390b8c..59f8bcd30c3eb 100644 --- a/agent/consul/state/system_metadata_test.go +++ b/agent/consul/state/system_metadata_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/tombstone_gc.go b/agent/consul/state/tombstone_gc.go index 6eab5b6b5ba91..3fc19c5cd9cc8 100644 --- a/agent/consul/state/tombstone_gc.go +++ b/agent/consul/state/tombstone_gc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/tombstone_gc_test.go b/agent/consul/state/tombstone_gc_test.go index def4c9af19720..d0fd11fa7c5a6 100644 --- a/agent/consul/state/tombstone_gc_test.go +++ b/agent/consul/state/tombstone_gc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/txn.go b/agent/consul/state/txn.go index 30189fc1ed602..81d8acd039291 100644 --- a/agent/consul/state/txn.go +++ b/agent/consul/state/txn.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/txn_test.go b/agent/consul/state/txn_test.go index bda004a63a3b6..a128badf42e52 100644 --- a/agent/consul/state/txn_test.go +++ b/agent/consul/state/txn_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/usage.go b/agent/consul/state/usage.go index 20515e2e7b0cd..0893d25288b68 100644 --- a/agent/consul/state/usage.go +++ b/agent/consul/state/usage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/state/usage_ce.go b/agent/consul/state/usage_ce.go index 3daad8b986579..1824cf12399a5 100644 --- a/agent/consul/state/usage_ce.go +++ b/agent/consul/state/usage_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/state/usage_test.go b/agent/consul/state/usage_test.go index 4195779b8c037..68844ebc1140d 100644 --- a/agent/consul/state/usage_test.go +++ b/agent/consul/state/usage_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/agent/consul/stats_fetcher.go b/agent/consul/stats_fetcher.go index 94e122f2b4389..d52930e85add3 100644 --- a/agent/consul/stats_fetcher.go +++ b/agent/consul/stats_fetcher.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/stats_fetcher_test.go b/agent/consul/stats_fetcher_test.go index 8dc9ce9eb2880..783424393a79e 100644 --- a/agent/consul/stats_fetcher_test.go +++ b/agent/consul/stats_fetcher_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/status_endpoint.go b/agent/consul/status_endpoint.go index bca454e25eb0f..efa2fa2cf4fa6 100644 --- a/agent/consul/status_endpoint.go +++ b/agent/consul/status_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/status_endpoint_test.go b/agent/consul/status_endpoint_test.go index d4cf5cb7798b9..6d95d7f6fd48d 100644 --- a/agent/consul/status_endpoint_test.go +++ b/agent/consul/status_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/stream/event.go b/agent/consul/stream/event.go index df8160d2dd366..db6f3a6312f38 100644 --- a/agent/consul/stream/event.go +++ b/agent/consul/stream/event.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 /* Package stream provides a publish/subscribe system for events produced by changes diff --git a/agent/consul/stream/event_buffer.go b/agent/consul/stream/event_buffer.go index 08060306e8d64..1c7f8c2b956a5 100644 --- a/agent/consul/stream/event_buffer.go +++ b/agent/consul/stream/event_buffer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_buffer_test.go b/agent/consul/stream/event_buffer_test.go index 892a14d733e1a..b6ec48e1775e1 100644 --- a/agent/consul/stream/event_buffer_test.go +++ b/agent/consul/stream/event_buffer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_publisher.go b/agent/consul/stream/event_publisher.go index bb6d87f8bacf2..f39ea22869a08 100644 --- a/agent/consul/stream/event_publisher.go +++ b/agent/consul/stream/event_publisher.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_publisher_test.go b/agent/consul/stream/event_publisher_test.go index 4ae53ebcbf8f3..13efd0fb564ab 100644 --- a/agent/consul/stream/event_publisher_test.go +++ b/agent/consul/stream/event_publisher_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_snapshot.go b/agent/consul/stream/event_snapshot.go index 40c9f3d007d50..6b4b693689b42 100644 --- a/agent/consul/stream/event_snapshot.go +++ b/agent/consul/stream/event_snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_snapshot_test.go b/agent/consul/stream/event_snapshot_test.go index 8a6d4e27c6bf5..0888b90c39c9c 100644 --- a/agent/consul/stream/event_snapshot_test.go +++ b/agent/consul/stream/event_snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/event_test.go b/agent/consul/stream/event_test.go index 22afe390de9c7..ff6f07c10ea83 100644 --- a/agent/consul/stream/event_test.go +++ b/agent/consul/stream/event_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/noop.go b/agent/consul/stream/noop.go index 65fcbb3fb7770..1cd35ea922eb8 100644 --- a/agent/consul/stream/noop.go +++ b/agent/consul/stream/noop.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/string_types.go b/agent/consul/stream/string_types.go index 2d0cb656777d3..6e6c4ef8e92fa 100644 --- a/agent/consul/stream/string_types.go +++ b/agent/consul/stream/string_types.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/subscription.go b/agent/consul/stream/subscription.go index 23911eff2e657..40286768abe02 100644 --- a/agent/consul/stream/subscription.go +++ b/agent/consul/stream/subscription.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/stream/subscription_test.go b/agent/consul/stream/subscription_test.go index fd4af464ee532..9bf0b95b5d564 100644 --- a/agent/consul/stream/subscription_test.go +++ b/agent/consul/stream/subscription_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stream diff --git a/agent/consul/subscribe_backend.go b/agent/consul/subscribe_backend.go index c73dea18136af..9afcd4fc567df 100644 --- a/agent/consul/subscribe_backend.go +++ b/agent/consul/subscribe_backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/subscribe_backend_test.go b/agent/consul/subscribe_backend_test.go index 8d0f7a501ca1e..833f049c9728a 100644 --- a/agent/consul/subscribe_backend_test.go +++ b/agent/consul/subscribe_backend_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/system_metadata.go b/agent/consul/system_metadata.go index f110255aa2e09..40185294b8d77 100644 --- a/agent/consul/system_metadata.go +++ b/agent/consul/system_metadata.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/system_metadata_test.go b/agent/consul/system_metadata_test.go index 75e69786b8dd5..7c4eb30e4732e 100644 --- a/agent/consul/system_metadata_test.go +++ b/agent/consul/system_metadata_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/tenancy_bridge.go b/agent/consul/tenancy_bridge.go deleted file mode 100644 index 4573db2feb060..0000000000000 --- a/agent/consul/tenancy_bridge.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package consul - -// V1TenancyBridge is used by the resource service to access V1 implementations of -// partitions and namespaces. This bridge will be removed when V2 implemenations -// of partitions and namespaces are available. -type V1TenancyBridge struct { - server *Server -} - -func NewV1TenancyBridge(server *Server) *V1TenancyBridge { - return &V1TenancyBridge{server: server} -} diff --git a/agent/consul/tenancy_bridge_ce.go b/agent/consul/tenancy_bridge_ce.go deleted file mode 100644 index 03f87378e7591..0000000000000 --- a/agent/consul/tenancy_bridge_ce.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package consul - -func (b *V1TenancyBridge) PartitionExists(partition string) (bool, error) { - if partition == "default" { - return true, nil - } - return false, nil -} - -func (b *V1TenancyBridge) IsPartitionMarkedForDeletion(partition string) (bool, error) { - return false, nil -} - -func (b *V1TenancyBridge) NamespaceExists(partition, namespace string) (bool, error) { - if partition == "default" && namespace == "default" { - return true, nil - } - return false, nil -} - -func (b *V1TenancyBridge) IsNamespaceMarkedForDeletion(partition, namespace string) (bool, error) { - return false, nil -} diff --git a/agent/consul/txn_endpoint.go b/agent/consul/txn_endpoint.go index f39cd502cb170..e7e5d870875e9 100644 --- a/agent/consul/txn_endpoint.go +++ b/agent/consul/txn_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/txn_endpoint_test.go b/agent/consul/txn_endpoint_test.go index ef2ecd13a3f85..f5654fdc001db 100644 --- a/agent/consul/txn_endpoint_test.go +++ b/agent/consul/txn_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/type_registry.go b/agent/consul/type_registry.go deleted file mode 100644 index 90bf76576fcf5..0000000000000 --- a/agent/consul/type_registry.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package consul - -import ( - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/mesh" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" -) - -// NewTypeRegistry returns a registry populated with all supported resource -// types. -// -// Note: the registry includes resource types that may not be suitable for -// production use (e.g. experimental or development resource types) because -// it is used in the CLI, where feature flags and other runtime configuration -// may not be available. -func NewTypeRegistry() resource.Registry { - registry := resource.NewRegistry() - - demo.RegisterTypes(registry) - mesh.RegisterTypes(registry) - catalog.RegisterTypes(registry) - - return registry -} diff --git a/agent/consul/usagemetrics/usagemetrics.go b/agent/consul/usagemetrics/usagemetrics.go index 7bd21b7d265bd..169238c375e14 100644 --- a/agent/consul/usagemetrics/usagemetrics.go +++ b/agent/consul/usagemetrics/usagemetrics.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package usagemetrics diff --git a/agent/consul/usagemetrics/usagemetrics_ce.go b/agent/consul/usagemetrics/usagemetrics_ce.go index 7de677cc079c0..17853b4fcf6e3 100644 --- a/agent/consul/usagemetrics/usagemetrics_ce.go +++ b/agent/consul/usagemetrics/usagemetrics_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/usagemetrics/usagemetrics_ce_test.go b/agent/consul/usagemetrics/usagemetrics_ce_test.go index 621224fb98822..47834da9164a9 100644 --- a/agent/consul/usagemetrics/usagemetrics_ce_test.go +++ b/agent/consul/usagemetrics/usagemetrics_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/consul/usagemetrics/usagemetrics_test.go b/agent/consul/usagemetrics/usagemetrics_test.go index c97fb13be802f..7bdf396b25749 100644 --- a/agent/consul/usagemetrics/usagemetrics_test.go +++ b/agent/consul/usagemetrics/usagemetrics_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package usagemetrics diff --git a/agent/consul/util.go b/agent/consul/util.go index 0fd88e14c8eb9..6fd6c77da33b1 100644 --- a/agent/consul/util.go +++ b/agent/consul/util.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/util_test.go b/agent/consul/util_test.go index d0a4fcb6842f1..c41b7748919fa 100644 --- a/agent/consul/util_test.go +++ b/agent/consul/util_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package consul diff --git a/agent/consul/wanfed/pool.go b/agent/consul/wanfed/pool.go index 3d083019346d4..9320087b3f713 100644 --- a/agent/consul/wanfed/pool.go +++ b/agent/consul/wanfed/pool.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wanfed diff --git a/agent/consul/wanfed/wanfed.go b/agent/consul/wanfed/wanfed.go index 7732e05ad39a4..e82eddcfa88ef 100644 --- a/agent/consul/wanfed/wanfed.go +++ b/agent/consul/wanfed/wanfed.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wanfed diff --git a/agent/consul/wanfed/wanfed_test.go b/agent/consul/wanfed/wanfed_test.go index 8254e9434b367..ef45c197c179a 100644 --- a/agent/consul/wanfed/wanfed_test.go +++ b/agent/consul/wanfed/wanfed_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wanfed diff --git a/agent/consul/watch/server_local.go b/agent/consul/watch/server_local.go index 2bb98fe349df9..5937ba1c6a10e 100644 --- a/agent/consul/watch/server_local.go +++ b/agent/consul/watch/server_local.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/agent/consul/watch/server_local_test.go b/agent/consul/watch/server_local_test.go index 84ab8de5739a2..1f96b1ec00d03 100644 --- a/agent/consul/watch/server_local_test.go +++ b/agent/consul/watch/server_local_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/agent/consul/xdscapacity/capacity.go b/agent/consul/xdscapacity/capacity.go index bf3cf4ced02a1..6396841d63fe8 100644 --- a/agent/consul/xdscapacity/capacity.go +++ b/agent/consul/xdscapacity/capacity.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscapacity diff --git a/agent/consul/xdscapacity/capacity_test.go b/agent/consul/xdscapacity/capacity_test.go index b3a3935a8806f..d26453feae607 100644 --- a/agent/consul/xdscapacity/capacity_test.go +++ b/agent/consul/xdscapacity/capacity_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscapacity diff --git a/agent/coordinate_endpoint.go b/agent/coordinate_endpoint.go index 60b69244afd5d..744498c055336 100644 --- a/agent/coordinate_endpoint.go +++ b/agent/coordinate_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/coordinate_endpoint_test.go b/agent/coordinate_endpoint_test.go index 508f308d13c7c..fe6deeef9567e 100644 --- a/agent/coordinate_endpoint_test.go +++ b/agent/coordinate_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/debug/host.go b/agent/debug/host.go index f863117e547b0..5116bf7499f7e 100644 --- a/agent/debug/host.go +++ b/agent/debug/host.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package debug diff --git a/agent/debug/host_test.go b/agent/debug/host_test.go index dce469b542f2a..1289e21b4f066 100644 --- a/agent/debug/host_test.go +++ b/agent/debug/host_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package debug diff --git a/agent/delegate_mock_test.go b/agent/delegate_mock_test.go index a75cf2d1e2624..9f91a6a0d919b 100644 --- a/agent/delegate_mock_test.go +++ b/agent/delegate_mock_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -15,7 +15,6 @@ import ( "github.com/hashicorp/consul/agent/consul" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/lib" - "github.com/hashicorp/consul/proto-public/pbresource" ) type delegateMock struct { @@ -77,7 +76,3 @@ func (m *delegateMock) Stats() map[string]map[string]string { func (m *delegateMock) ReloadConfig(config consul.ReloadableConfig) error { return m.Called(config).Error(0) } - -func (m *delegateMock) ResourceServiceClient() pbresource.ResourceServiceClient { - return nil -} diff --git a/agent/denylist.go b/agent/denylist.go index 5fdd8cc9f8721..b621465298146 100644 --- a/agent/denylist.go +++ b/agent/denylist.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/denylist_test.go b/agent/denylist_test.go index dd77e977d94d7..f9370723a7c30 100644 --- a/agent/denylist_test.go +++ b/agent/denylist_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/discovery_chain_endpoint.go b/agent/discovery_chain_endpoint.go index 69a5e668f46e1..a3aaa421f9387 100644 --- a/agent/discovery_chain_endpoint.go +++ b/agent/discovery_chain_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/discovery_chain_endpoint_test.go b/agent/discovery_chain_endpoint_test.go index 7e1e9a5524e4f..ed42ca0aede8a 100644 --- a/agent/discovery_chain_endpoint_test.go +++ b/agent/discovery_chain_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/dns.go b/agent/dns.go index 3ae9a18b673a4..5804dc97dd8ef 100644 --- a/agent/dns.go +++ b/agent/dns.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/dns/dns.go b/agent/dns/dns.go index 1942a1fdd8d23..9f8e785a390b6 100644 --- a/agent/dns/dns.go +++ b/agent/dns/dns.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns diff --git a/agent/dns/dns_test.go b/agent/dns/dns_test.go index 3acd2260e0a78..91dc3ea72a919 100644 --- a/agent/dns/dns_test.go +++ b/agent/dns/dns_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns diff --git a/agent/dns/validation.go b/agent/dns/validation.go index a88aaff2dbcba..cd66acf6fa8fe 100644 --- a/agent/dns/validation.go +++ b/agent/dns/validation.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns diff --git a/agent/dns/validation_test.go b/agent/dns/validation_test.go index 8855e375c5f9c..bcb65adf14a23 100644 --- a/agent/dns/validation_test.go +++ b/agent/dns/validation_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns_test diff --git a/agent/dns_ce.go b/agent/dns_ce.go index f82d1a31d2743..8c055776ed997 100644 --- a/agent/dns_ce.go +++ b/agent/dns_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/dns_ce_test.go b/agent/dns_ce_test.go index 50b100a989d2e..920568cd3b9bd 100644 --- a/agent/dns_ce_test.go +++ b/agent/dns_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/dns_test.go b/agent/dns_test.go index 399899527218e..ef5364964dd35 100644 --- a/agent/dns_test.go +++ b/agent/dns_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/enterprise_delegate_ce.go b/agent/enterprise_delegate_ce.go index 81d41ea8fa41b..39ae3db7c46d2 100644 --- a/agent/enterprise_delegate_ce.go +++ b/agent/enterprise_delegate_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/envoyextensions/builtin/aws-lambda/aws_lambda.go b/agent/envoyextensions/builtin/aws-lambda/aws_lambda.go index 978fc5cf5552b..fa36d6fa500d9 100644 --- a/agent/envoyextensions/builtin/aws-lambda/aws_lambda.go +++ b/agent/envoyextensions/builtin/aws-lambda/aws_lambda.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package awslambda diff --git a/agent/envoyextensions/builtin/aws-lambda/aws_lambda_test.go b/agent/envoyextensions/builtin/aws-lambda/aws_lambda_test.go index 3dda09e317a47..26f49eef4bd16 100644 --- a/agent/envoyextensions/builtin/aws-lambda/aws_lambda_test.go +++ b/agent/envoyextensions/builtin/aws-lambda/aws_lambda_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package awslambda diff --git a/agent/envoyextensions/builtin/ext-authz/ext_authz.go b/agent/envoyextensions/builtin/ext-authz/ext_authz.go index f5368c97ab8d8..7400aef13a04c 100644 --- a/agent/envoyextensions/builtin/ext-authz/ext_authz.go +++ b/agent/envoyextensions/builtin/ext-authz/ext_authz.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extauthz diff --git a/agent/envoyextensions/builtin/ext-authz/ext_authz_test.go b/agent/envoyextensions/builtin/ext-authz/ext_authz_test.go index 6db284476dd71..88e87d7e9a8f8 100644 --- a/agent/envoyextensions/builtin/ext-authz/ext_authz_test.go +++ b/agent/envoyextensions/builtin/ext-authz/ext_authz_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extauthz diff --git a/agent/envoyextensions/builtin/ext-authz/structs.go b/agent/envoyextensions/builtin/ext-authz/structs.go index 0a7e7dcce43a7..a14cedd63a765 100644 --- a/agent/envoyextensions/builtin/ext-authz/structs.go +++ b/agent/envoyextensions/builtin/ext-authz/structs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extauthz diff --git a/agent/envoyextensions/builtin/lua/lua.go b/agent/envoyextensions/builtin/lua/lua.go index ba08d9d286c01..aefea37e6c496 100644 --- a/agent/envoyextensions/builtin/lua/lua.go +++ b/agent/envoyextensions/builtin/lua/lua.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lua diff --git a/agent/envoyextensions/builtin/lua/lua_test.go b/agent/envoyextensions/builtin/lua/lua_test.go index afe65d067f433..3ea2ba716c1de 100644 --- a/agent/envoyextensions/builtin/lua/lua_test.go +++ b/agent/envoyextensions/builtin/lua/lua_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lua diff --git a/agent/envoyextensions/builtin/property-override/property_override.go b/agent/envoyextensions/builtin/property-override/property_override.go index 70577a56e3d40..41e98074b7a23 100644 --- a/agent/envoyextensions/builtin/property-override/property_override.go +++ b/agent/envoyextensions/builtin/property-override/property_override.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package propertyoverride import ( diff --git a/agent/envoyextensions/builtin/property-override/property_override_test.go b/agent/envoyextensions/builtin/property-override/property_override_test.go index 20febc21074db..0e4317f9ddb72 100644 --- a/agent/envoyextensions/builtin/property-override/property_override_test.go +++ b/agent/envoyextensions/builtin/property-override/property_override_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package propertyoverride import ( diff --git a/agent/envoyextensions/builtin/property-override/structpatcher.go b/agent/envoyextensions/builtin/property-override/structpatcher.go index 76fe3be1a8570..91de4cf7f86d1 100644 --- a/agent/envoyextensions/builtin/property-override/structpatcher.go +++ b/agent/envoyextensions/builtin/property-override/structpatcher.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package propertyoverride import ( diff --git a/agent/envoyextensions/builtin/property-override/structpatcher_test.go b/agent/envoyextensions/builtin/property-override/structpatcher_test.go index 4916f0c505c7d..ac7379f9f1868 100644 --- a/agent/envoyextensions/builtin/property-override/structpatcher_test.go +++ b/agent/envoyextensions/builtin/property-override/structpatcher_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package propertyoverride import ( diff --git a/agent/envoyextensions/builtin/wasm/structs.go b/agent/envoyextensions/builtin/wasm/structs.go index 67540fee56c94..012099ab62036 100644 --- a/agent/envoyextensions/builtin/wasm/structs.go +++ b/agent/envoyextensions/builtin/wasm/structs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wasm diff --git a/agent/envoyextensions/builtin/wasm/wasm.go b/agent/envoyextensions/builtin/wasm/wasm.go index da1e0a7ceaa95..c16ac4da81c0e 100644 --- a/agent/envoyextensions/builtin/wasm/wasm.go +++ b/agent/envoyextensions/builtin/wasm/wasm.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wasm diff --git a/agent/envoyextensions/builtin/wasm/wasm_test.go b/agent/envoyextensions/builtin/wasm/wasm_test.go index 41769beecdc9f..93f3a4b5e0aff 100644 --- a/agent/envoyextensions/builtin/wasm/wasm_test.go +++ b/agent/envoyextensions/builtin/wasm/wasm_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wasm diff --git a/agent/envoyextensions/registered_extensions.go b/agent/envoyextensions/registered_extensions.go index d9721b320b17b..7b0f2ae61da14 100644 --- a/agent/envoyextensions/registered_extensions.go +++ b/agent/envoyextensions/registered_extensions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoyextensions diff --git a/agent/envoyextensions/registered_extensions_test.go b/agent/envoyextensions/registered_extensions_test.go index 818db87fafea8..7f3cb6bbac7dc 100644 --- a/agent/envoyextensions/registered_extensions_test.go +++ b/agent/envoyextensions/registered_extensions_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoyextensions diff --git a/agent/event_endpoint.go b/agent/event_endpoint.go index da589632c75af..034dec305619b 100644 --- a/agent/event_endpoint.go +++ b/agent/event_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/event_endpoint_test.go b/agent/event_endpoint_test.go index a041088c448c7..4be21a6914b91 100644 --- a/agent/event_endpoint_test.go +++ b/agent/event_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/exec/exec.go b/agent/exec/exec.go index 408dc6bb8110d..d4b4bfafd1fed 100644 --- a/agent/exec/exec.go +++ b/agent/exec/exec.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package exec diff --git a/agent/exec/exec_unix.go b/agent/exec/exec_unix.go index b31e593163a0a..32ff23249e3b0 100644 --- a/agent/exec/exec_unix.go +++ b/agent/exec/exec_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/agent/exec/exec_windows.go b/agent/exec/exec_windows.go index aeb9b6a847819..1a0cb4c82c806 100644 --- a/agent/exec/exec_windows.go +++ b/agent/exec/exec_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/agent/federation_state_endpoint.go b/agent/federation_state_endpoint.go index 40a3df1ff1cd9..0bec145ae60cd 100644 --- a/agent/federation_state_endpoint.go +++ b/agent/federation_state_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/grpc-external/forward.go b/agent/grpc-external/forward.go index 395fb6aa479d0..c0ed064ac808c 100644 --- a/agent/grpc-external/forward.go +++ b/agent/grpc-external/forward.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-external/limiter/limiter.go b/agent/grpc-external/limiter/limiter.go index 44aaac616f99f..f995f963049be 100644 --- a/agent/grpc-external/limiter/limiter.go +++ b/agent/grpc-external/limiter/limiter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // package limiter provides primatives for limiting the number of concurrent // operations in-flight. diff --git a/agent/grpc-external/limiter/limiter_test.go b/agent/grpc-external/limiter/limiter_test.go index 3cfa3ad263273..fa165a66706bb 100644 --- a/agent/grpc-external/limiter/limiter_test.go +++ b/agent/grpc-external/limiter/limiter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package limiter diff --git a/agent/grpc-external/options.go b/agent/grpc-external/options.go index 04e5c10efb513..a25a4482990f6 100644 --- a/agent/grpc-external/options.go +++ b/agent/grpc-external/options.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-external/options_test.go b/agent/grpc-external/options_test.go index ccc0ad12fd697..b2edb8fbf1f50 100644 --- a/agent/grpc-external/options_test.go +++ b/agent/grpc-external/options_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-external/querymeta.go b/agent/grpc-external/querymeta.go index 0f4dd52adb867..55b960255fffa 100644 --- a/agent/grpc-external/querymeta.go +++ b/agent/grpc-external/querymeta.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package external import ( diff --git a/agent/grpc-external/querymeta_test.go b/agent/grpc-external/querymeta_test.go index 4406929648179..66c7136a3dd48 100644 --- a/agent/grpc-external/querymeta_test.go +++ b/agent/grpc-external/querymeta_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package external import ( diff --git a/agent/grpc-external/server.go b/agent/grpc-external/server.go index 6090a8f31a155..0513d22e223c9 100644 --- a/agent/grpc-external/server.go +++ b/agent/grpc-external/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-external/services/acl/login.go b/agent/grpc-external/services/acl/login.go index 1e44acf8a1712..c8c399d108be3 100644 --- a/agent/grpc-external/services/acl/login.go +++ b/agent/grpc-external/services/acl/login.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/acl/login_test.go b/agent/grpc-external/services/acl/login_test.go index 3b956d7c8c71e..e858618a906b4 100644 --- a/agent/grpc-external/services/acl/login_test.go +++ b/agent/grpc-external/services/acl/login_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/acl/logout.go b/agent/grpc-external/services/acl/logout.go index 691ac7b888949..bd3bb5e3e42a2 100644 --- a/agent/grpc-external/services/acl/logout.go +++ b/agent/grpc-external/services/acl/logout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/acl/logout_test.go b/agent/grpc-external/services/acl/logout_test.go index df5c39628297c..69491db5e3b0a 100644 --- a/agent/grpc-external/services/acl/logout_test.go +++ b/agent/grpc-external/services/acl/logout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/acl/server.go b/agent/grpc-external/services/acl/server.go index 2393f11aa1068..5513950e02ec8 100644 --- a/agent/grpc-external/services/acl/server.go +++ b/agent/grpc-external/services/acl/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/acl/server_test.go b/agent/grpc-external/services/acl/server_test.go index 1b6cd066001ef..89c49bf226a13 100644 --- a/agent/grpc-external/services/acl/server_test.go +++ b/agent/grpc-external/services/acl/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/agent/grpc-external/services/connectca/server.go b/agent/grpc-external/services/connectca/server.go index 4ef91705f7a14..c90962e180c84 100644 --- a/agent/grpc-external/services/connectca/server.go +++ b/agent/grpc-external/services/connectca/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/connectca/server_test.go b/agent/grpc-external/services/connectca/server_test.go index 27c8d17c0c9dc..84636e9e75886 100644 --- a/agent/grpc-external/services/connectca/server_test.go +++ b/agent/grpc-external/services/connectca/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/connectca/sign.go b/agent/grpc-external/services/connectca/sign.go index 148bf675b0570..59c1a6f28354a 100644 --- a/agent/grpc-external/services/connectca/sign.go +++ b/agent/grpc-external/services/connectca/sign.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/connectca/sign_test.go b/agent/grpc-external/services/connectca/sign_test.go index 07be304081ebb..e43978e0b906d 100644 --- a/agent/grpc-external/services/connectca/sign_test.go +++ b/agent/grpc-external/services/connectca/sign_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/connectca/watch_roots.go b/agent/grpc-external/services/connectca/watch_roots.go index ddd02ca56e0f9..14927e2188a18 100644 --- a/agent/grpc-external/services/connectca/watch_roots.go +++ b/agent/grpc-external/services/connectca/watch_roots.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/connectca/watch_roots_test.go b/agent/grpc-external/services/connectca/watch_roots_test.go index 171e00324643c..bfdb76f33bdd8 100644 --- a/agent/grpc-external/services/connectca/watch_roots_test.go +++ b/agent/grpc-external/services/connectca/watch_roots_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connectca diff --git a/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params.go b/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params.go index 147f84d302e28..13bbd1c9f94b9 100644 --- a/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params.go +++ b/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params_test.go b/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params_test.go index 03e968ba42219..322d2f6527459 100644 --- a/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params_test.go +++ b/agent/grpc-external/services/dataplane/get_envoy_bootstrap_params_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dataplane/get_supported_features.go b/agent/grpc-external/services/dataplane/get_supported_features.go index 214f0e249f30e..ea638715338a3 100644 --- a/agent/grpc-external/services/dataplane/get_supported_features.go +++ b/agent/grpc-external/services/dataplane/get_supported_features.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dataplane/get_supported_features_test.go b/agent/grpc-external/services/dataplane/get_supported_features_test.go index 4761ccb3cb38a..329b5df0f68f1 100644 --- a/agent/grpc-external/services/dataplane/get_supported_features_test.go +++ b/agent/grpc-external/services/dataplane/get_supported_features_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dataplane/server.go b/agent/grpc-external/services/dataplane/server.go index 88b586f459a4c..8772893863840 100644 --- a/agent/grpc-external/services/dataplane/server.go +++ b/agent/grpc-external/services/dataplane/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dataplane/server_test.go b/agent/grpc-external/services/dataplane/server_test.go index ec57396bcb791..15ac272871e85 100644 --- a/agent/grpc-external/services/dataplane/server_test.go +++ b/agent/grpc-external/services/dataplane/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dataplane diff --git a/agent/grpc-external/services/dns/server.go b/agent/grpc-external/services/dns/server.go index a6f2249733c11..a9733c40666be 100644 --- a/agent/grpc-external/services/dns/server.go +++ b/agent/grpc-external/services/dns/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns diff --git a/agent/grpc-external/services/dns/server_test.go b/agent/grpc-external/services/dns/server_test.go index a6576b51adcfd..0144eccc0cd1f 100644 --- a/agent/grpc-external/services/dns/server_test.go +++ b/agent/grpc-external/services/dns/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dns diff --git a/agent/grpc-external/services/peerstream/health_snapshot.go b/agent/grpc-external/services/peerstream/health_snapshot.go index efd60a7f1039e..dd9a10c67469b 100644 --- a/agent/grpc-external/services/peerstream/health_snapshot.go +++ b/agent/grpc-external/services/peerstream/health_snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/health_snapshot_test.go b/agent/grpc-external/services/peerstream/health_snapshot_test.go index 6759db252d2cc..7ea404f3854c3 100644 --- a/agent/grpc-external/services/peerstream/health_snapshot_test.go +++ b/agent/grpc-external/services/peerstream/health_snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/replication.go b/agent/grpc-external/services/peerstream/replication.go index 692a475235be0..a0c1e4387f1c6 100644 --- a/agent/grpc-external/services/peerstream/replication.go +++ b/agent/grpc-external/services/peerstream/replication.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/server.go b/agent/grpc-external/services/peerstream/server.go index 4127312fe72cd..58e436bd1f5cd 100644 --- a/agent/grpc-external/services/peerstream/server.go +++ b/agent/grpc-external/services/peerstream/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/server_test.go b/agent/grpc-external/services/peerstream/server_test.go index 836b09d89b2b1..cb7c60e3cf0a2 100644 --- a/agent/grpc-external/services/peerstream/server_test.go +++ b/agent/grpc-external/services/peerstream/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/stream_resources.go b/agent/grpc-external/services/peerstream/stream_resources.go index 9f2d9cf896f3d..61c98d3f07894 100644 --- a/agent/grpc-external/services/peerstream/stream_resources.go +++ b/agent/grpc-external/services/peerstream/stream_resources.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/stream_test.go b/agent/grpc-external/services/peerstream/stream_test.go index 8c1e0783bd7ba..2d8f6f3e16677 100644 --- a/agent/grpc-external/services/peerstream/stream_test.go +++ b/agent/grpc-external/services/peerstream/stream_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/stream_tracker.go b/agent/grpc-external/services/peerstream/stream_tracker.go index c74a1b284f09e..abb5a003a3992 100644 --- a/agent/grpc-external/services/peerstream/stream_tracker.go +++ b/agent/grpc-external/services/peerstream/stream_tracker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/stream_tracker_test.go b/agent/grpc-external/services/peerstream/stream_tracker_test.go index 33ea536469d8a..d676587a2520e 100644 --- a/agent/grpc-external/services/peerstream/stream_tracker_test.go +++ b/agent/grpc-external/services/peerstream/stream_tracker_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_blocking.go b/agent/grpc-external/services/peerstream/subscription_blocking.go index a1257d3d33819..7fa8bc1eff59f 100644 --- a/agent/grpc-external/services/peerstream/subscription_blocking.go +++ b/agent/grpc-external/services/peerstream/subscription_blocking.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_manager.go b/agent/grpc-external/services/peerstream/subscription_manager.go index bd2d36ffd942c..4fcd27635b81d 100644 --- a/agent/grpc-external/services/peerstream/subscription_manager.go +++ b/agent/grpc-external/services/peerstream/subscription_manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_manager_test.go b/agent/grpc-external/services/peerstream/subscription_manager_test.go index cc2afee0d54cd..4ed912368e89b 100644 --- a/agent/grpc-external/services/peerstream/subscription_manager_test.go +++ b/agent/grpc-external/services/peerstream/subscription_manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_state.go b/agent/grpc-external/services/peerstream/subscription_state.go index a1a370a3ec4c6..dba315370de7f 100644 --- a/agent/grpc-external/services/peerstream/subscription_state.go +++ b/agent/grpc-external/services/peerstream/subscription_state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_state_test.go b/agent/grpc-external/services/peerstream/subscription_state_test.go index cc3e49ab4c9cb..3cba66c9c2be4 100644 --- a/agent/grpc-external/services/peerstream/subscription_state_test.go +++ b/agent/grpc-external/services/peerstream/subscription_state_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_view.go b/agent/grpc-external/services/peerstream/subscription_view.go index 575729bc71df9..c85c82b15e5c8 100644 --- a/agent/grpc-external/services/peerstream/subscription_view.go +++ b/agent/grpc-external/services/peerstream/subscription_view.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/subscription_view_test.go b/agent/grpc-external/services/peerstream/subscription_view_test.go index cd2f61e60feb7..a51ca57e2902c 100644 --- a/agent/grpc-external/services/peerstream/subscription_view_test.go +++ b/agent/grpc-external/services/peerstream/subscription_view_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/peerstream/testing.go b/agent/grpc-external/services/peerstream/testing.go index 47cc8d1dbec64..2208249dc6fc8 100644 --- a/agent/grpc-external/services/peerstream/testing.go +++ b/agent/grpc-external/services/peerstream/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peerstream diff --git a/agent/grpc-external/services/resource/delete.go b/agent/grpc-external/services/resource/delete.go index 123ffac35b389..b3045b3d6d294 100644 --- a/agent/grpc-external/services/resource/delete.go +++ b/agent/grpc-external/services/resource/delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -27,38 +27,21 @@ import ( // - Errors with Aborted if the requested Version does not match the stored Version. // - Errors with PermissionDenied if ACL check fails func (s *Server) Delete(ctx context.Context, req *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error) { - reg, err := s.validateDeleteRequest(req) - if err != nil { + if err := validateDeleteRequest(req); err != nil { return nil, err } - entMeta := v2TenancyToV1EntMeta(req.Id.Tenancy) - authz, authzContext, err := s.getAuthorizer(tokenFromContext(ctx), entMeta) + reg, err := s.resolveType(req.Id.Type) if err != nil { return nil, err } - // Retrieve resource since ACL hook requires it. Furthermore, we'll need the - // read to be strongly consistent if the passed in Version or Uid are empty. - consistency := storage.EventualConsistency - if req.Version == "" || req.Id.Uid == "" { - consistency = storage.StrongConsistency - } - - // Apply defaults when tenancy units empty. - v1EntMetaToV2Tenancy(reg, entMeta, req.Id.Tenancy) - - existing, err := s.Backend.Read(ctx, consistency, req.Id) - switch { - case errors.Is(err, storage.ErrNotFound): - // Deletes are idempotent so no-op when not found - return &pbresource.DeleteResponse{}, nil - case err != nil: - return nil, status.Errorf(codes.Internal, "failed read: %v", err) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) + if err != nil { + return nil, err } - // Check ACLs - err = reg.ACLs.Write(authz, authzContext, existing) + err = reg.ACLs.Write(authz, req.Id) switch { case acl.IsErrPermissionDenied(err): return nil, status.Error(codes.PermissionDenied, err.Error()) @@ -66,11 +49,27 @@ func (s *Server) Delete(ctx context.Context, req *pbresource.DeleteRequest) (*pb return nil, status.Errorf(codes.Internal, "failed write acl: %v", err) } + // The storage backend requires a Version and Uid to delete a resource based + // on CAS semantics. When either are not provided, the resource must be read + // with a strongly consistent read to retrieve either or both. + // + // n.b.: There is a chance DeleteCAS may fail with a storage.ErrCASFailure + // if an update occurs between the Read and DeleteCAS. Consider refactoring + // to use retryCAS() similar to the Write endpoint to close this gap. deleteVersion := req.Version deleteId := req.Id if deleteVersion == "" || deleteId.Uid == "" { - deleteVersion = existing.Version - deleteId = existing.Id + existing, err := s.Backend.Read(ctx, storage.StrongConsistency, req.Id) + switch { + case err == nil: + deleteVersion = existing.Version + deleteId = existing.Id + case errors.Is(err, storage.ErrNotFound): + // Deletes are idempotent so no-op when not found + return &pbresource.DeleteResponse{}, nil + default: + return nil, status.Errorf(codes.Internal, "failed read: %v", err) + } } if err := s.maybeCreateTombstone(ctx, deleteId); err != nil { @@ -144,31 +143,15 @@ func (s *Server) maybeCreateTombstone(ctx context.Context, deleteId *pbresource. } } -func (s *Server) validateDeleteRequest(req *pbresource.DeleteRequest) (*resource.Registration, error) { +func validateDeleteRequest(req *pbresource.DeleteRequest) error { if req.Id == nil { - return nil, status.Errorf(codes.InvalidArgument, "id is required") + return status.Errorf(codes.InvalidArgument, "id is required") } if err := validateId(req.Id, "id"); err != nil { - return nil, err - } - - reg, err := s.resolveType(req.Id.Type) - if err != nil { - return nil, err + return err } - - // Check scope - if reg.Scope == resource.ScopePartition && req.Id.Tenancy.Namespace != "" { - return nil, status.Errorf( - codes.InvalidArgument, - "partition scoped resource %s cannot have a namespace. got: %s", - resource.ToGVK(req.Id.Type), - req.Id.Tenancy.Namespace, - ) - } - - return reg, nil + return nil } // Maintains a deterministic mapping between a resource and it's tombstone's diff --git a/agent/grpc-external/services/resource/delete_test.go b/agent/grpc-external/services/resource/delete_test.go index 3b8a8099021df..0e98d3fd57a7a 100644 --- a/agent/grpc-external/services/resource/delete_test.go +++ b/agent/grpc-external/services/resource/delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" "github.com/hashicorp/consul/acl/resolver" "github.com/hashicorp/consul/internal/resource" @@ -26,36 +25,32 @@ func TestDelete_InputValidation(t *testing.T) { demo.RegisterTypes(server.Registry) - testCases := map[string]func(artistId, recordLabelId *pbresource.ID) *pbresource.ID{ - "no id": func(artistId, recordLabelId *pbresource.ID) *pbresource.ID { - return nil + testCases := map[string]func(*pbresource.DeleteRequest){ + "no id": func(req *pbresource.DeleteRequest) { req.Id = nil }, + "no type": func(req *pbresource.DeleteRequest) { req.Id.Type = nil }, + "no tenancy": func(req *pbresource.DeleteRequest) { req.Id.Tenancy = nil }, + "no name": func(req *pbresource.DeleteRequest) { req.Id.Name = "" }, + // clone necessary to not pollute DefaultTenancy + "tenancy partition not default": func(req *pbresource.DeleteRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.Partition = "" }, - "no type": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Type = nil - return artistId + "tenancy namespace not default": func(req *pbresource.DeleteRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.Namespace = "" }, - "no tenancy": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Tenancy = nil - return artistId - }, - "no name": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Name = "" - return artistId - }, - "partition scoped resource with namespace": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - recordLabelId.Tenancy.Namespace = "ishouldnothaveanamespace" - return recordLabelId + "tenancy peername not local": func(req *pbresource.DeleteRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.PeerName = "" }, } for desc, modFn := range testCases { t.Run(desc, func(t *testing.T) { - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() + res, err := demo.GenerateV2Artist() require.NoError(t, err) - req := &pbresource.DeleteRequest{Id: modFn(artist.Id, recordLabel.Id), Version: ""} + req := &pbresource.DeleteRequest{Id: res.Id, Version: ""} + modFn(req) _, err = client.Delete(testContext(t), req) require.Error(t, err) @@ -127,48 +122,34 @@ func TestDelete_Success(t *testing.T) { for desc, tc := range deleteTestCases() { t.Run(desc, func(t *testing.T) { - for tenancyDesc, modFn := range tenancyCases() { - t.Run(tenancyDesc, func(t *testing.T) { - server, client, ctx := testDeps(t) - demo.RegisterTypes(server.Registry) - - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - recordLabel, err = server.Backend.WriteCAS(ctx, recordLabel) - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - artist, err = server.Backend.WriteCAS(ctx, artist) - require.NoError(t, err) - - // Pick the resource to be deleted based on type's scope - deleteId := modFn(artist.Id, recordLabel.Id) - deleteReq := tc.deleteReqFn(recordLabel) - if proto.Equal(deleteId.Type, demo.TypeV2Artist) { - deleteReq = tc.deleteReqFn(artist) - } - - // Delete - _, err = client.Delete(ctx, deleteReq) - require.NoError(t, err) - - // Verify deleted - _, err = server.Backend.Read(ctx, storage.StrongConsistency, deleteId) - require.Error(t, err) - require.ErrorIs(t, err, storage.ErrNotFound) - - // Verify tombstone created - _, err = client.Read(ctx, &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Name: tombstoneName(deleteReq.Id), - Type: resource.TypeV1Tombstone, - Tenancy: deleteReq.Id.Tenancy, - }, - }) - require.NoError(t, err, "expected tombstome to be found") - }) - } + server, client, ctx := testDeps(t) + demo.RegisterTypes(server.Registry) + artist, err := demo.GenerateV2Artist() + require.NoError(t, err) + + rsp, err := client.Write(ctx, &pbresource.WriteRequest{Resource: artist}) + require.NoError(t, err) + artistId := clone(rsp.Resource.Id) + artist = rsp.Resource + + // delete + _, err = client.Delete(ctx, tc.deleteReqFn(artist)) + require.NoError(t, err) + + // verify deleted + _, err = server.Backend.Read(ctx, storage.StrongConsistency, artistId) + require.Error(t, err) + require.ErrorIs(t, err, storage.ErrNotFound) + + // verify tombstone created + _, err = client.Read(ctx, &pbresource.ReadRequest{ + Id: &pbresource.ID{ + Name: tombstoneName(artistId), + Type: resource.TypeV1Tombstone, + Tenancy: artist.Id.Tenancy, + }, + }) + require.NoError(t, err) }) } } diff --git a/agent/grpc-external/services/resource/list.go b/agent/grpc-external/services/resource/list.go index cc2b19026a11b..77269e74688ff 100644 --- a/agent/grpc-external/services/resource/list.go +++ b/agent/grpc-external/services/resource/list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -10,27 +10,28 @@ import ( "google.golang.org/grpc/status" "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/storage" "github.com/hashicorp/consul/proto-public/pbresource" ) func (s *Server) List(ctx context.Context, req *pbresource.ListRequest) (*pbresource.ListResponse, error) { - reg, err := s.validateListRequest(req) + if err := validateListRequest(req); err != nil { + return nil, err + } + + // check type + reg, err := s.resolveType(req.Type) if err != nil { return nil, err } - // v1 ACL subsystem is "wildcard" aware so just pass on through. - entMeta := v2TenancyToV1EntMeta(req.Tenancy) - token := tokenFromContext(ctx) - authz, authzContext, err := s.getAuthorizer(token, entMeta) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) if err != nil { return nil, err } - // Check ACLs. - err = reg.ACLs.List(authz, authzContext) + // check acls + err = reg.ACLs.List(authz, req.Tenancy) switch { case acl.IsErrPermissionDenied(err): return nil, status.Error(codes.PermissionDenied, err.Error()) @@ -38,9 +39,6 @@ func (s *Server) List(ctx context.Context, req *pbresource.ListRequest) (*pbreso return nil, status.Errorf(codes.Internal, "failed list acl: %v", err) } - // Ensure we're defaulting correctly when request tenancy units are empty. - v1EntMetaToV2Tenancy(reg, entMeta, req.Tenancy) - resources, err := s.Backend.List( ctx, readConsistencyFrom(ctx), @@ -54,22 +52,13 @@ func (s *Server) List(ctx context.Context, req *pbresource.ListRequest) (*pbreso result := make([]*pbresource.Resource, 0) for _, resource := range resources { - // Filter out non-matching GroupVersion. + // filter out non-matching GroupVersion if resource.Id.Type.GroupVersion != req.Type.GroupVersion { continue } - // Need to rebuild authorizer per resource since wildcard inputs may - // result in different tenancies. Consider caching per tenancy if this - // is deemed expensive. - entMeta = v2TenancyToV1EntMeta(resource.Id.Tenancy) - authz, authzContext, err = s.getAuthorizer(token, entMeta) - if err != nil { - return nil, err - } - - // Filter out items that don't pass read ACLs. - err = reg.ACLs.Read(authz, authzContext, resource.Id) + // filter out items that don't pass read ACLs + err = reg.ACLs.Read(authz, resource.Id) switch { case acl.IsErrPermissionDenied(err): continue @@ -81,37 +70,15 @@ func (s *Server) List(ctx context.Context, req *pbresource.ListRequest) (*pbreso return &pbresource.ListResponse{Resources: result}, nil } -func (s *Server) validateListRequest(req *pbresource.ListRequest) (*resource.Registration, error) { +func validateListRequest(req *pbresource.ListRequest) error { var field string switch { case req.Type == nil: field = "type" case req.Tenancy == nil: field = "tenancy" + default: + return nil } - - if field != "" { - return nil, status.Errorf(codes.InvalidArgument, "%s is required", field) - } - - // Check type exists. - reg, err := s.resolveType(req.Type) - if err != nil { - return nil, err - } - - // Lowercase - resource.Normalize(req.Tenancy) - - // Error when partition scoped and namespace not empty. - if reg.Scope == resource.ScopePartition && req.Tenancy.Namespace != "" { - return nil, status.Errorf( - codes.InvalidArgument, - "partition scoped type %s cannot have a namespace. got: %s", - resource.ToGVK(req.Type), - req.Tenancy.Namespace, - ) - } - - return reg, nil + return status.Errorf(codes.InvalidArgument, "%s is required", field) } diff --git a/agent/grpc-external/services/resource/list_by_owner.go b/agent/grpc-external/services/resource/list_by_owner.go index 8f1b4216a3ac0..2cc203e72c30b 100644 --- a/agent/grpc-external/services/resource/list_by_owner.go +++ b/agent/grpc-external/services/resource/list_by_owner.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -28,8 +28,7 @@ func (s *Server) ListByOwner(ctx context.Context, req *pbresource.ListByOwnerReq return nil, status.Errorf(codes.Internal, "failed list by owner: %v", err) } - // TODO(spatel): Refactor _ and entMeta in NET-4917 - authz, authzContext, err := s.getAuthorizer(tokenFromContext(ctx), acl.DefaultEnterpriseMeta()) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) if err != nil { return nil, err } @@ -42,7 +41,7 @@ func (s *Server) ListByOwner(ctx context.Context, req *pbresource.ListByOwnerReq } // ACL filter - err = reg.ACLs.Read(authz, authzContext, child.Id) + err = reg.ACLs.Read(authz, child.Id) switch { case acl.IsErrPermissionDenied(err): continue diff --git a/agent/grpc-external/services/resource/list_by_owner_test.go b/agent/grpc-external/services/resource/list_by_owner_test.go index 5b2fe63975bf9..218971a050daa 100644 --- a/agent/grpc-external/services/resource/list_by_owner_test.go +++ b/agent/grpc-external/services/resource/list_by_owner_test.go @@ -1,5 +1,5 @@ // // Copyright (c) HashiCorp, Inc. -// // SPDX-License-Identifier: BUSL-1.1 +// // SPDX-License-Identifier: MPL-2.0 package resource diff --git a/agent/grpc-external/services/resource/list_test.go b/agent/grpc-external/services/resource/list_test.go index 64026b7d34e59..4d6b50951b758 100644 --- a/agent/grpc-external/services/resource/list_test.go +++ b/agent/grpc-external/services/resource/list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/agent/grpc-external/testutils" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/resource/demo" "github.com/hashicorp/consul/internal/storage" "github.com/hashicorp/consul/proto-public/pbresource" @@ -32,16 +31,12 @@ func TestList_InputValidation(t *testing.T) { testCases := map[string]func(*pbresource.ListRequest){ "no type": func(req *pbresource.ListRequest) { req.Type = nil }, "no tenancy": func(req *pbresource.ListRequest) { req.Tenancy = nil }, - "partitioned resource provides non-empty namespace": func(req *pbresource.ListRequest) { - req.Type = demo.TypeV1RecordLabel - req.Tenancy.Namespace = "bad" - }, } for desc, modFn := range testCases { t.Run(desc, func(t *testing.T) { req := &pbresource.ListRequest{ Type: demo.TypeV2Album, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, } modFn(req) @@ -58,7 +53,7 @@ func TestList_TypeNotFound(t *testing.T) { _, err := client.List(context.Background(), &pbresource.ListRequest{ Type: demo.TypeV2Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.Error(t, err) @@ -75,7 +70,7 @@ func TestList_Empty(t *testing.T) { rsp, err := client.List(tc.ctx, &pbresource.ListRequest{ Type: demo.TypeV1Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.NoError(t, err) @@ -107,7 +102,7 @@ func TestList_Many(t *testing.T) { rsp, err := client.List(tc.ctx, &pbresource.ListRequest{ Type: demo.TypeV2Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.NoError(t, err) @@ -116,44 +111,6 @@ func TestList_Many(t *testing.T) { } } -func TestList_Tenancy_Defaults_And_Normalization(t *testing.T) { - // Test units of tenancy get defaulted correctly when empty. - ctx := context.Background() - for desc, tc := range wildcardTenancyCases() { - t.Run(desc, func(t *testing.T) { - server := testServer(t) - demo.RegisterTypes(server.Registry) - client := testClient(t, server) - - // Write partition scoped record label - recordLabel, err := demo.GenerateV1RecordLabel("LooneyTunes") - require.NoError(t, err) - recordLabelRsp, err := client.Write(ctx, &pbresource.WriteRequest{Resource: recordLabel}) - require.NoError(t, err) - - // Write namespace scoped artist - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - artistRsp, err := client.Write(ctx, &pbresource.WriteRequest{Resource: artist}) - require.NoError(t, err) - - // List and verify correct resource returned for empty tenancy units. - listRsp, err := client.List(ctx, &pbresource.ListRequest{ - Type: tc.typ, - Tenancy: tc.tenancy, - }) - require.NoError(t, err) - require.Len(t, listRsp.Resources, 1) - if tc.typ == demo.TypeV1RecordLabel { - prototest.AssertDeepEqual(t, recordLabelRsp.Resource, listRsp.Resources[0]) - } else { - prototest.AssertDeepEqual(t, artistRsp.Resource, listRsp.Resources[0]) - } - }) - - } -} - func TestList_GroupVersionMismatch(t *testing.T) { for desc, tc := range listTestCases() { t.Run(desc, func(t *testing.T) { diff --git a/agent/grpc-external/services/resource/mock_TenancyBridge.go b/agent/grpc-external/services/resource/mock_TenancyBridge.go deleted file mode 100644 index 662b4004b99f7..0000000000000 --- a/agent/grpc-external/services/resource/mock_TenancyBridge.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package resource - -import mock "github.com/stretchr/testify/mock" - -// MockTenancyBridge is an autogenerated mock type for the TenancyBridge type -type MockTenancyBridge struct { - mock.Mock -} - -// IsNamespaceMarkedForDeletion provides a mock function with given fields: partition, namespace -func (_m *MockTenancyBridge) IsNamespaceMarkedForDeletion(partition string, namespace string) (bool, error) { - ret := _m.Called(partition, namespace) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { - return rf(partition, namespace) - } - if rf, ok := ret.Get(0).(func(string, string) bool); ok { - r0 = rf(partition, namespace) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(partition, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IsPartitionMarkedForDeletion provides a mock function with given fields: partition -func (_m *MockTenancyBridge) IsPartitionMarkedForDeletion(partition string) (bool, error) { - ret := _m.Called(partition) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(partition) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(partition) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(partition) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NamespaceExists provides a mock function with given fields: partition, namespace -func (_m *MockTenancyBridge) NamespaceExists(partition string, namespace string) (bool, error) { - ret := _m.Called(partition, namespace) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { - return rf(partition, namespace) - } - if rf, ok := ret.Get(0).(func(string, string) bool); ok { - r0 = rf(partition, namespace) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(partition, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// PartitionExists provides a mock function with given fields: partition -func (_m *MockTenancyBridge) PartitionExists(partition string) (bool, error) { - ret := _m.Called(partition) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(partition) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(partition) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(partition) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type mockConstructorTestingTNewMockTenancyBridge interface { - mock.TestingT - Cleanup(func()) -} - -// NewMockTenancyBridge creates a new instance of MockTenancyBridge. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockTenancyBridge(t mockConstructorTestingTNewMockTenancyBridge) *MockTenancyBridge { - mock := &MockTenancyBridge{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/grpc-external/services/resource/read.go b/agent/grpc-external/services/resource/read.go index febfcb69f0faa..c75779183cb8d 100644 --- a/agent/grpc-external/services/resource/read.go +++ b/agent/grpc-external/services/resource/read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -11,41 +11,28 @@ import ( "google.golang.org/grpc/status" "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/storage" "github.com/hashicorp/consul/proto-public/pbresource" ) func (s *Server) Read(ctx context.Context, req *pbresource.ReadRequest) (*pbresource.ReadResponse, error) { - // Light first pass validation based on what user passed in and not much more. - reg, err := s.validateReadRequest(req) - if err != nil { + if err := validateReadRequest(req); err != nil { return nil, err } - // acl.EnterpriseMeta acl.AuthorizerContext follow rules for V1 resources since they integrate with the V1 acl subsystem. - // pbresource.Tenacy follows rules for V2 resources and the Resource service. - // Example: - // - // A CE namespace scoped resource: - // V1: EnterpriseMeta{} - // V2: Tenancy {Partition: "default", Namespace: "default"} - // - // An ENT namespace scoped resource: - // V1: EnterpriseMeta{Partition: "default", Namespace: "default"} - // V2: Tenancy {Partition: "default", Namespace: "default"} - // - // It is necessary to convert back and forth depending on which component supports which version, V1 or V2. - entMeta := v2TenancyToV1EntMeta(req.Id.Tenancy) - authz, authzContext, err := s.getAuthorizer(tokenFromContext(ctx), entMeta) + // check type exists + reg, err := s.resolveType(req.Id.Type) if err != nil { return nil, err } - v1EntMetaToV2Tenancy(reg, entMeta, req.Id.Tenancy) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) + if err != nil { + return nil, err + } - // ACL check comes before tenancy existence checks to not leak tenancy "existence". - err = reg.ACLs.Read(authz, authzContext, req.Id) + // check acls + err = reg.ACLs.Read(authz, req.Id) switch { case acl.IsErrPermissionDenied(err): return nil, status.Error(codes.PermissionDenied, err.Error()) @@ -53,11 +40,6 @@ func (s *Server) Read(ctx context.Context, req *pbresource.ReadRequest) (*pbreso return nil, status.Errorf(codes.Internal, "failed read acl: %v", err) } - // Check V1 tenancy exists for the V2 resource. - if err = v1TenancyExists(reg, s.V1TenancyBridge, req.Id.Tenancy, codes.NotFound); err != nil { - return nil, err - } - resource, err := s.Backend.Read(ctx, readConsistencyFrom(ctx), req.Id) switch { case err == nil: @@ -71,30 +53,13 @@ func (s *Server) Read(ctx context.Context, req *pbresource.ReadRequest) (*pbreso } } -func (s *Server) validateReadRequest(req *pbresource.ReadRequest) (*resource.Registration, error) { +func validateReadRequest(req *pbresource.ReadRequest) error { if req.Id == nil { - return nil, status.Errorf(codes.InvalidArgument, "id is required") + return status.Errorf(codes.InvalidArgument, "id is required") } if err := validateId(req.Id, "id"); err != nil { - return nil, err + return err } - - // Check type exists. - reg, err := s.resolveType(req.Id.Type) - if err != nil { - return nil, err - } - - // Check scope - if reg.Scope == resource.ScopePartition && req.Id.Tenancy.Namespace != "" { - return nil, status.Errorf( - codes.InvalidArgument, - "partition scoped resource %s cannot have a namespace. got: %s", - resource.ToGVK(req.Id.Type), - req.Id.Tenancy.Namespace, - ) - } - - return reg, nil + return nil } diff --git a/agent/grpc-external/services/resource/read_test.go b/agent/grpc-external/services/resource/read_test.go index ff312c82ca005..cca911ec15b5b 100644 --- a/agent/grpc-external/services/resource/read_test.go +++ b/agent/grpc-external/services/resource/read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -12,7 +12,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" "github.com/hashicorp/consul/acl/resolver" "github.com/hashicorp/consul/internal/resource" @@ -25,37 +24,35 @@ import ( func TestRead_InputValidation(t *testing.T) { server := testServer(t) client := testClient(t, server) + demo.RegisterTypes(server.Registry) - testCases := map[string]func(artistId, recordlabelId *pbresource.ID) *pbresource.ID{ - "no id": func(artistId, recordLabelId *pbresource.ID) *pbresource.ID { return nil }, - "no type": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Type = nil - return artistId - }, - "no tenancy": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Tenancy = nil - return artistId + testCases := map[string]func(*pbresource.ReadRequest){ + "no id": func(req *pbresource.ReadRequest) { req.Id = nil }, + "no type": func(req *pbresource.ReadRequest) { req.Id.Type = nil }, + "no tenancy": func(req *pbresource.ReadRequest) { req.Id.Tenancy = nil }, + "no name": func(req *pbresource.ReadRequest) { req.Id.Name = "" }, + // clone necessary to not pollute DefaultTenancy + "tenancy partition not default": func(req *pbresource.ReadRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.Partition = "" }, - "no name": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Name = "" - return artistId + "tenancy namespace not default": func(req *pbresource.ReadRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.Namespace = "" }, - "partition scope with non-empty namespace": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - recordLabelId.Tenancy.Namespace = "ishouldnothaveanamespace" - return recordLabelId + "tenancy peername not local": func(req *pbresource.ReadRequest) { + req.Id.Tenancy = clone(req.Id.Tenancy) + req.Id.Tenancy.PeerName = "" }, } for desc, modFn := range testCases { t.Run(desc, func(t *testing.T) { - artist, err := demo.GenerateV2Artist() + res, err := demo.GenerateV2Artist() require.NoError(t, err) - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - - // Each test case picks which resource to use based on the resource type's scope. - req := &pbresource.ReadRequest{Id: modFn(artist.Id, recordLabel.Id)} + req := &pbresource.ReadRequest{Id: res.Id} + modFn(req) _, err = client.Read(testContext(t), req) require.Error(t, err) @@ -80,50 +77,18 @@ func TestRead_TypeNotFound(t *testing.T) { func TestRead_ResourceNotFound(t *testing.T) { for desc, tc := range readTestCases() { t.Run(desc, func(t *testing.T) { - tenancyCases := map[string]func(artistId, recordlabelId *pbresource.ID) *pbresource.ID{ - "resource not found by name": func(artistId, _ *pbresource.ID) *pbresource.ID { - artistId.Name = "bogusname" - return artistId - }, - "partition not found when namespace scoped": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Partition = "boguspartition" - return id - }, - "namespace not found when namespace scoped": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Namespace = "bogusnamespace" - return id - }, - "partition not found when partition scoped": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - id := clone(recordLabelId) - id.Tenancy.Partition = "boguspartition" - return id - }, - } - for tenancyDesc, modFn := range tenancyCases { - t.Run(tenancyDesc, func(t *testing.T) { - server := testServer(t) - demo.RegisterTypes(server.Registry) - client := testClient(t, server) - - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - recordLabel, err = server.Backend.WriteCAS(tc.ctx, recordLabel) - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - artist, err = server.Backend.WriteCAS(tc.ctx, artist) - require.NoError(t, err) - - // Each tenancy test case picks which resource to use based on the resource type's scope. - _, err = client.Read(tc.ctx, &pbresource.ReadRequest{Id: modFn(artist.Id, recordLabel.Id)}) - require.Error(t, err) - require.Equal(t, codes.NotFound.String(), status.Code(err).String()) - require.Contains(t, err.Error(), "resource not found") - }) - } + server := testServer(t) + + demo.RegisterTypes(server.Registry) + client := testClient(t, server) + + artist, err := demo.GenerateV2Artist() + require.NoError(t, err) + + _, err = client.Read(tc.ctx, &pbresource.ReadRequest{Id: artist.Id}) + require.Error(t, err) + require.Equal(t, codes.NotFound.String(), status.Code(err).String()) + require.Contains(t, err.Error(), "resource not found") }) } } @@ -156,37 +121,20 @@ func TestRead_GroupVersionMismatch(t *testing.T) { func TestRead_Success(t *testing.T) { for desc, tc := range readTestCases() { t.Run(desc, func(t *testing.T) { - for tenancyDesc, modFn := range tenancyCases() { - t.Run(tenancyDesc, func(t *testing.T) { - server := testServer(t) - demo.RegisterTypes(server.Registry) - client := testClient(t, server) - - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - recordLabel, err = server.Backend.WriteCAS(tc.ctx, recordLabel) - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - artist, err = server.Backend.WriteCAS(tc.ctx, artist) - require.NoError(t, err) - - // Each tenancy test case picks which resource to use based on the resource type's scope. - req := &pbresource.ReadRequest{Id: modFn(artist.Id, recordLabel.Id)} - rsp, err := client.Read(tc.ctx, req) - require.NoError(t, err) - - switch { - case proto.Equal(rsp.Resource.Id.Type, demo.TypeV2Artist): - prototest.AssertDeepEqual(t, artist, rsp.Resource) - case proto.Equal(rsp.Resource.Id.Type, demo.TypeV1RecordLabel): - prototest.AssertDeepEqual(t, recordLabel, rsp.Resource) - default: - require.Fail(t, "unexpected resource type") - } - }) - } + server := testServer(t) + + demo.RegisterTypes(server.Registry) + client := testClient(t, server) + + artist, err := demo.GenerateV2Artist() + require.NoError(t, err) + + resource1, err := server.Backend.WriteCAS(tc.ctx, artist) + require.NoError(t, err) + + rsp, err := client.Read(tc.ctx, &pbresource.ReadRequest{Id: artist.Id}) + require.NoError(t, err) + prototest.AssertDeepEqual(t, resource1, rsp.Resource) }) } } diff --git a/agent/grpc-external/services/resource/server.go b/agent/grpc-external/services/resource/server.go index 29b18bd964c8b..51bb4610d527f 100644 --- a/agent/grpc-external/services/resource/server.go +++ b/agent/grpc-external/services/resource/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -31,9 +31,6 @@ type Config struct { // Backend is the storage backend that will be used for resource persistence. Backend Backend ACLResolver ACLResolver - // V1TenancyBridge temporarily allows us to use V1 implementations of - // partitions and namespaces until V2 implementations are available. - V1TenancyBridge TenancyBridge } //go:generate mockery --name Registry --inpackage @@ -51,14 +48,6 @@ type ACLResolver interface { ResolveTokenAndDefaultMeta(string, *acl.EnterpriseMeta, *acl.AuthorizerContext) (resolver.Result, error) } -//go:generate mockery --name TenancyBridge --inpackage -type TenancyBridge interface { - PartitionExists(partition string) (bool, error) - IsPartitionMarkedForDeletion(partition string) (bool, error) - NamespaceExists(partition, namespace string) (bool, error) - IsNamespaceMarkedForDeletion(partition, namespace string) (bool, error) -} - func NewServer(cfg Config) *Server { return &Server{cfg} } @@ -111,13 +100,12 @@ func readConsistencyFrom(ctx context.Context) storage.ReadConsistency { return storage.EventualConsistency } -func (s *Server) getAuthorizer(token string, entMeta *acl.EnterpriseMeta) (acl.Authorizer, *acl.AuthorizerContext, error) { - authzContext := &acl.AuthorizerContext{} - authz, err := s.ACLResolver.ResolveTokenAndDefaultMeta(token, entMeta, authzContext) +func (s *Server) getAuthorizer(token string) (acl.Authorizer, error) { + authz, err := s.ACLResolver.ResolveTokenAndDefaultMeta(token, nil, nil) if err != nil { - return nil, nil, status.Errorf(codes.Internal, "failed getting authorizer: %v", err) + return nil, status.Errorf(codes.Internal, "failed getting authorizer: %v", err) } - return authz, authzContext, nil + return authz, nil } func isGRPCStatusError(err error) bool { @@ -142,55 +130,20 @@ func validateId(id *pbresource.ID, errorPrefix string) error { if field != "" { return status.Errorf(codes.InvalidArgument, "%s.%s is required", errorPrefix, field) } - resource.Normalize(id.Tenancy) - - return nil -} - -// v1TenancyExists return an error with the passed in gRPC status code when tenancy partition or namespace do not exist. -func v1TenancyExists(reg *resource.Registration, v1Bridge TenancyBridge, tenancy *pbresource.Tenancy, errCode codes.Code) error { - if reg.Scope == resource.ScopePartition || reg.Scope == resource.ScopeNamespace { - exists, err := v1Bridge.PartitionExists(tenancy.Partition) - switch { - case err != nil: - return err - case !exists: - return status.Errorf(errCode, "partition resource not found: %v", tenancy.Partition) - } - } - if reg.Scope == resource.ScopeNamespace { - exists, err := v1Bridge.NamespaceExists(tenancy.Partition, tenancy.Namespace) - switch { - case err != nil: - return err - case !exists: - return status.Errorf(errCode, "namespace resource not found: %v", tenancy.Namespace) - } - } - return nil -} - -// v1TenancyMarkedForDeletion returns a gRPC InvalidArgument when either partition or namespace is marked for deletion. -func v1TenancyMarkedForDeletion(reg *resource.Registration, v1Bridge TenancyBridge, tenancy *pbresource.Tenancy) error { - if reg.Scope == resource.ScopePartition || reg.Scope == resource.ScopeNamespace { - marked, err := v1Bridge.IsPartitionMarkedForDeletion(tenancy.Partition) - switch { - case err != nil: - return err - case marked: - return status.Errorf(codes.InvalidArgument, "partition marked for deletion: %v", tenancy.Partition) - } + // Revisit defaulting and non-namespaced resources post-1.16 + var expected string + switch { + case id.Tenancy.Partition != "default": + field, expected = "partition", "default" + case id.Tenancy.Namespace != "default": + field, expected = "namespace", "default" + case id.Tenancy.PeerName != "local": + field, expected = "peername", "local" } - if reg.Scope == resource.ScopeNamespace { - marked, err := v1Bridge.IsNamespaceMarkedForDeletion(tenancy.Partition, tenancy.Namespace) - switch { - case err != nil: - return err - case marked: - return status.Errorf(codes.InvalidArgument, "namespace marked for deletion: %v", tenancy.Namespace) - } + if field != "" { + return status.Errorf(codes.InvalidArgument, "%s.tenancy.%s must be %s", errorPrefix, field, expected) } return nil } diff --git a/agent/grpc-external/services/resource/server_ce.go b/agent/grpc-external/services/resource/server_ce.go deleted file mode 100644 index 562af973200ff..0000000000000 --- a/agent/grpc-external/services/resource/server_ce.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package resource - -import ( - "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -func v2TenancyToV1EntMeta(tenancy *pbresource.Tenancy) *acl.EnterpriseMeta { - return acl.DefaultEnterpriseMeta() -} - -func v1EntMetaToV2Tenancy(reg *resource.Registration, entMeta *acl.EnterpriseMeta, tenancy *pbresource.Tenancy) { - if (reg.Scope == resource.ScopeNamespace || reg.Scope == resource.ScopePartition) && tenancy.Partition == "" { - tenancy.Partition = entMeta.PartitionOrDefault() - } - - if reg.Scope == resource.ScopeNamespace && tenancy.Namespace == "" { - tenancy.Namespace = entMeta.NamespaceOrDefault() - } -} diff --git a/agent/grpc-external/services/resource/server_ce_test.go b/agent/grpc-external/services/resource/server_ce_test.go deleted file mode 100644 index 9e155019ca01e..0000000000000 --- a/agent/grpc-external/services/resource/server_ce_test.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package resource - -import "github.com/hashicorp/consul/acl" - -func fillEntMeta(entMeta *acl.EnterpriseMeta) { - return -} - -func fillAuthorizerContext(authzContext *acl.AuthorizerContext) { - return -} diff --git a/agent/grpc-external/services/resource/server_test.go b/agent/grpc-external/services/resource/server_test.go index 7f745952e5e5c..a92fff38a3266 100644 --- a/agent/grpc-external/services/resource/server_test.go +++ b/agent/grpc-external/services/resource/server_test.go @@ -1,12 +1,11 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource import ( "context" "fmt" - "strings" "testing" "github.com/stretchr/testify/mock" @@ -21,7 +20,6 @@ import ( "github.com/hashicorp/consul/agent/grpc-external/testutils" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" "github.com/hashicorp/consul/internal/storage/inmem" "github.com/hashicorp/consul/proto-public/pbresource" pbdemov2 "github.com/hashicorp/consul/proto/private/pbdemo/v2" @@ -59,38 +57,16 @@ func testServer(t *testing.T) *Server { require.NoError(t, err) go backend.Run(testContext(t)) - // Mock the ACL Resolver to "allow all" for testing. + // Mock the ACL Resolver to allow everything for testing mockACLResolver := &MockACLResolver{} mockACLResolver.On("ResolveTokenAndDefaultMeta", mock.Anything, mock.Anything, mock.Anything). - Return(testutils.ACLsDisabled(t), nil). - Run(func(args mock.Arguments) { - // Caller expecting passed in tokenEntMeta and authorizerContext to be filled in. - tokenEntMeta := args.Get(1).(*acl.EnterpriseMeta) - if tokenEntMeta != nil { - fillEntMeta(tokenEntMeta) - } - - authzContext := args.Get(2).(*acl.AuthorizerContext) - if authzContext != nil { - fillAuthorizerContext(authzContext) - } - }) - - // Mock the V1 tenancy bridge since we can't use the real thing. - mockTenancyBridge := &MockTenancyBridge{} - mockTenancyBridge.On("PartitionExists", resource.DefaultPartitionName).Return(true, nil) - mockTenancyBridge.On("NamespaceExists", resource.DefaultPartitionName, resource.DefaultNamespaceName).Return(true, nil) - mockTenancyBridge.On("PartitionExists", mock.Anything).Return(false, nil) - mockTenancyBridge.On("NamespaceExists", mock.Anything, mock.Anything).Return(false, nil) - mockTenancyBridge.On("IsPartitionMarkedForDeletion", resource.DefaultPartitionName).Return(false, nil) - mockTenancyBridge.On("IsNamespaceMarkedForDeletion", resource.DefaultPartitionName, resource.DefaultNamespaceName).Return(false, nil) + Return(testutils.ACLsDisabled(t), nil) return NewServer(Config{ - Logger: testutil.Logger(t), - Registry: resource.NewRegistry(), - Backend: backend, - ACLResolver: mockACLResolver, - V1TenancyBridge: mockTenancyBridge, + Logger: testutil.Logger(t), + Registry: resource.NewRegistry(), + Backend: backend, + ACLResolver: mockACLResolver, }) } @@ -131,134 +107,3 @@ func modifyArtist(t *testing.T, res *pbresource.Resource) *pbresource.Resource { res.Data = data return res } - -// wildcardTenancyCases returns permutations of tenancy and type scope used as input -// to endpoints that accept wildcards for tenancy. -func wildcardTenancyCases() map[string]struct { - typ *pbresource.Type - tenancy *pbresource.Tenancy -} { - return map[string]struct { - typ *pbresource.Type - tenancy *pbresource.Tenancy - }{ - "namespaced type with empty partition": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: "", - Namespace: resource.DefaultNamespaceName, - PeerName: "local", - }, - }, - "namespaced type with empty namespace": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: resource.DefaultPartitionName, - Namespace: "", - PeerName: "local", - }, - }, - "namespaced type with empty partition and namespace": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: "", - Namespace: "", - PeerName: "local", - }, - }, - "namespaced type with uppercase partition and namespace": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: "DEFAULT", - Namespace: "DEFAULT", - PeerName: "local", - }, - }, - "namespaced type with wildcard partition and empty namespace": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: "*", - Namespace: "", - PeerName: "local", - }, - }, - "namespaced type with empty partition and wildcard namespace": { - typ: demo.TypeV2Artist, - tenancy: &pbresource.Tenancy{ - Partition: "", - Namespace: "*", - PeerName: "local", - }, - }, - "partitioned type with empty partition": { - typ: demo.TypeV1RecordLabel, - tenancy: &pbresource.Tenancy{ - Partition: "", - Namespace: "", - PeerName: "local", - }, - }, - "partitioned type with uppercase partition": { - typ: demo.TypeV1RecordLabel, - tenancy: &pbresource.Tenancy{ - Partition: "DEFAULT", - Namespace: "", - PeerName: "local", - }, - }, - "partitioned type with wildcard partition": { - typ: demo.TypeV1RecordLabel, - tenancy: &pbresource.Tenancy{ - Partition: "*", - PeerName: "local", - }, - }, - } -} - -// tenancyCases returns permutations of valid tenancy structs in a resource id to use as inputs. -// - the id is for a recordLabel when the resource is partition scoped -// - the id is for an artist when the resource is namespace scoped -func tenancyCases() map[string]func(artistId, recordlabelId *pbresource.ID) *pbresource.ID { - tenancyCases := map[string]func(artistId, recordlabelId *pbresource.ID) *pbresource.ID{ - "namespaced resource provides nonempty partition and namespace": func(artistId, recordLabelId *pbresource.ID) *pbresource.ID { - return artistId - }, - "namespaced resource provides uppercase partition and namespace": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Partition = strings.ToUpper(artistId.Tenancy.Partition) - id.Tenancy.Namespace = strings.ToUpper(artistId.Tenancy.Namespace) - return id - }, - "namespaced resource inherits tokens partition when empty": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Partition = "" - return id - }, - "namespaced resource inherits tokens namespace when empty": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Namespace = "" - return id - }, - "namespaced resource inherits tokens partition and namespace when empty": func(artistId, _ *pbresource.ID) *pbresource.ID { - id := clone(artistId) - id.Tenancy.Partition = "" - id.Tenancy.Namespace = "" - return id - }, - "partitioned resource provides nonempty partition": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - return recordLabelId - }, - "partitioned resource provides uppercase partition": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - id := clone(recordLabelId) - id.Tenancy.Partition = strings.ToUpper(recordLabelId.Tenancy.Partition) - return id - }, - "partitioned resource inherits tokens partition when empty": func(_, recordLabelId *pbresource.ID) *pbresource.ID { - id := clone(recordLabelId) - id.Tenancy.Partition = "" - return id - }, - } - return tenancyCases -} diff --git a/agent/grpc-external/services/resource/testing/testing.go b/agent/grpc-external/services/resource/testing/testing.go index 403263404fe27..5bcbc148e7bb6 100644 --- a/agent/grpc-external/services/resource/testing/testing.go +++ b/agent/grpc-external/services/resource/testing/testing.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package testing import ( @@ -11,51 +8,18 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/hashicorp/go-uuid" - - "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/acl/resolver" svc "github.com/hashicorp/consul/agent/grpc-external/services/resource" internal "github.com/hashicorp/consul/agent/grpc-internal" - "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/storage/inmem" "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/sdk/testutil" ) -func randomACLIdentity(t *testing.T) structs.ACLIdentity { - id, err := uuid.GenerateUUID() - require.NoError(t, err) - - return &structs.ACLToken{AccessorID: id} -} - -func AuthorizerFrom(t *testing.T, policyStrs ...string) resolver.Result { - policies := []*acl.Policy{} - for _, policyStr := range policyStrs { - policy, err := acl.NewPolicyFromSource(policyStr, nil, nil) - require.NoError(t, err) - policies = append(policies, policy) - } - - authz, err := acl.NewPolicyAuthorizerWithDefaults(acl.DenyAll(), policies, nil) - require.NoError(t, err) - - return resolver.Result{ - Authorizer: authz, - ACLIdentity: randomACLIdentity(t), - } -} - // RunResourceService runs a Resource Service for the duration of the test and -// returns a client to interact with it. ACLs will be disabled and only the -// default partition and namespace are available. +// returns a client to interact with it. ACLs will be disabled. func RunResourceService(t *testing.T, registerFns ...func(resource.Registry)) pbresource.ResourceServiceClient { - return RunResourceServiceWithACL(t, resolver.DANGER_NO_AUTH{}, registerFns...) -} - -func RunResourceServiceWithACL(t *testing.T, aclResolver svc.ACLResolver, registerFns ...func(resource.Registry)) pbresource.ResourceServiceClient { t.Helper() backend, err := inmem.NewBackend() @@ -72,18 +36,11 @@ func RunResourceServiceWithACL(t *testing.T, aclResolver svc.ACLResolver, regist server := grpc.NewServer() - mockTenancyBridge := &svc.MockTenancyBridge{} - mockTenancyBridge.On("PartitionExists", resource.DefaultPartitionName).Return(true, nil) - mockTenancyBridge.On("NamespaceExists", resource.DefaultPartitionName, resource.DefaultNamespaceName).Return(true, nil) - mockTenancyBridge.On("IsPartitionMarkedForDeletion", resource.DefaultPartitionName).Return(false, nil) - mockTenancyBridge.On("IsNamespaceMarkedForDeletion", resource.DefaultPartitionName, resource.DefaultNamespaceName).Return(false, nil) - svc.NewServer(svc.Config{ - Backend: backend, - Registry: registry, - Logger: testutil.Logger(t), - ACLResolver: aclResolver, - V1TenancyBridge: mockTenancyBridge, + Backend: backend, + Registry: registry, + Logger: testutil.Logger(t), + ACLResolver: resolver.DANGER_NO_AUTH{}, }).Register(server) pipe := internal.NewPipeListener() diff --git a/agent/grpc-external/services/resource/watch.go b/agent/grpc-external/services/resource/watch.go index 6039613b8fed5..35ec14513ac37 100644 --- a/agent/grpc-external/services/resource/watch.go +++ b/agent/grpc-external/services/resource/watch.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -10,27 +10,28 @@ import ( "google.golang.org/grpc/status" "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/storage" "github.com/hashicorp/consul/proto-public/pbresource" ) func (s *Server) WatchList(req *pbresource.WatchListRequest, stream pbresource.ResourceService_WatchListServer) error { - reg, err := s.validateWatchListRequest(req) + if err := validateWatchListRequest(req); err != nil { + return err + } + + // check type exists + reg, err := s.resolveType(req.Type) if err != nil { return err } - // v1 ACL subsystem is "wildcard" aware so just pass on through. - entMeta := v2TenancyToV1EntMeta(req.Tenancy) - token := tokenFromContext(stream.Context()) - authz, authzContext, err := s.getAuthorizer(token, entMeta) + authz, err := s.getAuthorizer(tokenFromContext(stream.Context())) if err != nil { return err } - // Check list ACL. - err = reg.ACLs.List(authz, authzContext) + // check acls + err = reg.ACLs.List(authz, req.Tenancy) switch { case acl.IsErrPermissionDenied(err): return status.Error(codes.PermissionDenied, err.Error()) @@ -38,9 +39,6 @@ func (s *Server) WatchList(req *pbresource.WatchListRequest, stream pbresource.R return status.Errorf(codes.Internal, "failed list acl: %v", err) } - // Ensure we're defaulting correctly when request tenancy units are empty. - v1EntMetaToV2Tenancy(reg, entMeta, req.Tenancy) - unversionedType := storage.UnversionedTypeFrom(req.Type) watch, err := s.Backend.WatchList( stream.Context(), @@ -67,17 +65,8 @@ func (s *Server) WatchList(req *pbresource.WatchListRequest, stream pbresource.R continue } - // Need to rebuild authorizer per resource since wildcard inputs may - // result in different tenancies. Consider caching per tenancy if this - // is deemed expensive. - entMeta = v2TenancyToV1EntMeta(event.Resource.Id.Tenancy) - authz, authzContext, err = s.getAuthorizer(token, entMeta) - if err != nil { - return err - } - // filter out items that don't pass read ACLs - err = reg.ACLs.Read(authz, authzContext, event.Resource.Id) + err = reg.ACLs.Read(authz, event.Resource.Id) switch { case acl.IsErrPermissionDenied(err): continue @@ -91,37 +80,15 @@ func (s *Server) WatchList(req *pbresource.WatchListRequest, stream pbresource.R } } -func (s *Server) validateWatchListRequest(req *pbresource.WatchListRequest) (*resource.Registration, error) { +func validateWatchListRequest(req *pbresource.WatchListRequest) error { var field string switch { case req.Type == nil: field = "type" case req.Tenancy == nil: field = "tenancy" + default: + return nil } - - if field != "" { - return nil, status.Errorf(codes.InvalidArgument, "%s is required", field) - } - - // Check type exists. - reg, err := s.resolveType(req.Type) - if err != nil { - return nil, err - } - - // Lowercase - resource.Normalize(req.Tenancy) - - // Error when partition scoped and namespace not empty. - if reg.Scope == resource.ScopePartition && req.Tenancy.Namespace != "" { - return nil, status.Errorf( - codes.InvalidArgument, - "partition scoped type %s cannot have a namespace. got: %s", - resource.ToGVK(req.Type), - req.Tenancy.Namespace, - ) - } - - return reg, nil + return status.Errorf(codes.InvalidArgument, "%s is required", field) } diff --git a/agent/grpc-external/services/resource/watch_test.go b/agent/grpc-external/services/resource/watch_test.go index 051264441bbc8..95695f295ebd4 100644 --- a/agent/grpc-external/services/resource/watch_test.go +++ b/agent/grpc-external/services/resource/watch_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/agent/grpc-external/testutils" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/resource/demo" "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/proto/private/prototest" @@ -21,7 +20,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) func TestWatchList_InputValidation(t *testing.T) { @@ -33,16 +31,12 @@ func TestWatchList_InputValidation(t *testing.T) { testCases := map[string]func(*pbresource.WatchListRequest){ "no type": func(req *pbresource.WatchListRequest) { req.Type = nil }, "no tenancy": func(req *pbresource.WatchListRequest) { req.Tenancy = nil }, - "partitioned type provides non-empty namespace": func(req *pbresource.WatchListRequest) { - req.Type = demo.TypeV1RecordLabel - req.Tenancy.Namespace = "bad" - }, } for desc, modFn := range testCases { t.Run(desc, func(t *testing.T) { req := &pbresource.WatchListRequest{ Type: demo.TypeV2Album, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, } modFn(req) @@ -64,7 +58,7 @@ func TestWatchList_TypeNotFound(t *testing.T) { stream, err := client.WatchList(context.Background(), &pbresource.WatchListRequest{ Type: demo.TypeV2Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.NoError(t, err) @@ -86,7 +80,7 @@ func TestWatchList_GroupVersionMatches(t *testing.T) { // create a watch stream, err := client.WatchList(ctx, &pbresource.WatchListRequest{ Type: demo.TypeV2Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.NoError(t, err) @@ -117,54 +111,6 @@ func TestWatchList_GroupVersionMatches(t *testing.T) { require.Equal(t, pbresource.WatchEvent_OPERATION_DELETE, rsp.Operation) } -func TestWatchList_Tenancy_Defaults_And_Normalization(t *testing.T) { - // Test units of tenancy get lowercased and defaulted correctly when empty. - for desc, tc := range wildcardTenancyCases() { - t.Run(desc, func(t *testing.T) { - ctx := context.Background() - server := testServer(t) - client := testClient(t, server) - demo.RegisterTypes(server.Registry) - - // Create a watch. - stream, err := client.WatchList(ctx, &pbresource.WatchListRequest{ - Type: tc.typ, - Tenancy: tc.tenancy, - NamePrefix: "", - }) - require.NoError(t, err) - rspCh := handleResourceStream(t, stream) - - // Testcase will pick one of recordLabel or artist based on scope of type. - recordLabel, err := demo.GenerateV1RecordLabel("LooneyTunes") - require.NoError(t, err) - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - - // Create and verify upsert event received. - recordLabel, err = server.Backend.WriteCAS(ctx, recordLabel) - require.NoError(t, err) - artist, err = server.Backend.WriteCAS(ctx, artist) - require.NoError(t, err) - - var expected *pbresource.Resource - switch { - case proto.Equal(tc.typ, demo.TypeV1RecordLabel): - expected = recordLabel - case proto.Equal(tc.typ, demo.TypeV2Artist): - expected = artist - default: - require.Fail(t, "unsupported type", tc.typ) - } - - rsp := mustGetResource(t, rspCh) - require.Equal(t, pbresource.WatchEvent_OPERATION_UPSERT, rsp.Operation) - prototest.AssertDeepEqual(t, expected, rsp.Resource) - }) - - } -} - func TestWatchList_GroupVersionMismatch(t *testing.T) { // Given a watch on TypeArtistV1 that only differs from TypeArtistV2 by GroupVersion // When a resource of TypeArtistV2 is created/updated/deleted @@ -179,7 +125,7 @@ func TestWatchList_GroupVersionMismatch(t *testing.T) { // create a watch for TypeArtistV1 stream, err := client.WatchList(ctx, &pbresource.WatchListRequest{ Type: demo.TypeV1Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: demo.TenancyDefault, NamePrefix: "", }) require.NoError(t, err) diff --git a/agent/grpc-external/services/resource/write.go b/agent/grpc-external/services/resource/write.go index ec39f3a12a85d..34799ae8d82ec 100644 --- a/agent/grpc-external/services/resource/write.go +++ b/agent/grpc-external/services/resource/write.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -37,20 +37,22 @@ import ( var errUseWriteStatus = status.Error(codes.InvalidArgument, "resource.status can only be set using the WriteStatus endpoint") func (s *Server) Write(ctx context.Context, req *pbresource.WriteRequest) (*pbresource.WriteResponse, error) { - reg, err := s.validateWriteRequest(req) + if err := validateWriteRequest(req); err != nil { + return nil, err + } + + reg, err := s.resolveType(req.Resource.Id.Type) if err != nil { return nil, err } - v1EntMeta := v2TenancyToV1EntMeta(req.Resource.Id.Tenancy) - authz, authzContext, err := s.getAuthorizer(tokenFromContext(ctx), v1EntMeta) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) if err != nil { return nil, err } - v1EntMetaToV2Tenancy(reg, v1EntMeta, req.Resource.Id.Tenancy) - // ACL check comes before tenancy existence checks to not leak tenancy "existence". - err = reg.ACLs.Write(authz, authzContext, req.Resource) + // check acls + err = reg.ACLs.Write(authz, req.Resource.Id) switch { case acl.IsErrPermissionDenied(err): return nil, status.Error(codes.PermissionDenied, err.Error()) @@ -70,24 +72,14 @@ func (s *Server) Write(ctx context.Context, req *pbresource.WriteRequest) (*pbre ) } - // Check V1 tenancy exists for the V2 resource - if err = v1TenancyExists(reg, s.V1TenancyBridge, req.Resource.Id.Tenancy, codes.InvalidArgument); err != nil { - return nil, err - } - - // Check V1 tenancy not marked for deletion. - if err = v1TenancyMarkedForDeletion(reg, s.V1TenancyBridge, req.Resource.Id.Tenancy); err != nil { - return nil, err + if err = reg.Validate(req.Resource); err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) } if err = reg.Mutate(req.Resource); err != nil { return nil, status.Errorf(codes.Internal, "failed mutate hook: %v", err.Error()) } - if err = reg.Validate(req.Resource); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - // At the storage backend layer, all writes are CAS operations. // // This makes it possible to *safely* do things like keeping the Uid stable @@ -265,7 +257,7 @@ func (s *Server) retryCAS(ctx context.Context, vsn string, cas func() error) err return err } -func (s *Server) validateWriteRequest(req *pbresource.WriteRequest) (*resource.Registration, error) { +func validateWriteRequest(req *pbresource.WriteRequest) error { var field string switch { case req.Resource == nil: @@ -277,34 +269,17 @@ func (s *Server) validateWriteRequest(req *pbresource.WriteRequest) (*resource.R } if field != "" { - return nil, status.Errorf(codes.InvalidArgument, "%s is required", field) + return status.Errorf(codes.InvalidArgument, "%s is required", field) } if err := validateId(req.Resource.Id, "resource.id"); err != nil { - return nil, err + return err } if req.Resource.Owner != nil { if err := validateId(req.Resource.Owner, "resource.owner"); err != nil { - return nil, err + return err } } - - // Check type exists. - reg, err := s.resolveType(req.Resource.Id.Type) - if err != nil { - return nil, err - } - - // Check scope - if reg.Scope == resource.ScopePartition && req.Resource.Id.Tenancy.Namespace != "" { - return nil, status.Errorf( - codes.InvalidArgument, - "partition scoped resource %s cannot have a namespace. got: %s", - resource.ToGVK(req.Resource.Id.Type), - req.Resource.Id.Tenancy.Namespace, - ) - } - - return reg, nil + return nil } diff --git a/agent/grpc-external/services/resource/write_status.go b/agent/grpc-external/services/resource/write_status.go index d0dea6f162667..205918e1dc2b7 100644 --- a/agent/grpc-external/services/resource/write_status.go +++ b/agent/grpc-external/services/resource/write_status.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -20,8 +20,7 @@ import ( ) func (s *Server) WriteStatus(ctx context.Context, req *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error) { - // TODO(spatel): Refactor _ and entMeta as part of NET-4912 - authz, _, err := s.getAuthorizer(tokenFromContext(ctx), acl.DefaultEnterpriseMeta()) + authz, err := s.getAuthorizer(tokenFromContext(ctx)) if err != nil { return nil, err } diff --git a/agent/grpc-external/services/resource/write_status_test.go b/agent/grpc-external/services/resource/write_status_test.go index 8470f50d85c0b..aa26330176df7 100644 --- a/agent/grpc-external/services/resource/write_status_test.go +++ b/agent/grpc-external/services/resource/write_status_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource diff --git a/agent/grpc-external/services/resource/write_test.go b/agent/grpc-external/services/resource/write_test.go index 861f099519795..4ec25ee26c0c7 100644 --- a/agent/grpc-external/services/resource/write_test.go +++ b/agent/grpc-external/services/resource/write_test.go @@ -1,11 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource import ( "context" - "strings" "sync/atomic" "testing" @@ -17,13 +16,11 @@ import ( "google.golang.org/protobuf/types/known/anypb" "github.com/hashicorp/consul/acl/resolver" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/internal/resource/demo" "github.com/hashicorp/consul/internal/storage" "github.com/hashicorp/consul/proto-public/pbresource" pbdemov1 "github.com/hashicorp/consul/proto/private/pbdemo/v1" pbdemov2 "github.com/hashicorp/consul/proto/private/pbdemo/v2" - "github.com/hashicorp/consul/proto/private/prototest" ) func TestWrite_InputValidation(t *testing.T) { @@ -32,56 +29,46 @@ func TestWrite_InputValidation(t *testing.T) { demo.RegisterTypes(server.Registry) - testCases := map[string]func(artist, recordLabel *pbresource.Resource) *pbresource.Resource{ - "no resource": func(artist, recordLabel *pbresource.Resource) *pbresource.Resource { return nil }, - "no id": func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id = nil - return artist + testCases := map[string]func(*pbresource.WriteRequest){ + "no resource": func(req *pbresource.WriteRequest) { req.Resource = nil }, + "no id": func(req *pbresource.WriteRequest) { req.Resource.Id = nil }, + "no type": func(req *pbresource.WriteRequest) { req.Resource.Id.Type = nil }, + "no tenancy": func(req *pbresource.WriteRequest) { req.Resource.Id.Tenancy = nil }, + "no name": func(req *pbresource.WriteRequest) { req.Resource.Id.Name = "" }, + "no data": func(req *pbresource.WriteRequest) { req.Resource.Data = nil }, + // clone necessary to not pollute DefaultTenancy + "tenancy partition not default": func(req *pbresource.WriteRequest) { + req.Resource.Id.Tenancy = clone(req.Resource.Id.Tenancy) + req.Resource.Id.Tenancy.Partition = "" }, - "no type": func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Type = nil - return artist + "tenancy namespace not default": func(req *pbresource.WriteRequest) { + req.Resource.Id.Tenancy = clone(req.Resource.Id.Tenancy) + req.Resource.Id.Tenancy.Namespace = "" }, - "no tenancy": func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy = nil - return artist + "tenancy peername not local": func(req *pbresource.WriteRequest) { + req.Resource.Id.Tenancy = clone(req.Resource.Id.Tenancy) + req.Resource.Id.Tenancy.PeerName = "" }, - "no name": func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Name = "" - return artist - }, - "no data": func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Data = nil - return artist - }, - "wrong data type": func(artist, _ *pbresource.Resource) *pbresource.Resource { + "wrong data type": func(req *pbresource.WriteRequest) { var err error - artist.Data, err = anypb.New(&pbdemov2.Album{}) + req.Resource.Data, err = anypb.New(&pbdemov2.Album{}) require.NoError(t, err) - return artist - }, - "fail validation hook": func(artist, _ *pbresource.Resource) *pbresource.Resource { - buffer := &pbdemov2.Artist{} - require.NoError(t, artist.Data.UnmarshalTo(buffer)) - buffer.Name = "" // name cannot be empty - require.NoError(t, artist.Data.MarshalFrom(buffer)) - return artist }, - "partition scope with non-empty namespace": func(_, recordLabel *pbresource.Resource) *pbresource.Resource { - recordLabel.Id.Tenancy.Namespace = "bogus" - return recordLabel + "fail validation hook": func(req *pbresource.WriteRequest) { + artist := &pbdemov2.Artist{} + require.NoError(t, req.Resource.Data.UnmarshalTo(artist)) + artist.Name = "" // name cannot be empty + require.NoError(t, req.Resource.Data.MarshalFrom(artist)) }, - // TODO(spatel): add cluster scope tests when we have an actual cluster scoped resource (e.g. partition) } for desc, modFn := range testCases { t.Run(desc, func(t *testing.T) { - artist, err := demo.GenerateV2Artist() + res, err := demo.GenerateV2Artist() require.NoError(t, err) - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) + req := &pbresource.WriteRequest{Resource: res} + modFn(req) - req := &pbresource.WriteRequest{Resource: modFn(artist, recordLabel)} _, err = client.Write(testContext(t), req) require.Error(t, err) require.Equal(t, codes.InvalidArgument.String(), status.Code(err).String()) @@ -112,6 +99,28 @@ func TestWrite_OwnerValidation(t *testing.T) { modReqFn: func(req *pbresource.WriteRequest) { req.Resource.Owner.Name = "" }, errorContains: "resource.owner.name", }, + // clone necessary to not pollute DefaultTenancy + "owner tenancy partition not default": { + modReqFn: func(req *pbresource.WriteRequest) { + req.Resource.Owner.Tenancy = clone(req.Resource.Owner.Tenancy) + req.Resource.Owner.Tenancy.Partition = "" + }, + errorContains: "resource.owner.tenancy.partition", + }, + "owner tenancy namespace not default": { + modReqFn: func(req *pbresource.WriteRequest) { + req.Resource.Owner.Tenancy = clone(req.Resource.Owner.Tenancy) + req.Resource.Owner.Tenancy.Namespace = "" + }, + errorContains: "resource.owner.tenancy.namespace", + }, + "owner tenancy peername not local": { + modReqFn: func(req *pbresource.WriteRequest) { + req.Resource.Owner.Tenancy = clone(req.Resource.Owner.Tenancy) + req.Resource.Owner.Tenancy.PeerName = "" + }, + errorContains: "resource.owner.tenancy.peername", + }, } for desc, tc := range testCases { t.Run(desc, func(t *testing.T) { @@ -212,196 +221,20 @@ func TestWrite_Mutate(t *testing.T) { require.Equal(t, pbdemov2.Genre_GENRE_DISCO, artistData.Genre) } -func TestWrite_Create_Success(t *testing.T) { - testCases := map[string]struct { - modFn func(artist, recordLabel *pbresource.Resource) *pbresource.Resource - expectedTenancy *pbresource.Tenancy - }{ - "namespaced resource provides nonempty partition and namespace": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - return artist - }, - expectedTenancy: resource.DefaultNamespacedTenancy(), - }, - "namespaced resource provides uppercase partition and namespace": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Partition = strings.ToUpper(artist.Id.Tenancy.Partition) - artist.Id.Tenancy.Namespace = strings.ToUpper(artist.Id.Tenancy.Namespace) - return artist - }, - expectedTenancy: resource.DefaultNamespacedTenancy(), - }, - "namespaced resource inherits tokens partition when empty": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Partition = "" - return artist - }, - expectedTenancy: resource.DefaultNamespacedTenancy(), - }, - "namespaced resource inherits tokens namespace when empty": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Namespace = "" - return artist - }, - expectedTenancy: resource.DefaultNamespacedTenancy(), - }, - "namespaced resource inherits tokens partition and namespace when empty": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Partition = "" - artist.Id.Tenancy.Namespace = "" - return artist - }, - expectedTenancy: resource.DefaultNamespacedTenancy(), - }, - "partitioned resource provides nonempty partition": { - modFn: func(_, recordLabel *pbresource.Resource) *pbresource.Resource { - return recordLabel - }, - expectedTenancy: resource.DefaultPartitionedTenancy(), - }, - "partitioned resource provides uppercase partition": { - modFn: func(_, recordLabel *pbresource.Resource) *pbresource.Resource { - recordLabel.Id.Tenancy.Partition = strings.ToUpper(recordLabel.Id.Tenancy.Partition) - return recordLabel - }, - expectedTenancy: resource.DefaultPartitionedTenancy(), - }, - "partitioned resource inherits tokens partition when empty": { - modFn: func(_, recordLabel *pbresource.Resource) *pbresource.Resource { - recordLabel.Id.Tenancy.Partition = "" - return recordLabel - }, - expectedTenancy: resource.DefaultPartitionedTenancy(), - }, - // TODO(spatel): Add cluster scope tests when we have an actual cluster scoped resource (e.g. partition) - } - for desc, tc := range testCases { - t.Run(desc, func(t *testing.T) { - server := testServer(t) - client := testClient(t, server) - demo.RegisterTypes(server.Registry) - - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - - rsp, err := client.Write(testContext(t), &pbresource.WriteRequest{Resource: tc.modFn(artist, recordLabel)}) - require.NoError(t, err) - require.NotEmpty(t, rsp.Resource.Version, "resource should have version") - require.NotEmpty(t, rsp.Resource.Id.Uid, "resource id should have uid") - require.NotEmpty(t, rsp.Resource.Generation, "resource should have generation") - prototest.AssertDeepEqual(t, tc.expectedTenancy, rsp.Resource.Id.Tenancy) - }) - } -} - -func TestWrite_Create_Invalid_Tenancy(t *testing.T) { - testCases := map[string]struct { - modFn func(artist, recordLabel *pbresource.Resource) *pbresource.Resource - errCode codes.Code - errContains string - }{ - "namespaced resource provides nonexistant partition": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Partition = "boguspartition" - return artist - }, - errCode: codes.InvalidArgument, - errContains: "partition", - }, - "namespaced resource provides nonexistant namespace": { - modFn: func(artist, _ *pbresource.Resource) *pbresource.Resource { - artist.Id.Tenancy.Namespace = "bogusnamespace" - return artist - }, - errCode: codes.InvalidArgument, - errContains: "namespace", - }, - "partitioned resource provides nonexistant partition": { - modFn: func(_, recordLabel *pbresource.Resource) *pbresource.Resource { - recordLabel.Id.Tenancy.Partition = "boguspartition" - return recordLabel - }, - errCode: codes.InvalidArgument, - errContains: "partition", - }, - } - for desc, tc := range testCases { - t.Run(desc, func(t *testing.T) { - server := testServer(t) - client := testClient(t, server) - demo.RegisterTypes(server.Registry) - - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - - _, err = client.Write(testContext(t), &pbresource.WriteRequest{Resource: tc.modFn(artist, recordLabel)}) - require.Error(t, err) - require.Equal(t, codes.InvalidArgument.String(), status.Code(err).String()) - require.Contains(t, err.Error(), tc.errContains) - }) - } -} - -func TestWrite_Tenancy_MarkedForDeletion(t *testing.T) { - // Verify resource write fails when its partition or namespace is marked for deletion. - testCases := map[string]struct { - modFn func(artist, recordLabel *pbresource.Resource, mockTenancyBridge *MockTenancyBridge) *pbresource.Resource - errContains string - }{ - "namespaced resources partition marked for deletion": { - modFn: func(artist, _ *pbresource.Resource, mockTenancyBridge *MockTenancyBridge) *pbresource.Resource { - mockTenancyBridge.On("IsPartitionMarkedForDeletion", "part1").Return(true, nil) - return artist - }, - errContains: "partition marked for deletion", - }, - "namespaced resources namespace marked for deletion": { - modFn: func(artist, _ *pbresource.Resource, mockTenancyBridge *MockTenancyBridge) *pbresource.Resource { - mockTenancyBridge.On("IsPartitionMarkedForDeletion", "part1").Return(false, nil) - mockTenancyBridge.On("IsNamespaceMarkedForDeletion", "part1", "ns1").Return(true, nil) - return artist - }, - errContains: "namespace marked for deletion", - }, - "partitioned resources partition marked for deletion": { - modFn: func(_, recordLabel *pbresource.Resource, mockTenancyBridge *MockTenancyBridge) *pbresource.Resource { - mockTenancyBridge.On("IsPartitionMarkedForDeletion", "part1").Return(true, nil) - return recordLabel - }, - errContains: "partition marked for deletion", - }, - } - for desc, tc := range testCases { - t.Run(desc, func(t *testing.T) { - server := testServer(t) - client := testClient(t, server) - demo.RegisterTypes(server.Registry) - recordLabel, err := demo.GenerateV1RecordLabel("LoonyTunes") - require.NoError(t, err) - recordLabel.Id.Tenancy.Partition = "part1" +func TestWrite_ResourceCreation_Success(t *testing.T) { + server := testServer(t) + client := testClient(t, server) - artist, err := demo.GenerateV2Artist() - require.NoError(t, err) - artist.Id.Tenancy.Partition = "part1" - artist.Id.Tenancy.Namespace = "ns1" + demo.RegisterTypes(server.Registry) - mockTenancyBridge := &MockTenancyBridge{} - mockTenancyBridge.On("PartitionExists", "part1").Return(true, nil) - mockTenancyBridge.On("NamespaceExists", "part1", "ns1").Return(true, nil) - server.V1TenancyBridge = mockTenancyBridge + res, err := demo.GenerateV2Artist() + require.NoError(t, err) - _, err = client.Write(testContext(t), &pbresource.WriteRequest{Resource: tc.modFn(artist, recordLabel, mockTenancyBridge)}) - require.Error(t, err) - require.Equal(t, codes.InvalidArgument.String(), status.Code(err).String()) - require.Contains(t, err.Error(), tc.errContains) - }) - } + rsp, err := client.Write(testContext(t), &pbresource.WriteRequest{Resource: res}) + require.NoError(t, err) + require.NotEmpty(t, rsp.Resource.Version, "resource should have version") + require.NotEmpty(t, rsp.Resource.Id.Uid, "resource id should have uid") + require.NotEmpty(t, rsp.Resource.Generation, "resource should have generation") } func TestWrite_CASUpdate_Success(t *testing.T) { diff --git a/agent/grpc-external/services/serverdiscovery/server.go b/agent/grpc-external/services/serverdiscovery/server.go index 99011c6d076ff..477617122120c 100644 --- a/agent/grpc-external/services/serverdiscovery/server.go +++ b/agent/grpc-external/services/serverdiscovery/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package serverdiscovery diff --git a/agent/grpc-external/services/serverdiscovery/server_test.go b/agent/grpc-external/services/serverdiscovery/server_test.go index a9fd65b7cbdce..cac32bd31ee30 100644 --- a/agent/grpc-external/services/serverdiscovery/server_test.go +++ b/agent/grpc-external/services/serverdiscovery/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package serverdiscovery diff --git a/agent/grpc-external/services/serverdiscovery/watch_servers.go b/agent/grpc-external/services/serverdiscovery/watch_servers.go index 94ed7ac58aef6..31a2cb92c8370 100644 --- a/agent/grpc-external/services/serverdiscovery/watch_servers.go +++ b/agent/grpc-external/services/serverdiscovery/watch_servers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package serverdiscovery diff --git a/agent/grpc-external/services/serverdiscovery/watch_servers_test.go b/agent/grpc-external/services/serverdiscovery/watch_servers_test.go index 0df48f3bb35c4..d58d0be407c3f 100644 --- a/agent/grpc-external/services/serverdiscovery/watch_servers_test.go +++ b/agent/grpc-external/services/serverdiscovery/watch_servers_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package serverdiscovery diff --git a/agent/grpc-external/stats_test.go b/agent/grpc-external/stats_test.go index 798c900148ba0..eed834064e085 100644 --- a/agent/grpc-external/stats_test.go +++ b/agent/grpc-external/stats_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-external/testutils/acl.go b/agent/grpc-external/testutils/acl.go index caa5c7ae81f5e..440a837682817 100644 --- a/agent/grpc-external/testutils/acl.go +++ b/agent/grpc-external/testutils/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testutils diff --git a/agent/grpc-external/testutils/fsm.go b/agent/grpc-external/testutils/fsm.go index fdec1b109ed36..0e7b645a65ec5 100644 --- a/agent/grpc-external/testutils/fsm.go +++ b/agent/grpc-external/testutils/fsm.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testutils diff --git a/agent/grpc-external/testutils/server.go b/agent/grpc-external/testutils/server.go index 13cbb985e564e..eecb10bb954f3 100644 --- a/agent/grpc-external/testutils/server.go +++ b/agent/grpc-external/testutils/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testutils diff --git a/agent/grpc-external/utils.go b/agent/grpc-external/utils.go index 13c84c75c1ce4..b3a3d3d20264a 100644 --- a/agent/grpc-external/utils.go +++ b/agent/grpc-external/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package external diff --git a/agent/grpc-internal/balancer/balancer.go b/agent/grpc-internal/balancer/balancer.go index 884c2a1dec3dc..4941a80873188 100644 --- a/agent/grpc-internal/balancer/balancer.go +++ b/agent/grpc-internal/balancer/balancer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // package balancer implements a custom gRPC load balancer. // diff --git a/agent/grpc-internal/balancer/balancer_test.go b/agent/grpc-internal/balancer/balancer_test.go index f0c6db9f53296..35912aab269a1 100644 --- a/agent/grpc-internal/balancer/balancer_test.go +++ b/agent/grpc-internal/balancer/balancer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package balancer diff --git a/agent/grpc-internal/balancer/registry.go b/agent/grpc-internal/balancer/registry.go index 53b2e6555ac30..f11ea6c8cebeb 100644 --- a/agent/grpc-internal/balancer/registry.go +++ b/agent/grpc-internal/balancer/registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package balancer diff --git a/agent/grpc-internal/client.go b/agent/grpc-internal/client.go index 1d49bc23cdd31..98a6f1fd81c5d 100644 --- a/agent/grpc-internal/client.go +++ b/agent/grpc-internal/client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/client_test.go b/agent/grpc-internal/client_test.go index 134a62aa4aae3..a3b99e78ad1b7 100644 --- a/agent/grpc-internal/client_test.go +++ b/agent/grpc-internal/client_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/handler.go b/agent/grpc-internal/handler.go index b0eeaa8a4f0c2..3278d744436f9 100644 --- a/agent/grpc-internal/handler.go +++ b/agent/grpc-internal/handler.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/handler_test.go b/agent/grpc-internal/handler_test.go index 2027c055866de..80c026113d1f5 100644 --- a/agent/grpc-internal/handler_test.go +++ b/agent/grpc-internal/handler_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/listener.go b/agent/grpc-internal/listener.go index a1c226613778c..bcbf121c733e8 100644 --- a/agent/grpc-internal/listener.go +++ b/agent/grpc-internal/listener.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/pipe.go b/agent/grpc-internal/pipe.go index 555f6d2162aa3..188defd085ed9 100644 --- a/agent/grpc-internal/pipe.go +++ b/agent/grpc-internal/pipe.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/pipe_test.go b/agent/grpc-internal/pipe_test.go index f51d1581292b2..e6ce286d1f867 100644 --- a/agent/grpc-internal/pipe_test.go +++ b/agent/grpc-internal/pipe_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/resolver/registry.go b/agent/grpc-internal/resolver/registry.go index aab369c501314..5151cfd46ce0f 100644 --- a/agent/grpc-internal/resolver/registry.go +++ b/agent/grpc-internal/resolver/registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resolver diff --git a/agent/grpc-internal/resolver/resolver.go b/agent/grpc-internal/resolver/resolver.go index 8d1436bf7aff2..d04f1e657e61f 100644 --- a/agent/grpc-internal/resolver/resolver.go +++ b/agent/grpc-internal/resolver/resolver.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resolver diff --git a/agent/grpc-internal/resolver/resolver_test.go b/agent/grpc-internal/resolver/resolver_test.go index 0914eba147bae..2bd3f24f9936b 100644 --- a/agent/grpc-internal/resolver/resolver_test.go +++ b/agent/grpc-internal/resolver/resolver_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resolver import ( diff --git a/agent/grpc-internal/server_test.go b/agent/grpc-internal/server_test.go index 12f420979b6ee..83774c712fc6a 100644 --- a/agent/grpc-internal/server_test.go +++ b/agent/grpc-internal/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/services/subscribe/logger.go b/agent/grpc-internal/services/subscribe/logger.go index 11c18f6adfa48..faaa63ff84270 100644 --- a/agent/grpc-internal/services/subscribe/logger.go +++ b/agent/grpc-internal/services/subscribe/logger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package subscribe diff --git a/agent/grpc-internal/services/subscribe/subscribe.go b/agent/grpc-internal/services/subscribe/subscribe.go index a728b0164c977..08c501b6dd032 100644 --- a/agent/grpc-internal/services/subscribe/subscribe.go +++ b/agent/grpc-internal/services/subscribe/subscribe.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package subscribe diff --git a/agent/grpc-internal/services/subscribe/subscribe_test.go b/agent/grpc-internal/services/subscribe/subscribe_test.go index 910862d4cfbd4..54a267f7c40d1 100644 --- a/agent/grpc-internal/services/subscribe/subscribe_test.go +++ b/agent/grpc-internal/services/subscribe/subscribe_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package subscribe diff --git a/agent/grpc-internal/stats_test.go b/agent/grpc-internal/stats_test.go index d14c4c46bc451..5da26f512ccbe 100644 --- a/agent/grpc-internal/stats_test.go +++ b/agent/grpc-internal/stats_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-internal/tracker.go b/agent/grpc-internal/tracker.go index 251fe48f95399..a313f88e53501 100644 --- a/agent/grpc-internal/tracker.go +++ b/agent/grpc-internal/tracker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package internal diff --git a/agent/grpc-middleware/auth_interceptor.go b/agent/grpc-middleware/auth_interceptor.go index af85e5c6f94c2..0472b71f00ece 100644 --- a/agent/grpc-middleware/auth_interceptor.go +++ b/agent/grpc-middleware/auth_interceptor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/auth_interceptor_test.go b/agent/grpc-middleware/auth_interceptor_test.go index 0c447499bcb2f..18f9334cc9b80 100644 --- a/agent/grpc-middleware/auth_interceptor_test.go +++ b/agent/grpc-middleware/auth_interceptor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/handshake.go b/agent/grpc-middleware/handshake.go index 893421e0e7f1b..82b352bb5ac30 100644 --- a/agent/grpc-middleware/handshake.go +++ b/agent/grpc-middleware/handshake.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/handshake_test.go b/agent/grpc-middleware/handshake_test.go index 178451a31464c..f987a6689af22 100644 --- a/agent/grpc-middleware/handshake_test.go +++ b/agent/grpc-middleware/handshake_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/rate.go b/agent/grpc-middleware/rate.go index bdb63cd244a97..6f84fd36c16e6 100644 --- a/agent/grpc-middleware/rate.go +++ b/agent/grpc-middleware/rate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/rate_test.go b/agent/grpc-middleware/rate_test.go index 16c84734a9edd..0a71d232465cf 100644 --- a/agent/grpc-middleware/rate_test.go +++ b/agent/grpc-middleware/rate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/recovery.go b/agent/grpc-middleware/recovery.go index 04b918ee9b3a2..cf1cbabe4e085 100644 --- a/agent/grpc-middleware/recovery.go +++ b/agent/grpc-middleware/recovery.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/stats.go b/agent/grpc-middleware/stats.go index a6bf1d2c59bec..564d14a844b95 100644 --- a/agent/grpc-middleware/stats.go +++ b/agent/grpc-middleware/stats.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/grpc-middleware/testutil/fake_sink.go b/agent/grpc-middleware/testutil/fake_sink.go index be7623c774a2c..c121481ee24fb 100644 --- a/agent/grpc-middleware/testutil/fake_sink.go +++ b/agent/grpc-middleware/testutil/fake_sink.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testutil diff --git a/agent/grpc-middleware/testutil/testservice/buf.gen.yaml b/agent/grpc-middleware/testutil/testservice/buf.gen.yaml index 8d8a6c7dbfc09..b8ba317a333a9 100644 --- a/agent/grpc-middleware/testutil/testservice/buf.gen.yaml +++ b/agent/grpc-middleware/testutil/testservice/buf.gen.yaml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 version: v1 managed: diff --git a/agent/grpc-middleware/testutil/testservice/fake_service.go b/agent/grpc-middleware/testutil/testservice/fake_service.go index ca21d286f0b35..4428e173740bb 100644 --- a/agent/grpc-middleware/testutil/testservice/fake_service.go +++ b/agent/grpc-middleware/testutil/testservice/fake_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testservice diff --git a/agent/grpc-middleware/testutil/testservice/simple.pb.go b/agent/grpc-middleware/testutil/testservice/simple.pb.go index b4f664bf1ca73..18022b3dad3d1 100644 --- a/agent/grpc-middleware/testutil/testservice/simple.pb.go +++ b/agent/grpc-middleware/testutil/testservice/simple.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/agent/grpc-middleware/testutil/testservice/simple.proto b/agent/grpc-middleware/testutil/testservice/simple.proto index d005a45aa1138..c8ce3d58118d3 100644 --- a/agent/grpc-middleware/testutil/testservice/simple.proto +++ b/agent/grpc-middleware/testutil/testservice/simple.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/agent/hcp/bootstrap/bootstrap.go b/agent/hcp/bootstrap/bootstrap.go index 8e544bdec3128..191859ea002b4 100644 --- a/agent/hcp/bootstrap/bootstrap.go +++ b/agent/hcp/bootstrap/bootstrap.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package bootstrap handles bootstrapping an agent's config from HCP. It must be a // separate package from other HCP components because it has a dependency on diff --git a/agent/hcp/bootstrap/bootstrap_test.go b/agent/hcp/bootstrap/bootstrap_test.go index b475223ff8cf3..74b57e5f50abd 100644 --- a/agent/hcp/bootstrap/bootstrap_test.go +++ b/agent/hcp/bootstrap/bootstrap_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package bootstrap import ( diff --git a/agent/hcp/bootstrap/testing.go b/agent/hcp/bootstrap/testing.go index f073d17183444..a10a5d2bc8add 100644 --- a/agent/hcp/bootstrap/testing.go +++ b/agent/hcp/bootstrap/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bootstrap diff --git a/agent/hcp/client/client.go b/agent/hcp/client/client.go index c0526c0e4acf0..f04767e983c7b 100644 --- a/agent/hcp/client/client.go +++ b/agent/hcp/client/client.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package client diff --git a/agent/hcp/client/client_test.go b/agent/hcp/client/client_test.go index 5571630ad45a3..d4bae2ae4cb52 100644 --- a/agent/hcp/client/client_test.go +++ b/agent/hcp/client/client_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/client/metrics_client.go b/agent/hcp/client/metrics_client.go index b3c1c6a6b3dc8..3c5b5c4fb9d69 100644 --- a/agent/hcp/client/metrics_client.go +++ b/agent/hcp/client/metrics_client.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/client/metrics_client_test.go b/agent/hcp/client/metrics_client_test.go index 20a5f010ec4cd..4119e326e9dc0 100644 --- a/agent/hcp/client/metrics_client_test.go +++ b/agent/hcp/client/metrics_client_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/client/mock_CloudConfig.go b/agent/hcp/client/mock_CloudConfig.go index 574f83e55fd59..5f2ef50046d70 100644 --- a/agent/hcp/client/mock_CloudConfig.go +++ b/agent/hcp/client/mock_CloudConfig.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/client/telemetry_config.go b/agent/hcp/client/telemetry_config.go index 4c5b27c58b4f4..55c2264380306 100644 --- a/agent/hcp/client/telemetry_config.go +++ b/agent/hcp/client/telemetry_config.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/client/telemetry_config_test.go b/agent/hcp/client/telemetry_config_test.go index 1e6e2cb23a29d..42d3ee649802a 100644 --- a/agent/hcp/client/telemetry_config_test.go +++ b/agent/hcp/client/telemetry_config_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package client import ( diff --git a/agent/hcp/config/config.go b/agent/hcp/config/config.go index 59977ef46f37d..319c39e40e94c 100644 --- a/agent/hcp/config/config.go +++ b/agent/hcp/config/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/agent/hcp/deps.go b/agent/hcp/deps.go index 503792d84c0ab..0d52c7b54ea5a 100644 --- a/agent/hcp/deps.go +++ b/agent/hcp/deps.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcp diff --git a/agent/hcp/deps_test.go b/agent/hcp/deps_test.go index 101fe076cb697..8bab66bac3f3c 100644 --- a/agent/hcp/deps_test.go +++ b/agent/hcp/deps_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hcp import ( diff --git a/agent/hcp/discover/discover.go b/agent/hcp/discover/discover.go index 981400c38b478..12024b7dd6a0b 100644 --- a/agent/hcp/discover/discover.go +++ b/agent/hcp/discover/discover.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package discover diff --git a/agent/hcp/manager.go b/agent/hcp/manager.go index a3664b0608dfe..0dc9db95da295 100644 --- a/agent/hcp/manager.go +++ b/agent/hcp/manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcp diff --git a/agent/hcp/manager_test.go b/agent/hcp/manager_test.go index 8432e63ed5288..48ace166618bf 100644 --- a/agent/hcp/manager_test.go +++ b/agent/hcp/manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcp diff --git a/agent/hcp/scada/capabilities.go b/agent/hcp/scada/capabilities.go index bbb6ea6266dc3..c18192ae6e94a 100644 --- a/agent/hcp/scada/capabilities.go +++ b/agent/hcp/scada/capabilities.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package scada diff --git a/agent/hcp/scada/scada.go b/agent/hcp/scada/scada.go index 151e1b6862efa..5aba819bda499 100644 --- a/agent/hcp/scada/scada.go +++ b/agent/hcp/scada/scada.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package scada diff --git a/agent/hcp/telemetry/custom_metrics.go b/agent/hcp/telemetry/custom_metrics.go index 39df765b9204b..d691dccde2078 100644 --- a/agent/hcp/telemetry/custom_metrics.go +++ b/agent/hcp/telemetry/custom_metrics.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry // Keys for custom Go Metrics metrics emitted only for the OTEL diff --git a/agent/hcp/telemetry/doc.go b/agent/hcp/telemetry/doc.go index d982a37c0f3e5..4ef18f39bd309 100644 --- a/agent/hcp/telemetry/doc.go +++ b/agent/hcp/telemetry/doc.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - // Package telemetry implements functionality to collect, aggregate, convert and export // telemetry data in OpenTelemetry Protocol (OTLP) format. // diff --git a/agent/hcp/telemetry/gauge_store.go b/agent/hcp/telemetry/gauge_store.go index bb7030dae852b..76dfb78066683 100644 --- a/agent/hcp/telemetry/gauge_store.go +++ b/agent/hcp/telemetry/gauge_store.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/gauge_store_test.go b/agent/hcp/telemetry/gauge_store_test.go index 4ccac624dbd99..1171ee379c325 100644 --- a/agent/hcp/telemetry/gauge_store_test.go +++ b/agent/hcp/telemetry/gauge_store_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otel_exporter.go b/agent/hcp/telemetry/otel_exporter.go index 23852f3539cf1..084657816e0cf 100644 --- a/agent/hcp/telemetry/otel_exporter.go +++ b/agent/hcp/telemetry/otel_exporter.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otel_exporter_test.go b/agent/hcp/telemetry/otel_exporter_test.go index 09d848d3bee33..53b7bd3160947 100644 --- a/agent/hcp/telemetry/otel_exporter_test.go +++ b/agent/hcp/telemetry/otel_exporter_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otel_sink.go b/agent/hcp/telemetry/otel_sink.go index a25c549e23a46..49a6d595076c0 100644 --- a/agent/hcp/telemetry/otel_sink.go +++ b/agent/hcp/telemetry/otel_sink.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otel_sink_test.go b/agent/hcp/telemetry/otel_sink_test.go index 13c310b34ca03..509dde299d627 100644 --- a/agent/hcp/telemetry/otel_sink_test.go +++ b/agent/hcp/telemetry/otel_sink_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otlp_transform.go b/agent/hcp/telemetry/otlp_transform.go index a244f0f1a5f61..76e20552a0d4e 100644 --- a/agent/hcp/telemetry/otlp_transform.go +++ b/agent/hcp/telemetry/otlp_transform.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry/otlp_transform_test.go b/agent/hcp/telemetry/otlp_transform_test.go index 04ff40382ddab..8f6beb7d489db 100644 --- a/agent/hcp/telemetry/otlp_transform_test.go +++ b/agent/hcp/telemetry/otlp_transform_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package telemetry import ( diff --git a/agent/hcp/telemetry_provider.go b/agent/hcp/telemetry_provider.go index 870d3b3685a44..eb0f23e804f3c 100644 --- a/agent/hcp/telemetry_provider.go +++ b/agent/hcp/telemetry_provider.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hcp import ( diff --git a/agent/hcp/telemetry_provider_test.go b/agent/hcp/telemetry_provider_test.go index 0c20a5742e426..684593b4f38b0 100644 --- a/agent/hcp/telemetry_provider_test.go +++ b/agent/hcp/telemetry_provider_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hcp import ( diff --git a/agent/hcp/testing.go b/agent/hcp/testing.go index 30f7ba7bcdeb3..94f3122c33d2d 100644 --- a/agent/hcp/testing.go +++ b/agent/hcp/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package hcp diff --git a/agent/hcp/testserver/main.go b/agent/hcp/testserver/main.go index e0db7670ef99f..ffdd4cac51afa 100644 --- a/agent/hcp/testserver/main.go +++ b/agent/hcp/testserver/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/agent/health_endpoint.go b/agent/health_endpoint.go index 3b888988d2730..ea3d315f6b8b5 100644 --- a/agent/health_endpoint.go +++ b/agent/health_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/health_endpoint_test.go b/agent/health_endpoint_test.go index 021a269b8a093..3a589be0d78bd 100644 --- a/agent/health_endpoint_test.go +++ b/agent/health_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/http.go b/agent/http.go index 982e784c76b7c..32010c343a6c5 100644 --- a/agent/http.go +++ b/agent/http.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -36,7 +36,6 @@ import ( "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/uiserver" "github.com/hashicorp/consul/api" - resourcehttp "github.com/hashicorp/consul/internal/resource/http" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/logging" "github.com/hashicorp/consul/proto/private/pbcommon" @@ -260,17 +259,6 @@ func (s *HTTPHandlers) handler() http.Handler { handlePProf("/debug/pprof/symbol", pprof.Symbol) handlePProf("/debug/pprof/trace", pprof.Trace) - mux.Handle("/api/", - http.StripPrefix("/api", - resourcehttp.NewHandler( - s.agent.delegate.ResourceServiceClient(), - s.agent.baseDeps.Registry, - s.parseToken, - s.agent.logger.Named(logging.HTTP), - ), - ), - ) - if s.IsUIEnabled() { // Note that we _don't_ support reloading ui_config.{enabled, content_dir, // content_path} since this only runs at initial startup. @@ -616,9 +604,7 @@ func (s *HTTPHandlers) marshalJSON(req *http.Request, obj interface{}) ([]byte, if err != nil { return nil, err } - if ok { - buf = append(buf, "\n"...) - } + buf = append(buf, "\n"...) return buf, nil } diff --git a/agent/http_ce.go b/agent/http_ce.go index 09a03c706246e..d9c233226c491 100644 --- a/agent/http_ce.go +++ b/agent/http_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/http_ce_test.go b/agent/http_ce_test.go index ea1d2af61d7a4..bf085ca8c29c7 100644 --- a/agent/http_ce_test.go +++ b/agent/http_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/http_decode_test.go b/agent/http_decode_test.go index 6aece784c0b2d..03d1b9191fa74 100644 --- a/agent/http_decode_test.go +++ b/agent/http_decode_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/http_register.go b/agent/http_register.go index bc2551ec000d0..b3f0dfea3f3a6 100644 --- a/agent/http_register.go +++ b/agent/http_register.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/http_test.go b/agent/http_test.go index 83510d9c06e08..99100c5fbc8e8 100644 --- a/agent/http_test.go +++ b/agent/http_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/intentions_endpoint.go b/agent/intentions_endpoint.go index 4f0b188a0cc43..2353c5bdac2ee 100644 --- a/agent/intentions_endpoint.go +++ b/agent/intentions_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/intentions_endpoint_ce_test.go b/agent/intentions_endpoint_ce_test.go index 6b5314de099fa..fb6a47f5e53d4 100644 --- a/agent/intentions_endpoint_ce_test.go +++ b/agent/intentions_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/intentions_endpoint_test.go b/agent/intentions_endpoint_test.go index b1309feb9d2cd..161b8b5139d54 100644 --- a/agent/intentions_endpoint_test.go +++ b/agent/intentions_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/keyring.go b/agent/keyring.go index f30680774b340..3d96880f03aaa 100644 --- a/agent/keyring.go +++ b/agent/keyring.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/keyring_test.go b/agent/keyring_test.go index 1a9332a8a7393..7ce5d2cd4b93b 100644 --- a/agent/keyring_test.go +++ b/agent/keyring_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/kvs_endpoint.go b/agent/kvs_endpoint.go index e60567cd5b807..d5ad8cabc3de8 100644 --- a/agent/kvs_endpoint.go +++ b/agent/kvs_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/kvs_endpoint_test.go b/agent/kvs_endpoint_test.go index 2b3563000815b..6ea5efced20d2 100644 --- a/agent/kvs_endpoint_test.go +++ b/agent/kvs_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/leafcert/cached_roots.go b/agent/leafcert/cached_roots.go index aaf768a2fb8e0..b973b6dc660ca 100644 --- a/agent/leafcert/cached_roots.go +++ b/agent/leafcert/cached_roots.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/cert.go b/agent/leafcert/cert.go index b6236a4a14ac1..0230685737756 100644 --- a/agent/leafcert/cert.go +++ b/agent/leafcert/cert.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/generate.go b/agent/leafcert/generate.go index 9551e760b1fc2..0e397cdc2d52f 100644 --- a/agent/leafcert/generate.go +++ b/agent/leafcert/generate.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/leafcert.go b/agent/leafcert/leafcert.go index 5b1cd6b9be3bd..9cd0c08db13d0 100644 --- a/agent/leafcert/leafcert.go +++ b/agent/leafcert/leafcert.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/leafcert_test.go b/agent/leafcert/leafcert_test.go index 0b523523e4736..0db683a816e1a 100644 --- a/agent/leafcert/leafcert_test.go +++ b/agent/leafcert/leafcert_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/roots.go b/agent/leafcert/roots.go index 161b0d0a041c2..7f95e0578dccb 100644 --- a/agent/leafcert/roots.go +++ b/agent/leafcert/roots.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/signer_netrpc.go b/agent/leafcert/signer_netrpc.go index 0e1a7a7487f88..2d6b490a9ea8c 100644 --- a/agent/leafcert/signer_netrpc.go +++ b/agent/leafcert/signer_netrpc.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/signer_test.go b/agent/leafcert/signer_test.go index ad385f8c72a1c..21e3388f5a1c4 100644 --- a/agent/leafcert/signer_test.go +++ b/agent/leafcert/signer_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/structs.go b/agent/leafcert/structs.go index 7ad11a0869a52..531d35c897e68 100644 --- a/agent/leafcert/structs.go +++ b/agent/leafcert/structs.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/structs_test.go b/agent/leafcert/structs_test.go index 6a8e034700313..bb131f10ed7c6 100644 --- a/agent/leafcert/structs_test.go +++ b/agent/leafcert/structs_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/util.go b/agent/leafcert/util.go index 795aa62ac11c8..a7453df37b4f9 100644 --- a/agent/leafcert/util.go +++ b/agent/leafcert/util.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/util_test.go b/agent/leafcert/util_test.go index 0716a9af88f24..be89ad5936c19 100644 --- a/agent/leafcert/util_test.go +++ b/agent/leafcert/util_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/leafcert/watch.go b/agent/leafcert/watch.go index fe745f916d14b..62a7260c42875 100644 --- a/agent/leafcert/watch.go +++ b/agent/leafcert/watch.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package leafcert import ( diff --git a/agent/local/state.go b/agent/local/state.go index 67e72aece0b4d..6cd5b0c82a584 100644 --- a/agent/local/state.go +++ b/agent/local/state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/local/state_internal_test.go b/agent/local/state_internal_test.go index 61fc2c0273a80..ba68e20f287a6 100644 --- a/agent/local/state_internal_test.go +++ b/agent/local/state_internal_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/local/state_test.go b/agent/local/state_test.go index ced73201e72bd..4751352ec1c8f 100644 --- a/agent/local/state_test.go +++ b/agent/local/state_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local_test diff --git a/agent/local/testing.go b/agent/local/testing.go index 5e9ae15ac3763..5303cb6b0c4ac 100644 --- a/agent/local/testing.go +++ b/agent/local/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/log-drop/log-drop.go b/agent/log-drop/log-drop.go index ea08f88d890b0..54bc09c5a8c3b 100644 --- a/agent/log-drop/log-drop.go +++ b/agent/log-drop/log-drop.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logdrop diff --git a/agent/log-drop/log-drop_test.go b/agent/log-drop/log-drop_test.go index c050a734be4a8..fdb61a059e525 100644 --- a/agent/log-drop/log-drop_test.go +++ b/agent/log-drop/log-drop_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logdrop diff --git a/agent/metadata/build.go b/agent/metadata/build.go index 76a432d9a380b..b50fa96acc7af 100644 --- a/agent/metadata/build.go +++ b/agent/metadata/build.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metadata diff --git a/agent/metadata/build_test.go b/agent/metadata/build_test.go index 888b9b0210c4b..4688db2e1850f 100644 --- a/agent/metadata/build_test.go +++ b/agent/metadata/build_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metadata diff --git a/agent/metadata/server.go b/agent/metadata/server.go index 2e626787bdff7..64c9936909892 100644 --- a/agent/metadata/server.go +++ b/agent/metadata/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metadata diff --git a/agent/metadata/server_internal_test.go b/agent/metadata/server_internal_test.go index bb0561ab2d193..5f3d47724ee91 100644 --- a/agent/metadata/server_internal_test.go +++ b/agent/metadata/server_internal_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metadata diff --git a/agent/metadata/server_test.go b/agent/metadata/server_test.go index 78b16f2599b2f..8ee63fa3b413f 100644 --- a/agent/metadata/server_test.go +++ b/agent/metadata/server_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metadata_test diff --git a/agent/metrics.go b/agent/metrics.go index 58f9e3c829e10..d9294eb25cb95 100644 --- a/agent/metrics.go +++ b/agent/metrics.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/metrics/testing.go b/agent/metrics/testing.go index 3663d6834c16d..0fc3455ab5e70 100644 --- a/agent/metrics/testing.go +++ b/agent/metrics/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package metrics diff --git a/agent/metrics_test.go b/agent/metrics_test.go index 41013b3c7069a..76da0e55f292f 100644 --- a/agent/metrics_test.go +++ b/agent/metrics_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/mock/notify.go b/agent/mock/notify.go index 00dc9a3864a7b..1aa700b31d2d3 100644 --- a/agent/mock/notify.go +++ b/agent/mock/notify.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package mock diff --git a/agent/nodeid.go b/agent/nodeid.go index c2192fac9123c..1e5823aef7c6c 100644 --- a/agent/nodeid.go +++ b/agent/nodeid.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/nodeid_test.go b/agent/nodeid_test.go index 73ce601249db3..d48889bf6d8df 100644 --- a/agent/nodeid_test.go +++ b/agent/nodeid_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/notify.go b/agent/notify.go index 80a150b19413a..eec501f098ada 100644 --- a/agent/notify.go +++ b/agent/notify.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/notify_test.go b/agent/notify_test.go index f256ee319ce7d..fe08800ae2ec8 100644 --- a/agent/notify_test.go +++ b/agent/notify_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/operator_endpoint.go b/agent/operator_endpoint.go index f669c13bd5caa..099f3dcfe4b08 100644 --- a/agent/operator_endpoint.go +++ b/agent/operator_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/operator_endpoint_ce.go b/agent/operator_endpoint_ce.go index d97e6422616fe..cf2ba2a2027d9 100644 --- a/agent/operator_endpoint_ce.go +++ b/agent/operator_endpoint_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/operator_endpoint_ce_test.go b/agent/operator_endpoint_ce_test.go index 0086a56065ca3..f4de46f9050c9 100644 --- a/agent/operator_endpoint_ce_test.go +++ b/agent/operator_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/operator_endpoint_test.go b/agent/operator_endpoint_test.go index ffe5c1a53abe6..4d90dbb2249ef 100644 --- a/agent/operator_endpoint_test.go +++ b/agent/operator_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/peering_endpoint.go b/agent/peering_endpoint.go index 2d5cab92be2e7..a1fbd009acc60 100644 --- a/agent/peering_endpoint.go +++ b/agent/peering_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/peering_endpoint_ce_test.go b/agent/peering_endpoint_ce_test.go index f435ca3310522..b0395ea968398 100644 --- a/agent/peering_endpoint_ce_test.go +++ b/agent/peering_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/peering_endpoint_test.go b/agent/peering_endpoint_test.go index ba3b704b8b5ad..7ec63c1cd73eb 100644 --- a/agent/peering_endpoint_test.go +++ b/agent/peering_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/pool/conn.go b/agent/pool/conn.go index 24d4c2cba4dc9..45a2c09486177 100644 --- a/agent/pool/conn.go +++ b/agent/pool/conn.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pool diff --git a/agent/pool/peek.go b/agent/pool/peek.go index b631134341d9a..d6557bb23db8c 100644 --- a/agent/pool/peek.go +++ b/agent/pool/peek.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pool diff --git a/agent/pool/peek_test.go b/agent/pool/peek_test.go index 29fbe9d4ab72e..cb53c421f9c2e 100644 --- a/agent/pool/peek_test.go +++ b/agent/pool/peek_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pool diff --git a/agent/pool/pool.go b/agent/pool/pool.go index 899cefe2e9740..cadb0e4af4ec6 100644 --- a/agent/pool/pool.go +++ b/agent/pool/pool.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pool diff --git a/agent/prepared_query_endpoint.go b/agent/prepared_query_endpoint.go index 15ab1005e48b5..8d5f9fdc5313f 100644 --- a/agent/prepared_query_endpoint.go +++ b/agent/prepared_query_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/prepared_query_endpoint_test.go b/agent/prepared_query_endpoint_test.go index 07e4b8e68c70e..f96c43ad8b904 100644 --- a/agent/prepared_query_endpoint_test.go +++ b/agent/prepared_query_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/proxy-tracker/mock_Logger.go b/agent/proxy-tracker/mock_Logger.go deleted file mode 100644 index b4d28b096e86b..0000000000000 --- a/agent/proxy-tracker/mock_Logger.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. - -package proxytracker - -import mock "github.com/stretchr/testify/mock" - -// MockLogger is an autogenerated mock type for the Logger type -type MockLogger struct { - mock.Mock -} - -// Error provides a mock function with given fields: args -func (_m *MockLogger) Error(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// NewMockLogger creates a new instance of MockLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockLogger(t interface { - mock.TestingT - Cleanup(func()) -}) *MockLogger { - mock := &MockLogger{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/proxy-tracker/mock_SessionLimiter.go b/agent/proxy-tracker/mock_SessionLimiter.go deleted file mode 100644 index 4a2c5f324a1bc..0000000000000 --- a/agent/proxy-tracker/mock_SessionLimiter.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. - -package proxytracker - -import ( - limiter "github.com/hashicorp/consul/agent/grpc-external/limiter" - mock "github.com/stretchr/testify/mock" -) - -// MockSessionLimiter is an autogenerated mock type for the SessionLimiter type -type MockSessionLimiter struct { - mock.Mock -} - -// BeginSession provides a mock function with given fields: -func (_m *MockSessionLimiter) BeginSession() (limiter.Session, error) { - ret := _m.Called() - - var r0 limiter.Session - var r1 error - if rf, ok := ret.Get(0).(func() (limiter.Session, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() limiter.Session); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(limiter.Session) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMockSessionLimiter creates a new instance of MockSessionLimiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSessionLimiter(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSessionLimiter { - mock := &MockSessionLimiter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/proxy-tracker/proxy_tracker.go b/agent/proxy-tracker/proxy_tracker.go deleted file mode 100644 index 00c0cf23f9906..0000000000000 --- a/agent/proxy-tracker/proxy_tracker.go +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxytracker - -import ( - "errors" - "fmt" - "sync" - - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh" - "github.com/hashicorp/consul/internal/resource" - - "github.com/hashicorp/consul/agent/grpc-external/limiter" - "github.com/hashicorp/consul/agent/proxycfg" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// Proxy implements the queue.ItemType interface so that it can be used in a controller.Event. -// It is sent on the newProxyConnectionCh channel. -// TODO(ProxyState): needs to support tenancy in the future. -// Key() is current resourceID.Name. -type ProxyConnection struct { - ProxyID *pbresource.ID -} - -func (e *ProxyConnection) Key() string { - return e.ProxyID.GetName() -} - -// proxyWatchData is a handle on all of the relevant bits that is created by calling Watch(). -// It is meant to be stored in the proxies cache by proxyID so that watches can be notified -// when the ProxyState for that proxyID has changed. -type proxyWatchData struct { - // notifyCh is the channel that the watcher receives updates from ProxyTracker. - notifyCh chan *pbmesh.ProxyState - // state is the current/last updated ProxyState for a given proxy. - state *pbmesh.ProxyState - // token is the ACL token provided by the watcher. - token string - // nodeName is the node where the given proxy resides. - nodeName string -} - -type ProxyTrackerConfig struct { - // logger will be used to write log messages. - Logger Logger - - // sessionLimiter is used to enforce xDS concurrency limits. - SessionLimiter SessionLimiter -} - -// ProxyTracker implements the Watcher and Updater interfaces. The Watcher is used by the xds server to add a new proxy -// to this server, and get back a channel for updates. The Updater is used by the ProxyState controller running on the -// server to push ProxyState updates to the notify channel. -type ProxyTracker struct { - config ProxyTrackerConfig - // proxies is a cache of the proxies connected to this server and configuration information for each one. - proxies map[resource.ReferenceKey]*proxyWatchData - // newProxyConnectionCh is the channel that the "updater" retains to receive messages from ProxyTracker that a new - // proxy has connected to ProxyTracker and a signal the "updater" should call PushChanges with a new state. - newProxyConnectionCh chan controller.Event - // shutdownCh is a channel that closes when ProxyTracker is shutdown. ShutdownChannel is never written to, only closed to - // indicate a shutdown has been initiated. - shutdownCh chan struct{} - // mu is a mutex that is used internally for locking when reading and modifying ProxyTracker state, namely the proxies map. - mu sync.Mutex -} - -// NewProxyTracker returns a ProxyTracker instance given a configuration. -func NewProxyTracker(cfg ProxyTrackerConfig) *ProxyTracker { - return &ProxyTracker{ - config: cfg, - proxies: make(map[resource.ReferenceKey]*proxyWatchData), - // buffering this channel since ProxyTracker will be registering watches for all proxies. - // using the buffer will limit errors related to controller and the proxy are both running - // but the controllers listening function is not blocking on the particular receive line. - // This channel is meant to error when the controller is "not ready" which means up and alive. - // This buffer will try to reduce false negatives and limit unnecessary erroring. - newProxyConnectionCh: make(chan controller.Event, 1000), - shutdownCh: make(chan struct{}), - } -} - -// Watch connects a proxy with ProxyTracker and returns the consumer a channel to receive updates, -// a channel to notify of xDS terminated session, and a cancel function to cancel the watch. -func (pt *ProxyTracker) Watch(proxyID *pbresource.ID, - nodeName string, token string) (<-chan *pbmesh.ProxyState, - limiter.SessionTerminatedChan, proxycfg.CancelFunc, error) { - - if err := validateArgs(proxyID, nodeName, token); err != nil { - pt.config.Logger.Error("args failed validation", err) - return nil, nil, nil, err - } - // Begin a session with the xDS session concurrency limiter. - // - // See: https://github.com/hashicorp/consul/issues/15753 - session, err := pt.config.SessionLimiter.BeginSession() - if err != nil { - pt.config.Logger.Error("failed to begin session with xDS session concurrency limiter", err) - return nil, nil, nil, err - } - - // This buffering is crucial otherwise we'd block immediately trying to - // deliver the current snapshot below if we already have one. - proxyStateChan := make(chan *pbmesh.ProxyState, 1) - watchData := &proxyWatchData{ - notifyCh: proxyStateChan, - state: nil, - token: token, - nodeName: nodeName, - } - - proxyReferenceKey := resource.NewReferenceKey(proxyID) - cancel := func() { - pt.mu.Lock() - defer pt.mu.Unlock() - pt.cancelWatchLocked(proxyReferenceKey, proxyStateChan, session) - } - - pt.mu.Lock() - defer pt.mu.Unlock() - - pt.proxies[proxyReferenceKey] = watchData - - //Send an event to the controller - err = pt.notifyNewProxyChannel(proxyID) - if err != nil { - pt.cancelWatchLocked(proxyReferenceKey, watchData.notifyCh, session) - return nil, nil, nil, err - } - - return proxyStateChan, session.Terminated(), cancel, nil -} - -// notifyNewProxyChannel attempts to send a message to newProxyConnectionCh and will return an error if there's no receiver. -// This will handle conditions where a proxy is connected but there's no controller for some reason to receive the event. -// This will error back to the proxy's Watch call and will cause the proxy call Watch again to retry connection until the controller -// is available. -func (pt *ProxyTracker) notifyNewProxyChannel(proxyID *pbresource.ID) error { - controllerEvent := controller.Event{ - Obj: &ProxyConnection{ - ProxyID: proxyID, - }, - } - select { - case pt.newProxyConnectionCh <- controllerEvent: - return nil - // using default here to return errors is only safe when we have a large buffer. - // the receiver is on a loop to read from the channel. If the sequence of - // sender blocks on the channel and then the receiver blocks on the channel is not - // aligned, then extraneous errors could be returned to the proxy that are just - // false negatives and the controller could be up and healthy. - default: - return fmt.Errorf("failed to notify the controller of the proxy connecting") - } -} - -// cancelWatchLocked does the following: -// - deletes the key from the proxies array. -// - ends the session with xDS session limiter. -// - closes the proxy state channel assigned to the proxy. -// This function assumes the state lock is already held. -func (pt *ProxyTracker) cancelWatchLocked(proxyReferenceKey resource.ReferenceKey, proxyStateChan chan *pbmesh.ProxyState, session limiter.Session) { - delete(pt.proxies, proxyReferenceKey) - session.End() - close(proxyStateChan) -} - -func validateArgs(proxyID *pbresource.ID, - nodeName string, token string) error { - if proxyID == nil { - return errors.New("proxyID is required") - } else if proxyID.Type.Kind != mesh.ProxyStateTemplateConfigurationType.Kind { - return fmt.Errorf("proxyID must be a %s", mesh.ProxyStateTemplateConfigurationType.GetKind()) - } else if nodeName == "" { - return errors.New("nodeName is required") - } else if token == "" { - return errors.New("token is required") - } - - return nil -} - -// PushChange allows pushing a computed ProxyState to xds for xds resource generation to send to a proxy. -func (pt *ProxyTracker) PushChange(proxyID *pbresource.ID, proxyState *pbmesh.ProxyState) error { - proxyReferenceKey := resource.NewReferenceKey(proxyID) - pt.mu.Lock() - defer pt.mu.Unlock() - if data, ok := pt.proxies[proxyReferenceKey]; ok { - data.state = proxyState - pt.deliverLatest(proxyID, proxyState, data.notifyCh) - } else { - return errors.New("proxyState change could not be sent because proxy is not connected") - } - - return nil -} - -func (pt *ProxyTracker) deliverLatest(proxyID *pbresource.ID, proxyState *pbmesh.ProxyState, ch chan *pbmesh.ProxyState) { - // Send if chan is empty - select { - case ch <- proxyState: - return - default: - } - - // Not empty, drain the chan of older snapshots and redeliver. For now we only - // use 1-buffered chans but this will still work if we change that later. -OUTER: - for { - select { - case <-ch: - continue - default: - break OUTER - } - } - - // Now send again - select { - case ch <- proxyState: - return - default: - // This should not be possible since we should be the only sender, enforced - // by m.mu but error and drop the update rather than panic. - pt.config.Logger.Error("failed to deliver proxyState to proxy", - "proxy", proxyID.String(), - ) - } -} - -// EventChannel returns an event channel that sends controller events when a proxy connects to a server. -func (pt *ProxyTracker) EventChannel() chan controller.Event { - return pt.newProxyConnectionCh -} - -// ShutdownChannel returns a channel that closes when ProxyTracker is shutdown. ShutdownChannel is never written to, only closed to -// indicate a shutdown has been initiated. -func (pt *ProxyTracker) ShutdownChannel() chan struct{} { - return pt.shutdownCh -} - -// ProxyConnectedToServer returns whether this id is connected to this server. -func (pt *ProxyTracker) ProxyConnectedToServer(proxyID *pbresource.ID) bool { - pt.mu.Lock() - defer pt.mu.Unlock() - proxyReferenceKey := resource.NewReferenceKey(proxyID) - _, ok := pt.proxies[proxyReferenceKey] - return ok -} - -// Shutdown removes all state and close all channels. -func (pt *ProxyTracker) Shutdown() { - pt.mu.Lock() - defer pt.mu.Unlock() - - // Close all current watchers first - for proxyID, watchData := range pt.proxies { - close(watchData.notifyCh) - delete(pt.proxies, proxyID) - } - - close(pt.newProxyConnectionCh) - close(pt.shutdownCh) -} - -//go:generate mockery --name SessionLimiter --inpackage -type SessionLimiter interface { - BeginSession() (limiter.Session, error) -} - -//go:generate mockery --name Logger --inpackage -type Logger interface { - Error(args ...any) -} diff --git a/agent/proxy-tracker/proxy_tracker_test.go b/agent/proxy-tracker/proxy_tracker_test.go deleted file mode 100644 index 3913f95b213f0..0000000000000 --- a/agent/proxy-tracker/proxy_tracker_test.go +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxytracker - -import ( - "errors" - "fmt" - "github.com/hashicorp/consul/agent/grpc-external/limiter" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "testing" -) - -func TestProxyTracker_Watch(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - proxyReferenceKey := resource.NewReferenceKey(resourceID) - lim := NewMockSessionLimiter(t) - session1 := newMockSession(t) - session1TermCh := make(limiter.SessionTerminatedChan) - session1.On("Terminated").Return(session1TermCh) - session1.On("End").Return() - lim.On("BeginSession").Return(session1, nil) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // Watch() - proxyStateChan, _, cancelFunc, err := pt.Watch(resourceID, "node 1", "token") - require.NoError(t, err) - - // ensure New Proxy Connection message is sent - newProxyMsg := <-pt.EventChannel() - require.Equal(t, resourceID.Name, newProxyMsg.Obj.Key()) - - // watchData is stored in the proxies array with a nil state - watchData, ok := pt.proxies[proxyReferenceKey] - require.True(t, ok) - require.NotNil(t, watchData) - require.Nil(t, watchData.state) - - // calling cancelFunc does the following: - // - closes the proxy state channel - // - and removes the map entry for the proxy - // - session is ended - cancelFunc() - - // read channel to see if there is data and it is open. - receivedState, channelOpen := <-proxyStateChan - require.Nil(t, receivedState) - require.False(t, channelOpen) - - // key is removed from proxies array - _, ok = pt.proxies[proxyReferenceKey] - require.False(t, ok) - - // session ended - session1.AssertCalled(t, "Terminated") - session1.AssertCalled(t, "End") -} - -func TestProxyTracker_Watch_ErrorConsumerNotReady(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - proxyReferenceKey := resource.NewReferenceKey(resourceID) - lim := NewMockSessionLimiter(t) - session1 := newMockSession(t) - session1.On("End").Return() - lim.On("BeginSession").Return(session1, nil) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - //fill up buffered channel while the consumer is not ready to simulate the error - for i := 0; i < 1000; i++ { - event := controller.Event{Obj: &ProxyConnection{ProxyID: resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, fmt.Sprintf("test%d", i)).ID()}} - pt.newProxyConnectionCh <- event - } - - // Watch() - proxyStateChan, sessionTerminatedCh, cancelFunc, err := pt.Watch(resourceID, "node 1", "token") - require.Nil(t, cancelFunc) - require.Nil(t, proxyStateChan) - require.Nil(t, sessionTerminatedCh) - require.Error(t, err) - require.Equal(t, "failed to notify the controller of the proxy connecting", err.Error()) - - // it is not stored in the proxies array - watchData, ok := pt.proxies[proxyReferenceKey] - require.False(t, ok) - require.Nil(t, watchData) -} - -func TestProxyTracker_Watch_ArgValidationErrors(t *testing.T) { - type testcase struct { - description string - proxyID *pbresource.ID - nodeName string - token string - expectedError error - } - testcases := []*testcase{ - { - description: "Empty proxyID", - proxyID: nil, - nodeName: "something", - token: "something", - expectedError: errors.New("proxyID is required"), - }, - { - description: "Empty nodeName", - proxyID: resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID(), - nodeName: "", - token: "something", - expectedError: errors.New("nodeName is required"), - }, - { - description: "Empty token", - proxyID: resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID(), - nodeName: "something", - token: "", - expectedError: errors.New("token is required"), - }, - { - description: "resource is not ProxyStateTemplate", - proxyID: resourcetest.Resource(mesh.ProxyConfigurationType, "test").ID(), - nodeName: "something", - token: "something else", - expectedError: errors.New("proxyID must be a ProxyStateTemplate"), - }, - } - for _, tc := range testcases { - lim := NewMockSessionLimiter(t) - lim.On("BeginSession").Return(nil, nil).Maybe() - logger := NewMockLogger(t) - logger.On("Error", mock.Anything, mock.Anything).Return(nil) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // Watch() - proxyStateChan, sessionTerminateCh, cancelFunc, err := pt.Watch(tc.proxyID, tc.nodeName, tc.token) - require.Error(t, err) - require.Equal(t, tc.expectedError, err) - require.Nil(t, proxyStateChan) - require.Nil(t, sessionTerminateCh) - require.Nil(t, cancelFunc) - } -} - -func TestProxyTracker_Watch_SessionLimiterError(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - lim := NewMockSessionLimiter(t) - lim.On("BeginSession").Return(nil, errors.New("kaboom")) - logger := NewMockLogger(t) - logger.On("Error", mock.Anything, mock.Anything).Return(nil) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // Watch() - proxyStateChan, sessionTerminateCh, cancelFunc, err := pt.Watch(resourceID, "node 1", "token") - require.Error(t, err) - require.Equal(t, "kaboom", err.Error()) - require.Nil(t, proxyStateChan) - require.Nil(t, sessionTerminateCh) - require.Nil(t, cancelFunc) -} - -func TestProxyTracker_PushChange(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - proxyReferenceKey := resource.NewReferenceKey(resourceID) - lim := NewMockSessionLimiter(t) - session1 := newMockSession(t) - session1TermCh := make(limiter.SessionTerminatedChan) - session1.On("Terminated").Return(session1TermCh) - lim.On("BeginSession").Return(session1, nil) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // Watch() - proxyStateChan, _, _, err := pt.Watch(resourceID, "node 1", "token") - require.NoError(t, err) - - // PushChange - proxyState := &pbmesh.ProxyState{ - IntentionDefaultAllow: true, - } - - // using a goroutine so that the channel and main test thread do not cause - // blocking issues with each other - go func() { - err = pt.PushChange(resourceID, proxyState) - require.NoError(t, err) - }() - - // channel receives a copy - receivedState, channelOpen := <-proxyStateChan - require.True(t, channelOpen) - require.Equal(t, proxyState, receivedState) - - // it is stored in the proxies array - watchData, ok := pt.proxies[proxyReferenceKey] - require.True(t, ok) - require.Equal(t, proxyState, watchData.state) -} - -func TestProxyTracker_PushChanges_ErrorProxyNotConnected(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - lim := NewMockSessionLimiter(t) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // PushChange - proxyState := &pbmesh.ProxyState{ - IntentionDefaultAllow: true, - } - - err := pt.PushChange(resourceID, proxyState) - require.Error(t, err) - require.Equal(t, "proxyState change could not be sent because proxy is not connected", err.Error()) -} - -func TestProxyTracker_ProxyConnectedToServer(t *testing.T) { - type testcase struct { - name string - shouldExist bool - preProcessingFunc func(pt *ProxyTracker, resourceID *pbresource.ID, limiter *MockSessionLimiter, session *mockSession, channel limiter.SessionTerminatedChan) - } - testsCases := []*testcase{ - { - name: "Resource that has not been sent through Watch() should return false", - shouldExist: false, - preProcessingFunc: func(pt *ProxyTracker, resourceID *pbresource.ID, limiter *MockSessionLimiter, session *mockSession, channel limiter.SessionTerminatedChan) { - session.On("Terminated").Return(channel).Maybe() - session.On("End").Return().Maybe() - limiter.On("BeginSession").Return(session, nil).Maybe() - }, - }, - { - name: "Resource used that is already passed in through Watch() should return true", - shouldExist: true, - preProcessingFunc: func(pt *ProxyTracker, resourceID *pbresource.ID, limiter *MockSessionLimiter, session *mockSession, channel limiter.SessionTerminatedChan) { - session.On("Terminated").Return(channel).Maybe() - session.On("End").Return().Maybe() - limiter.On("BeginSession").Return(session, nil) - _, _, _, _ = pt.Watch(resourceID, "node 1", "token") - }, - }, - } - - for _, tc := range testsCases { - lim := NewMockSessionLimiter(t) - session1 := newMockSession(t) - session1TermCh := make(limiter.SessionTerminatedChan) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - tc.preProcessingFunc(pt, resourceID, lim, session1, session1TermCh) - require.Equal(t, tc.shouldExist, pt.ProxyConnectedToServer(resourceID)) - } -} - -func TestProxyTracker_Shutdown(t *testing.T) { - resourceID := resourcetest.Resource(mesh.ProxyStateTemplateConfigurationType, "test").ID() - proxyReferenceKey := resource.NewReferenceKey(resourceID) - lim := NewMockSessionLimiter(t) - session1 := newMockSession(t) - session1TermCh := make(limiter.SessionTerminatedChan) - session1.On("Terminated").Return(session1TermCh) - session1.On("End").Return().Maybe() - lim.On("BeginSession").Return(session1, nil) - logger := NewMockLogger(t) - - pt := NewProxyTracker(ProxyTrackerConfig{ - Logger: logger, - SessionLimiter: lim, - }) - - // Watch() - proxyStateChan, _, _, err := pt.Watch(resourceID, "node 1", "token") - require.NoError(t, err) - - pt.Shutdown() - - // proxy channels are all disconnected and proxy is removed from proxies map - receivedState, channelOpen := <-proxyStateChan - require.Nil(t, receivedState) - require.False(t, channelOpen) - _, ok := pt.proxies[proxyReferenceKey] - require.False(t, ok) - - // shutdownCh is closed - select { - case <-pt.ShutdownChannel(): - default: - t.Fatalf("shutdown channel should be closed") - } - // newProxyConnectionCh is closed - select { - case <-pt.EventChannel(): - default: - t.Fatalf("shutdown channel should be closed") - } -} - -type mockSession struct { - mock.Mock -} - -func newMockSession(t *testing.T) *mockSession { - m := &mockSession{} - m.Mock.Test(t) - - t.Cleanup(func() { m.AssertExpectations(t) }) - - return m -} - -func (m *mockSession) End() { m.Called() } - -func (m *mockSession) Terminated() limiter.SessionTerminatedChan { - return m.Called().Get(0).(limiter.SessionTerminatedChan) -} diff --git a/agent/proxycfg-glue/config_entry.go b/agent/proxycfg-glue/config_entry.go index 3a79e228277d7..cd86d91e1e91f 100644 --- a/agent/proxycfg-glue/config_entry.go +++ b/agent/proxycfg-glue/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/discovery_chain.go b/agent/proxycfg-glue/discovery_chain.go index 518467492d7cc..3b322e6b334f9 100644 --- a/agent/proxycfg-glue/discovery_chain.go +++ b/agent/proxycfg-glue/discovery_chain.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/discovery_chain_test.go b/agent/proxycfg-glue/discovery_chain_test.go index e4156667d36b7..60d48537c684b 100644 --- a/agent/proxycfg-glue/discovery_chain_test.go +++ b/agent/proxycfg-glue/discovery_chain_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/exported_peered_services.go b/agent/proxycfg-glue/exported_peered_services.go index 1b92600451710..8637891f1556b 100644 --- a/agent/proxycfg-glue/exported_peered_services.go +++ b/agent/proxycfg-glue/exported_peered_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/exported_peered_services_test.go b/agent/proxycfg-glue/exported_peered_services_test.go index 91b42323fab8a..a2b99d4d25b5f 100644 --- a/agent/proxycfg-glue/exported_peered_services_test.go +++ b/agent/proxycfg-glue/exported_peered_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/federation_state_list_mesh_gateways.go b/agent/proxycfg-glue/federation_state_list_mesh_gateways.go index c34303552c0a2..f5f32f1c01cba 100644 --- a/agent/proxycfg-glue/federation_state_list_mesh_gateways.go +++ b/agent/proxycfg-glue/federation_state_list_mesh_gateways.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/federation_state_list_mesh_gateways_test.go b/agent/proxycfg-glue/federation_state_list_mesh_gateways_test.go index baf477f4340b2..fd73e19aaf698 100644 --- a/agent/proxycfg-glue/federation_state_list_mesh_gateways_test.go +++ b/agent/proxycfg-glue/federation_state_list_mesh_gateways_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/gateway_services.go b/agent/proxycfg-glue/gateway_services.go index 555b1d5385359..24f4087eea817 100644 --- a/agent/proxycfg-glue/gateway_services.go +++ b/agent/proxycfg-glue/gateway_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/gateway_services_test.go b/agent/proxycfg-glue/gateway_services_test.go index ff89a62c92e45..eb853bd7b49e9 100644 --- a/agent/proxycfg-glue/gateway_services_test.go +++ b/agent/proxycfg-glue/gateway_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/glue.go b/agent/proxycfg-glue/glue.go index 8f23bf458ea77..d0363ec3b8e73 100644 --- a/agent/proxycfg-glue/glue.go +++ b/agent/proxycfg-glue/glue.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/health.go b/agent/proxycfg-glue/health.go index 6acf5b7023026..f0808da978ce9 100644 --- a/agent/proxycfg-glue/health.go +++ b/agent/proxycfg-glue/health.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/health_blocking.go b/agent/proxycfg-glue/health_blocking.go index 181605298aa8a..0a47a920d157d 100644 --- a/agent/proxycfg-glue/health_blocking.go +++ b/agent/proxycfg-glue/health_blocking.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/health_blocking_test.go b/agent/proxycfg-glue/health_blocking_test.go index c64381b7fd7fc..3dcdaf17d6148 100644 --- a/agent/proxycfg-glue/health_blocking_test.go +++ b/agent/proxycfg-glue/health_blocking_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package proxycfgglue import ( diff --git a/agent/proxycfg-glue/health_test.go b/agent/proxycfg-glue/health_test.go index 821e22a789085..6f5702ca19c87 100644 --- a/agent/proxycfg-glue/health_test.go +++ b/agent/proxycfg-glue/health_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/helpers_test.go b/agent/proxycfg-glue/helpers_test.go index 3c7eb5b7ad153..0d8bd8c9660d0 100644 --- a/agent/proxycfg-glue/helpers_test.go +++ b/agent/proxycfg-glue/helpers_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/intention_upstreams.go b/agent/proxycfg-glue/intention_upstreams.go index dc6731372271f..07a12c4ddb6c3 100644 --- a/agent/proxycfg-glue/intention_upstreams.go +++ b/agent/proxycfg-glue/intention_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/intention_upstreams_test.go b/agent/proxycfg-glue/intention_upstreams_test.go index bfaeb55b38646..3028524eb0f29 100644 --- a/agent/proxycfg-glue/intention_upstreams_test.go +++ b/agent/proxycfg-glue/intention_upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/intentions.go b/agent/proxycfg-glue/intentions.go index f3186c6689ab9..5176054325962 100644 --- a/agent/proxycfg-glue/intentions.go +++ b/agent/proxycfg-glue/intentions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/intentions_ce.go b/agent/proxycfg-glue/intentions_ce.go index d4bdef266e099..bd1823adb192d 100644 --- a/agent/proxycfg-glue/intentions_ce.go +++ b/agent/proxycfg-glue/intentions_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg-glue/intentions_test.go b/agent/proxycfg-glue/intentions_test.go index 0e1ab10918865..07d3a8067e34b 100644 --- a/agent/proxycfg-glue/intentions_test.go +++ b/agent/proxycfg-glue/intentions_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/internal_service_dump.go b/agent/proxycfg-glue/internal_service_dump.go index d1c701083d520..e41dc020b1d04 100644 --- a/agent/proxycfg-glue/internal_service_dump.go +++ b/agent/proxycfg-glue/internal_service_dump.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/internal_service_dump_test.go b/agent/proxycfg-glue/internal_service_dump_test.go index 1eba4c043828c..a6e6c3b028607 100644 --- a/agent/proxycfg-glue/internal_service_dump_test.go +++ b/agent/proxycfg-glue/internal_service_dump_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/leafcerts.go b/agent/proxycfg-glue/leafcerts.go index b805586a154a3..24631ffc31134 100644 --- a/agent/proxycfg-glue/leafcerts.go +++ b/agent/proxycfg-glue/leafcerts.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/peered_upstreams.go b/agent/proxycfg-glue/peered_upstreams.go index f345c26df572e..df38b3f0daf4d 100644 --- a/agent/proxycfg-glue/peered_upstreams.go +++ b/agent/proxycfg-glue/peered_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/peered_upstreams_test.go b/agent/proxycfg-glue/peered_upstreams_test.go index 026fd67a3455f..b0e7c0d8f83c4 100644 --- a/agent/proxycfg-glue/peered_upstreams_test.go +++ b/agent/proxycfg-glue/peered_upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/peering_list.go b/agent/proxycfg-glue/peering_list.go index 6e7a78c707f15..219bf9b955298 100644 --- a/agent/proxycfg-glue/peering_list.go +++ b/agent/proxycfg-glue/peering_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/peering_list_test.go b/agent/proxycfg-glue/peering_list_test.go index 575d161b4e5d3..f570dbbcc2a86 100644 --- a/agent/proxycfg-glue/peering_list_test.go +++ b/agent/proxycfg-glue/peering_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/resolved_service_config.go b/agent/proxycfg-glue/resolved_service_config.go index 11654cd767b2e..89611bbc07114 100644 --- a/agent/proxycfg-glue/resolved_service_config.go +++ b/agent/proxycfg-glue/resolved_service_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/resolved_service_config_test.go b/agent/proxycfg-glue/resolved_service_config_test.go index 248ab4eab363f..60d39eec205f0 100644 --- a/agent/proxycfg-glue/resolved_service_config_test.go +++ b/agent/proxycfg-glue/resolved_service_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/service_http_checks.go b/agent/proxycfg-glue/service_http_checks.go index 2d0a9dfcff51f..45521f712ae8b 100644 --- a/agent/proxycfg-glue/service_http_checks.go +++ b/agent/proxycfg-glue/service_http_checks.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/service_http_checks_test.go b/agent/proxycfg-glue/service_http_checks_test.go index 87bdfc7abe609..cfe28c7e89f9f 100644 --- a/agent/proxycfg-glue/service_http_checks_test.go +++ b/agent/proxycfg-glue/service_http_checks_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/service_list.go b/agent/proxycfg-glue/service_list.go index f4a9380df715a..418103aef6fed 100644 --- a/agent/proxycfg-glue/service_list.go +++ b/agent/proxycfg-glue/service_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/service_list_test.go b/agent/proxycfg-glue/service_list_test.go index c6372aaf4ea1d..154c1300a3275 100644 --- a/agent/proxycfg-glue/service_list_test.go +++ b/agent/proxycfg-glue/service_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/trust_bundle.go b/agent/proxycfg-glue/trust_bundle.go index f623d2a5555c9..108e7ea9f9aec 100644 --- a/agent/proxycfg-glue/trust_bundle.go +++ b/agent/proxycfg-glue/trust_bundle.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-glue/trust_bundle_test.go b/agent/proxycfg-glue/trust_bundle_test.go index e2082e3d240be..da77e32a56e86 100644 --- a/agent/proxycfg-glue/trust_bundle_test.go +++ b/agent/proxycfg-glue/trust_bundle_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfgglue diff --git a/agent/proxycfg-sources/catalog/config_source.go b/agent/proxycfg-sources/catalog/config_source.go index fb1ceab31604d..3fbca88de5087 100644 --- a/agent/proxycfg-sources/catalog/config_source.go +++ b/agent/proxycfg-sources/catalog/config_source.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog diff --git a/agent/proxycfg-sources/catalog/config_source_test.go b/agent/proxycfg-sources/catalog/config_source_test.go index 0767466a6d60c..661fae9c082b1 100644 --- a/agent/proxycfg-sources/catalog/config_source_test.go +++ b/agent/proxycfg-sources/catalog/config_source_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog diff --git a/agent/proxycfg-sources/local/config_source.go b/agent/proxycfg-sources/local/config_source.go index e104043bac604..18b8a045c421b 100644 --- a/agent/proxycfg-sources/local/config_source.go +++ b/agent/proxycfg-sources/local/config_source.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/proxycfg-sources/local/local.go b/agent/proxycfg-sources/local/local.go index 44867eb067515..92eefe1eb85f0 100644 --- a/agent/proxycfg-sources/local/local.go +++ b/agent/proxycfg-sources/local/local.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package local integrates the proxycfg Manager with the agent's local state. package local diff --git a/agent/proxycfg-sources/local/sync.go b/agent/proxycfg-sources/local/sync.go index 982e527f79349..86427c9f005ba 100644 --- a/agent/proxycfg-sources/local/sync.go +++ b/agent/proxycfg-sources/local/sync.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/proxycfg-sources/local/sync_test.go b/agent/proxycfg-sources/local/sync_test.go index 5aa030db4cfc2..8fa4883518197 100644 --- a/agent/proxycfg-sources/local/sync_test.go +++ b/agent/proxycfg-sources/local/sync_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package local diff --git a/agent/proxycfg/api_gateway.go b/agent/proxycfg/api_gateway.go index 3ed39481204c2..b4954cd3973c7 100644 --- a/agent/proxycfg/api_gateway.go +++ b/agent/proxycfg/api_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/connect_proxy.go b/agent/proxycfg/connect_proxy.go index 0a8c1737923ee..7dcbe18e71957 100644 --- a/agent/proxycfg/connect_proxy.go +++ b/agent/proxycfg/connect_proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/data_sources.go b/agent/proxycfg/data_sources.go index dfb9a70f357b8..ee779dfb6c884 100644 --- a/agent/proxycfg/data_sources.go +++ b/agent/proxycfg/data_sources.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/data_sources_ce.go b/agent/proxycfg/data_sources_ce.go index a4a4aaff74762..5a92e9486b0dd 100644 --- a/agent/proxycfg/data_sources_ce.go +++ b/agent/proxycfg/data_sources_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/deep-copy.sh b/agent/proxycfg/deep-copy.sh index 2e1f361dd7101..17791e79b1194 100755 --- a/agent/proxycfg/deep-copy.sh +++ b/agent/proxycfg/deep-copy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly PACKAGE_DIR="$(dirname "${BASH_SOURCE[0]}")" diff --git a/agent/proxycfg/ingress_gateway.go b/agent/proxycfg/ingress_gateway.go index 3ab5828add40a..efb774c9b17c3 100644 --- a/agent/proxycfg/ingress_gateway.go +++ b/agent/proxycfg/ingress_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/internal/watch/watchmap.go b/agent/proxycfg/internal/watch/watchmap.go index d4fba2ea03eb8..c36ec3237cc66 100644 --- a/agent/proxycfg/internal/watch/watchmap.go +++ b/agent/proxycfg/internal/watch/watchmap.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/agent/proxycfg/internal/watch/watchmap_test.go b/agent/proxycfg/internal/watch/watchmap_test.go index 54fb51d4df9ba..c5bef8e471088 100644 --- a/agent/proxycfg/internal/watch/watchmap_test.go +++ b/agent/proxycfg/internal/watch/watchmap_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/agent/proxycfg/manager.go b/agent/proxycfg/manager.go index ac87dddc1924e..a942fd1d1e147 100644 --- a/agent/proxycfg/manager.go +++ b/agent/proxycfg/manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/manager_test.go b/agent/proxycfg/manager_test.go index 72deaa73ab280..13dd0f95420cd 100644 --- a/agent/proxycfg/manager_test.go +++ b/agent/proxycfg/manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/mesh_gateway.go b/agent/proxycfg/mesh_gateway.go index 0237e84232905..f2fee37d46719 100644 --- a/agent/proxycfg/mesh_gateway.go +++ b/agent/proxycfg/mesh_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/consul/acl" + cachetype "github.com/hashicorp/consul/agent/cache-types" "github.com/hashicorp/consul/agent/leafcert" "github.com/hashicorp/consul/agent/proxycfg/internal/watch" diff --git a/agent/proxycfg/mesh_gateway_ce.go b/agent/proxycfg/mesh_gateway_ce.go index 0c302f27cd7b4..2959a8383a1e8 100644 --- a/agent/proxycfg/mesh_gateway_ce.go +++ b/agent/proxycfg/mesh_gateway_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/naming.go b/agent/proxycfg/naming.go index a9bd5fd8c0ca4..07aa42f2f4dd4 100644 --- a/agent/proxycfg/naming.go +++ b/agent/proxycfg/naming.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/naming_ce.go b/agent/proxycfg/naming_ce.go index a98204a8bbac4..858b8d3553dfd 100644 --- a/agent/proxycfg/naming_ce.go +++ b/agent/proxycfg/naming_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/naming_test.go b/agent/proxycfg/naming_test.go index 0615a81281824..caf917f5d9757 100644 --- a/agent/proxycfg/naming_test.go +++ b/agent/proxycfg/naming_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/proxycfg.deepcopy.go b/agent/proxycfg/proxycfg.deepcopy.go index d6f11319169ad..5b9d9ce3e7e08 100644 --- a/agent/proxycfg/proxycfg.deepcopy.go +++ b/agent/proxycfg/proxycfg.deepcopy.go @@ -13,10 +13,6 @@ import ( // DeepCopy generates a deep copy of *ConfigSnapshot func (o *ConfigSnapshot) DeepCopy() *ConfigSnapshot { var cp ConfigSnapshot = *o - if o.ServiceLocality != nil { - cp.ServiceLocality = new(structs.Locality) - *cp.ServiceLocality = *o.ServiceLocality - } if o.ServiceMeta != nil { cp.ServiceMeta = make(map[string]string, len(o.ServiceMeta)) for k2, v2 := range o.ServiceMeta { diff --git a/agent/proxycfg/proxycfg.go b/agent/proxycfg/proxycfg.go index 9b71156dfe5aa..f73e6ac726ceb 100644 --- a/agent/proxycfg/proxycfg.go +++ b/agent/proxycfg/proxycfg.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package proxycfg contains components for sourcing the data required to // configure Connect proxies. The Manager provides an API with which proxy @@ -45,7 +45,7 @@ // ConfigSource - on a client agent this would be a local config source, on a // server it would be a catalog config source. // 4. On server, the catalog config source will check if service is registered locally. -// 4a. If the service *is* registered locally it hands off the local config +// 4a. If the service *is* registered locally it hands off the the local config // source, which calls Watch on the proxycfg manager (and serves the pre- // fetched data). // 5. Otherwise, it fetches the service from the state store. diff --git a/agent/proxycfg/snapshot.go b/agent/proxycfg/snapshot.go index e9304ec631227..b4093d6f734c0 100644 --- a/agent/proxycfg/snapshot.go +++ b/agent/proxycfg/snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -925,7 +925,6 @@ func IngressListenerKeyFromListener(l structs.IngressListener) IngressListenerKe type ConfigSnapshot struct { Kind structs.ServiceKind Service string - ServiceLocality *structs.Locality ProxyID ProxyID Address string Port int diff --git a/agent/proxycfg/snapshot_test.go b/agent/proxycfg/snapshot_test.go index b4b0ab57c957a..ea6700cd249da 100644 --- a/agent/proxycfg/snapshot_test.go +++ b/agent/proxycfg/snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/state.go b/agent/proxycfg/state.go index 853dca5a9f1bf..55ba287ef1f25 100644 --- a/agent/proxycfg/state.go +++ b/agent/proxycfg/state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -126,7 +126,6 @@ type serviceInstance struct { taggedAddresses map[string]structs.ServiceAddress proxyCfg structs.ConnectProxyConfig token string - locality *structs.Locality } func copyProxyConfig(ns *structs.NodeService) (structs.ConnectProxyConfig, error) { @@ -247,7 +246,6 @@ func newServiceInstanceFromNodeService(id ProxyID, ns *structs.NodeService, toke return serviceInstance{ kind: ns.Kind, service: ns.Service, - locality: ns.Locality, proxyID: id, address: ns.Address, port: ns.Port, @@ -307,7 +305,6 @@ func newConfigSnapshotFromServiceInstance(s serviceInstance, config stateConfig) return ConfigSnapshot{ Kind: s.kind, Service: s.service, - ServiceLocality: s.locality, ProxyID: s.proxyID, Address: s.address, Port: s.port, diff --git a/agent/proxycfg/state_ce_test.go b/agent/proxycfg/state_ce_test.go index 36f2e07183e41..e817aeef0b13f 100644 --- a/agent/proxycfg/state_ce_test.go +++ b/agent/proxycfg/state_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/state_test.go b/agent/proxycfg/state_test.go index 2a6792aa22e93..9065db885dc3b 100644 --- a/agent/proxycfg/state_test.go +++ b/agent/proxycfg/state_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/terminating_gateway.go b/agent/proxycfg/terminating_gateway.go index 05085a6ab26dc..7d29ee70501bb 100644 --- a/agent/proxycfg/terminating_gateway.go +++ b/agent/proxycfg/terminating_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/testing.go b/agent/proxycfg/testing.go index bdd565ec0454e..ac68994cb8f18 100644 --- a/agent/proxycfg/testing.go +++ b/agent/proxycfg/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -167,7 +167,7 @@ func TestUpstreamNodes(t testing.T, service string) structs.CheckServiceNodes { Datacenter: "dc1", Partition: structs.NodeEnterpriseMetaInDefaultPartition().PartitionOrEmpty(), }, - Service: structs.TestNodeServiceWithName(service), + Service: structs.TestNodeServiceWithName(t, service), }, structs.CheckServiceNode{ Node: &structs.Node{ @@ -177,47 +177,7 @@ func TestUpstreamNodes(t testing.T, service string) structs.CheckServiceNodes { Datacenter: "dc1", Partition: structs.NodeEnterpriseMetaInDefaultPartition().PartitionOrEmpty(), }, - Service: structs.TestNodeServiceWithName(service), - }, - } -} - -// TestUpstreamNodesWithServiceSubset returns a sample service discovery result with one instance tagged v1 -// and the other tagged v2 -func TestUpstreamNodesWithServiceSubset(t testing.T, service string) structs.CheckServiceNodes { - return structs.CheckServiceNodes{ - structs.CheckServiceNode{ - Node: &structs.Node{ - ID: "test1", - Node: "test1", - Address: "10.10.1.3", - Datacenter: "dc1", - Partition: structs.NodeEnterpriseMetaInDefaultPartition().PartitionOrEmpty(), - }, - Service: &structs.NodeService{ - Kind: structs.ServiceKindTypical, - Service: service, - Port: 8080, - Meta: map[string]string{"Version": "1"}, - Weights: &structs.Weights{ - Passing: 300, // Check that this gets normalized to 128 - }, - }, - }, - structs.CheckServiceNode{ - Node: &structs.Node{ - ID: "test2", - Node: "test2", - Address: "10.10.1.4", - Datacenter: "dc1", - Partition: structs.NodeEnterpriseMetaInDefaultPartition().PartitionOrEmpty(), - }, - Service: &structs.NodeService{ - Kind: structs.ServiceKindTypical, - Service: service, - Port: 8080, - Meta: map[string]string{"Version": "2"}, - }, + Service: structs.TestNodeServiceWithName(t, service), }, } } @@ -271,7 +231,7 @@ func TestUpstreamNodesInStatus(t testing.T, status string) structs.CheckServiceN Address: "10.10.1.1", Datacenter: "dc1", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), Checks: structs.HealthChecks{ &structs.HealthCheck{ Node: "test1", @@ -288,7 +248,7 @@ func TestUpstreamNodesInStatus(t testing.T, status string) structs.CheckServiceN Address: "10.10.1.2", Datacenter: "dc1", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), Checks: structs.HealthChecks{ &structs.HealthCheck{ Node: "test2", @@ -310,7 +270,7 @@ func TestUpstreamNodesDC2(t testing.T) structs.CheckServiceNodes { Address: "10.20.1.1", Datacenter: "dc2", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), }, structs.CheckServiceNode{ Node: &structs.Node{ @@ -319,7 +279,7 @@ func TestUpstreamNodesDC2(t testing.T) structs.CheckServiceNodes { Address: "10.20.1.2", Datacenter: "dc2", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), }, } } @@ -333,7 +293,7 @@ func TestUpstreamNodesInStatusDC2(t testing.T, status string) structs.CheckServi Address: "10.20.1.1", Datacenter: "dc2", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), Checks: structs.HealthChecks{ &structs.HealthCheck{ Node: "test1", @@ -350,7 +310,7 @@ func TestUpstreamNodesInStatusDC2(t testing.T, status string) structs.CheckServi Address: "10.20.1.2", Datacenter: "dc2", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), Checks: structs.HealthChecks{ &structs.HealthCheck{ Node: "test2", @@ -372,7 +332,7 @@ func TestUpstreamNodesAlternate(t testing.T) structs.CheckServiceNodes { Address: "10.20.1.1", Datacenter: "dc1", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), }, structs.CheckServiceNode{ Node: &structs.Node{ @@ -381,7 +341,7 @@ func TestUpstreamNodesAlternate(t testing.T) structs.CheckServiceNodes { Address: "10.20.1.2", Datacenter: "dc1", }, - Service: structs.TestNodeService(), + Service: structs.TestNodeService(t), }, } } diff --git a/agent/proxycfg/testing_api_gateway.go b/agent/proxycfg/testing_api_gateway.go index ddfa17dcf6ab2..87ff58fbf0535 100644 --- a/agent/proxycfg/testing_api_gateway.go +++ b/agent/proxycfg/testing_api_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -8,9 +8,10 @@ import ( "github.com/mitchellh/go-testing-interface" - "github.com/hashicorp/consul/agent/configentry" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/consul/discoverychain" + + "github.com/hashicorp/consul/agent/configentry" "github.com/hashicorp/consul/agent/structs" ) diff --git a/agent/proxycfg/testing_ce.go b/agent/proxycfg/testing_ce.go index 6aa07588d4d1d..202252a3a7335 100644 --- a/agent/proxycfg/testing_ce.go +++ b/agent/proxycfg/testing_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/testing_connect_proxy.go b/agent/proxycfg/testing_connect_proxy.go index cf6f4a479b1eb..a929aa52f167d 100644 --- a/agent/proxycfg/testing_connect_proxy.go +++ b/agent/proxycfg/testing_connect_proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -227,14 +227,6 @@ func TestConfigSnapshotExposeConfig(t testing.T, nsFn func(ns *structs.NodeServi } func TestConfigSnapshotExposeChecks(t testing.T) *ConfigSnapshot { - return testConfigSnapshotExposedChecks(t, false) -} - -func TestConfigSnapshotExposeChecksWithBindOverride(t testing.T) *ConfigSnapshot { - return testConfigSnapshotExposedChecks(t, true) -} - -func testConfigSnapshotExposedChecks(t testing.T, overrideBind bool) *ConfigSnapshot { return TestConfigSnapshot(t, func(ns *structs.NodeService) { ns.Address = "1.2.3.4" @@ -243,12 +235,6 @@ func testConfigSnapshotExposedChecks(t testing.T, overrideBind bool) *ConfigSnap ns.Proxy.Expose = structs.ExposeConfig{ Checks: true, } - if overrideBind { - if ns.Proxy.Config == nil { - ns.Proxy.Config = map[string]any{} - } - ns.Proxy.Config["bind_address"] = "6.7.8.9" - } }, []UpdateEvent{ { @@ -267,32 +253,6 @@ func testConfigSnapshotExposedChecks(t testing.T, overrideBind bool) *ConfigSnap ) } -func TestConfigSnapshotExposeChecksGRPC(t testing.T) *ConfigSnapshot { - return TestConfigSnapshot(t, - func(ns *structs.NodeService) { - ns.Address = "1.2.3.4" - ns.Port = 9090 - ns.Proxy.Upstreams = nil - ns.Proxy.Expose = structs.ExposeConfig{ - Checks: true, - } - }, - []UpdateEvent{ - { - CorrelationID: svcChecksWatchIDPrefix + structs.ServiceIDString("web", nil), - Result: []structs.CheckType{{ - CheckID: types.CheckID("grpc"), - Name: "grpc", - GRPC: "localhost:9090/v1.Health", - ProxyGRPC: "localhost:21501/myservice", - Interval: 10 * time.Second, - Timeout: 1 * time.Second, - }}, - }, - }, - ) -} - func TestConfigSnapshotGRPCExposeHTTP1(t testing.T) *ConfigSnapshot { roots, leaf := TestCerts(t) diff --git a/agent/proxycfg/testing_ingress_gateway.go b/agent/proxycfg/testing_ingress_gateway.go index 96918a261bd05..87a3313ecdb50 100644 --- a/agent/proxycfg/testing_ingress_gateway.go +++ b/agent/proxycfg/testing_ingress_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -1888,8 +1888,8 @@ func TestConfigSnapshotIngressGateway_TLSMixedMinVersionListeners(t testing.T) * entry.TLS.Enabled = true entry.TLS.TLSMinVersion = types.TLSv1_2 - // One listener should inherit TLS minimum version from the gateway config, - // two others each set explicit TLS minimum versions + // One listener disables TLS, one inherits TLS minimum version from the gateway + // config, two others set different versions entry.Listeners = []structs.IngressListener{ { Port: 8080, @@ -1925,6 +1925,8 @@ func TestConfigSnapshotIngressGateway_TLSMixedMinVersionListeners(t testing.T) * { CorrelationID: gatewayServicesWatchID, Result: &structs.IndexedGatewayServices{ + // One listener should inherit TLS minimum version from the gateway config, + // two others each set explicit TLS minimum versions Services: []*structs.GatewayService{ { Service: s1, @@ -1982,208 +1984,3 @@ func TestConfigSnapshotIngressGateway_TLSMixedMinVersionListeners(t testing.T) * }, }) } - -func TestConfigSnapshotIngressGateway_TLSMixedMaxVersionListeners(t testing.T) *ConfigSnapshot { - var ( - s1 = structs.NewServiceName("s1", nil) - s1UID = NewUpstreamIDFromServiceName(s1) - s1Chain = discoverychain.TestCompileConfigEntries(t, "s1", "default", "default", "dc1", connect.TestClusterID+".consul", nil, nil) - - s2 = structs.NewServiceName("s2", nil) - s2UID = NewUpstreamIDFromServiceName(s2) - s2Chain = discoverychain.TestCompileConfigEntries(t, "s2", "default", "default", "dc1", connect.TestClusterID+".consul", nil, nil) - - s3 = structs.NewServiceName("s3", nil) - s3UID = NewUpstreamIDFromServiceName(s3) - s3Chain = discoverychain.TestCompileConfigEntries(t, "s3", "default", "default", "dc1", connect.TestClusterID+".consul", nil, nil) - ) - - return TestConfigSnapshotIngressGateway(t, true, "tcp", "default", nil, - func(entry *structs.IngressGatewayConfigEntry) { - entry.TLS.Enabled = true - entry.TLS.TLSMaxVersion = types.TLSv1_2 - - // One listener should inherit TLS maximum version from the gateway config, - // two others each set explicit TLS maximum versions - entry.Listeners = []structs.IngressListener{ - { - Port: 8080, - Protocol: "http", - Services: []structs.IngressService{ - {Name: "s1"}, - }, - }, - { - Port: 8081, - Protocol: "http", - Services: []structs.IngressService{ - {Name: "s2"}, - }, - TLS: &structs.GatewayTLSConfig{ - Enabled: true, - TLSMaxVersion: types.TLSv1_0, - }, - }, - { - Port: 8082, - Protocol: "http", - Services: []structs.IngressService{ - {Name: "s3"}, - }, - TLS: &structs.GatewayTLSConfig{ - Enabled: true, - TLSMaxVersion: types.TLSv1_3, - }, - }, - } - }, []UpdateEvent{ - { - CorrelationID: gatewayServicesWatchID, - Result: &structs.IndexedGatewayServices{ - Services: []*structs.GatewayService{ - { - Service: s1, - Port: 8080, - Protocol: "http", - }, - { - Service: s2, - Port: 8081, - Protocol: "http", - }, - { - Service: s3, - Port: 8082, - Protocol: "http", - }, - }, - }, - }, - { - CorrelationID: "discovery-chain:" + s1UID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: s1Chain, - }, - }, - { - CorrelationID: "discovery-chain:" + s2UID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: s2Chain, - }, - }, - { - CorrelationID: "discovery-chain:" + s3UID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: s3Chain, - }, - }, - { - CorrelationID: "upstream-target:" + s1Chain.ID() + ":" + s1UID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: TestUpstreamNodes(t, "s1"), - }, - }, - { - CorrelationID: "upstream-target:" + s2Chain.ID() + ":" + s2UID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: TestUpstreamNodes(t, "s2"), - }, - }, - { - CorrelationID: "upstream-target:" + s3Chain.ID() + ":" + s3UID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: TestUpstreamNodes(t, "s3"), - }, - }, - }) -} - -func TestConfigSnapshotIngressGateway_TLSMixedCipherVersionListeners(t testing.T) *ConfigSnapshot { - var ( - s1 = structs.NewServiceName("s1", nil) - s1UID = NewUpstreamIDFromServiceName(s1) - s1Chain = discoverychain.TestCompileConfigEntries(t, "s1", "default", "default", "dc1", connect.TestClusterID+".consul", nil, nil) - - s2 = structs.NewServiceName("s2", nil) - s2UID = NewUpstreamIDFromServiceName(s2) - s2Chain = discoverychain.TestCompileConfigEntries(t, "s2", "default", "default", "dc1", connect.TestClusterID+".consul", nil, nil) - ) - - return TestConfigSnapshotIngressGateway(t, true, "tcp", "default", nil, - func(entry *structs.IngressGatewayConfigEntry) { - entry.TLS.Enabled = true - entry.TLS.CipherSuites = []types.TLSCipherSuite{ - types.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - } - - // One listener should inherit TLS Ciphers from the gateway config, - // the other should be set explicitly from the listener config - entry.Listeners = []structs.IngressListener{ - { - Port: 8080, - Protocol: "http", - Services: []structs.IngressService{ - {Name: "s1"}, - }, - }, - { - Port: 8081, - Protocol: "http", - Services: []structs.IngressService{ - {Name: "s2"}, - }, - TLS: &structs.GatewayTLSConfig{ - Enabled: true, - CipherSuites: []types.TLSCipherSuite{ - types.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, - types.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, - }, - }, - }, - } - }, []UpdateEvent{ - { - CorrelationID: gatewayServicesWatchID, - Result: &structs.IndexedGatewayServices{ - // One listener should inherit TLS minimum version from the gateway config, - // two others each set explicit TLS minimum versions - Services: []*structs.GatewayService{ - { - Service: s1, - Port: 8080, - Protocol: "http", - }, - { - Service: s2, - Port: 8081, - Protocol: "http", - }, - }, - }, - }, - { - CorrelationID: "discovery-chain:" + s1UID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: s1Chain, - }, - }, - { - CorrelationID: "discovery-chain:" + s2UID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: s2Chain, - }, - }, - { - CorrelationID: "upstream-target:" + s1Chain.ID() + ":" + s1UID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: TestUpstreamNodes(t, "s1"), - }, - }, - { - CorrelationID: "upstream-target:" + s2Chain.ID() + ":" + s2UID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: TestUpstreamNodes(t, "s2"), - }, - }, - }) -} diff --git a/agent/proxycfg/testing_mesh_gateway.go b/agent/proxycfg/testing_mesh_gateway.go index 865e219cd4350..0ad9d4524afe7 100644 --- a/agent/proxycfg/testing_mesh_gateway.go +++ b/agent/proxycfg/testing_mesh_gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -23,10 +23,9 @@ func TestConfigSnapshotMeshGateway(t testing.T, variant string, nsFn func(ns *st roots, _ := TestCertsForMeshGateway(t) var ( - populateServices = true - useFederationStates = false - deleteCrossDCEntry = false - meshGatewayFederation = false + populateServices = true + useFederationStates = false + deleteCrossDCEntry = false ) switch variant { @@ -35,11 +34,6 @@ func TestConfigSnapshotMeshGateway(t testing.T, variant string, nsFn func(ns *st populateServices = true useFederationStates = true deleteCrossDCEntry = true - case "mesh-gateway-federation": - populateServices = true - useFederationStates = true - deleteCrossDCEntry = true - meshGatewayFederation = true case "newer-info-in-federation-states": populateServices = true useFederationStates = true @@ -453,63 +447,6 @@ func TestConfigSnapshotMeshGateway(t testing.T, variant string, nsFn func(ns *st }) } - var serverSNIFn ServerSNIFunc - if meshGatewayFederation { - - // reproduced from tlsutil/config.go - serverSNIFn = func(dc, nodeName string) string { - // Strip the trailing '.' from the domain if any - domain := "consul" - - if nodeName == "" || nodeName == "*" { - return "server." + dc + "." + domain - } - - return nodeName + ".server." + dc + "." + domain - } - - baseEvents = testSpliceEvents(baseEvents, []UpdateEvent{ - { - CorrelationID: consulServerListWatchID, - Result: &structs.IndexedCheckServiceNodes{ - Nodes: structs.CheckServiceNodes{ - { - Node: &structs.Node{ - Datacenter: "dc1", - Node: "node1", - Address: "127.0.0.1", - }, - Service: &structs.NodeService{ - ID: structs.ConsulServiceID, - Service: structs.ConsulServiceName, - Meta: map[string]string{ - "grpc_port": "8502", - "grpc_tls_port": "8503", - }, - }, - }, - { - Node: &structs.Node{ - Datacenter: "dc1", - Node: "node2", - Address: "127.0.0.2", - }, - Service: &structs.NodeService{ - ID: structs.ConsulServiceID, - Service: structs.ConsulServiceName, - Meta: map[string]string{ - "grpc_port": "8502", - "grpc_tls_port": "8503", - }, - }, - }, - }, - }, - }, - }) - - } - return testConfigSnapshotFixture(t, &structs.NodeService{ Kind: structs.ServiceKindMeshGateway, Service: "mesh-gateway", @@ -529,7 +466,7 @@ func TestConfigSnapshotMeshGateway(t testing.T, variant string, nsFn func(ns *st Port: 443, }, }, - }, nsFn, serverSNIFn, testSpliceEvents(baseEvents, extraUpdates)) + }, nsFn, nil, testSpliceEvents(baseEvents, extraUpdates)) } func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func(ns *structs.NodeService), extraUpdates []UpdateEvent) *ConfigSnapshot { @@ -747,73 +684,6 @@ func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func( }, }, ) - case "mgw-peered-upstream": - // This is a modified version of "chain-and-l7-stuff" that adds a peer field to the resolver - // and removes some of the extraneous disco-chain testing. - entries = []structs.ConfigEntry{ - &structs.ProxyConfigEntry{ - Kind: structs.ProxyDefaults, - Name: structs.ProxyConfigGlobal, - Config: map[string]interface{}{ - "protocol": "http", - }, - }, - &structs.ServiceResolverConfigEntry{ - Kind: structs.ServiceResolver, - Name: "db", - Redirect: &structs.ServiceResolverRedirect{ - Service: "alt", - Peer: "peer-b", - }, - ConnectTimeout: 33 * time.Second, - RequestTimeout: 33 * time.Second, - }, - } - for _, entry := range entries { - require.NoError(t, entry.Normalize()) - require.NoError(t, entry.Validate()) - } - - set := configentry.NewDiscoveryChainSet() - set.AddEntries(entries...) - - var ( - dbSN = structs.NewServiceName("db", nil) - altSN = structs.NewServiceName("alt", nil) - - dbChain = discoverychain.TestCompileConfigEntries(t, "db", "default", "default", "dc1", connect.TestClusterID+".consul", nil, set) - ) - - needPeerA = true - needLeaf = true - discoChains[dbSN] = dbChain - endpoints[dbSN] = TestUpstreamNodes(t, "db") - endpoints[altSN] = TestUpstreamNodes(t, "alt") - - extraUpdates = append(extraUpdates, - UpdateEvent{ - CorrelationID: datacentersWatchID, - Result: &[]string{"dc1"}, - }, - UpdateEvent{ - CorrelationID: exportedServiceListWatchID, - Result: &structs.IndexedExportedServiceList{ - Services: map[string]structs.ServiceList{ - "peer-a": []structs.ServiceName{dbSN}, - }, - }, - }, - UpdateEvent{ - CorrelationID: serviceListWatchID, - Result: &structs.IndexedServiceList{ - Services: []structs.ServiceName{ - dbSN, - altSN, - }, - }, - }, - ) - case "chain-and-l7-stuff": entries = []structs.ConfigEntry{ &structs.ProxyConfigEntry{ @@ -833,12 +703,8 @@ func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func( Kind: structs.ServiceResolver, Name: "api", Subsets: map[string]structs.ServiceResolverSubset{ - "v1": { - Filter: "Service.Meta.Version == 1", - }, "v2": { - Filter: "Service.Meta.Version == 2", - OnlyPassing: true, + Filter: "Service.Meta.version == v2", }, }, }, @@ -888,7 +754,6 @@ func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func( var ( dbSN = structs.NewServiceName("db", nil) altSN = structs.NewServiceName("alt", nil) - apiSN = structs.NewServiceName("api", nil) dbChain = discoverychain.TestCompileConfigEntries(t, "db", "default", "default", "dc1", connect.TestClusterID+".consul", nil, set) ) @@ -898,7 +763,6 @@ func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func( discoChains[dbSN] = dbChain endpoints[dbSN] = TestUpstreamNodes(t, "db") endpoints[altSN] = TestUpstreamNodes(t, "alt") - endpoints[apiSN] = TestUpstreamNodesWithServiceSubset(t, "api") extraUpdates = append(extraUpdates, UpdateEvent{ @@ -922,29 +786,7 @@ func TestConfigSnapshotPeeredMeshGateway(t testing.T, variant string, nsFn func( }, }, }, - UpdateEvent{ - CorrelationID: serviceResolversWatchID, - Result: &structs.IndexedConfigEntries{ - Kind: structs.ServiceResolver, - Entries: []structs.ConfigEntry{ - &structs.ServiceResolverConfigEntry{ - Kind: structs.ServiceResolver, - Name: "api", - Subsets: map[string]structs.ServiceResolverSubset{ - "v1": { - Filter: "Service.Meta.Version == 1", - }, - "v2": { - Filter: "Service.Meta.Version == 2", - OnlyPassing: true, - }, - }, - }, - }, - }, - }, ) - case "peer-through-mesh-gateway": extraUpdates = append(extraUpdates, diff --git a/agent/proxycfg/testing_peering.go b/agent/proxycfg/testing_peering.go index 0af8bafa9f086..9b754c977f2f6 100644 --- a/agent/proxycfg/testing_peering.go +++ b/agent/proxycfg/testing_peering.go @@ -1,32 +1,16 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg import ( - "bytes" - "text/template" - "github.com/mitchellh/go-testing-interface" - "github.com/stretchr/testify/require" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/proto/private/pbpeering" ) func TestConfigSnapshotPeering(t testing.T) *ConfigSnapshot { - return testConfigSnapshot(t, false, false) -} - -func TestConfigSnapshotPeeringWithEscapeOverrides(t testing.T) *ConfigSnapshot { - return testConfigSnapshot(t, true, false) -} - -func TestConfigSnapshotPeeringWithHTTP2(t testing.T) *ConfigSnapshot { - return testConfigSnapshot(t, false, true) -} - -func testConfigSnapshot(t testing.T, escapeOverride bool, useHTTP2 bool) *ConfigSnapshot { var ( paymentsUpstream = structs.Upstream{ DestinationName: "payments", @@ -43,11 +27,6 @@ func testConfigSnapshot(t testing.T, escapeOverride bool, useHTTP2 bool) *Config refundsUID = NewUpstreamID(&refundsUpstream) ) - protocol := "tcp" - if useHTTP2 { - protocol = "http2" - } - const peerTrustDomain = "1c053652-8512-4373-90cf-5a7f6263a994.consul" return TestConfigSnapshot(t, func(ns *structs.NodeService) { @@ -55,24 +34,6 @@ func testConfigSnapshot(t testing.T, escapeOverride bool, useHTTP2 bool) *Config paymentsUpstream, refundsUpstream, } - - if escapeOverride { - if ns.Proxy.Upstreams[0].Config == nil { - ns.Proxy.Upstreams[0].Config = map[string]interface{}{} - } - - uid := NewUpstreamID(&ns.Proxy.Upstreams[0]) - - ns.Proxy.Upstreams[0].Config["envoy_listener_json"] = - customListenerJSON(t, customListenerJSONOptions{ - Name: uid.EnvoyID() + ":custom-upstream", - }) - ns.Proxy.Upstreams[0].Config["envoy_cluster_json"] = - customClusterJSON(t, customClusterJSONOptions{ - Name: uid.EnvoyID() + ":custom-upstream", - }) - } - }, []UpdateEvent{ { CorrelationID: peerTrustBundleIDPrefix + "cloud", @@ -111,7 +72,7 @@ func testConfigSnapshot(t testing.T, escapeOverride bool, useHTTP2 bool) *Config SpiffeID: []string{ "spiffe://" + peerTrustDomain + "/ns/default/dc/cloud-dc/svc/payments", }, - Protocol: protocol, + Protocol: "tcp", }, }, }, @@ -140,7 +101,7 @@ func testConfigSnapshot(t testing.T, escapeOverride bool, useHTTP2 bool) *Config SpiffeID: []string{ "spiffe://" + peerTrustDomain + "/ns/default/dc/cloud-dc/svc/refunds", }, - Protocol: protocol, + Protocol: "tcp", }, }, }, @@ -419,93 +380,3 @@ func TestConfigSnapshotPeeringLocalMeshGateway(t testing.T) *ConfigSnapshot { }, }) } - -var ( - customListenerJSONTemplate = template.Must(template.New("").Parse(customListenerJSONTpl)) -) - -func customListenerJSON(t testing.T, opts customListenerJSONOptions) string { - t.Helper() - var buf bytes.Buffer - require.NoError(t, customListenerJSONTemplate.Execute(&buf, opts)) - return buf.String() -} - -type customListenerJSONOptions struct { - Name string - TLSContext string -} - -const customListenerJSONTpl = `{ - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "{{ .Name }}", - "address": { - "socketAddress": { - "address": "11.11.11.11", - "portValue": 11111 - } - }, - "filterChains": [ - { - {{ if .TLSContext -}} - "transport_socket": { - "name": "tls", - "typed_config": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - {{ .TLSContext }} - } - }, - {{- end }} - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "cluster": "random-cluster", - "statPrefix": "foo-stats" - } - } - ] - } - ] -}` - -type customClusterJSONOptions struct { - Name string - TLSContext string -} - -var customClusterJSONTpl = `{ - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "{{ .Name }}", - "connectTimeout": "15s", - "loadAssignment": { - "clusterName": "{{ .Name }}", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - } - } - } - ] - } - ] - } -}` - -var customClusterJSONTemplate = template.Must(template.New("").Parse(customClusterJSONTpl)) - -func customClusterJSON(t testing.T, opts customClusterJSONOptions) string { - t.Helper() - var buf bytes.Buffer - err := customClusterJSONTemplate.Execute(&buf, opts) - require.NoError(t, err) - return buf.String() -} diff --git a/agent/proxycfg/testing_terminating_gateway.go b/agent/proxycfg/testing_terminating_gateway.go index 6a718779943f6..2bfdd8fca043a 100644 --- a/agent/proxycfg/testing_terminating_gateway.go +++ b/agent/proxycfg/testing_terminating_gateway.go @@ -1,11 +1,9 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg import ( - "time" - "github.com/mitchellh/go-testing-interface" "github.com/hashicorp/consul/agent/structs" @@ -650,7 +648,6 @@ func testConfigSnapshotTerminatingGatewayLBConfig(t testing.T, variant string) * OnlyPassing: true, }, }, - RequestTimeout: 200 * time.Millisecond, LoadBalancer: &structs.LoadBalancer{ Policy: "ring_hash", RingHashConfig: &structs.RingHashConfig{ diff --git a/agent/proxycfg/testing_tproxy.go b/agent/proxycfg/testing_tproxy.go index 9c1c0934e2b87..52bbf2f5ec3e4 100644 --- a/agent/proxycfg/testing_tproxy.go +++ b/agent/proxycfg/testing_tproxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg/testing_upstreams.go b/agent/proxycfg/testing_upstreams.go index aa8c6c2e04d65..f9b77c4d62d5c 100644 --- a/agent/proxycfg/testing_upstreams.go +++ b/agent/proxycfg/testing_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg @@ -256,9 +256,6 @@ func setupTestVariationConfigEntriesAndSnapshot( case "chain-and-router": case "lb-resolver": case "register-to-terminating-gateway": - case "redirect-to-lb-node": - case "resolver-with-lb": - case "splitter-overweight": default: extraEvents := extraUpdateEvents(t, variation, dbUID) events = append(events, extraEvents...) @@ -583,61 +580,6 @@ func setupTestVariationDiscoveryChain( }, }, ) - case "splitter-overweight": - entries = append(entries, - &structs.ServiceResolverConfigEntry{ - Kind: structs.ServiceResolver, - Name: "db", - EnterpriseMeta: entMeta, - ConnectTimeout: 33 * time.Second, - RequestTimeout: 33 * time.Second, - }, - &structs.ProxyConfigEntry{ - Kind: structs.ProxyDefaults, - Name: structs.ProxyConfigGlobal, - EnterpriseMeta: entMeta, - Config: map[string]interface{}{ - "protocol": "http", - }, - }, - &structs.ServiceSplitterConfigEntry{ - Kind: structs.ServiceSplitter, - Name: "db", - EnterpriseMeta: entMeta, - Splits: []structs.ServiceSplit{ - { - Weight: 100.0, - Service: "big-side", - RequestHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "big"}, - }, - ResponseHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "big"}, - }, - }, - { - Weight: 100.0, - Service: "goldilocks-side", - RequestHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "goldilocks"}, - }, - ResponseHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "goldilocks"}, - }, - }, - { - Weight: 100.0, - Service: "lil-bit-side", - RequestHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "small"}, - }, - ResponseHeaders: &structs.HTTPHeaderModifiers{ - Set: map[string]string{"x-split-leg": "small"}, - }, - }, - }, - }, - ) case "grpc-router": entries = append(entries, &structs.ServiceResolverConfigEntry{ @@ -975,74 +917,12 @@ func setupTestVariationDiscoveryChain( Field: "header", FieldValue: "x-user-id", }, - { - Field: "query_parameter", - FieldValue: "my-pretty-param", - }, { SourceIP: true, Terminal: true, }, }, }, - }) - case "redirect-to-lb-node": - entries = append(entries, - &structs.ProxyConfigEntry{ - Kind: structs.ProxyDefaults, - Name: structs.ProxyConfigGlobal, - EnterpriseMeta: entMeta, - Config: map[string]interface{}{ - "protocol": "http", - }, - }, - &structs.ServiceRouterConfigEntry{ - Kind: structs.ServiceRouter, - Name: "db", - EnterpriseMeta: entMeta, - Routes: []structs.ServiceRoute{ - { - Match: httpMatch(&structs.ServiceRouteHTTPMatch{ - PathPrefix: "/web", - }), - Destination: toService("web"), - }, - }, - }, - &structs.ServiceResolverConfigEntry{ - Kind: structs.ServiceResolver, - Name: "web", - EnterpriseMeta: entMeta, - LoadBalancer: &structs.LoadBalancer{ - Policy: "ring_hash", - RingHashConfig: &structs.RingHashConfig{ - MinimumRingSize: 20, - MaximumRingSize: 30, - }, - }, - }, - ) - case "resolver-with-lb": - entries = append(entries, - &structs.ProxyConfigEntry{ - Kind: structs.ProxyDefaults, - Name: structs.ProxyConfigGlobal, - EnterpriseMeta: entMeta, - Config: map[string]interface{}{ - "protocol": "http", - }, - }, - &structs.ServiceResolverConfigEntry{ - Kind: structs.ServiceResolver, - Name: "db", - EnterpriseMeta: entMeta, - LoadBalancer: &structs.LoadBalancer{ - Policy: "ring_hash", - RingHashConfig: &structs.RingHashConfig{ - MinimumRingSize: 20, - MaximumRingSize: 30, - }, - }, }, ) default: diff --git a/agent/proxycfg/testing_upstreams_ce.go b/agent/proxycfg/testing_upstreams_ce.go index 711a2794b6305..3b8e22d0bda8b 100644 --- a/agent/proxycfg/testing_upstreams_ce.go +++ b/agent/proxycfg/testing_upstreams_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/proxycfg/upstreams.go b/agent/proxycfg/upstreams.go index ff2cbd212aca2..5e42072fac326 100644 --- a/agent/proxycfg/upstreams.go +++ b/agent/proxycfg/upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxycfg diff --git a/agent/proxycfg_test.go b/agent/proxycfg_test.go index 74584331ae7b3..334af2cca0acc 100644 --- a/agent/proxycfg_test.go +++ b/agent/proxycfg_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/reload.go b/agent/reload.go index cf68481621bc5..ce31fd1a76c1c 100644 --- a/agent/reload.go +++ b/agent/reload.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/remote_exec.go b/agent/remote_exec.go index 876c1898620cd..770221ed2622f 100644 --- a/agent/remote_exec.go +++ b/agent/remote_exec.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/remote_exec_test.go b/agent/remote_exec_test.go index f077de895a396..9994095078d16 100644 --- a/agent/remote_exec_test.go +++ b/agent/remote_exec_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/retry_join.go b/agent/retry_join.go index eb010c0c22c47..a629aa04706e8 100644 --- a/agent/retry_join.go +++ b/agent/retry_join.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/retry_join_test.go b/agent/retry_join_test.go index 4184ab0a9f3df..af90205965b21 100644 --- a/agent/retry_join_test.go +++ b/agent/retry_join_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/router/grpc.go b/agent/router/grpc.go index ce3f079e86b97..9fe6355d4dcf1 100644 --- a/agent/router/grpc.go +++ b/agent/router/grpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/router/manager.go b/agent/router/manager.go index 07d55127f3c8b..cccbc27d081a5 100644 --- a/agent/router/manager.go +++ b/agent/router/manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package servers provides a Manager interface for Manager managed // metadata.Server objects. The servers package manages servers from a Consul diff --git a/agent/router/manager_internal_test.go b/agent/router/manager_internal_test.go index 120a5f012c630..0e1fa28189a6d 100644 --- a/agent/router/manager_internal_test.go +++ b/agent/router/manager_internal_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/router/manager_test.go b/agent/router/manager_test.go index 6490164fda10c..708bb620a0da0 100644 --- a/agent/router/manager_test.go +++ b/agent/router/manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router_test diff --git a/agent/router/router.go b/agent/router/router.go index c261b6ed7cd52..bdba22f42d41b 100644 --- a/agent/router/router.go +++ b/agent/router/router.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/router/router_test.go b/agent/router/router_test.go index 206b0befe811c..1064dea342a32 100644 --- a/agent/router/router_test.go +++ b/agent/router/router_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/router/serf_adapter.go b/agent/router/serf_adapter.go index d3a228ca3d5d7..f30449dc05dff 100644 --- a/agent/router/serf_adapter.go +++ b/agent/router/serf_adapter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/router/serf_flooder.go b/agent/router/serf_flooder.go index 06d59d5c4a89d..34ef318377faa 100644 --- a/agent/router/serf_flooder.go +++ b/agent/router/serf_flooder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package router diff --git a/agent/routine-leak-checker/leak_test.go b/agent/routine-leak-checker/leak_test.go index f6b3c2a74953c..91d84b071b3f3 100644 --- a/agent/routine-leak-checker/leak_test.go +++ b/agent/routine-leak-checker/leak_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package leakcheck diff --git a/agent/rpc/middleware/interceptors.go b/agent/rpc/middleware/interceptors.go index 1e4a4e591fb27..f614e06cea768 100644 --- a/agent/rpc/middleware/interceptors.go +++ b/agent/rpc/middleware/interceptors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/rpc/middleware/interceptors_test.go b/agent/rpc/middleware/interceptors_test.go index a8e07c8d4d2ba..a22837fc6d952 100644 --- a/agent/rpc/middleware/interceptors_test.go +++ b/agent/rpc/middleware/interceptors_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/rpc/middleware/rate_limit_mappings.go b/agent/rpc/middleware/rate_limit_mappings.go index f9ca6a3333018..0df249c932338 100644 --- a/agent/rpc/middleware/rate_limit_mappings.go +++ b/agent/rpc/middleware/rate_limit_mappings.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/rpc/middleware/recovery.go b/agent/rpc/middleware/recovery.go index 6c23eb3ed3fa6..df37f969d4120 100644 --- a/agent/rpc/middleware/recovery.go +++ b/agent/rpc/middleware/recovery.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package middleware diff --git a/agent/rpc/operator/service.go b/agent/rpc/operator/service.go index 697b0db254321..6b3302c9f2e46 100644 --- a/agent/rpc/operator/service.go +++ b/agent/rpc/operator/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package operator diff --git a/agent/rpc/operator/service_test.go b/agent/rpc/operator/service_test.go index 3cc9e117d4425..465a6d6428d29 100644 --- a/agent/rpc/operator/service_test.go +++ b/agent/rpc/operator/service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package operator diff --git a/agent/rpc/peering/service.go b/agent/rpc/peering/service.go index d57e0378f98c0..cae0319a62dd1 100644 --- a/agent/rpc/peering/service.go +++ b/agent/rpc/peering/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/agent/rpc/peering/service_ce_test.go b/agent/rpc/peering/service_ce_test.go index 92fb9fac45d2f..d4e5fab0ba40e 100644 --- a/agent/rpc/peering/service_ce_test.go +++ b/agent/rpc/peering/service_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/rpc/peering/service_test.go b/agent/rpc/peering/service_test.go index 49bf97b19c7ff..9ae1f6597700a 100644 --- a/agent/rpc/peering/service_test.go +++ b/agent/rpc/peering/service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering_test @@ -15,8 +15,6 @@ import ( "testing" "time" - "github.com/hashicorp/consul/internal/resource" - "github.com/google/tcpproxy" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-uuid" @@ -1952,7 +1950,6 @@ func newDefaultDeps(t *testing.T, c *consul.Config) consul.Deps { NewRequestRecorderFunc: middleware.NewRequestRecorder, GetNetRPCInterceptorFunc: middleware.GetNetRPCInterceptor, XDSStreamLimiter: limiter.NewSessionLimiter(), - Registry: resource.NewRegistry(), } } diff --git a/agent/rpc/peering/testing.go b/agent/rpc/peering/testing.go index 8989950ee29be..ddd9d43a8ad27 100644 --- a/agent/rpc/peering/testing.go +++ b/agent/rpc/peering/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/agent/rpc/peering/testutil_ce_test.go b/agent/rpc/peering/testutil_ce_test.go index 4602c01fc5abe..d15d62e9f1cb1 100644 --- a/agent/rpc/peering/testutil_ce_test.go +++ b/agent/rpc/peering/testutil_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/rpc/peering/validate.go b/agent/rpc/peering/validate.go index 2de6684d85ff9..1bd3f393bd748 100644 --- a/agent/rpc/peering/validate.go +++ b/agent/rpc/peering/validate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/agent/rpc/peering/validate_test.go b/agent/rpc/peering/validate_test.go index 669baf41702fc..c5b3c6c7bdb08 100644 --- a/agent/rpc/peering/validate_test.go +++ b/agent/rpc/peering/validate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/agent/rpcclient/common.go b/agent/rpcclient/common.go index 316fb341a9356..8ff1573992362 100644 --- a/agent/rpcclient/common.go +++ b/agent/rpcclient/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rpcclient diff --git a/agent/rpcclient/configentry/configentry.go b/agent/rpcclient/configentry/configentry.go index 2b38455beb074..ada7928dc1af7 100644 --- a/agent/rpcclient/configentry/configentry.go +++ b/agent/rpcclient/configentry/configentry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/rpcclient/configentry/configentry_test.go b/agent/rpcclient/configentry/configentry_test.go index 92e6f4b3c88ae..9f526892fd11a 100644 --- a/agent/rpcclient/configentry/configentry_test.go +++ b/agent/rpcclient/configentry/configentry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/rpcclient/configentry/view.go b/agent/rpcclient/configentry/view.go index 70271a9220e97..dae3208810bfa 100644 --- a/agent/rpcclient/configentry/view.go +++ b/agent/rpcclient/configentry/view.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/rpcclient/configentry/view_test.go b/agent/rpcclient/configentry/view_test.go index 0209c898cafed..37e642e5c36c1 100644 --- a/agent/rpcclient/configentry/view_test.go +++ b/agent/rpcclient/configentry/view_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package configentry diff --git a/agent/rpcclient/health/health.go b/agent/rpcclient/health/health.go index f062d2aac284e..8a65a50578aad 100644 --- a/agent/rpcclient/health/health.go +++ b/agent/rpcclient/health/health.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package health diff --git a/agent/rpcclient/health/health_test.go b/agent/rpcclient/health/health_test.go index 30900bc04cc01..2d8c57a3beba5 100644 --- a/agent/rpcclient/health/health_test.go +++ b/agent/rpcclient/health/health_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package health diff --git a/agent/rpcclient/health/streaming_test.go b/agent/rpcclient/health/streaming_test.go index 180b61f0eec65..3a0ba734ba9ab 100644 --- a/agent/rpcclient/health/streaming_test.go +++ b/agent/rpcclient/health/streaming_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package health diff --git a/agent/rpcclient/health/view.go b/agent/rpcclient/health/view.go index 8e08ba801e5f1..e1fffd3e23de6 100644 --- a/agent/rpcclient/health/view.go +++ b/agent/rpcclient/health/view.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package health diff --git a/agent/rpcclient/health/view_test.go b/agent/rpcclient/health/view_test.go index 83eba5ab41a07..6b4b8ee85798d 100644 --- a/agent/rpcclient/health/view_test.go +++ b/agent/rpcclient/health/view_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package health diff --git a/agent/service_checks_test.go b/agent/service_checks_test.go index 41372cc47dbbe..c567776587e36 100644 --- a/agent/service_checks_test.go +++ b/agent/service_checks_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/service_manager.go b/agent/service_manager.go index 1c6041f8f0de8..b7e38b393ace2 100644 --- a/agent/service_manager.go +++ b/agent/service_manager.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/service_manager_test.go b/agent/service_manager_test.go index 289503a51ede4..724022d42ad90 100644 --- a/agent/service_manager_test.go +++ b/agent/service_manager_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/session_endpoint.go b/agent/session_endpoint.go index 90c3fa32bae7e..a9b9a6dee6baa 100644 --- a/agent/session_endpoint.go +++ b/agent/session_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/session_endpoint_test.go b/agent/session_endpoint_test.go index ae5a492808d7c..5ce93db7a68fe 100644 --- a/agent/session_endpoint_test.go +++ b/agent/session_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/setup.go b/agent/setup.go index 7a95ba6bf5411..88c883f9bdb71 100644 --- a/agent/setup.go +++ b/agent/setup.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -260,8 +260,6 @@ func NewBaseDeps(configLoader ConfigLoader, logOut io.Writer, providedLogger hcl d.XDSStreamLimiter = limiter.NewSessionLimiter() - d.Registry = consul.NewTypeRegistry() - return d, nil } diff --git a/agent/setup_ce.go b/agent/setup_ce.go index af24a1515e6be..46c4b80eb4efb 100644 --- a/agent/setup_ce.go +++ b/agent/setup_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/sidecar_service.go b/agent/sidecar_service.go index 8e57d5930bc11..7dfb067b50ef0 100644 --- a/agent/sidecar_service.go +++ b/agent/sidecar_service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/sidecar_service_test.go b/agent/sidecar_service_test.go index fd39a5a284a10..4960dd73d0542 100644 --- a/agent/sidecar_service_test.go +++ b/agent/sidecar_service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/signal_unix.go b/agent/signal_unix.go index 83e00f27b351d..bd0b3e7793cdd 100644 --- a/agent/signal_unix.go +++ b/agent/signal_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/agent/signal_windows.go b/agent/signal_windows.go index cb49a169c09a0..c6ea0c980ffb6 100644 --- a/agent/signal_windows.go +++ b/agent/signal_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/agent/snapshot_endpoint.go b/agent/snapshot_endpoint.go index 06805ae5f8c19..60d986256433b 100644 --- a/agent/snapshot_endpoint.go +++ b/agent/snapshot_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/snapshot_endpoint_test.go b/agent/snapshot_endpoint_test.go index a534fe0251135..e68fb22f385fd 100644 --- a/agent/snapshot_endpoint_test.go +++ b/agent/snapshot_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/status_endpoint.go b/agent/status_endpoint.go index 4a40ec8910270..86f9f1a5d0193 100644 --- a/agent/status_endpoint.go +++ b/agent/status_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/status_endpoint_test.go b/agent/status_endpoint_test.go index db231fbc9b834..5be9d6be64a3e 100644 --- a/agent/status_endpoint_test.go +++ b/agent/status_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/streaming_test.go b/agent/streaming_test.go index fed1e8126d41d..9074f66e83441 100644 --- a/agent/streaming_test.go +++ b/agent/streaming_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/structs/acl.go b/agent/structs/acl.go index 813a3b1758438..bed8aaca7d6b5 100644 --- a/agent/structs/acl.go +++ b/agent/structs/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -1323,7 +1323,7 @@ type ACLTokenListResponse struct { } // ACLTokenBatchGetRequest is used for reading multiple tokens, this is -// different from the token list request in that only tokens with the +// different from the the token list request in that only tokens with the // the requested ids are returned type ACLTokenBatchGetRequest struct { AccessorIDs []string // List of accessor ids to fetch diff --git a/agent/structs/acl_cache.go b/agent/structs/acl_cache.go index 15f3a2edc3c26..46d4fdd28117b 100644 --- a/agent/structs/acl_cache.go +++ b/agent/structs/acl_cache.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/acl_cache_test.go b/agent/structs/acl_cache_test.go index 57e218ff21e32..e390da960f4ed 100644 --- a/agent/structs/acl_cache_test.go +++ b/agent/structs/acl_cache_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/acl_ce.go b/agent/structs/acl_ce.go index 54062047606be..9cc4e7813ce85 100644 --- a/agent/structs/acl_ce.go +++ b/agent/structs/acl_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/acl_test.go b/agent/structs/acl_test.go index e1fb35263b95a..6658b8335021a 100644 --- a/agent/structs/acl_test.go +++ b/agent/structs/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/aclfilter/filter.go b/agent/structs/aclfilter/filter.go index d59bf3c9c403b..ddd63db10e686 100644 --- a/agent/structs/aclfilter/filter.go +++ b/agent/structs/aclfilter/filter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package aclfilter diff --git a/agent/structs/aclfilter/filter_test.go b/agent/structs/aclfilter/filter_test.go index 98f3bb63f291b..2339b0acd223d 100644 --- a/agent/structs/aclfilter/filter_test.go +++ b/agent/structs/aclfilter/filter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package aclfilter diff --git a/agent/structs/auto_encrypt.go b/agent/structs/auto_encrypt.go index cce7c4effa1e3..2e9053f9a5382 100644 --- a/agent/structs/auto_encrypt.go +++ b/agent/structs/auto_encrypt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/autopilot.go b/agent/structs/autopilot.go index 431e2ad4d374f..a5a14684fa9e3 100644 --- a/agent/structs/autopilot.go +++ b/agent/structs/autopilot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/autopilot_ce.go b/agent/structs/autopilot_ce.go index 55420d23e19de..3098c0cf3cae6 100644 --- a/agent/structs/autopilot_ce.go +++ b/agent/structs/autopilot_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/catalog.go b/agent/structs/catalog.go index 84795ce47898d..f11af9f87801b 100644 --- a/agent/structs/catalog.go +++ b/agent/structs/catalog.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/catalog_ce.go b/agent/structs/catalog_ce.go index ad5218bf80ae5..91e08264b99d0 100644 --- a/agent/structs/catalog_ce.go +++ b/agent/structs/catalog_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/check_definition.go b/agent/structs/check_definition.go index ec760832609ab..600fc1f0502fb 100644 --- a/agent/structs/check_definition.go +++ b/agent/structs/check_definition.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/check_definition_test.go b/agent/structs/check_definition_test.go index 5a51f377c0e8f..676499ef042a1 100644 --- a/agent/structs/check_definition_test.go +++ b/agent/structs/check_definition_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/check_type.go b/agent/structs/check_type.go index 96254f62d86e7..0f31a89bfb153 100644 --- a/agent/structs/check_type.go +++ b/agent/structs/check_type.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry.go b/agent/structs/config_entry.go index 27ea020bd404c..c18a8013b6d45 100644 --- a/agent/structs/config_entry.go +++ b/agent/structs/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -574,7 +574,7 @@ func (e *ProxyConfigEntry) UnmarshalBinary(data []byte) error { // into a concrete type. // // There is an 'api' variation of this in -// command/helpers/helpers.go:newDecodeConfigEntry +// command/config/write/config_write.go:newDecodeConfigEntry func DecodeConfigEntry(raw map[string]interface{}) (ConfigEntry, error) { var entry ConfigEntry diff --git a/agent/structs/config_entry_apigw_jwt_ce.go b/agent/structs/config_entry_apigw_jwt_ce.go deleted file mode 100644 index 5c0b40b5c8e1a..0000000000000 --- a/agent/structs/config_entry_apigw_jwt_ce.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package structs - -// APIGatewayJWTRequirement holds the list of JWT providers to be verified against -type APIGatewayJWTRequirement struct{} - -// JWTFilter holds the JWT Filter configuration for an HTTPRoute -type JWTFilter struct{} diff --git a/agent/structs/config_entry_ce.go b/agent/structs/config_entry_ce.go index b95192bec22bd..2977075bff1b7 100644 --- a/agent/structs/config_entry_ce.go +++ b/agent/structs/config_entry_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent @@ -30,8 +30,6 @@ func validateUnusedKeys(unused []string) error { // to exist on the target. case strings.HasSuffix(strings.ToLower(k), "namespace"): err = multierror.Append(err, fmt.Errorf("invalid config key %q, namespaces are a consul enterprise feature", k)) - case strings.Contains(strings.ToLower(k), "jwt"): - err = multierror.Append(err, fmt.Errorf("invalid config key %q, api-gateway jwt validation is a consul enterprise feature", k)) default: err = multierror.Append(err, fmt.Errorf("invalid config key %q", k)) } diff --git a/agent/structs/config_entry_ce_test.go b/agent/structs/config_entry_ce_test.go index fd3ed9d350777..4561f4aae3587 100644 --- a/agent/structs/config_entry_ce_test.go +++ b/agent/structs/config_entry_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_discoverychain.go b/agent/structs/config_entry_discoverychain.go index 6dc0a05d8212a..587d98561c4ec 100644 --- a/agent/structs/config_entry_discoverychain.go +++ b/agent/structs/config_entry_discoverychain.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_discoverychain_ce.go b/agent/structs/config_entry_discoverychain_ce.go index bdbe463a5bf04..87c22263794e8 100644 --- a/agent/structs/config_entry_discoverychain_ce.go +++ b/agent/structs/config_entry_discoverychain_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_discoverychain_ce_test.go b/agent/structs/config_entry_discoverychain_ce_test.go index 4dda3ff39626e..2edcce2bedd8f 100644 --- a/agent/structs/config_entry_discoverychain_ce_test.go +++ b/agent/structs/config_entry_discoverychain_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_discoverychain_test.go b/agent/structs/config_entry_discoverychain_test.go index 5961446d1fb78..7378e20787fea 100644 --- a/agent/structs/config_entry_discoverychain_test.go +++ b/agent/structs/config_entry_discoverychain_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_exports.go b/agent/structs/config_entry_exports.go index 97e33dd6e7059..631773072d0be 100644 --- a/agent/structs/config_entry_exports.go +++ b/agent/structs/config_entry_exports.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_exports_ce.go b/agent/structs/config_entry_exports_ce.go index 770139ee2ef90..9f9bb1cc0825e 100644 --- a/agent/structs/config_entry_exports_ce.go +++ b/agent/structs/config_entry_exports_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_exports_ce_test.go b/agent/structs/config_entry_exports_ce_test.go index bd74dfc962529..671654b3b2a4a 100644 --- a/agent/structs/config_entry_exports_ce_test.go +++ b/agent/structs/config_entry_exports_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_exports_test.go b/agent/structs/config_entry_exports_test.go index 62e5586a0dac2..7905b46009b79 100644 --- a/agent/structs/config_entry_exports_test.go +++ b/agent/structs/config_entry_exports_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_gateways.go b/agent/structs/config_entry_gateways.go index 00c2687d1ec96..0be410d198708 100644 --- a/agent/structs/config_entry_gateways.go +++ b/agent/structs/config_entry_gateways.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -887,17 +887,6 @@ type APIGatewayListener struct { Protocol APIGatewayListenerProtocol // TLS is the TLS settings for the listener. TLS APIGatewayTLSConfiguration - - // Override is the policy that overrides all other policy and route specific configuration - Override *APIGatewayPolicy `json:",omitempty"` - // Default is the policy that is the default for the listener and route, routes can override this behavior - Default *APIGatewayPolicy `json:",omitempty"` -} - -// APIGatewayPolicy holds the policy that configures the gateway listener, this is used in the `Override` and `Default` fields of a listener -type APIGatewayPolicy struct { - // JWT holds the JWT configuration for the Listener - JWT *APIGatewayJWTRequirement `json:",omitempty"` } func (l APIGatewayListener) GetHostname() string { diff --git a/agent/structs/config_entry_gateways_test.go b/agent/structs/config_entry_gateways_test.go index f05638ec4d2e2..d624b39acd403 100644 --- a/agent/structs/config_entry_gateways_test.go +++ b/agent/structs/config_entry_gateways_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_inline_certificate.go b/agent/structs/config_entry_inline_certificate.go index f397ee2ba16ec..17ffa9082b6fd 100644 --- a/agent/structs/config_entry_inline_certificate.go +++ b/agent/structs/config_entry_inline_certificate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -58,7 +58,6 @@ func (e *InlineCertificateConfigEntry) Validate() error { if privateKeyBlock == nil { return errors.New("failed to parse private key PEM") } - err = validateKeyLength(privateKeyBlock) if err != nil { return err diff --git a/agent/structs/config_entry_inline_certificate_test.go b/agent/structs/config_entry_inline_certificate_test.go index 3c537c059161b..b95f3b0e9694d 100644 --- a/agent/structs/config_entry_inline_certificate_test.go +++ b/agent/structs/config_entry_inline_certificate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_intentions.go b/agent/structs/config_entry_intentions.go index f32aafa9a87d2..bc4d36863b567 100644 --- a/agent/structs/config_entry_intentions.go +++ b/agent/structs/config_entry_intentions.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_intentions_ce.go b/agent/structs/config_entry_intentions_ce.go index e11063b999d14..3c97b55aac56a 100644 --- a/agent/structs/config_entry_intentions_ce.go +++ b/agent/structs/config_entry_intentions_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_intentions_ce_test.go b/agent/structs/config_entry_intentions_ce_test.go index 03f82075e5a65..23d4ded4d2617 100644 --- a/agent/structs/config_entry_intentions_ce_test.go +++ b/agent/structs/config_entry_intentions_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_intentions_test.go b/agent/structs/config_entry_intentions_test.go index ea8703de05d86..56c04bb21e3cf 100644 --- a/agent/structs/config_entry_intentions_test.go +++ b/agent/structs/config_entry_intentions_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_jwt_provider.go b/agent/structs/config_entry_jwt_provider.go index 12bc7c89d9ede..7336027d70954 100644 --- a/agent/structs/config_entry_jwt_provider.go +++ b/agent/structs/config_entry_jwt_provider.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_jwt_provider_ce.go b/agent/structs/config_entry_jwt_provider_ce.go index 1473cf95d98a2..533f349c01e52 100644 --- a/agent/structs/config_entry_jwt_provider_ce.go +++ b/agent/structs/config_entry_jwt_provider_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_jwt_provider_test.go b/agent/structs/config_entry_jwt_provider_test.go index 6a117fe5084f4..a63507663ce45 100644 --- a/agent/structs/config_entry_jwt_provider_test.go +++ b/agent/structs/config_entry_jwt_provider_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_mesh.go b/agent/structs/config_entry_mesh.go index a531821650d83..249973c00b08e 100644 --- a/agent/structs/config_entry_mesh.go +++ b/agent/structs/config_entry_mesh.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_mesh_ce.go b/agent/structs/config_entry_mesh_ce.go index 319bf6adc109e..1612d65682730 100644 --- a/agent/structs/config_entry_mesh_ce.go +++ b/agent/structs/config_entry_mesh_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_mesh_test.go b/agent/structs/config_entry_mesh_test.go index f6eaea9e9c546..6bdfaa15cae80 100644 --- a/agent/structs/config_entry_mesh_test.go +++ b/agent/structs/config_entry_mesh_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_routes.go b/agent/structs/config_entry_routes.go index d285a40624435..4d908331511d4 100644 --- a/agent/structs/config_entry_routes.go +++ b/agent/structs/config_entry_routes.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -7,7 +7,6 @@ import ( "errors" "fmt" "strings" - "time" "github.com/miekg/dns" @@ -418,11 +417,8 @@ type HTTPQueryMatch struct { // HTTPFilters specifies a list of filters used to modify a request // before it is routed to an upstream. type HTTPFilters struct { - Headers []HTTPHeaderFilter - URLRewrite *URLRewrite - RetryFilter *RetryFilter - TimeoutFilter *TimeoutFilter - JWT *JWTFilter + Headers []HTTPHeaderFilter + URLRewrite *URLRewrite } // HTTPHeaderFilter specifies how HTTP headers should be modified. @@ -436,18 +432,6 @@ type URLRewrite struct { Path string } -type RetryFilter struct { - NumRetries *uint32 - RetryOn []string - RetryOnStatusCodes []uint32 - RetryOnConnectFailure *bool -} - -type TimeoutFilter struct { - RequestTimeout time.Duration - IdleTimeout time.Duration -} - // HTTPRouteRule specifies the routing rules used to determine what upstream // service an HTTP request is routed to. type HTTPRouteRule struct { diff --git a/agent/structs/config_entry_routes_test.go b/agent/structs/config_entry_routes_test.go index 5ab85e5977e9d..476ce46eed05d 100644 --- a/agent/structs/config_entry_routes_test.go +++ b/agent/structs/config_entry_routes_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_sameness_group.go b/agent/structs/config_entry_sameness_group.go index dd1b84aa85ed3..a1d0dccb3c7c1 100644 --- a/agent/structs/config_entry_sameness_group.go +++ b/agent/structs/config_entry_sameness_group.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_sameness_group_ce.go b/agent/structs/config_entry_sameness_group_ce.go index 2fd3a3438de46..282ab862fa3b3 100644 --- a/agent/structs/config_entry_sameness_group_ce.go +++ b/agent/structs/config_entry_sameness_group_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/config_entry_status.go b/agent/structs/config_entry_status.go index 749ba1596868d..fb91a0add3743 100644 --- a/agent/structs/config_entry_status.go +++ b/agent/structs/config_entry_status.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/config_entry_test.go b/agent/structs/config_entry_test.go index 9151ef815b158..cdaae4e23d4bf 100644 --- a/agent/structs/config_entry_test.go +++ b/agent/structs/config_entry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/connect.go b/agent/structs/connect.go index 4a6033efab57c..227c2eb472702 100644 --- a/agent/structs/connect.go +++ b/agent/structs/connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/connect_ca.go b/agent/structs/connect_ca.go index 90e139fab0dcb..c8a7cea1df8ae 100644 --- a/agent/structs/connect_ca.go +++ b/agent/structs/connect_ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/connect_ca_test.go b/agent/structs/connect_ca_test.go index 5f224e04f76a6..d64efef375bfd 100644 --- a/agent/structs/connect_ca_test.go +++ b/agent/structs/connect_ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/connect_ce.go b/agent/structs/connect_ce.go index b78e8b4c6c23a..9547c245148b0 100644 --- a/agent/structs/connect_ce.go +++ b/agent/structs/connect_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/connect_proxy_config.go b/agent/structs/connect_proxy_config.go index 3bd5276f8279a..acca2ad1cbcd4 100644 --- a/agent/structs/connect_proxy_config.go +++ b/agent/structs/connect_proxy_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/connect_proxy_config_ce.go b/agent/structs/connect_proxy_config_ce.go index dfdc10bbadcff..898ca163a5c2f 100644 --- a/agent/structs/connect_proxy_config_ce.go +++ b/agent/structs/connect_proxy_config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/connect_proxy_config_test.go b/agent/structs/connect_proxy_config_test.go index be16d17be6a3c..bcf43b2119ca1 100644 --- a/agent/structs/connect_proxy_config_test.go +++ b/agent/structs/connect_proxy_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/deep-copy.sh b/agent/structs/deep-copy.sh index cbc1bdc42ae5d..e4ab69273a473 100755 --- a/agent/structs/deep-copy.sh +++ b/agent/structs/deep-copy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly PACKAGE_DIR="$(dirname "${BASH_SOURCE[0]}")" diff --git a/agent/structs/discovery_chain.go b/agent/structs/discovery_chain.go index c81dd1ec0836e..029fc3b0a8be8 100644 --- a/agent/structs/discovery_chain.go +++ b/agent/structs/discovery_chain.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/discovery_chain_ce.go b/agent/structs/discovery_chain_ce.go index b4a83b890445e..febff8c7762a7 100644 --- a/agent/structs/discovery_chain_ce.go +++ b/agent/structs/discovery_chain_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/envoy_extension.go b/agent/structs/envoy_extension.go index ab9988bf21bc8..c788aedf37e85 100644 --- a/agent/structs/envoy_extension.go +++ b/agent/structs/envoy_extension.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/errors.go b/agent/structs/errors.go index df8123dc60dab..82e2b0b5f0132 100644 --- a/agent/structs/errors.go +++ b/agent/structs/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/federation_state.go b/agent/structs/federation_state.go index 5a0e8eef6d04d..f123a0954be7e 100644 --- a/agent/structs/federation_state.go +++ b/agent/structs/federation_state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/identity.go b/agent/structs/identity.go index b55f6bb7ae51d..286dd552a3469 100644 --- a/agent/structs/identity.go +++ b/agent/structs/identity.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/intention.go b/agent/structs/intention.go index 3bbc2584f70fc..21d5432b41123 100644 --- a/agent/structs/intention.go +++ b/agent/structs/intention.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/intention_ce.go b/agent/structs/intention_ce.go index cb657b8e37773..af62df50bca44 100644 --- a/agent/structs/intention_ce.go +++ b/agent/structs/intention_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/intention_test.go b/agent/structs/intention_test.go index 077bef0f200d2..600f600729d13 100644 --- a/agent/structs/intention_test.go +++ b/agent/structs/intention_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/operator.go b/agent/structs/operator.go index 9d78cb92143f8..05862861e3f85 100644 --- a/agent/structs/operator.go +++ b/agent/structs/operator.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/peering.go b/agent/structs/peering.go index 927efabb34c25..3ee7acb224025 100644 --- a/agent/structs/peering.go +++ b/agent/structs/peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/prepared_query.go b/agent/structs/prepared_query.go index 1c851c476ef00..71b0eba81bc3e 100644 --- a/agent/structs/prepared_query.go +++ b/agent/structs/prepared_query.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -341,7 +341,7 @@ type PreparedQueryExecuteRemoteRequest struct { Connect bool // QueryOptions (unfortunately named here) controls the consistency - // settings for the service lookups. + // settings for the the service lookups. QueryOptions } diff --git a/agent/structs/prepared_query_test.go b/agent/structs/prepared_query_test.go index 537c6b043818a..a6d6e64849af0 100644 --- a/agent/structs/prepared_query_test.go +++ b/agent/structs/prepared_query_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/protobuf_compat.go b/agent/structs/protobuf_compat.go index c52d85a32c29f..65ebf2eaf4acd 100644 --- a/agent/structs/protobuf_compat.go +++ b/agent/structs/protobuf_compat.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/service_definition.go b/agent/structs/service_definition.go index 9b9fec89e9540..6ee81af0590c9 100644 --- a/agent/structs/service_definition.go +++ b/agent/structs/service_definition.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/service_definition_test.go b/agent/structs/service_definition_test.go index ec6d4fc5374e9..023972092ff44 100644 --- a/agent/structs/service_definition_test.go +++ b/agent/structs/service_definition_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/snapshot.go b/agent/structs/snapshot.go index 3d71fb093d3c6..4f622216751f0 100644 --- a/agent/structs/snapshot.go +++ b/agent/structs/snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/structs.deepcopy.go b/agent/structs/structs.deepcopy.go index 35dd20062817e..cdd007c26cdb5 100644 --- a/agent/structs/structs.deepcopy.go +++ b/agent/structs/structs.deepcopy.go @@ -18,20 +18,6 @@ func (o *APIGatewayListener) DeepCopy() *APIGatewayListener { cp.TLS.CipherSuites = make([]types.TLSCipherSuite, len(o.TLS.CipherSuites)) copy(cp.TLS.CipherSuites, o.TLS.CipherSuites) } - if o.Override != nil { - cp.Override = new(APIGatewayPolicy) - *cp.Override = *o.Override - if o.Override.JWT != nil { - cp.Override.JWT = o.Override.JWT.DeepCopy() - } - } - if o.Default != nil { - cp.Default = new(APIGatewayPolicy) - *cp.Default = *o.Default - if o.Default.JWT != nil { - cp.Default.JWT = o.Default.JWT.DeepCopy() - } - } return &cp } @@ -397,33 +383,6 @@ func (o *HTTPRouteConfigEntry) DeepCopy() *HTTPRouteConfigEntry { cp.Rules[i2].Filters.URLRewrite = new(URLRewrite) *cp.Rules[i2].Filters.URLRewrite = *o.Rules[i2].Filters.URLRewrite } - if o.Rules[i2].Filters.RetryFilter != nil { - cp.Rules[i2].Filters.RetryFilter = new(RetryFilter) - *cp.Rules[i2].Filters.RetryFilter = *o.Rules[i2].Filters.RetryFilter - if o.Rules[i2].Filters.RetryFilter.NumRetries != nil { - cp.Rules[i2].Filters.RetryFilter.NumRetries = new(uint32) - *cp.Rules[i2].Filters.RetryFilter.NumRetries = *o.Rules[i2].Filters.RetryFilter.NumRetries - } - if o.Rules[i2].Filters.RetryFilter.RetryOn != nil { - cp.Rules[i2].Filters.RetryFilter.RetryOn = make([]string, len(o.Rules[i2].Filters.RetryFilter.RetryOn)) - copy(cp.Rules[i2].Filters.RetryFilter.RetryOn, o.Rules[i2].Filters.RetryFilter.RetryOn) - } - if o.Rules[i2].Filters.RetryFilter.RetryOnStatusCodes != nil { - cp.Rules[i2].Filters.RetryFilter.RetryOnStatusCodes = make([]uint32, len(o.Rules[i2].Filters.RetryFilter.RetryOnStatusCodes)) - copy(cp.Rules[i2].Filters.RetryFilter.RetryOnStatusCodes, o.Rules[i2].Filters.RetryFilter.RetryOnStatusCodes) - } - if o.Rules[i2].Filters.RetryFilter.RetryOnConnectFailure != nil { - cp.Rules[i2].Filters.RetryFilter.RetryOnConnectFailure = new(bool) - *cp.Rules[i2].Filters.RetryFilter.RetryOnConnectFailure = *o.Rules[i2].Filters.RetryFilter.RetryOnConnectFailure - } - } - if o.Rules[i2].Filters.TimeoutFilter != nil { - cp.Rules[i2].Filters.TimeoutFilter = new(TimeoutFilter) - *cp.Rules[i2].Filters.TimeoutFilter = *o.Rules[i2].Filters.TimeoutFilter - } - if o.Rules[i2].Filters.JWT != nil { - cp.Rules[i2].Filters.JWT = o.Rules[i2].Filters.JWT.DeepCopy() - } if o.Rules[i2].Matches != nil { cp.Rules[i2].Matches = make([]HTTPMatch, len(o.Rules[i2].Matches)) copy(cp.Rules[i2].Matches, o.Rules[i2].Matches) @@ -468,33 +427,6 @@ func (o *HTTPRouteConfigEntry) DeepCopy() *HTTPRouteConfigEntry { cp.Rules[i2].Services[i4].Filters.URLRewrite = new(URLRewrite) *cp.Rules[i2].Services[i4].Filters.URLRewrite = *o.Rules[i2].Services[i4].Filters.URLRewrite } - if o.Rules[i2].Services[i4].Filters.RetryFilter != nil { - cp.Rules[i2].Services[i4].Filters.RetryFilter = new(RetryFilter) - *cp.Rules[i2].Services[i4].Filters.RetryFilter = *o.Rules[i2].Services[i4].Filters.RetryFilter - if o.Rules[i2].Services[i4].Filters.RetryFilter.NumRetries != nil { - cp.Rules[i2].Services[i4].Filters.RetryFilter.NumRetries = new(uint32) - *cp.Rules[i2].Services[i4].Filters.RetryFilter.NumRetries = *o.Rules[i2].Services[i4].Filters.RetryFilter.NumRetries - } - if o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOn != nil { - cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOn = make([]string, len(o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOn)) - copy(cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOn, o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOn) - } - if o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnStatusCodes != nil { - cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnStatusCodes = make([]uint32, len(o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnStatusCodes)) - copy(cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnStatusCodes, o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnStatusCodes) - } - if o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnConnectFailure != nil { - cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnConnectFailure = new(bool) - *cp.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnConnectFailure = *o.Rules[i2].Services[i4].Filters.RetryFilter.RetryOnConnectFailure - } - } - if o.Rules[i2].Services[i4].Filters.TimeoutFilter != nil { - cp.Rules[i2].Services[i4].Filters.TimeoutFilter = new(TimeoutFilter) - *cp.Rules[i2].Services[i4].Filters.TimeoutFilter = *o.Rules[i2].Services[i4].Filters.TimeoutFilter - } - if o.Rules[i2].Services[i4].Filters.JWT != nil { - cp.Rules[i2].Services[i4].Filters.JWT = o.Rules[i2].Services[i4].Filters.JWT.DeepCopy() - } } } } diff --git a/agent/structs/structs.deepcopy_ce.go b/agent/structs/structs.deepcopy_ce.go deleted file mode 100644 index d2e909bf49e87..0000000000000 --- a/agent/structs/structs.deepcopy_ce.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package structs - -// DeepCopy generates a deep copy of *APIGatewayJWTRequirement -func (o *APIGatewayJWTRequirement) DeepCopy() *APIGatewayJWTRequirement { - return new(APIGatewayJWTRequirement) -} - -// DeepCopy generates a deep copy of *JWTFilter -func (o *JWTFilter) DeepCopy() *JWTFilter { - return new(JWTFilter) -} diff --git a/agent/structs/structs.go b/agent/structs/structs.go index fbacb36ffe665..fc9783fa800c9 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -1483,10 +1483,6 @@ func (s *NodeService) IsGateway() bool { func (s *NodeService) Validate() error { var result error - if err := s.Locality.Validate(); err != nil { - result = multierror.Append(result, err) - } - if s.Kind == ServiceKindConnectProxy { if s.Port == 0 && s.SocketPath == "" { result = multierror.Append(result, fmt.Errorf("Port or SocketPath must be set for a %s", s.Kind)) @@ -2098,18 +2094,6 @@ func (csn *CheckServiceNode) CanRead(authz acl.Authorizer) acl.EnforcementDecisi return acl.Allow } -func (csn *CheckServiceNode) Locality() *Locality { - if csn.Service != nil && csn.Service.Locality != nil { - return csn.Service.Locality - } - - if csn.Node != nil && csn.Node.Locality != nil { - return csn.Node.Locality - } - - return nil -} - type CheckServiceNodes []CheckServiceNode func (csns CheckServiceNodes) DeepCopy() CheckServiceNodes { @@ -3131,15 +3115,3 @@ func (l *Locality) GetRegion() string { } return l.Region } - -func (l *Locality) Validate() error { - if l == nil { - return nil - } - - if l.Region == "" && l.Zone != "" { - return fmt.Errorf("zone cannot be set without region") - } - - return nil -} diff --git a/agent/structs/structs_ce.go b/agent/structs/structs_ce.go index f47fac578afcc..6b004460e5fb7 100644 --- a/agent/structs/structs_ce.go +++ b/agent/structs/structs_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/structs_ce_test.go b/agent/structs/structs_ce_test.go index 6ec8723ae5e12..55e51a70088c3 100644 --- a/agent/structs/structs_ce_test.go +++ b/agent/structs/structs_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/structs/structs_ext_test.go b/agent/structs/structs_ext_test.go index 3b1cd6b6df1cf..9bbc4ca0cb915 100644 --- a/agent/structs/structs_ext_test.go +++ b/agent/structs/structs_ext_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs_test diff --git a/agent/structs/structs_filtering_test.go b/agent/structs/structs_filtering_test.go index 3750adb16ce1f..9739923e0e5a9 100644 --- a/agent/structs/structs_filtering_test.go +++ b/agent/structs/structs_filtering_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/structs_test.go b/agent/structs/structs_test.go index bf909aa41903e..6d887da9ac776 100644 --- a/agent/structs/structs_test.go +++ b/agent/structs/structs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs @@ -592,43 +592,6 @@ func TestStructs_ServiceNode_Conversions(t *testing.T) { } } -func TestStructs_Locality_Validate(t *testing.T) { - type testCase struct { - locality *Locality - err string - } - cases := map[string]testCase{ - "nil": { - nil, - "", - }, - "region only": { - &Locality{Region: "us-west-1"}, - "", - }, - "region and zone": { - &Locality{Region: "us-west-1", Zone: "us-west-1a"}, - "", - }, - "zone only": { - &Locality{Zone: "us-west-1a"}, - "zone cannot be set without region", - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - err := tc.locality.Validate() - if tc.err == "" { - require.NoError(t, err) - } else { - require.Error(t, err) - require.Contains(t, err.Error(), tc.err) - } - }) - } -} - func TestStructs_NodeService_ValidateMeshGateway(t *testing.T) { type testCase struct { Modify func(*NodeService) @@ -1189,13 +1152,6 @@ func TestStructs_NodeService_ValidateConnectProxy(t *testing.T) { }, "", }, - { - "connect-proxy: invalid locality", - func(x *NodeService) { - x.Locality = &Locality{Zone: "bad"} - }, - "zone cannot be set without region", - }, } for _, tc := range cases { @@ -1358,7 +1314,7 @@ func TestStructs_NodeService_ValidateSidecarService(t *testing.T) { } func TestStructs_NodeService_ConnectNativeEmptyPortError(t *testing.T) { - ns := TestNodeService() + ns := TestNodeService(t) ns.Connect.Native = true ns.Port = 0 err := ns.Validate() diff --git a/agent/structs/system_metadata.go b/agent/structs/system_metadata.go index 555756201a5d2..fa6f6cd0ae58c 100644 --- a/agent/structs/system_metadata.go +++ b/agent/structs/system_metadata.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/testing.go b/agent/structs/testing.go index 527da21c4e890..ad8382b0ce3b1 100644 --- a/agent/structs/testing.go +++ b/agent/structs/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/testing_catalog.go b/agent/structs/testing_catalog.go index 8047695bba564..9e72aebc77458 100644 --- a/agent/structs/testing_catalog.go +++ b/agent/structs/testing_catalog.go @@ -1,14 +1,13 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs import ( "fmt" - "github.com/mitchellh/go-testing-interface" - "github.com/hashicorp/consul/acl" + "github.com/mitchellh/go-testing-interface" ) // TestRegisterRequest returns a RegisterRequest for registering a typical service. @@ -48,11 +47,11 @@ func TestRegisterIngressGateway(t testing.T) *RegisterRequest { } // TestNodeService returns a *NodeService representing a valid regular service: "web". -func TestNodeService() *NodeService { - return TestNodeServiceWithName("web") +func TestNodeService(t testing.T) *NodeService { + return TestNodeServiceWithName(t, "web") } -func TestNodeServiceWithName(name string) *NodeService { +func TestNodeServiceWithName(t testing.T, name string) *NodeService { return &NodeService{ Kind: ServiceKindTypical, Service: name, diff --git a/agent/structs/testing_connect_proxy_config.go b/agent/structs/testing_connect_proxy_config.go index 971e355fba2da..c41cc99651113 100644 --- a/agent/structs/testing_connect_proxy_config.go +++ b/agent/structs/testing_connect_proxy_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/testing_intention.go b/agent/structs/testing_intention.go index 974a103de1bd4..57c6f9d50154e 100644 --- a/agent/structs/testing_intention.go +++ b/agent/structs/testing_intention.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/testing_service_definition.go b/agent/structs/testing_service_definition.go index da51014f43115..2707067262f5e 100644 --- a/agent/structs/testing_service_definition.go +++ b/agent/structs/testing_service_definition.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/structs/txn.go b/agent/structs/txn.go index efb11aa891eae..a97b4733f5edb 100644 --- a/agent/structs/txn.go +++ b/agent/structs/txn.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/agent/submatview/handler.go b/agent/submatview/handler.go index f33746a7f324c..b3c900e695286 100644 --- a/agent/submatview/handler.go +++ b/agent/submatview/handler.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/local_materializer.go b/agent/submatview/local_materializer.go index 4ee06a3640298..5eeaefaa665a9 100644 --- a/agent/submatview/local_materializer.go +++ b/agent/submatview/local_materializer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/local_materializer_test.go b/agent/submatview/local_materializer_test.go index fa7a01845034b..e6600a0516207 100644 --- a/agent/submatview/local_materializer_test.go +++ b/agent/submatview/local_materializer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/materializer.go b/agent/submatview/materializer.go index 42754c914da08..240f6cfafbb4e 100644 --- a/agent/submatview/materializer.go +++ b/agent/submatview/materializer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/rpc_materializer.go b/agent/submatview/rpc_materializer.go index dfeb90172a695..855576b1b339a 100644 --- a/agent/submatview/rpc_materializer.go +++ b/agent/submatview/rpc_materializer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/store.go b/agent/submatview/store.go index ccfc319e2f4cc..1f189121264c4 100644 --- a/agent/submatview/store.go +++ b/agent/submatview/store.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/store_integration_test.go b/agent/submatview/store_integration_test.go index 45ba11d3cc3cf..3b6d9fbc2b57d 100644 --- a/agent/submatview/store_integration_test.go +++ b/agent/submatview/store_integration_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview_test diff --git a/agent/submatview/store_test.go b/agent/submatview/store_test.go index c878654d89be9..36a92e7ec02b7 100644 --- a/agent/submatview/store_test.go +++ b/agent/submatview/store_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/submatview/streaming_test.go b/agent/submatview/streaming_test.go index 54b28d1abe6bc..223babf530b13 100644 --- a/agent/submatview/streaming_test.go +++ b/agent/submatview/streaming_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package submatview diff --git a/agent/systemd/notify.go b/agent/systemd/notify.go index 60c71947dc8a4..88ce2c2ece95a 100644 --- a/agent/systemd/notify.go +++ b/agent/systemd/notify.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package systemd diff --git a/agent/testagent.go b/agent/testagent.go index 3d0e2c8038e8b..57b9c1b111833 100644 --- a/agent/testagent.go +++ b/agent/testagent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/testagent_test.go b/agent/testagent_test.go index 266b6e864cc36..66d1d61f01e53 100644 --- a/agent/testagent_test.go +++ b/agent/testagent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/token/persistence.go b/agent/token/persistence.go index 117f72359d277..9d543b30edf9d 100644 --- a/agent/token/persistence.go +++ b/agent/token/persistence.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/agent/token/persistence_test.go b/agent/token/persistence_test.go index 5d6e73f0d228b..093515f70e434 100644 --- a/agent/token/persistence_test.go +++ b/agent/token/persistence_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/agent/token/store.go b/agent/token/store.go index a32475eb477ed..b0f9732a8cc6f 100644 --- a/agent/token/store.go +++ b/agent/token/store.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/agent/token/store_ce.go b/agent/token/store_ce.go index f2fab3390dfd6..87fefdbbe0480 100644 --- a/agent/token/store_ce.go +++ b/agent/token/store_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/token/store_test.go b/agent/token/store_test.go index c35c44a7b69fa..8d0992f229ca2 100644 --- a/agent/token/store_test.go +++ b/agent/token/store_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/agent/translate_addr.go b/agent/translate_addr.go index 1c0f8a4003058..9be80ebc0f8c8 100644 --- a/agent/translate_addr.go +++ b/agent/translate_addr.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/txn_endpoint.go b/agent/txn_endpoint.go index 10117a53c500b..faf9c9e726668 100644 --- a/agent/txn_endpoint.go +++ b/agent/txn_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/txn_endpoint_test.go b/agent/txn_endpoint_test.go index fe19ed825301c..19c5925ba7a9c 100644 --- a/agent/txn_endpoint_test.go +++ b/agent/txn_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/ui_endpoint.go b/agent/ui_endpoint.go index d0cc8a5be8329..fa4bb23f84647 100644 --- a/agent/ui_endpoint.go +++ b/agent/ui_endpoint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent @@ -190,6 +190,7 @@ func AgentMembersMapAddrVer(s *HTTPHandlers, req *http.Request) (map[string]stri filter := consul.LANMemberFilter{ Partition: entMeta.PartitionOrDefault(), } + if acl.IsDefaultPartition(filter.Partition) { filter.AllSegments = true } diff --git a/agent/ui_endpoint_ce_test.go b/agent/ui_endpoint_ce_test.go index 82a16b765f5cb..3e57fca667e87 100644 --- a/agent/ui_endpoint_ce_test.go +++ b/agent/ui_endpoint_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/ui_endpoint_test.go b/agent/ui_endpoint_test.go index 1e0c391d0c951..b39a2f31dc931 100644 --- a/agent/ui_endpoint_test.go +++ b/agent/ui_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/uiserver/buf_index_fs.go b/agent/uiserver/buf_index_fs.go index 283616c36eda6..9ea23316fb10a 100644 --- a/agent/uiserver/buf_index_fs.go +++ b/agent/uiserver/buf_index_fs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/uiserver/buffered_file.go b/agent/uiserver/buffered_file.go index daa30c610d29f..5c794dac26908 100644 --- a/agent/uiserver/buffered_file.go +++ b/agent/uiserver/buffered_file.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/uiserver/redirect_fs.go b/agent/uiserver/redirect_fs.go index 4a61ba7b2c14d..66b48e637fdc8 100644 --- a/agent/uiserver/redirect_fs.go +++ b/agent/uiserver/redirect_fs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/uiserver/ui_template_data.go b/agent/uiserver/ui_template_data.go index 726207b148f0c..d8d5fc42ba4e3 100644 --- a/agent/uiserver/ui_template_data.go +++ b/agent/uiserver/ui_template_data.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/uiserver/uiserver.go b/agent/uiserver/uiserver.go index 0cd20c5fda0b4..8cabb8e3e0cd9 100644 --- a/agent/uiserver/uiserver.go +++ b/agent/uiserver/uiserver.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/uiserver/uiserver_test.go b/agent/uiserver/uiserver_test.go index ce649276546be..c42792fe320bf 100644 --- a/agent/uiserver/uiserver_test.go +++ b/agent/uiserver/uiserver_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package uiserver diff --git a/agent/user_event.go b/agent/user_event.go index 23cbc90c336d8..25be0dd88f42a 100644 --- a/agent/user_event.go +++ b/agent/user_event.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/user_event_test.go b/agent/user_event_test.go index 62ea5f4adca31..ac807def924cf 100644 --- a/agent/user_event_test.go +++ b/agent/user_event_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/util.go b/agent/util.go index 1bcdbca01f1aa..285ba91df948d 100644 --- a/agent/util.go +++ b/agent/util.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/util_test.go b/agent/util_test.go index 42aa745e70fae..4c3ae5602d39b 100644 --- a/agent/util_test.go +++ b/agent/util_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/watch_handler.go b/agent/watch_handler.go index b926b7167505d..518fd6c77c98a 100644 --- a/agent/watch_handler.go +++ b/agent/watch_handler.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/watch_handler_test.go b/agent/watch_handler_test.go index 151e05e9c0778..f97d4d3982d3f 100644 --- a/agent/watch_handler_test.go +++ b/agent/watch_handler_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/agent/xds/accesslogs/accesslogs.go b/agent/xds/accesslogs/accesslogs.go index 25a3baf192fe0..84cbf55e64d8c 100644 --- a/agent/xds/accesslogs/accesslogs.go +++ b/agent/xds/accesslogs/accesslogs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package accesslogs diff --git a/agent/xds/clusters.go b/agent/xds/clusters.go index 908aa746bc9c4..dc8245627b0cd 100644 --- a/agent/xds/clusters.go +++ b/agent/xds/clusters.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -19,8 +19,6 @@ import ( envoy_upstreams_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3" envoy_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" - "github.com/hashicorp/consul/agent/xds/config" - "github.com/hashicorp/consul/agent/xds/naming" "github.com/hashicorp/go-hclog" "google.golang.org/protobuf/encoding/protojson" @@ -32,7 +30,6 @@ import ( "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/proto/private/pbpeering" ) @@ -369,7 +366,7 @@ func makePassthroughClusters(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.Message, !meshConf.TransparentProxy.MeshDestinationsOnly { clusters = append(clusters, &envoy_cluster_v3.Cluster{ - Name: naming.OriginalDestinationClusterName, + Name: OriginalDestinationClusterName, ClusterDiscoveryType: &envoy_cluster_v3.Cluster_Type{ Type: envoy_cluster_v3.Cluster_ORIGINAL_DST, }, @@ -811,6 +808,27 @@ func (s *ResourceGenerator) makeGatewayOutgoingClusterPeeringServiceClusters(cfg } cluster := s.makeGatewayCluster(cfgSnap, opts) + if serviceGroup.UseCDS { + configureClusterWithHostnames( + s.Logger, + cluster, + "", /*TODO:make configurable?*/ + serviceGroup.Nodes, + true, /*isRemote*/ + false, /*onlyPassing*/ + ) + } else { + cluster.ClusterDiscoveryType = &envoy_cluster_v3.Cluster_Type{Type: envoy_cluster_v3.Cluster_EDS} + cluster.EdsClusterConfig = &envoy_cluster_v3.Cluster_EdsClusterConfig{ + EdsConfig: &envoy_core_v3.ConfigSource{ + ResourceApiVersion: envoy_core_v3.ApiVersion_V3, + ConfigSourceSpecifier: &envoy_core_v3.ConfigSource_Ads{ + Ads: &envoy_core_v3.AggregatedConfigSource{}, + }, + }, + } + } + clusters = append(clusters, cluster) } } @@ -974,10 +992,8 @@ func (s *ResourceGenerator) clustersFromSnapshotAPIGateway(cfgSnap *proxycfg.Con // Grab the discovery chain compiled in handlerAPIGateway.recompileDiscoveryChains chain, ok := cfgSnap.APIGateway.DiscoveryChain[uid] if !ok { - // this should not happen, but it can't error out because the equivalent - // listener generation will continue - s.Logger.Warn("could not find discovery chain for gateway upstream", "upstream", uid) - continue + // this should not happen + return nil, fmt.Errorf("no discovery chain for upstream %q", uid) } // Generate the list of upstream clusters for the discovery chain @@ -1009,11 +1025,11 @@ func (s *ResourceGenerator) configIngressUpstreamCluster(c *envoy_cluster_v3.Clu switch limitType { case "max_connections": - threshold.MaxConnections = response.MakeUint32Value(limit) + threshold.MaxConnections = makeUint32Value(limit) case "max_pending_requests": - threshold.MaxPendingRequests = response.MakeUint32Value(limit) + threshold.MaxPendingRequests = makeUint32Value(limit) case "max_requests": - threshold.MaxRequests = response.MakeUint32Value(limit) + threshold.MaxRequests = makeUint32Value(limit) } } @@ -1044,7 +1060,12 @@ func (s *ResourceGenerator) configIngressUpstreamCluster(c *envoy_cluster_v3.Clu if svc != nil { override = svc.PassiveHealthCheck } - outlierDetection := config.ToOutlierDetection(cfgSnap.IngressGateway.Defaults.PassiveHealthCheck, override, false) + outlierDetection := ToOutlierDetection(cfgSnap.IngressGateway.Defaults.PassiveHealthCheck, override, false) + + // Specail handling for failover peering service, which has set MaxEjectionPercent + if c.OutlierDetection != nil && c.OutlierDetection.MaxEjectionPercent != nil { + outlierDetection.MaxEjectionPercent = &wrapperspb.UInt32Value{Value: c.OutlierDetection.MaxEjectionPercent.Value} + } c.OutlierDetection = outlierDetection } @@ -1053,7 +1074,7 @@ func (s *ResourceGenerator) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, nam var c *envoy_cluster_v3.Cluster var err error - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) + cfg, err := ParseProxyConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1104,7 +1125,7 @@ func (s *ResourceGenerator) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, nam c.CircuitBreakers = &envoy_cluster_v3.CircuitBreakers{ Thresholds: []*envoy_cluster_v3.CircuitBreakers_Thresholds{ { - MaxConnections: response.MakeUint32Value(cfg.MaxInboundConnections), + MaxConnections: makeUint32Value(cfg.MaxInboundConnections), }, }, } @@ -1147,7 +1168,7 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService( clusterName := generatePeeredClusterName(uid, tbs) - outlierDetection := config.ToOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true) + outlierDetection := ToOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true) // We can't rely on health checks for services on cluster peers because they // don't take into account service resolvers, splitters and routers. Setting // MaxEjectionPercent too 100% gives outlier detection the power to eject the @@ -1282,7 +1303,7 @@ func (s *ResourceGenerator) makeUpstreamClusterForPreparedQuery(upstream structs CircuitBreakers: &envoy_cluster_v3.CircuitBreakers{ Thresholds: makeThresholdsIfNeeded(cfg.Limits), }, - OutlierDetection: config.ToOutlierDetection(cfg.PassiveHealthCheck, nil, true), + OutlierDetection: ToOutlierDetection(cfg.PassiveHealthCheck, nil, true), } if cfg.Protocol == "http2" || cfg.Protocol == "grpc" { if err := s.setHttp2ProtocolOptions(c); err != nil { @@ -1424,7 +1445,7 @@ func (s *ResourceGenerator) makeUpstreamClustersForDiscoveryChain( // These variables are prefixed with primary to avoid shaddowing bugs. primaryTargetID := node.Resolver.Target primaryTarget := chain.Targets[primaryTargetID] - primaryTargetClusterName := s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway) + primaryTargetClusterName := s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway, false) if primaryTargetClusterName == "" { continue } @@ -1502,7 +1523,7 @@ func (s *ResourceGenerator) makeUpstreamClustersForDiscoveryChain( CircuitBreakers: &envoy_cluster_v3.CircuitBreakers{ Thresholds: makeThresholdsIfNeeded(upstreamConfig.Limits), }, - OutlierDetection: config.ToOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true), + OutlierDetection: ToOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true), } var lb *structs.LoadBalancer @@ -1656,6 +1677,11 @@ func makeClusterFromUserConfig(configJSON string) (*envoy_cluster_v3.Cluster, er return &c, err } +type addressPair struct { + host string + port int +} + type clusterOpts struct { // name for the cluster name string @@ -1679,7 +1705,7 @@ type clusterOpts struct { // makeGatewayCluster creates an Envoy cluster for a mesh or terminating gateway func (s *ResourceGenerator) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, opts clusterOpts) *envoy_cluster_v3.Cluster { - cfg, err := config.ParseGatewayConfig(snap.Proxy.Config) + cfg, err := ParseGatewayConfig(snap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1709,13 +1735,13 @@ func (s *ResourceGenerator) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, op TcpKeepalive: &envoy_core_v3.TcpKeepalive{}, } if cfg.TcpKeepaliveTime != 0 { - cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveTime = response.MakeUint32Value(cfg.TcpKeepaliveTime) + cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveTime = makeUint32Value(cfg.TcpKeepaliveTime) } if cfg.TcpKeepaliveInterval != 0 { - cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveInterval = response.MakeUint32Value(cfg.TcpKeepaliveInterval) + cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveInterval = makeUint32Value(cfg.TcpKeepaliveInterval) } if cfg.TcpKeepaliveProbes != 0 { - cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveProbes = response.MakeUint32Value(cfg.TcpKeepaliveProbes) + cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveProbes = makeUint32Value(cfg.TcpKeepaliveProbes) } } @@ -1822,7 +1848,7 @@ func configureClusterWithHostnames( // makeExternalIPCluster creates an Envoy cluster for routing to IP addresses outside of Consul // This is used by terminating gateways for Destinations func (s *ResourceGenerator) makeExternalIPCluster(snap *proxycfg.ConfigSnapshot, opts clusterOpts) *envoy_cluster_v3.Cluster { - cfg, err := config.ParseGatewayConfig(snap.Proxy.Config) + cfg, err := ParseGatewayConfig(snap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1861,7 +1887,7 @@ func (s *ResourceGenerator) makeExternalIPCluster(snap *proxycfg.ConfigSnapshot, // makeExternalHostnameCluster creates an Envoy cluster for hostname endpoints that will be resolved with DNS // This is used by both terminating gateways for Destinations, and Mesh Gateways for peering control plane traffice func (s *ResourceGenerator) makeExternalHostnameCluster(snap *proxycfg.ConfigSnapshot, opts clusterOpts) *envoy_cluster_v3.Cluster { - cfg, err := config.ParseGatewayConfig(snap.Proxy.Config) + cfg, err := ParseGatewayConfig(snap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1885,7 +1911,7 @@ func (s *ResourceGenerator) makeExternalHostnameCluster(snap *proxycfg.ConfigSna endpoints := make([]*envoy_endpoint_v3.LbEndpoint, 0, len(opts.addresses)) for _, pair := range opts.addresses { - address := response.MakeAddress(pair.Address, pair.Port) + address := makeAddress(pair.Address, pair.Port) endpoint := &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ @@ -1918,13 +1944,13 @@ func makeThresholdsIfNeeded(limits *structs.UpstreamLimits) []*envoy_cluster_v3. // Likewise, make sure to not set any threshold values on the zero-value in // order to rely on Envoy defaults if limits.MaxConnections != nil { - threshold.MaxConnections = response.MakeUint32Value(*limits.MaxConnections) + threshold.MaxConnections = makeUint32Value(*limits.MaxConnections) } if limits.MaxPendingRequests != nil { - threshold.MaxPendingRequests = response.MakeUint32Value(*limits.MaxPendingRequests) + threshold.MaxPendingRequests = makeUint32Value(*limits.MaxPendingRequests) } if limits.MaxConcurrentRequests != nil { - threshold.MaxRequests = response.MakeUint32Value(*limits.MaxConcurrentRequests) + threshold.MaxRequests = makeUint32Value(*limits.MaxConcurrentRequests) } return []*envoy_cluster_v3.CircuitBreakers_Thresholds{threshold} @@ -1947,7 +1973,7 @@ func makeLbEndpoint(addr string, port int, health envoy_core_v3.HealthStatus, we }, }, HealthStatus: health, - LoadBalancingWeight: response.MakeUint32Value(weight), + LoadBalancingWeight: makeUint32Value(weight), } } @@ -2028,11 +2054,15 @@ func generatePeeredClusterName(uid proxycfg.UpstreamID, tb *pbpeering.PeeringTru }, ".") } -func (s *ResourceGenerator) getTargetClusterName(upstreamsSnapshot *proxycfg.ConfigSnapshotUpstreams, chain *structs.CompiledDiscoveryChain, tid string, forMeshGateway bool) string { +type targetClusterData struct { + targetID string + clusterName string +} + +func (s *ResourceGenerator) getTargetClusterName(upstreamsSnapshot *proxycfg.ConfigSnapshotUpstreams, chain *structs.CompiledDiscoveryChain, tid string, forMeshGateway bool, failover bool) string { target := chain.Targets[tid] clusterName := target.Name targetUID := proxycfg.NewUpstreamIDFromTargetID(tid) - if targetUID.Peer != "" { tbs, ok := upstreamsSnapshot.UpstreamPeerTrustBundles.Get(targetUID.Peer) // We can't generate cluster on peers without the trust bundle. The @@ -2047,7 +2077,10 @@ func (s *ResourceGenerator) getTargetClusterName(upstreamsSnapshot *proxycfg.Con clusterName = generatePeeredClusterName(targetUID, tbs) } - clusterName = naming.CustomizeClusterName(clusterName, chain) + clusterName = CustomizeClusterName(clusterName, chain) + if failover { + clusterName = xdscommon.FailoverClusterNamePrefix + clusterName + } if forMeshGateway { clusterName = meshGatewayExportedClusterNamePrefix + clusterName } diff --git a/agent/xds/clusters_test.go b/agent/xds/clusters_test.go index adeb2b57374fb..954aad7756f06 100644 --- a/agent/xds/clusters_test.go +++ b/agent/xds/clusters_test.go @@ -1,11 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds import ( "bytes" - "github.com/hashicorp/consul/types" "path/filepath" "sort" "testing" @@ -21,35 +20,16 @@ import ( "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/proxystateconverter" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/agent/xds/testcommon" - "github.com/hashicorp/consul/agent/xdsv2" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/sdk/testutil" + "github.com/hashicorp/consul/types" ) -type mockCfgFetcher struct { - addressLan string -} - -func (s *mockCfgFetcher) AdvertiseAddrLAN() string { - return s.addressLan -} - type clusterTestCase struct { name string create func(t testinf.T) *proxycfg.ConfigSnapshot overrideGoldenName string - alsoRunTestForV2 bool -} - -func uint32ptr(i uint32) *uint32 { - return &i -} - -func durationPtr(d time.Duration) *time.Duration { - return &d } func makeClusterDiscoChainTests(enterprise bool) []clusterTestCase { @@ -64,125 +44,90 @@ func makeClusterDiscoChainTests(enterprise bool) []clusterTestCase { }) }, nil) }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-chain", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple", enterprise, nil, nil) }, - alsoRunTestForV2: true, - }, - { - name: "connect-proxy-with-chain-http2", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple", enterprise, func(ns *structs.NodeService) { - ns.Proxy.Upstreams[0].Config["protocol"] = "http2" - }, nil) - }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-external-sni", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "external-sni", enterprise, nil, nil) }, - //TODO(proxystate): this requires terminating gateway work - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-overrides", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple-with-overrides", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-failover", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-failover-through-remote-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-remote-gateway", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-failover-through-remote-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-remote-gateway-triggered", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-remote-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-remote-gateway", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-remote-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-remote-gateway-triggered", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-failover-through-local-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-local-gateway", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-failover-through-local-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-local-gateway-triggered", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-local-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-local-gateway", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-local-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-local-gateway-triggered", enterprise, nil, nil) }, - // TODO(proxystate): requires routes work - alsoRunTestForV2: false, }, { name: "splitter-with-resolver-redirect", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "splitter-with-resolver-redirect-multidc", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-lb-in-resolver", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "lb-resolver", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, } } @@ -214,7 +159,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-outgoing-min-version", @@ -234,7 +178,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-outgoing-max-version", @@ -254,7 +197,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-outgoing-cipher-suites", @@ -277,7 +219,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-jwt-config-entry-with-local", @@ -301,8 +242,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - // TODO(proxystate): jwt work will come at a later time - alsoRunTestForV2: false, }, { name: "connect-proxy-with-jwt-config-entry-with-remote-jwks", @@ -337,8 +276,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - // TODO(proxystate): jwt work will come at a later time - alsoRunTestForV2: false, }, { name: "custom-local-app", @@ -350,8 +287,6 @@ func TestClustersFromSnapshot(t *testing.T) { }) }, nil) }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, }, { name: "custom-upstream", @@ -363,8 +298,6 @@ func TestClustersFromSnapshot(t *testing.T) { }) }, nil) }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, }, { name: "custom-upstream-ignores-tls", @@ -379,46 +312,6 @@ func TestClustersFromSnapshot(t *testing.T) { }) }, nil) }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, - }, - { - name: "custom-upstream-with-prepared-query", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { - for i := range ns.Proxy.Upstreams { - - switch ns.Proxy.Upstreams[i].DestinationName { - case "db": - if ns.Proxy.Upstreams[i].Config == nil { - ns.Proxy.Upstreams[i].Config = map[string]interface{}{} - } - - uid := proxycfg.NewUpstreamID(&ns.Proxy.Upstreams[i]) - - // Triggers an override with the presence of the escape hatch listener - ns.Proxy.Upstreams[i].DestinationType = structs.UpstreamDestTypePreparedQuery - - ns.Proxy.Upstreams[i].Config["envoy_cluster_json"] = - customClusterJSON(t, customClusterJSONOptions{ - Name: uid.EnvoyID() + ":custom-upstream", - }) - - // Also test that http2 options are triggered. - // A separate upstream without an override is required to test - case "geo-cache": - if ns.Proxy.Upstreams[i].Config == nil { - ns.Proxy.Upstreams[i].Config = map[string]interface{}{} - } - ns.Proxy.Upstreams[i].Config["protocol"] = "http2" - default: - continue - } - } - }, nil) - }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, }, { name: "custom-timeouts", @@ -428,7 +321,6 @@ func TestClustersFromSnapshot(t *testing.T) { ns.Proxy.Upstreams[0].Config["connect_timeout_ms"] = 2345 }, nil) }, - alsoRunTestForV2: true, }, { name: "custom-passive-healthcheck", @@ -443,22 +335,6 @@ func TestClustersFromSnapshot(t *testing.T) { } }, nil) }, - alsoRunTestForV2: true, - }, - { - name: "custom-passive-healthcheck-zero-consecutive_5xx", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { - ns.Proxy.Upstreams[0].Config["passive_health_check"] = map[string]interface{}{ - "enforcing_consecutive_5xx": float64(0), - "max_failures": float64(5), - "interval": float64(10 * time.Second), - "max_ejection_percent": float64(100), - "base_ejection_time": float64(10 * time.Second), - } - }, nil) - }, - alsoRunTestForV2: true, }, { name: "custom-max-inbound-connections", @@ -467,7 +343,6 @@ func TestClustersFromSnapshot(t *testing.T) { ns.Proxy.Config["max_inbound_connections"] = 3456 }, nil) }, - alsoRunTestForV2: true, }, { name: "custom-limits-max-connections-only", @@ -488,7 +363,6 @@ func TestClustersFromSnapshot(t *testing.T) { } }, nil) }, - alsoRunTestForV2: true, }, { name: "custom-limits-set-to-zero", @@ -507,7 +381,6 @@ func TestClustersFromSnapshot(t *testing.T) { } }, nil) }, - alsoRunTestForV2: true, }, { name: "custom-limits", @@ -526,14 +399,12 @@ func TestClustersFromSnapshot(t *testing.T) { } }, nil) }, - alsoRunTestForV2: true, }, { name: "expose-paths-local-app-paths", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotExposeConfig(t, nil) }, - alsoRunTestForV2: true, }, { name: "downstream-service-with-unix-sockets", @@ -546,7 +417,6 @@ func TestClustersFromSnapshot(t *testing.T) { ns.Proxy.LocalServiceSocketPath = "/tmp/downstream_proxy.sock" }, nil) }, - alsoRunTestForV2: true, }, { name: "expose-paths-new-cluster-http2", @@ -560,89 +430,58 @@ func TestClustersFromSnapshot(t *testing.T) { } }) }, - alsoRunTestForV2: true, }, { - name: "expose-checks", - create: proxycfg.TestConfigSnapshotExposeChecks, - alsoRunTestForV2: true, - }, - { - name: "expose-paths-grpc-new-cluster-http1", - create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, - alsoRunTestForV2: true, + name: "expose-paths-grpc-new-cluster-http1", + create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, }, { name: "mesh-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "default", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-using-federation-states", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "federation-states", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, - }, - { - name: "mesh-gateway-using-federation-control-plane", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotMeshGateway(t, "mesh-gateway-federation", nil, nil) - }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-no-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "no-services", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-service-subsets", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "service-subsets", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-ignore-extra-resolvers", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "ignore-extra-resolvers", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-service-timeouts", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "service-timeouts", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-non-hash-lb-injected", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "non-hash-lb-injected", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-hash-lb-ignored", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "hash-lb-ignored", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-tcp-keepalives", @@ -654,8 +493,6 @@ func TestClustersFromSnapshot(t *testing.T) { ns.Proxy.Config["envoy_gateway_remote_tcp_keepalive_probes"] = 7 }, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway", @@ -663,16 +500,12 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "default", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-nil-config-entry", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGateway_NilConfigEntry(t) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-with-tls-outgoing-min-version", @@ -692,8 +525,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-with-tls-outgoing-max-version", @@ -713,8 +544,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-with-tls-outgoing-cipher-suites", @@ -737,8 +566,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, }) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-no-services", @@ -746,8 +573,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, false, "tcp", "default", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain", @@ -755,8 +580,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "simple", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-service-max-connections", @@ -767,8 +590,6 @@ func TestClustersFromSnapshot(t *testing.T) { entry.Listeners[0].Services[0].MaxConnections = 4096 }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-defaults-service-max-connections", @@ -783,8 +604,6 @@ func TestClustersFromSnapshot(t *testing.T) { } }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-overwrite-defaults-service-max-connections", @@ -800,8 +619,6 @@ func TestClustersFromSnapshot(t *testing.T) { entry.Listeners[0].Services[0].MaxPendingRequests = 2048 }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-service-passive-health-check", @@ -811,14 +628,11 @@ func TestClustersFromSnapshot(t *testing.T) { func(entry *structs.IngressGatewayConfigEntry) { entry.Listeners[0].Services[0].MaxConnections = 4096 entry.Listeners[0].Services[0].PassiveHealthCheck = &structs.PassiveHealthCheck{ - Interval: 5000000000, - MaxFailures: 10, - MaxEjectionPercent: uint32ptr(90), + Interval: 5000000000, + MaxFailures: 10, } }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-defaults-passive-health-check", @@ -835,13 +649,10 @@ func TestClustersFromSnapshot(t *testing.T) { Interval: 5000000000, MaxFailures: 10, EnforcingConsecutive5xx: &enforcingConsecutive5xx, - MaxEjectionPercent: uint32ptr(90), }, } }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-overwrite-defaults-passive-health-check", @@ -856,7 +667,6 @@ func TestClustersFromSnapshot(t *testing.T) { PassiveHealthCheck: &structs.PassiveHealthCheck{ Interval: 5000000000, EnforcingConsecutive5xx: &defaultEnforcingConsecutive5xx, - MaxEjectionPercent: uint32ptr(80), }, } enforcingConsecutive5xx := uint32(50) @@ -865,13 +675,9 @@ func TestClustersFromSnapshot(t *testing.T) { entry.Listeners[0].Services[0].PassiveHealthCheck = &structs.PassiveHealthCheck{ Interval: 8000000000, EnforcingConsecutive5xx: &enforcingConsecutive5xx, - MaxEjectionPercent: uint32ptr(90), - BaseEjectionTime: durationPtr(12 * time.Second), } }, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-external-sni", @@ -879,8 +685,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "external-sni", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-failover", @@ -888,8 +692,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-failover-to-cluster-peer", @@ -897,8 +699,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-to-cluster-peer", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-remote-gateway", @@ -906,8 +706,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-remote-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-remote-gateway-triggered", @@ -915,8 +713,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-remote-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-remote-gateway", @@ -924,8 +720,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-remote-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-remote-gateway-triggered", @@ -933,8 +727,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-remote-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-local-gateway", @@ -942,8 +734,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-local-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-local-gateway-triggered", @@ -951,8 +741,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-local-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-local-gateway", @@ -960,8 +748,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-local-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-local-gateway-triggered", @@ -969,8 +755,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-local-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-splitter-with-resolver-redirect", @@ -978,8 +762,6 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "splitter-with-resolver-redirect-multidc", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-lb-in-resolver", @@ -987,66 +769,46 @@ func TestClustersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "lb-resolver", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotTerminatingGateway(t, true, nil, nil) }, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-no-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotTerminatingGateway(t, false, nil, nil) }, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-service-subsets", create: proxycfg.TestConfigSnapshotTerminatingGatewayServiceSubsetsWebAndCache, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-hostname-service-subsets", create: proxycfg.TestConfigSnapshotTerminatingGatewayHostnameSubsets, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-sni", create: proxycfg.TestConfigSnapshotTerminatingGatewaySNI, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-http2-upstream", create: proxycfg.TestConfigSnapshotTerminatingGatewayHTTP2, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-http2-upstream-subsets", create: proxycfg.TestConfigSnapshotTerminatingGatewaySubsetsHTTP2, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-ignore-extra-resolvers", create: proxycfg.TestConfigSnapshotTerminatingGatewayIgnoreExtraResolvers, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-lb-config", create: proxycfg.TestConfigSnapshotTerminatingGatewayLBConfigNoHashPolicies, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-tcp-keepalives", @@ -1061,24 +823,18 @@ func TestClustersFromSnapshot(t *testing.T) { ns.Proxy.Config["envoy_gateway_remote_tcp_keepalive_probes"] = 5 }, nil) }, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-multiple-listeners-duplicate-service", create: proxycfg.TestConfigSnapshotIngress_MultipleListenersDuplicateService, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { - name: "transparent-proxy-catalog-destinations-only", - create: proxycfg.TestConfigSnapshotTransparentProxyCatalogDestinationsOnly, - alsoRunTestForV2: true, + name: "transparent-proxy-catalog-destinations-only", + create: proxycfg.TestConfigSnapshotTransparentProxyCatalogDestinationsOnly, }, { - name: "transparent-proxy-dial-instances-directly", - create: proxycfg.TestConfigSnapshotTransparentProxyDialDirectly, - alsoRunTestForV2: true, + name: "transparent-proxy-dial-instances-directly", + create: proxycfg.TestConfigSnapshotTransparentProxyDialDirectly, }, } @@ -1110,10 +866,10 @@ func TestClustersFromSnapshot(t *testing.T) { return clusters[i].(*envoy_cluster_v3.Cluster).Name < clusters[j].(*envoy_cluster_v3.Cluster).Name }) - r, err := response.CreateResponse(xdscommon.ClusterType, "00000001", "00000001", clusters) + r, err := createResponse(xdscommon.ClusterType, "00000001", "00000001", clusters) require.NoError(t, err) - t.Run("current-xdsv1", func(t *testing.T) { + t.Run("current", func(t *testing.T) { gotJSON := protoToJSON(t, r) gName := tt.name @@ -1123,40 +879,6 @@ func TestClustersFromSnapshot(t *testing.T) { require.JSONEq(t, goldenEnvoy(t, filepath.Join("clusters", gName), envoyVersion, latestEnvoyVersion, gotJSON), gotJSON) }) - - if tt.alsoRunTestForV2 { - generator := xdsv2.NewResourceGenerator(testutil.Logger(t)) - - converter := proxystateconverter.NewConverter(testutil.Logger(t), &mockCfgFetcher{addressLan: "10.10.10.10"}) - proxyState, err := converter.ProxyStateFromSnapshot(snap) - require.NoError(t, err) - - res, err := generator.AllResourcesFromIR(proxyState) - require.NoError(t, err) - - clusters = res[xdscommon.ClusterType] - - // The order of clusters returned via CDS isn't relevant, so it's safe - // to sort these for the purposes of test comparisons. - sort.Slice(clusters, func(i, j int) bool { - return clusters[i].(*envoy_cluster_v3.Cluster).Name < clusters[j].(*envoy_cluster_v3.Cluster).Name - }) - - r, err := response.CreateResponse(xdscommon.ClusterType, "00000001", "00000001", clusters) - require.NoError(t, err) - - t.Run("current-xdsv2", func(t *testing.T) { - gotJSON := protoToJSON(t, r) - - gName := tt.name - if tt.overrideGoldenName != "" { - gName = tt.overrideGoldenName - } - - expectedJSON := goldenEnvoy(t, filepath.Join("clusters", gName), envoyVersion, latestEnvoyVersion, gotJSON) - require.JSONEq(t, expectedJSON, gotJSON) - }) - } }) } }) @@ -1212,41 +934,6 @@ func customAppClusterJSON(t testinf.T, opts customClusterJSONOptions) string { return buf.String() } -var customClusterJSONTpl = `{ - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "{{ .Name }}", - "connectTimeout": "15s", - "loadAssignment": { - "clusterName": "{{ .Name }}", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - } - } - } - ] - } - ] - } -}` - -var customClusterJSONTemplate = template.Must(template.New("").Parse(customClusterJSONTpl)) - -func customClusterJSON(t testinf.T, opts customClusterJSONOptions) string { - t.Helper() - var buf bytes.Buffer - err := customClusterJSONTemplate.Execute(&buf, opts) - require.NoError(t, err) - return buf.String() -} - func TestEnvoyLBConfig_InjectToCluster(t *testing.T) { var tests = []struct { name string diff --git a/agent/xds/config/config.go b/agent/xds/config.go similarity index 98% rename from agent/xds/config/config.go rename to agent/xds/config.go index 32c46d07d3ef6..967bcb213dec5 100644 --- a/agent/xds/config/config.go +++ b/agent/xds/config.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 -package config +package xds import ( "strings" @@ -229,9 +229,9 @@ func ToOutlierDetection(p *structs.PassiveHealthCheck, override *structs.Passive // NOTE: EnforcingConsecutive5xx must be great than 0 for ingress-gateway if *override.EnforcingConsecutive5xx != 0 { od.EnforcingConsecutive_5Xx = &wrapperspb.UInt32Value{Value: *override.EnforcingConsecutive5xx} + } else if allowZero { + od.EnforcingConsecutive_5Xx = &wrapperspb.UInt32Value{Value: *override.EnforcingConsecutive5xx} } - // Because only ingress gateways have overrides and they cannot have a value of 0, there is no allowZero - // override case to handle } if override.MaxEjectionPercent != nil { diff --git a/agent/xds/config/config_test.go b/agent/xds/config_test.go similarity index 99% rename from agent/xds/config/config_test.go rename to agent/xds/config_test.go index 72e9a0e614614..e544c30b393e2 100644 --- a/agent/xds/config/config_test.go +++ b/agent/xds/config_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 -package config +package xds import ( "testing" diff --git a/agent/xds/configfetcher/config_fetcher.go b/agent/xds/configfetcher/config_fetcher.go deleted file mode 100644 index db7d4f2035d23..0000000000000 --- a/agent/xds/configfetcher/config_fetcher.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package configfetcher - -// ConfigFetcher is the interface the agent needs to expose -// for the xDS server to fetch agent config, currently only one field is fetched -type ConfigFetcher interface { - AdvertiseAddrLAN() string -} diff --git a/agent/xds/delta.go b/agent/xds/delta.go index d44b84fd4eb78..15c59193e626c 100644 --- a/agent/xds/delta.go +++ b/agent/xds/delta.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -117,7 +117,7 @@ func (s *Server) processDelta(stream ADSDeltaStream, reqCh <-chan *envoy_discove // type => name => proto resourceMap = xdscommon.EmptyIndexedResources() - // currentVersions is the xDS versioning represented by Resources. + // currentVersions is the the xDS versioning represented by Resources. // // type => name => version (as consul knows right now) currentVersions = make(map[string]map[string]string) diff --git a/agent/xds/delta_envoy_extender_ce_test.go b/agent/xds/delta_envoy_extender_ce_test.go index 0607919ef5a5b..10411e353cec5 100644 --- a/agent/xds/delta_envoy_extender_ce_test.go +++ b/agent/xds/delta_envoy_extender_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent @@ -21,12 +21,12 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" + "github.com/hashicorp/consul/agent/xds/testcommon" + propertyoverride "github.com/hashicorp/consul/agent/envoyextensions/builtin/property-override" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/xds/extensionruntime" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/agent/xds/testcommon" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/envoyextensions/extensioncommon" "github.com/hashicorp/consul/envoyextensions/xdscommon" @@ -803,7 +803,7 @@ end`, } sort.Slice(msgs, entity.sorter(msgs)) - r, err := response.CreateResponse(entity.key, "00000001", "00000001", msgs) + r, err := createResponse(entity.key, "00000001", "00000001", msgs) require.NoError(t, err) t.Run(entity.name, func(t *testing.T) { diff --git a/agent/xds/delta_envoy_extender_test.go b/agent/xds/delta_envoy_extender_test.go index cfa762cb049ed..6cd57fa53a041 100644 --- a/agent/xds/delta_envoy_extender_test.go +++ b/agent/xds/delta_envoy_extender_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/delta_test.go b/agent/xds/delta_test.go index f324e9193460b..052e72ad558d8 100644 --- a/agent/xds/delta_test.go +++ b/agent/xds/delta_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -1696,12 +1696,6 @@ func Test_validateAndApplyEnvoyExtension_Validations(t *testing.T) { runtimeConfig: makeRuntimeConfig(false, ">= 1.15.0", ">= 1.25.0", map[string]interface{}{"bad": "args"}), err: false, }, - { - name: "valid everything - no resources and required", - runtimeConfig: makeRuntimeConfig(true, ">= 1.15.0", ">= 1.25.0", nil), - err: true, - errString: "failed to patch xDS resources in", - }, { name: "valid everything", runtimeConfig: makeRuntimeConfig(false, ">= 1.15.0", ">= 1.25.0", nil), diff --git a/agent/xds/endpoints.go b/agent/xds/endpoints.go index a2c36f06bdc23..ad0397133666c 100644 --- a/agent/xds/endpoints.go +++ b/agent/xds/endpoints.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -8,20 +8,17 @@ import ( "fmt" "strconv" - "github.com/hashicorp/go-hclog" - envoy_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_endpoint_v3 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" + "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/go-bexpr" "google.golang.org/protobuf/proto" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/envoyextensions/xdscommon" ) const ( @@ -138,10 +135,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotConnectProxy(cfgSnap *proxycfg. endpoints, ok := cfgSnap.ConnectProxy.PreparedQueryEndpoints[uid] if ok { la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, []loadAssignmentEndpointGroup{ {Endpoints: endpoints}, }, @@ -164,10 +158,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotConnectProxy(cfgSnap *proxycfg. endpoints, ok := cfgSnap.ConnectProxy.DestinationGateways.Get(uid) if ok { la := makeLoadAssignment( - s.Logger, - cfgSnap, name, - nil, []loadAssignmentEndpointGroup{ {Endpoints: endpoints}, }, @@ -233,10 +224,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.C clusterName := connect.GatewaySNI(key.Datacenter, key.Partition, cfgSnap.Roots.TrustDomain) la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, []loadAssignmentEndpointGroup{ {Endpoints: endpoints}, }, @@ -251,10 +239,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.C clusterName := cfgSnap.ServerSNIFn(key.Datacenter, "") la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, []loadAssignmentEndpointGroup{ {Endpoints: endpoints}, }, @@ -279,7 +264,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.C lbEndpoint := &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress(addr, port), + Address: makeAddress(addr, port), }, }, HealthStatus: envoy_core_v3.HealthStatus_UNKNOWN, @@ -336,7 +321,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.C serverEndpoints = append(serverEndpoints, &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress(addr, port), + Address: makeAddress(addr, port), }, }, }) @@ -424,10 +409,7 @@ func (s *ResourceGenerator) endpointsFromServicesAndResolvers( for subsetName, groups := range clusterEndpoints { clusterName := connect.ServiceSNI(svc.Name, subsetName, svc.NamespaceOrDefault(), svc.PartitionOrDefault(), cfgSnap.Datacenter, cfgSnap.Roots.TrustDomain) la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, groups, cfgSnap.Locality, ) @@ -462,10 +444,7 @@ func (s *ResourceGenerator) makeEndpointsForOutgoingPeeredServices( groups := []loadAssignmentEndpointGroup{{Endpoints: serviceGroup.Nodes, OnlyPassing: false}} la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, groups, // Use an empty key here so that it never matches. This will force the mesh gateway to always // reference the remote mesh gateway's wan addr. @@ -585,7 +564,7 @@ func makeEndpoint(host string, port int) *envoy_endpoint_v3.LbEndpoint { return &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress(host, port), + Address: makeAddress(host, port), }, }, } @@ -595,7 +574,7 @@ func makePipeEndpoint(path string) *envoy_endpoint_v3.LbEndpoint { return &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakePipeAddress(path, 0), + Address: makePipeAddress(path, 0), }, }, } @@ -627,10 +606,7 @@ func (s *ResourceGenerator) makeUpstreamLoadAssignmentForPeerService( return la, nil } la = makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, []loadAssignmentEndpointGroup{ {Endpoints: localGw}, }, @@ -650,10 +626,7 @@ func (s *ResourceGenerator) makeUpstreamLoadAssignmentForPeerService( return nil, nil } la = makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - nil, []loadAssignmentEndpointGroup{ {Endpoints: endpoints}, }, @@ -783,10 +756,7 @@ func (s *ResourceGenerator) endpointsFromDiscoveryChain( } la := makeLoadAssignment( - s.Logger, - cfgSnap, clusterName, - ti.PrioritizeByLocality, []loadAssignmentEndpointGroup{endpointGroup}, gatewayKey, ) @@ -872,7 +842,7 @@ type loadAssignmentEndpointGroup struct { OverrideHealth envoy_core_v3.HealthStatus } -func makeLoadAssignment(logger hclog.Logger, cfgSnap *proxycfg.ConfigSnapshot, clusterName string, policy *structs.DiscoveryPrioritizeByLocality, endpointGroups []loadAssignmentEndpointGroup, localKey proxycfg.GatewayKey) *envoy_endpoint_v3.ClusterLoadAssignment { +func makeLoadAssignment(clusterName string, endpointGroups []loadAssignmentEndpointGroup, localKey proxycfg.GatewayKey) *envoy_endpoint_v3.ClusterLoadAssignment { cla := &envoy_endpoint_v3.ClusterLoadAssignment{ ClusterName: clusterName, Endpoints: make([]*envoy_endpoint_v3.LocalityLbEndpoints, 0, len(endpointGroups)), @@ -882,50 +852,39 @@ func makeLoadAssignment(logger hclog.Logger, cfgSnap *proxycfg.ConfigSnapshot, c cla.Policy = &envoy_endpoint_v3.ClusterLoadAssignment_Policy{ // We choose such a large value here that the failover math should // in effect not happen until zero instances are healthy. - OverprovisioningFactor: response.MakeUint32Value(100000), + OverprovisioningFactor: makeUint32Value(100000), } } - var priority uint32 + for priority, endpointGroup := range endpointGroups { + endpoints := endpointGroup.Endpoints + es := make([]*envoy_endpoint_v3.LbEndpoint, 0, len(endpoints)) - for _, endpointGroup := range endpointGroups { - endpointsByLocality, err := groupedEndpoints(logger, cfgSnap.ServiceLocality, policy, endpointGroup.Endpoints) + for _, ep := range endpoints { + // TODO (mesh-gateway) - should we respect the translate_wan_addrs configuration here or just always use the wan for cross-dc? + _, addr, port := ep.BestAddress(!localKey.Matches(ep.Node.Datacenter, ep.Node.PartitionOrDefault())) + healthStatus, weight := calculateEndpointHealthAndWeight(ep, endpointGroup.OnlyPassing) - if err != nil { - continue - } - - for _, endpoints := range endpointsByLocality { - es := make([]*envoy_endpoint_v3.LbEndpoint, 0, len(endpointGroup.Endpoints)) - - for _, ep := range endpoints { - // TODO (mesh-gateway) - should we respect the translate_wan_addrs configuration here or just always use the wan for cross-dc? - _, addr, port := ep.BestAddress(!localKey.Matches(ep.Node.Datacenter, ep.Node.PartitionOrDefault())) - healthStatus, weight := calculateEndpointHealthAndWeight(ep, endpointGroup.OnlyPassing) - - if endpointGroup.OverrideHealth != envoy_core_v3.HealthStatus_UNKNOWN { - healthStatus = endpointGroup.OverrideHealth - } - - endpoint := &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress(addr, port), - } - es = append(es, &envoy_endpoint_v3.LbEndpoint{ - HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ - Endpoint: endpoint, - }, - HealthStatus: healthStatus, - LoadBalancingWeight: response.MakeUint32Value(weight), - }) + if endpointGroup.OverrideHealth != envoy_core_v3.HealthStatus_UNKNOWN { + healthStatus = endpointGroup.OverrideHealth } - cla.Endpoints = append(cla.Endpoints, &envoy_endpoint_v3.LocalityLbEndpoints{ - Priority: priority, - LbEndpoints: es, + endpoint := &envoy_endpoint_v3.Endpoint{ + Address: makeAddress(addr, port), + } + es = append(es, &envoy_endpoint_v3.LbEndpoint{ + HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ + Endpoint: endpoint, + }, + HealthStatus: healthStatus, + LoadBalancingWeight: makeUint32Value(weight), }) - - priority++ } + + cla.Endpoints = append(cla.Endpoints, &envoy_endpoint_v3.LocalityLbEndpoints{ + Priority: uint32(priority), + LbEndpoints: es, + }) } return cla diff --git a/agent/xds/endpoints_test.go b/agent/xds/endpoints_test.go index 9daf5b31f55b3..ebdd06aa41e23 100644 --- a/agent/xds/endpoints_test.go +++ b/agent/xds/endpoints_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -10,18 +10,16 @@ import ( envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_endpoint_v3 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/proxystateconverter" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/agent/xds/testcommon" - "github.com/hashicorp/consul/agent/xdsv2" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/go-hclog" + "github.com/mitchellh/copystructure" testinf "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" + + "github.com/hashicorp/consul/agent/proxycfg" + "github.com/hashicorp/consul/agent/structs" + "github.com/hashicorp/consul/envoyextensions/xdscommon" + "github.com/hashicorp/consul/sdk/testutil" ) func Test_makeLoadAssignment(t *testing.T) { @@ -103,7 +101,6 @@ func Test_makeLoadAssignment(t *testing.T) { tests := []struct { name string clusterName string - locality *structs.Locality endpoints []loadAssignmentEndpointGroup want *envoy_endpoint_v3.ClusterLoadAssignment }{ @@ -133,18 +130,18 @@ func Test_makeLoadAssignment(t *testing.T) { { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_HEALTHY, - LoadBalancingWeight: response.MakeUint32Value(1), + LoadBalancingWeight: makeUint32Value(1), }, { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_HEALTHY, - LoadBalancingWeight: response.MakeUint32Value(1), + LoadBalancingWeight: makeUint32Value(1), }, }, }}, @@ -163,18 +160,18 @@ func Test_makeLoadAssignment(t *testing.T) { { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_HEALTHY, - LoadBalancingWeight: response.MakeUint32Value(10), + LoadBalancingWeight: makeUint32Value(10), }, { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_HEALTHY, - LoadBalancingWeight: response.MakeUint32Value(5), + LoadBalancingWeight: makeUint32Value(5), }, }, }}, @@ -193,18 +190,18 @@ func Test_makeLoadAssignment(t *testing.T) { { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_HEALTHY, - LoadBalancingWeight: response.MakeUint32Value(1), + LoadBalancingWeight: makeUint32Value(1), }, { HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, HealthStatus: envoy_core_v3.HealthStatus_UNHEALTHY, - LoadBalancingWeight: response.MakeUint32Value(1), + LoadBalancingWeight: makeUint32Value(1), }, }, }}, @@ -214,26 +211,11 @@ func Test_makeLoadAssignment(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := makeLoadAssignment( - hclog.NewNullLogger(), - &proxycfg.ConfigSnapshot{ServiceLocality: tt.locality}, tt.clusterName, - nil, tt.endpoints, proxycfg.GatewayKey{Datacenter: "dc1"}, ) require.Equal(t, tt.want, got) - - if tt.locality == nil { - got := makeLoadAssignment( - hclog.NewNullLogger(), - &proxycfg.ConfigSnapshot{ServiceLocality: &structs.Locality{Region: "us-west-1", Zone: "us-west-1a"}}, - tt.clusterName, - nil, - tt.endpoints, - proxycfg.GatewayKey{Datacenter: "dc1"}, - ) - require.Equal(t, tt.want, got) - } }) } } @@ -242,7 +224,6 @@ type endpointTestCase struct { name string create func(t testinf.T) *proxycfg.ConfigSnapshot overrideGoldenName string - alsoRunTestForV2 bool } func makeEndpointDiscoChainTests(enterprise bool) []endpointTestCase { @@ -252,84 +233,72 @@ func makeEndpointDiscoChainTests(enterprise bool) []endpointTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-external-sni", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "external-sni", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-overrides", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple-with-overrides", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-failover", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-failover-through-remote-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-remote-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-failover-through-remote-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-remote-gateway-triggered", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-remote-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-remote-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-remote-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-remote-gateway-triggered", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-failover-through-local-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-local-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-failover-through-local-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-local-gateway-triggered", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-local-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-local-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-double-failover-through-local-gateway-triggered", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-double-local-gateway-triggered", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-default-chain-and-custom-cluster", @@ -341,15 +310,12 @@ func makeEndpointDiscoChainTests(enterprise bool) []endpointTestCase { }) }, nil) }, - // TODO(proxystate): requires custom cluster work - alsoRunTestForV2: false, }, { name: "splitter-with-resolver-redirect", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "splitter-with-resolver-redirect-multidc", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, } } @@ -368,64 +334,42 @@ func TestEndpointsFromSnapshot(t *testing.T) { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "default", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-using-federation-states", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "federation-states", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-newer-information-in-federation-states", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "newer-info-in-federation-states", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, - }, - { - name: "mesh-gateway-using-federation-control-plane", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotMeshGateway(t, "mesh-gateway-federation", nil, nil) - }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-older-information-in-federation-states", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "older-info-in-federation-states", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-no-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "no-services", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-service-subsets", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "service-subsets2", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "mesh-gateway-default-service-subset", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotMeshGateway(t, "default-service-subsets2", nil, nil) }, - // TODO(proxystate): mesh gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway", @@ -433,16 +377,12 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "default", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-nil-config-entry", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGateway_NilConfigEntry(t) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-gateway-no-services", @@ -450,8 +390,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, false, "tcp", "default", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain", @@ -459,8 +397,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "simple", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-external-sni", @@ -468,8 +404,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "external-sni", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-failover", @@ -477,8 +411,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-failover-to-cluster-peer", @@ -486,8 +418,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-to-cluster-peer", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-remote-gateway", @@ -495,8 +425,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-remote-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-remote-gateway-triggered", @@ -504,8 +432,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-remote-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-remote-gateway", @@ -513,8 +439,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-remote-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-remote-gateway-triggered", @@ -522,8 +446,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-remote-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-local-gateway", @@ -531,8 +453,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-local-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-failover-through-local-gateway-triggered", @@ -540,8 +460,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-local-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-local-gateway", @@ -549,8 +467,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-local-gateway", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-tcp-chain-double-failover-through-local-gateway-triggered", @@ -558,8 +474,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "failover-through-double-local-gateway-triggered", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-splitter-with-resolver-redirect", @@ -567,42 +481,30 @@ func TestEndpointsFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "splitter-with-resolver-redirect-multidc", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotTerminatingGateway(t, true, nil, nil) }, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-no-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotTerminatingGateway(t, false, nil, nil) }, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-service-subsets", create: proxycfg.TestConfigSnapshotTerminatingGatewayServiceSubsets, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-default-service-subset", create: proxycfg.TestConfigSnapshotTerminatingGatewayDefaultServiceSubset, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-multiple-listeners-duplicate-service", create: proxycfg.TestConfigSnapshotIngress_MultipleListenersDuplicateService, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, } @@ -633,10 +535,10 @@ func TestEndpointsFromSnapshot(t *testing.T) { sort.Slice(endpoints, func(i, j int) bool { return endpoints[i].(*envoy_endpoint_v3.ClusterLoadAssignment).ClusterName < endpoints[j].(*envoy_endpoint_v3.ClusterLoadAssignment).ClusterName }) - r, err := response.CreateResponse(xdscommon.EndpointType, "00000001", "00000001", endpoints) + r, err := createResponse(xdscommon.EndpointType, "00000001", "00000001", endpoints) require.NoError(t, err) - t.Run("current-xdsv1", func(t *testing.T) { + t.Run("current", func(t *testing.T) { gotJSON := protoToJSON(t, r) gName := tt.name @@ -646,39 +548,6 @@ func TestEndpointsFromSnapshot(t *testing.T) { require.JSONEq(t, goldenEnvoy(t, filepath.Join("endpoints", gName), envoyVersion, latestEnvoyVersion, gotJSON), gotJSON) }) - - if tt.alsoRunTestForV2 { - generator := xdsv2.NewResourceGenerator(testutil.Logger(t)) - - converter := proxystateconverter.NewConverter(testutil.Logger(t), &mockCfgFetcher{addressLan: "10.10.10.10"}) - proxyState, err := converter.ProxyStateFromSnapshot(snap) - require.NoError(t, err) - - res, err := generator.AllResourcesFromIR(proxyState) - require.NoError(t, err) - - endpoints = res[xdscommon.EndpointType] - // The order of listeners returned via LDS isn't relevant, so it's safe - // to sort these for the purposes of test comparisons. - sort.Slice(endpoints, func(i, j int) bool { - return endpoints[i].(*envoy_endpoint_v3.ClusterLoadAssignment).ClusterName < endpoints[j].(*envoy_endpoint_v3.ClusterLoadAssignment).ClusterName - }) - - r, err := response.CreateResponse(xdscommon.EndpointType, "00000001", "00000001", endpoints) - require.NoError(t, err) - - t.Run("current-xdsv2", func(t *testing.T) { - gotJSON := protoToJSON(t, r) - - gName := tt.name - if tt.overrideGoldenName != "" { - gName = tt.overrideGoldenName - } - - expectedJSON := goldenEnvoy(t, filepath.Join("endpoints", gName), envoyVersion, latestEnvoyVersion, gotJSON) - require.JSONEq(t, expectedJSON, gotJSON) - }) - } }) } }) diff --git a/agent/xds/extensionruntime/runtime_config.go b/agent/xds/extensionruntime/runtime_config.go index 924368ebdf2a6..110e3db1df8b4 100644 --- a/agent/xds/extensionruntime/runtime_config.go +++ b/agent/xds/extensionruntime/runtime_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensionruntime diff --git a/agent/xds/extensionruntime/runtime_config_ce_test.go b/agent/xds/extensionruntime/runtime_config_ce_test.go index 1a38c044ef359..c70a3f47f4f34 100644 --- a/agent/xds/extensionruntime/runtime_config_ce_test.go +++ b/agent/xds/extensionruntime/runtime_config_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/xds/failover_policy.go b/agent/xds/failover_policy.go index ab3e86f25d1db..5edcae914d52c 100644 --- a/agent/xds/failover_policy.go +++ b/agent/xds/failover_policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -27,8 +27,6 @@ type targetInfo struct { // Region is the region from the failover target's Locality. nil means the // target is in the local Consul cluster. Region *string - - PrioritizeByLocality *structs.DiscoveryPrioritizeByLocality } type discoChainTargetGroup struct { @@ -70,7 +68,7 @@ func (s *ResourceGenerator) mapDiscoChainTargets(cfgSnap *proxycfg.ConfigSnapsho return discoChainTargets{}, err } - failoverTargets.baseClusterName = s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway) + failoverTargets.baseClusterName = s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway, false) tids := []string{primaryTargetID} failover := node.Resolver.Failover @@ -89,7 +87,7 @@ func (s *ResourceGenerator) mapDiscoChainTargets(cfgSnap *proxycfg.ConfigSnapsho var sni, rootPEMs string var spiffeIDs []string targetUID := proxycfg.NewUpstreamIDFromTargetID(tid) - ti := targetInfo{TargetID: tid, PrioritizeByLocality: target.PrioritizeByLocality} + ti := targetInfo{TargetID: tid} configureTLS := true if forMeshGateway { diff --git a/agent/xds/failover_policy_ce.go b/agent/xds/failover_policy_ce.go index ac8d843e40ba8..e22d717e2a110 100644 --- a/agent/xds/failover_policy_ce.go +++ b/agent/xds/failover_policy_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/xds/golden_test.go b/agent/xds/golden_test.go index d77ffda6a6a6e..9209678bb52ea 100644 --- a/agent/xds/golden_test.go +++ b/agent/xds/golden_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/jwt_authn.go b/agent/xds/jwt_authn.go index 36b8e05cb30c1..17b34e5cd6ce8 100644 --- a/agent/xds/jwt_authn.go +++ b/agent/xds/jwt_authn.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/jwt_authn_test.go b/agent/xds/jwt_authn_test.go index 834f62ad4c1a0..ab8665b1dc3aa 100644 --- a/agent/xds/jwt_authn_test.go +++ b/agent/xds/jwt_authn_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/listeners.go b/agent/xds/listeners.go index 846cbf6d536fe..520b58e0a6132 100644 --- a/agent/xds/listeners.go +++ b/agent/xds/listeners.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -29,9 +29,6 @@ import ( envoy_tcp_proxy_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3" envoy_tls_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" - "github.com/hashicorp/consul/agent/xds/config" - "github.com/hashicorp/consul/agent/xds/naming" - "github.com/hashicorp/consul/agent/xds/platform" "github.com/hashicorp/go-hclog" "google.golang.org/protobuf/encoding/protojson" @@ -45,7 +42,6 @@ import ( "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/xds/accesslogs" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/lib/stringslice" @@ -54,6 +50,8 @@ import ( "github.com/hashicorp/consul/types" ) +const virtualIPTag = "virtual" + // listenersFromSnapshot returns the xDS API representation of the "listeners" in the snapshot. func (s *ResourceGenerator) listenersFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.Message, error) { if cfgSnap == nil { @@ -120,7 +118,7 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg. } } - proxyCfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) + proxyCfg, err := ParseProxyConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -169,7 +167,7 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg. return nil, err } - clusterName = s.getTargetClusterName(upstreamsSnapshot, chain, target.ID, false) + clusterName = s.getTargetClusterName(upstreamsSnapshot, chain, target.ID, false, false) if clusterName == "" { continue } @@ -260,7 +258,7 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg. // We only match on this virtual IP if the upstream is in the proxy's partition. // This is because the IP is not guaranteed to be unique across k8s clusters. if acl.EqualPartitions(e.Node.PartitionOrDefault(), cfgSnap.ProxyID.PartitionOrDefault()) { - if vip := e.Service.TaggedAddresses[naming.VirtualIPTag]; vip.Address != "" { + if vip := e.Service.TaggedAddresses[virtualIPTag]; vip.Address != "" { uniqueAddrs[vip.Address] = struct{}{} } } @@ -464,7 +462,7 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg. // The virtualIPTag is used by consul-k8s to store the ClusterIP for a service. // For services imported from a peer,the partition will be equal in all cases. if acl.EqualPartitions(e.Node.PartitionOrDefault(), cfgSnap.ProxyID.PartitionOrDefault()) { - if vip := e.Service.TaggedAddresses[naming.VirtualIPTag]; vip.Address != "" { + if vip := e.Service.TaggedAddresses[virtualIPTag]; vip.Address != "" { uniqueAddrs[vip.Address] = struct{}{} } } @@ -554,8 +552,8 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg. filterChain, err := s.makeUpstreamFilterChain(filterChainOpts{ accessLogs: &cfgSnap.Proxy.AccessLogs, - clusterName: naming.OriginalDestinationClusterName, - filterName: naming.OriginalDestinationClusterName, + clusterName: OriginalDestinationClusterName, + filterName: OriginalDestinationClusterName, protocol: "tcp", }) if err != nil { @@ -789,7 +787,7 @@ func parseCheckPath(check structs.CheckType) (structs.ExposePath, error) { // listenersFromSnapshotGateway returns the "listener" for a terminating-gateway or mesh-gateway service func (s *ResourceGenerator) listenersFromSnapshotGateway(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.Message, error) { - cfg, err := config.ParseGatewayConfig(cfgSnap.Proxy.Config) + cfg, err := ParseGatewayConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -937,7 +935,7 @@ func makeListenerWithDefault(opts makeListenerOpts) *envoy_listener_v3.Listener return &envoy_listener_v3.Listener{ Name: fmt.Sprintf("%s:%s:%d", opts.name, opts.addr, opts.port), AccessLog: accessLog, - Address: response.MakeAddress(opts.addr, opts.port), + Address: makeAddress(opts.addr, opts.port), TrafficDirection: opts.direction, } } @@ -956,7 +954,7 @@ func makePipeListener(opts makeListenerOpts) *envoy_listener_v3.Listener { return &envoy_listener_v3.Listener{ Name: fmt.Sprintf("%s:%s", opts.name, opts.path), AccessLog: accessLog, - Address: response.MakePipeAddress(opts.path, uint32(modeInt)), + Address: makePipeAddress(opts.path, uint32(modeInt)), TrafficDirection: opts.direction, } } @@ -1173,7 +1171,7 @@ func createDownstreamTransportSocketForConnectTLS(cfgSnap *proxycfg.ConfigSnapsh // Determine listener protocol type from configured service protocol. Don't hard fail on a config typo, //The parse func returns default config if there is an error, so it's safe to continue. - cfg, _ := config.ParseProxyConfig(cfgSnap.Proxy.Config) + cfg, _ := ParseProxyConfig(cfgSnap.Proxy.Config) // Create TLS validation context for mTLS with leaf certificate and root certs. tlsContext := makeCommonTLSContext( @@ -1265,7 +1263,7 @@ func (s *ResourceGenerator) makeInboundListener(cfgSnap *proxycfg.ConfigSnapshot var l *envoy_listener_v3.Listener var err error - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) + cfg, err := ParseProxyConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1515,7 +1513,7 @@ func (s *ResourceGenerator) finalizePublicListenerFromConfig(l *envoy_listener_v } func (s *ResourceGenerator) makeExposedCheckListener(cfgSnap *proxycfg.ConfigSnapshot, cluster string, path structs.ExposePath) (proto.Message, error) { - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) + cfg, err := ParseProxyConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1590,7 +1588,7 @@ func (s *ResourceGenerator) makeExposedCheckListener(cfgSnap *proxycfg.ConfigSna &envoy_core_v3.CidrRange{AddressPrefix: advertise, PrefixLen: &wrapperspb.UInt32Value{Value: uint32(advertiseLen)}}, ) - if ok, err := platform.SupportsIPv6(); err != nil { + if ok, err := kernelSupportsIPv6(); err != nil { return nil, err } else if ok { ranges = append(ranges, @@ -1641,7 +1639,7 @@ func (s *ResourceGenerator) makeTerminatingGatewayListener( intentions := cfgSnap.TerminatingGateway.Intentions[svc] svcConfig := cfgSnap.TerminatingGateway.ServiceConfigs[svc] - cfg, err := config.ParseProxyConfig(svcConfig.ProxyConfig) + cfg, err := ParseProxyConfig(svcConfig.ProxyConfig) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1685,7 +1683,7 @@ func (s *ResourceGenerator) makeTerminatingGatewayListener( intentions := cfgSnap.TerminatingGateway.Intentions[svc] svcConfig := cfgSnap.TerminatingGateway.ServiceConfigs[svc] - cfg, err := config.ParseProxyConfig(svcConfig.ProxyConfig) + cfg, err := ParseProxyConfig(svcConfig.ProxyConfig) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -1809,7 +1807,7 @@ func (s *ResourceGenerator) makeFilterChainTerminatingGateway(cfgSnap *proxycfg. filterChain.Filters = append(filterChain.Filters, authFilter) } - proxyCfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) + proxyCfg, err := ParseProxyConfig(cfgSnap.Proxy.Config) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -2130,7 +2128,7 @@ func (s *ResourceGenerator) makeMeshGatewayPeerFilterChain( if err != nil { return nil, err } - clusterName = meshGatewayExportedClusterNamePrefix + naming.CustomizeClusterName(target.Name, chain) + clusterName = meshGatewayExportedClusterNamePrefix + CustomizeClusterName(target.Name, chain) } uid := proxycfg.NewUpstreamIDFromServiceName(svc) @@ -2593,7 +2591,7 @@ func makeHTTPFilter(opts listenerFilterOpts) (*envoy_listener_v3.Filter, error) "envoy.filters.http.grpc_stats", &envoy_grpc_stats_v3.FilterConfig{ PerMethodStatSpecifier: &envoy_grpc_stats_v3.FilterConfig_StatsForAllMethods{ - StatsForAllMethods: response.MakeBoolValue(true), + StatsForAllMethods: makeBoolValue(true), }, }, ) diff --git a/agent/xds/listeners_apigateway.go b/agent/xds/listeners_apigateway.go index 07566017cea94..633c04f0524b8 100644 --- a/agent/xds/listeners_apigateway.go +++ b/agent/xds/listeners_apigateway.go @@ -1,15 +1,13 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds import ( "fmt" - envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" envoy_tls_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" - "github.com/hashicorp/consul/agent/xds/naming" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/wrapperspb" @@ -71,7 +69,7 @@ func (s *ResourceGenerator) makeAPIGatewayListeners(address string, cfgSnap *pro if err != nil { return nil, err } - clusterName = naming.CustomizeClusterName(target.Name, chain) + clusterName = CustomizeClusterName(target.Name, chain) } filterName := fmt.Sprintf("%s.%s.%s.%s", chain.ServiceName, chain.Namespace, chain.Partition, chain.Datacenter) @@ -286,7 +284,10 @@ func makeCommonTLSContextFromSnapshotAPIGatewayListenerConfig(cfgSnap *proxycfg. connectTLSEnabled := (!listenerCfg.TLS.IsEmpty()) - if connectTLSEnabled { + if tlsCfg.SDS != nil { + // Set up listener TLS from SDS + tlsContext = makeCommonTLSContextFromGatewayTLSConfig(*tlsCfg) + } else if connectTLSEnabled { tlsContext = makeCommonTLSContext(cfgSnap.Leaf(), cfgSnap.RootPEMs(), makeTLSParametersFromGatewayTLSConfig(*tlsCfg)) } @@ -315,6 +316,29 @@ func resolveAPIListenerTLSConfig(listenerTLSCfg structs.APIGatewayTLSConfigurati return &mergedCfg, nil } +func routeNameForAPIGatewayUpstream(l structs.IngressListener, s structs.IngressService) string { + key := proxycfg.IngressListenerKeyFromListener(l) + + // If the upstream service doesn't have any TLS overrides then it can just use + // the combined filterchain with all the merged routes. + if !ingressServiceHasSDSOverrides(s) { + return key.RouteName() + } + + // Return a specific route for this service as it needs a custom FilterChain + // to serve its custom cert so we should attach its routes to a separate Route + // too. We need this to be consistent between OSS and Enterprise to avoid xDS + // config golden files in tests conflicting so we can't use ServiceID.String() + // which normalizes to included all identifiers in Enterprise. + sn := s.ToServiceName() + svcIdentifier := sn.Name + if !sn.InDefaultPartition() || !sn.InDefaultNamespace() { + // Non-default partition/namespace, use a full identifier + svcIdentifier = sn.String() + } + return fmt.Sprintf("%s_%s", key.RouteName(), svcIdentifier) +} + // when we have multiple certificates on a single listener, we need // to duplicate the filter chains with multiple TLS contexts func makeInlineOverrideFilterChains(cfgSnap *proxycfg.ConfigSnapshot, diff --git a/agent/xds/listeners_ingress.go b/agent/xds/listeners_ingress.go index e5e5a4980c411..031709e2a818c 100644 --- a/agent/xds/listeners_ingress.go +++ b/agent/xds/listeners_ingress.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -9,7 +9,6 @@ import ( envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" envoy_tls_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" - "github.com/hashicorp/consul/agent/xds/naming" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/durationpb" @@ -63,7 +62,7 @@ func (s *ResourceGenerator) makeIngressGatewayListeners(address string, cfgSnap if err != nil { return nil, err } - clusterName = naming.CustomizeClusterName(target.Name, chain) + clusterName = CustomizeClusterName(target.Name, chain) } filterName := fmt.Sprintf("%s.%s.%s.%s", chain.ServiceName, chain.Namespace, chain.Partition, chain.Datacenter) diff --git a/agent/xds/listeners_test.go b/agent/xds/listeners_test.go index 130f2234517e2..d6dbee0964b05 100644 --- a/agent/xds/listeners_test.go +++ b/agent/xds/listeners_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -10,8 +10,8 @@ import ( "testing" "text/template" + "github.com/hashicorp/consul/agent/xds/testcommon" "github.com/stretchr/testify/assert" - "google.golang.org/protobuf/proto" envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" testinf "github.com/mitchellh/go-testing-interface" @@ -19,11 +19,6 @@ import ( "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/configfetcher" - "github.com/hashicorp/consul/agent/xds/proxystateconverter" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/agent/xds/testcommon" - "github.com/hashicorp/consul/agent/xdsv2" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/sdk/testutil" "github.com/hashicorp/consul/types" @@ -37,7 +32,6 @@ type listenerTestCase struct { // test input. overrideGoldenName string generatorSetup func(*ResourceGenerator) - alsoRunTestForV2 bool } func makeListenerDiscoChainTests(enterprise bool) []listenerTestCase { @@ -75,7 +69,6 @@ func makeListenerDiscoChainTests(enterprise bool) []listenerTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-http-chain", @@ -124,7 +117,6 @@ func makeListenerDiscoChainTests(enterprise bool) []listenerTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "external-sni", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-overrides", @@ -137,14 +129,12 @@ func makeListenerDiscoChainTests(enterprise bool) []listenerTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-remote-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tcp-chain-failover-through-local-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "failover-through-local-gateway", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-jwt-config-entry-with-local", @@ -235,7 +225,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-incoming-min-version", @@ -255,7 +244,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-incoming-max-version", @@ -275,7 +263,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-tls-incoming-cipher-suites", @@ -298,7 +285,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, }) }, - alsoRunTestForV2: true, }, { name: "grpc-public-listener", @@ -315,7 +301,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Config["bind_address"] = "127.0.0.2" }, nil) }, - alsoRunTestForV2: true, }, { name: "listener-bind-port", @@ -324,7 +309,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Config["bind_port"] = 8888 }, nil) }, - alsoRunTestForV2: true, }, { name: "listener-bind-address-port", @@ -334,7 +318,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Config["bind_port"] = 8888 }, nil) }, - alsoRunTestForV2: true, }, { name: "listener-unix-domain-socket", @@ -346,7 +329,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Upstreams[0].LocalBindSocketMode = "0640" }, nil) }, - alsoRunTestForV2: true, }, { name: "listener-max-inbound-connections", @@ -355,7 +337,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Config["max_inbound_connections"] = 222 }, nil) }, - alsoRunTestForV2: true, }, { name: "http2-public-listener", @@ -372,7 +353,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Config["balance_inbound_connections"] = "exact_balance" }, nil) }, - alsoRunTestForV2: true, }, { name: "listener-balance-outbound-connections-bind-port", @@ -381,7 +361,6 @@ func TestListenersFromSnapshot(t *testing.T) { ns.Proxy.Upstreams[0].Config["balance_outbound_connections"] = "exact_balance" }, nil) }, - alsoRunTestForV2: true, }, { name: "http-public-listener", @@ -515,31 +494,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, nil) }, }, - { - name: "custom-upstream-with-prepared-query", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { - for i := range ns.Proxy.Upstreams { - if ns.Proxy.Upstreams[i].DestinationName != "db" { - continue // only tweak the db upstream - } - if ns.Proxy.Upstreams[i].Config == nil { - ns.Proxy.Upstreams[i].Config = map[string]interface{}{} - } - - uid := proxycfg.NewUpstreamID(&ns.Proxy.Upstreams[i]) - - // Triggers an override with the presence of the escape hatch listener - ns.Proxy.Upstreams[i].DestinationType = structs.UpstreamDestTypePreparedQuery - - ns.Proxy.Upstreams[i].Config["envoy_listener_json"] = - customListenerJSON(t, customListenerJSONOptions{ - Name: uid.EnvoyID() + ":custom-upstream", - }) - } - }, nil) - }, - }, { name: "connect-proxy-upstream-defaults", create: func(t testinf.T) *proxycfg.ConfigSnapshot { @@ -579,9 +533,9 @@ func TestListenersFromSnapshot(t *testing.T) { }, { // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden + // kernelSupportsIPv6() then this test will fail because the golden // files were generated assuming ipv6 support was present - name: "expose-checks-http", + name: "expose-checks", create: proxycfg.TestConfigSnapshotExposeChecks, generatorSetup: func(s *ResourceGenerator) { s.CfgFetcher = configFetcherFunc(func() string { @@ -589,30 +543,6 @@ func TestListenersFromSnapshot(t *testing.T) { }) }, }, - { - // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden - // files were generated assuming ipv6 support was present - name: "expose-checks-http-with-bind-override", - create: proxycfg.TestConfigSnapshotExposeChecksWithBindOverride, - generatorSetup: func(s *ResourceGenerator) { - s.CfgFetcher = configFetcherFunc(func() string { - return "192.0.2.1" - }) - }, - }, - { - // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden - // files were generated assuming ipv6 support was present - name: "expose-checks-grpc", - create: proxycfg.TestConfigSnapshotExposeChecksGRPC, - generatorSetup: func(s *ResourceGenerator) { - s.CfgFetcher = configFetcherFunc(func() string { - return "192.0.2.1" - }) - }, - }, { name: "mesh-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { @@ -625,12 +555,6 @@ func TestListenersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotMeshGateway(t, "federation-states", nil, nil) }, }, - { - name: "mesh-gateway-using-federation-control-plane", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotMeshGateway(t, "mesh-gateway-federation", nil, nil) - }, - }, { name: "mesh-gateway-no-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { @@ -947,16 +871,6 @@ func TestListenersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotTerminatingGateway(t, true, nil, nil) }, }, - { - name: "terminating-gateway-custom-trace-listener", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotTerminatingGateway(t, true, func(ns *structs.NodeService) { - ns.Proxy.Config = map[string]interface{}{} - ns.Proxy.Config["protocol"] = "http" - ns.Proxy.Config["envoy_listener_tracing_json"] = customTraceJSON(t) - }, nil) - }, - }, { name: "terminating-gateway-with-tls-incoming-min-version", create: func(t testinf.T) *proxycfg.ConfigSnapshot { @@ -1127,14 +1041,6 @@ func TestListenersFromSnapshot(t *testing.T) { name: "ingress-with-tls-mixed-min-version-listeners", create: proxycfg.TestConfigSnapshotIngressGateway_TLSMixedMinVersionListeners, }, - { - name: "ingress-with-tls-mixed-max-version-listeners", - create: proxycfg.TestConfigSnapshotIngressGateway_TLSMixedMaxVersionListeners, - }, - { - name: "ingress-with-tls-mixed-cipher-suites-listeners", - create: proxycfg.TestConfigSnapshotIngressGateway_TLSMixedCipherVersionListeners, - }, { name: "ingress-with-sds-listener-gw-level", create: proxycfg.TestConfigSnapshotIngressGatewaySDS_GatewayLevel, @@ -1190,19 +1096,16 @@ func TestListenersFromSnapshot(t *testing.T) { create: proxycfg.TestConfigSnapshotTransparentProxyResolverRedirectUpstream, }, { - name: "transparent-proxy-catalog-destinations-only", - create: proxycfg.TestConfigSnapshotTransparentProxyCatalogDestinationsOnly, - alsoRunTestForV2: true, + name: "transparent-proxy-catalog-destinations-only", + create: proxycfg.TestConfigSnapshotTransparentProxyCatalogDestinationsOnly, }, { - name: "transparent-proxy-dial-instances-directly", - create: proxycfg.TestConfigSnapshotTransparentProxyDialDirectly, - alsoRunTestForV2: true, + name: "transparent-proxy-dial-instances-directly", + create: proxycfg.TestConfigSnapshotTransparentProxyDialDirectly, }, { - name: "transparent-proxy-terminating-gateway", - create: proxycfg.TestConfigSnapshotTransparentProxyTerminatingGatewayCatalogDestinationsOnly, - alsoRunTestForV2: true, + name: "transparent-proxy-terminating-gateway", + create: proxycfg.TestConfigSnapshotTransparentProxyTerminatingGatewayCatalogDestinationsOnly, }, { name: "custom-trace-listener", @@ -1261,11 +1164,9 @@ func TestListenersFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { ns.Proxy.MutualTLSMode = structs.MutualTLSModePermissive ns.Proxy.Mode = structs.ProxyModeTransparent - ns.Proxy.TransparentProxy.OutboundListenerPort = 1234 }, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-without-tproxy-and-permissive-mtls", @@ -1275,7 +1176,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, nil) }, - alsoRunTestForV2: true, }, } @@ -1288,7 +1188,6 @@ func TestListenersFromSnapshot(t *testing.T) { t.Run("envoy-"+envoyVersion, func(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - // Sanity check default with no overrides first snap := tt.create(t) @@ -1300,26 +1199,26 @@ func TestListenersFromSnapshot(t *testing.T) { // golder files for every test case and so not be any use! testcommon.SetupTLSRootsAndLeaf(t, snap) - var listeners []proto.Message - // Need server just for logger dependency g := NewResourceGenerator(testutil.Logger(t), nil, false) g.ProxyFeatures = sf if tt.generatorSetup != nil { tt.generatorSetup(g) } - listeners, err = g.listenersFromSnapshot(snap) + + listeners, err := g.listenersFromSnapshot(snap) require.NoError(t, err) + // The order of listeners returned via LDS isn't relevant, so it's safe // to sort these for the purposes of test comparisons. sort.Slice(listeners, func(i, j int) bool { return listeners[i].(*envoy_listener_v3.Listener).Name < listeners[j].(*envoy_listener_v3.Listener).Name }) - r, err := response.CreateResponse(xdscommon.ListenerType, "00000001", "00000001", listeners) + r, err := createResponse(xdscommon.ListenerType, "00000001", "00000001", listeners) require.NoError(t, err) - t.Run("current-xdsv1", func(t *testing.T) { + t.Run("current", func(t *testing.T) { gotJSON := protoToJSON(t, r) gName := tt.name @@ -1330,39 +1229,6 @@ func TestListenersFromSnapshot(t *testing.T) { expectedJSON := goldenEnvoy(t, filepath.Join("listeners", gName), envoyVersion, latestEnvoyVersion, gotJSON) require.JSONEq(t, expectedJSON, gotJSON) }) - - if tt.alsoRunTestForV2 { - generator := xdsv2.NewResourceGenerator(testutil.Logger(t)) - converter := proxystateconverter.NewConverter(testutil.Logger(t), nil) - proxyState, err := converter.ProxyStateFromSnapshot(snap) - require.NoError(t, err) - - res, err := generator.AllResourcesFromIR(proxyState) - require.NoError(t, err) - - listeners = res[xdscommon.ListenerType] - // The order of listeners returned via LDS isn't relevant, so it's safe - // to sort these for the purposes of test comparisons. - sort.Slice(listeners, func(i, j int) bool { - return listeners[i].(*envoy_listener_v3.Listener).Name < listeners[j].(*envoy_listener_v3.Listener).Name - }) - - r, err := response.CreateResponse(xdscommon.ListenerType, "00000001", "00000001", listeners) - require.NoError(t, err) - - t.Run("current-xdsv2", func(t *testing.T) { - gotJSON := protoToJSON(t, r) - - gName := tt.name - if tt.overrideGoldenName != "" { - gName = tt.overrideGoldenName - } - - expectedJSON := goldenEnvoy(t, filepath.Join("listeners", gName), envoyVersion, latestEnvoyVersion, gotJSON) - require.JSONEq(t, expectedJSON, gotJSON) - }) - } - }) } }) @@ -1520,7 +1386,7 @@ func customTraceJSON(t testinf.T) string { type configFetcherFunc func() string -var _ configfetcher.ConfigFetcher = (configFetcherFunc)(nil) +var _ ConfigFetcher = (configFetcherFunc)(nil) func (f configFetcherFunc) AdvertiseAddrLAN() string { return f() diff --git a/agent/xds/locality_policy.go b/agent/xds/locality_policy.go deleted file mode 100644 index c94ba95ea2865..0000000000000 --- a/agent/xds/locality_policy.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "fmt" - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/agent/structs" -) - -func groupedEndpoints(logger hclog.Logger, locality *structs.Locality, policy *structs.DiscoveryPrioritizeByLocality, csns structs.CheckServiceNodes) ([]structs.CheckServiceNodes, error) { - switch { - case policy == nil || policy.Mode == "" || policy.Mode == "none": - return []structs.CheckServiceNodes{csns}, nil - case policy.Mode == "failover": - log := logger.Named("locality") - return prioritizeByLocalityFailover(log, locality, csns), nil - default: - return nil, fmt.Errorf("unexpected priortize-by-locality mode %q", policy.Mode) - } -} diff --git a/agent/xds/locality_policy_ce.go b/agent/xds/locality_policy_ce.go deleted file mode 100644 index fbc17775d689d..0000000000000 --- a/agent/xds/locality_policy_ce.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package xds - -import ( - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/go-hclog" -) - -func prioritizeByLocalityFailover(_ hclog.Logger, _ *structs.Locality, _ structs.CheckServiceNodes) []structs.CheckServiceNodes { - return nil -} diff --git a/agent/xds/naming.go b/agent/xds/naming.go new file mode 100644 index 0000000000000..ab9224f71ce8b --- /dev/null +++ b/agent/xds/naming.go @@ -0,0 +1,19 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package xds + +import ( + "fmt" + + "github.com/hashicorp/consul/agent/structs" +) + +func CustomizeClusterName(clusterName string, chain *structs.CompiledDiscoveryChain) string { + if chain == nil || chain.CustomizationHash == "" { + return clusterName + } + // Use a colon to delimit this prefix instead of a dot to avoid a + // theoretical collision problem with subsets. + return fmt.Sprintf("%s~%s", chain.CustomizationHash, clusterName) +} diff --git a/agent/xds/naming/naming.go b/agent/xds/naming/naming.go deleted file mode 100644 index 3e19d93270038..0000000000000 --- a/agent/xds/naming/naming.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package naming - -import ( - "fmt" - - "github.com/hashicorp/consul/agent/structs" -) - -const ( - // OriginalDestinationClusterName is the name we give to the passthrough - // cluster which redirects transparently-proxied requests to their original - // destination outside the mesh. This cluster prevents Consul from blocking - // connections to destinations outside of the catalog when in transparent - // proxy mode. - OriginalDestinationClusterName = "original-destination" - VirtualIPTag = "virtual" -) - -func CustomizeClusterName(clusterName string, chain *structs.CompiledDiscoveryChain) string { - if chain == nil || chain.CustomizationHash == "" { - return clusterName - } - // Use a colon to delimit this prefix instead of a dot to avoid a - // theoretical collision problem with subsets. - return fmt.Sprintf("%s~%s", chain.CustomizationHash, clusterName) -} diff --git a/agent/xds/platform/net_fallback.go b/agent/xds/net_fallback.go similarity index 50% rename from agent/xds/platform/net_fallback.go rename to agent/xds/net_fallback.go index e37c97633b285..7230c18ef2e85 100644 --- a/agent/xds/platform/net_fallback.go +++ b/agent/xds/net_fallback.go @@ -1,11 +1,11 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !linux // +build !linux -package platform +package xds -func SupportsIPv6() (bool, error) { +func kernelSupportsIPv6() (bool, error) { return true, nil } diff --git a/agent/xds/platform/net_linux.go b/agent/xds/net_linux.go similarity index 87% rename from agent/xds/platform/net_linux.go rename to agent/xds/net_linux.go index acf8c53a85e47..96932ca307309 100644 --- a/agent/xds/platform/net_linux.go +++ b/agent/xds/net_linux.go @@ -1,10 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build linux // +build linux -package platform +package xds import ( "fmt" @@ -20,7 +20,7 @@ var ( ipv6SupportedErr error ) -func SupportsIPv6() (bool, error) { +func kernelSupportsIPv6() (bool, error) { ipv6SupportOnce.Do(func() { ipv6Supported, ipv6SupportedErr = checkIfKernelSupportsIPv6() }) diff --git a/agent/xds/protocol_trace.go b/agent/xds/protocol_trace.go index 76d4e8e6ee5b9..42d82d76012bc 100644 --- a/agent/xds/protocol_trace.go +++ b/agent/xds/protocol_trace.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/proxystateconverter/clusters.go b/agent/xds/proxystateconverter/clusters.go deleted file mode 100644 index e12211f670782..0000000000000 --- a/agent/xds/proxystateconverter/clusters.go +++ /dev/null @@ -1,1251 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "errors" - "fmt" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-uuid" - "strings" - "time" - - envoy_endpoint_v3 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/wrapperspb" - - "github.com/hashicorp/consul/agent/connect" - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/config" - "github.com/hashicorp/consul/agent/xds/naming" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/consul/proto/private/pbpeering" -) - -const ( - meshGatewayExportedClusterNamePrefix = "exported~" -) - -type namedCluster struct { - name string - cluster *pbproxystate.Cluster -} - -// clustersFromSnapshot returns the xDS API representation of the "clusters" in the snapshot. -func (s *Converter) clustersFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - if cfgSnap == nil { - return errors.New("nil config given") - } - - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - return s.clustersFromSnapshotConnectProxy(cfgSnap) - // TODO(proxystate): Terminating Gateways will be added in the future. - //case structs.ServiceKindTerminatingGateway: - // err := s.clustersFromSnapshotTerminatingGateway(cfgSnap) - // if err != nil { - // return err - // } - // return nil - // TODO(proxystate): Mesh Gateways will be added in the future. - //case structs.ServiceKindMeshGateway: - // err := s.clustersFromSnapshotMeshGateway(cfgSnap) - // if err != nil { - // return err - // } - // return nil - // TODO(proxystate): Ingress Gateways will be added in the future. - //case structs.ServiceKindIngressGateway: - // err := s.clustersFromSnapshotIngressGateway(cfgSnap) - // if err != nil { - // return err - // } - // return nil - // TODO(proxystate): API Gateways will be added in the future. - //case structs.ServiceKindAPIGateway: - // res, err := s.clustersFromSnapshotAPIGateway(cfgSnap) - // if err != nil { - // return err - // } - // return nil - default: - return fmt.Errorf("Invalid service kind: %v", cfgSnap.Kind) - } -} - -// clustersFromSnapshot returns the xDS API representation of the "clusters" -// (upstreams) in the snapshot. -func (s *Converter) clustersFromSnapshotConnectProxy(cfgSnap *proxycfg.ConfigSnapshot) error { - // This is the list of listeners we add to. It will be empty to start. - clusters := s.proxyState.Clusters - var err error - - // Include the "app" cluster for the public listener - appCluster, err := s.makeAppCluster(cfgSnap, xdscommon.LocalAppClusterName, "", cfgSnap.Proxy.LocalServicePort) - if err != nil { - return err - } - clusters[appCluster.name] = appCluster.cluster - - if cfgSnap.Proxy.Mode == structs.ProxyModeTransparent { - passthroughs, err := s.makePassthroughClusters(cfgSnap) - if err != nil { - return fmt.Errorf("failed to make passthrough clusters for transparent proxy: %v", err) - } - for clusterName, cluster := range passthroughs { - clusters[clusterName] = cluster - } - } - - // NOTE: Any time we skip a chain below we MUST also skip that discovery chain in endpoints.go - // so that the sets of endpoints generated matches the sets of clusters. - for uid, chain := range cfgSnap.ConnectProxy.DiscoveryChain { - upstream, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - if skip { - continue - } - - upstreamClusters, err := s.makeUpstreamClustersForDiscoveryChain( - uid, - upstream, - chain, - cfgSnap, - false, - ) - if err != nil { - return err - } - - for name, cluster := range upstreamClusters { - clusters[name] = cluster - } - } - - // TODO(proxystate): peering will be added in the future. - //// NOTE: Any time we skip an upstream below we MUST also skip that same - //// upstream in endpoints.go so that the sets of endpoints generated matches - //// the sets of clusters. - //for _, uid := range cfgSnap.ConnectProxy.PeeredUpstreamIDs() { - // upstream, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - // if skip { - // continue - // } - // - // peerMeta, found := cfgSnap.ConnectProxy.UpstreamPeerMeta(uid) - // if !found { - // s.Logger.Warn("failed to fetch upstream peering metadata for cluster", "uid", uid) - // } - // cfg := s.getAndModifyUpstreamConfigForPeeredListener(uid, upstream, peerMeta) - // - // upstreamCluster, err := s.makeUpstreamClusterForPeerService(uid, cfg, peerMeta, cfgSnap) - // if err != nil { - // return nil, err - // } - // clusters = append(clusters, upstreamCluster) - //} - - // TODO(proxystate): L7 Intentions and JWT Auth will be added in the future. - //// add clusters for jwt-providers - //for _, prov := range cfgSnap.JWTProviders { - // //skip cluster creation for local providers - // if prov.JSONWebKeySet == nil || prov.JSONWebKeySet.Remote == nil { - // continue - // } - // - // cluster, err := makeJWTProviderCluster(prov) - // if err != nil { - // s.Logger.Warn("failed to make jwt-provider cluster", "provider name", prov.Name, "error", err) - // continue - // } - // - // clusters[cluster.GetName()] = cluster - //} - - for _, u := range cfgSnap.Proxy.Upstreams { - if u.DestinationType != structs.UpstreamDestTypePreparedQuery { - continue - } - - upstreamCluster, err := s.makeUpstreamClusterForPreparedQuery(u, cfgSnap) - if err != nil { - return err - } - clusters[upstreamCluster.name] = upstreamCluster.cluster - } - - cfgSnap.Proxy.Expose.Finalize() - paths := cfgSnap.Proxy.Expose.Paths - - // Add service health checks to the list of paths to create clusters for if needed - if cfgSnap.Proxy.Expose.Checks { - psid := structs.NewServiceID(cfgSnap.Proxy.DestinationServiceID, &cfgSnap.ProxyID.EnterpriseMeta) - for _, check := range cfgSnap.ConnectProxy.WatchedServiceChecks[psid] { - p, err := parseCheckPath(check) - if err != nil { - s.Logger.Warn("failed to create cluster for", "check", check.CheckID, "error", err) - continue - } - paths = append(paths, p) - } - } - - // Create a new cluster if we need to expose a port that is different from the service port - for _, path := range paths { - if path.LocalPathPort == cfgSnap.Proxy.LocalServicePort { - continue - } - c, err := s.makeAppCluster(cfgSnap, makeExposeClusterName(path.LocalPathPort), path.Protocol, path.LocalPathPort) - if err != nil { - s.Logger.Warn("failed to make local cluster", "path", path.Path, "error", err) - continue - } - clusters[c.name] = c.cluster - } - - return nil -} - -// TODO(proxystate): L7 Intentions and JWT Auth will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeJWTProviderCluster -// func makeJWKSDiscoveryClusterType -// func makeJWTCertValidationContext -// func parseJWTRemoteURL - -func makeExposeClusterName(destinationPort int) string { - return fmt.Sprintf("exposed_cluster_%d", destinationPort) -} - -// In transparent proxy mode there are potentially multiple passthrough clusters added. -// The first is for destinations outside of Consul's catalog. This is for a plain TCP proxy. -// All of these use Envoy's ORIGINAL_DST listener filter, which forwards to the original -// destination address (before the iptables redirection). -// The rest are for destinations inside the mesh, which require certificates for mTLS. -func (s *Converter) makePassthroughClusters(cfgSnap *proxycfg.ConfigSnapshot) (map[string]*pbproxystate.Cluster, error) { - // This size is an upper bound. - clusters := make(map[string]*pbproxystate.Cluster, 0) - if meshConf := cfgSnap.MeshConfig(); meshConf == nil || - !meshConf.TransparentProxy.MeshDestinationsOnly { - - clusters[naming.OriginalDestinationClusterName] = &pbproxystate.Cluster{ - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Passthrough{ - Passthrough: &pbproxystate.PassthroughEndpointGroup{ - Config: &pbproxystate.PassthroughEndpointGroupConfig{ - ConnectTimeout: durationpb.New(5 * time.Second), - }, - }, - }, - }, - }, - } - } - - for uid, chain := range cfgSnap.ConnectProxy.DiscoveryChain { - targetMap, ok := cfgSnap.ConnectProxy.PassthroughUpstreams[uid] - if !ok { - continue - } - - for targetID := range targetMap { - uid := proxycfg.NewUpstreamIDFromTargetID(targetID) - - sni := connect.ServiceSNI( - uid.Name, "", uid.NamespaceOrDefault(), - uid.PartitionOrDefault(), cfgSnap.Datacenter, - cfgSnap.Roots.TrustDomain) - - // Prefixed with passthrough to distinguish from non-passthrough clusters for the same upstream. - name := "passthrough~" + sni - - c := pbproxystate.Cluster{ - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Passthrough{ - Passthrough: &pbproxystate.PassthroughEndpointGroup{ - Config: &pbproxystate.PassthroughEndpointGroupConfig{ - ConnectTimeout: durationpb.New(5 * time.Second), - }, - }, - }, - }, - }, - } - - if discoTarget, ok := chain.Targets[targetID]; ok && discoTarget.ConnectTimeout > 0 { - c.GetEndpointGroup().GetPassthrough().GetConfig(). - ConnectTimeout = durationpb.New(discoTarget.ConnectTimeout) - } - - transportSocket, err := s.createOutboundMeshMTLS(cfgSnap, []string{getSpiffeID(cfgSnap, uid)}, sni) - if err != nil { - return nil, err - } - c.GetEndpointGroup().GetPassthrough().OutboundTls = transportSocket - - clusters[name] = &c - } - } - - err := cfgSnap.ConnectProxy.DestinationsUpstream.ForEachKeyE(func(uid proxycfg.UpstreamID) error { - svcConfig, ok := cfgSnap.ConnectProxy.DestinationsUpstream.Get(uid) - if !ok || svcConfig.Destination == nil { - return nil - } - - // One Cluster per Destination Address - for _, address := range svcConfig.Destination.Addresses { - name := clusterNameForDestination(cfgSnap, uid.Name, address, uid.NamespaceOrDefault(), uid.PartitionOrDefault()) - - c := &pbproxystate.Cluster{ - AltStatName: name, - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dynamic{ - Dynamic: &pbproxystate.DynamicEndpointGroup{ - Config: &pbproxystate.DynamicEndpointGroupConfig{ - ConnectTimeout: durationpb.New(5 * time.Second), - // Endpoints are managed separately by EDS - // Having an empty config enables outlier detection with default config. - OutlierDetection: &pbproxystate.OutlierDetection{}, - }, - }, - }, - }, - }, - } - sni := connect.ServiceSNI( - uid.Name, "", uid.NamespaceOrDefault(), - uid.PartitionOrDefault(), cfgSnap.Datacenter, - cfgSnap.Roots.TrustDomain) - transportSocket, err := s.createOutboundMeshMTLS(cfgSnap, []string{getSpiffeID(cfgSnap, uid)}, sni) - if err != nil { - return err - } - c.GetEndpointGroup().GetDynamic().OutboundTls = transportSocket - clusters[name] = c - } - return nil - }) - if err != nil { - return nil, err - } - - return clusters, nil -} - -func getSpiffeID(cfgSnap *proxycfg.ConfigSnapshot, uid proxycfg.UpstreamID) string { - spiffeIDService := &connect.SpiffeIDService{ - Host: cfgSnap.Roots.TrustDomain, - Partition: uid.PartitionOrDefault(), - Namespace: uid.NamespaceOrDefault(), - Datacenter: cfgSnap.Datacenter, - Service: uid.Name, - } - return spiffeIDService.URI().String() -} -func clusterNameForDestination(cfgSnap *proxycfg.ConfigSnapshot, name string, - address string, namespace string, partition string) string { - name = destinationSpecificServiceName(name, address) - sni := connect.ServiceSNI(name, "", namespace, partition, - cfgSnap.Datacenter, cfgSnap.Roots.TrustDomain) - - // Prefixed with destination to distinguish from non-passthrough clusters - // for the same upstream. - return "destination." + sni -} - -func destinationSpecificServiceName(name string, address string) string { - address = strings.ReplaceAll(address, ":", "-") - address = strings.ReplaceAll(address, ".", "-") - return fmt.Sprintf("%s.%s", address, name) -} - -// TODO(proxystate): Mesh Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func clustersFromSnapshotMeshGateway -// func haveVoters - -// TODO(proxystate): Peering will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makePeerServerClusters - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func clustersFromSnapshotTerminatingGateway - -// TODO(proxystate): Mesh Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeGatewayServiceClusters - -// TODO(proxystate): Cluster Peering will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeGatewayOutgoingClusterPeeringServiceClusters - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeDestinationClusters - -// TODO(proxystate): Mesh Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func injectGatewayServiceAddons - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func injectGatewayDestinationAddons - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func clustersFromSnapshotIngressGateway - -// TODO(proxystate): API Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func clustersFromSnapshotAPIGateway - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func configIngressUpstreamCluster - -func (s *Converter) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, name, pathProtocol string, port int) (*namedCluster, error) { - var err error - namedCluster := &namedCluster{} - - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - } - - //// If we have overridden local cluster config try to parse it into an Envoy cluster - //if cfg.LocalClusterJSON != "" { - // return makeClusterFromUserConfig(cfg.LocalClusterJSON) - //} - - var endpoint *pbproxystate.Endpoint - if cfgSnap.Proxy.LocalServiceSocketPath != "" { - endpoint = makeUnixSocketEndpoint(cfgSnap.Proxy.LocalServiceSocketPath) - } else { - addr := cfgSnap.Proxy.LocalServiceAddress - if addr == "" { - addr = "127.0.0.1" - } - endpoint = makeHostPortEndpoint(addr, port) - } - s.proxyState.Endpoints[name] = &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{endpoint}, - } - - namedCluster.name = name - namedCluster.cluster = &pbproxystate.Cluster{ - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Static{ - Static: &pbproxystate.StaticEndpointGroup{ - Config: &pbproxystate.StaticEndpointGroupConfig{ - ConnectTimeout: durationpb.New(time.Duration(cfg.LocalConnectTimeoutMs) * time.Millisecond), - }, - }, - }, - }, - }, - } - - protocol := pathProtocol - if protocol == "" { - protocol = cfg.Protocol - } - namedCluster.cluster.Protocol = protocol - if cfg.MaxInboundConnections > 0 { - namedCluster.cluster.GetEndpointGroup().GetStatic().GetConfig(). - CircuitBreakers = &pbproxystate.CircuitBreakers{ - UpstreamLimits: &pbproxystate.UpstreamLimits{ - MaxConnections: response.MakeUint32Value(cfg.MaxInboundConnections), - }, - } - } - - return namedCluster, err -} - -func (s *Converter) makeUpstreamClusterForPeerService( - uid proxycfg.UpstreamID, - upstreamConfig structs.UpstreamConfig, - peerMeta structs.PeeringServiceMeta, - cfgSnap *proxycfg.ConfigSnapshot, -) (string, *pbproxystate.Cluster, *pbproxystate.Endpoints, error) { - var ( - c *pbproxystate.Cluster - e *pbproxystate.Endpoints - err error - ) - - // TODO(proxystate): escapeHatches will be implemented in the future - //if upstreamConfig.EnvoyClusterJSON != "" { - // c, err = makeClusterFromUserConfig(upstreamConfig.EnvoyClusterJSON) - // if err != nil { - // return "", c, e, err - // } - // // In the happy path don't return yet as we need to inject TLS config still. - //} - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - - if err != nil { - return "", c, e, err - } - - tbs, ok := upstreamsSnapshot.UpstreamPeerTrustBundles.Get(uid.Peer) - if !ok { - // this should never happen since we loop through upstreams with - // set trust bundles - return "", c, e, fmt.Errorf("trust bundle not ready for peer %s", uid.Peer) - } - - clusterName := generatePeeredClusterName(uid, tbs) - - outlierDetection := makeOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true) - // We can't rely on health checks for services on cluster peers because they - // don't take into account service resolvers, splitters and routers. Setting - // MaxEjectionPercent too 100% gives outlier detection the power to eject the - // entire cluster. - outlierDetection.MaxEjectionPercent = &wrapperspb.UInt32Value{Value: 100} - - s.Logger.Trace("generating cluster for", "cluster", clusterName) - if c == nil { - c = &pbproxystate.Cluster{} - - useEDS := true - if _, ok := cfgSnap.ConnectProxy.PeerUpstreamEndpointsUseHostnames[uid]; ok { - // If we're using local mesh gw, the fact that upstreams use hostnames don't matter. - // If we're not using local mesh gw, then resort to CDS. - if upstreamConfig.MeshGateway.Mode != structs.MeshGatewayModeLocal { - useEDS = false - } - } - - // If none of the service instances are addressed by a hostname we - // provide the endpoint IP addresses via EDS - if useEDS { - d := &pbproxystate.DynamicEndpointGroup{ - Config: &pbproxystate.DynamicEndpointGroupConfig{ - UseAltStatName: false, - ConnectTimeout: durationpb.New(time.Duration(upstreamConfig.ConnectTimeoutMs) * time.Millisecond), - DisablePanicThreshold: true, - CircuitBreakers: &pbproxystate.CircuitBreakers{ - UpstreamLimits: makeUpstreamLimitsIfNeeded(upstreamConfig.Limits), - }, - OutlierDetection: outlierDetection, - }, - } - c.Group = &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dynamic{ - Dynamic: d, - }, - }, - } - transportSocket := &pbproxystate.TransportSocket{ - ConnectionTls: &pbproxystate.TransportSocket_OutboundMesh{ - OutboundMesh: &pbproxystate.OutboundMeshMTLS{ - ValidationContext: &pbproxystate.MeshOutboundValidationContext{ - SpiffeIds: peerMeta.SpiffeID, - TrustBundlePeerNameKey: uid.Peer, - }, - Sni: peerMeta.PrimarySNI(), - }, - }, - } - d.OutboundTls = transportSocket - } else { - d := &pbproxystate.DNSEndpointGroup{ - Config: &pbproxystate.DNSEndpointGroupConfig{ - UseAltStatName: false, - ConnectTimeout: durationpb.New(time.Duration(upstreamConfig.ConnectTimeoutMs) * time.Millisecond), - DisablePanicThreshold: true, - CircuitBreakers: &pbproxystate.CircuitBreakers{ - UpstreamLimits: makeUpstreamLimitsIfNeeded(upstreamConfig.Limits), - }, - OutlierDetection: outlierDetection, - }, - } - c.Group = &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dns{ - Dns: d, - }, - }, - } - e = &pbproxystate.Endpoints{ - Endpoints: make([]*pbproxystate.Endpoint, 0), - } - - ep, _ := cfgSnap.ConnectProxy.PeerUpstreamEndpoints.Get(uid) - configureClusterWithHostnames( - s.Logger, - d, - e, - "", /*TODO:make configurable?*/ - ep, - true, /*isRemote*/ - false, /*onlyPassing*/ - ) - transportSocket := &pbproxystate.TransportSocket{ - ConnectionTls: &pbproxystate.TransportSocket_OutboundMesh{ - OutboundMesh: &pbproxystate.OutboundMeshMTLS{ - ValidationContext: &pbproxystate.MeshOutboundValidationContext{ - SpiffeIds: peerMeta.SpiffeID, - TrustBundlePeerNameKey: uid.Peer, - }, - Sni: peerMeta.PrimarySNI(), - }, - }, - } - d.OutboundTls = transportSocket - } - } - - return clusterName, c, e, nil -} - -func (s *Converter) makeUpstreamClusterForPreparedQuery(upstream structs.Upstream, cfgSnap *proxycfg.ConfigSnapshot) (*namedCluster, error) { - var c *pbproxystate.Cluster - var err error - - uid := proxycfg.NewUpstreamID(&upstream) - - dc := upstream.Datacenter - if dc == "" { - dc = cfgSnap.Datacenter - } - sni := connect.UpstreamSNI(&upstream, "", dc, cfgSnap.Roots.TrustDomain) - - cfg, _ := structs.ParseUpstreamConfig(upstream.Config) - // TODO(proxystate): add logger and enable this - //if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - //s.Logger.Warn("failed to parse", "upstream", uid, "error", err) - //} - - // TODO(proxystate): escapeHatches will be implemented in the future - //if cfg.EnvoyClusterJSON != "" { - // c, err = makeClusterFromUserConfig(cfg.EnvoyClusterJSON) - // if err != nil { - // return c, err - // } - // // In the happy path don't return yet as we need to inject TLS config still. - //} - - if c == nil { - c = &pbproxystate.Cluster{ - Protocol: cfg.Protocol, - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dynamic{ - Dynamic: &pbproxystate.DynamicEndpointGroup{ - Config: &pbproxystate.DynamicEndpointGroupConfig{ - ConnectTimeout: durationpb.New(time.Duration(cfg.ConnectTimeoutMs) * time.Millisecond), - // Endpoints are managed separately by EDS - // Having an empty config enables outlier detection with default config. - OutlierDetection: makeOutlierDetection(cfg.PassiveHealthCheck, nil, true), - DisablePanicThreshold: true, - CircuitBreakers: &pbproxystate.CircuitBreakers{ - UpstreamLimits: makeUpstreamLimitsIfNeeded(cfg.Limits), - }, - }, - }, - }, - }, - }, - } - } - - endpoints := cfgSnap.ConnectProxy.PreparedQueryEndpoints[uid] - var ( - spiffeIDs = make([]string, 0) - seen = make(map[string]struct{}) - ) - for _, e := range endpoints { - id := fmt.Sprintf("%s/%s", e.Node.Datacenter, e.Service.CompoundServiceName()) - if _, ok := seen[id]; ok { - continue - } - seen[id] = struct{}{} - - name := e.Service.Proxy.DestinationServiceName - if e.Service.Connect.Native { - name = e.Service.Service - } - - spiffeIDs = append(spiffeIDs, connect.SpiffeIDService{ - Host: cfgSnap.Roots.TrustDomain, - Namespace: e.Service.NamespaceOrDefault(), - Partition: e.Service.PartitionOrDefault(), - Datacenter: e.Node.Datacenter, - Service: name, - }.URI().String()) - } - - transportSocket, err := s.createOutboundMeshMTLS(cfgSnap, spiffeIDs, sni) - if err != nil { - return nil, err - } - c.GetEndpointGroup().GetDynamic().OutboundTls = transportSocket - - return &namedCluster{name: sni, cluster: c}, nil -} - -func finalizeUpstreamConfig(cfg structs.UpstreamConfig, chain *structs.CompiledDiscoveryChain, connectTimeout time.Duration) structs.UpstreamConfig { - if cfg.Protocol == "" { - cfg.Protocol = chain.Protocol - } - - if cfg.Protocol == "" { - cfg.Protocol = "tcp" - } - - if cfg.ConnectTimeoutMs == 0 { - cfg.ConnectTimeoutMs = int(connectTimeout / time.Millisecond) - } - return cfg -} - -func (s *Converter) createOutboundMeshMTLS(cfgSnap *proxycfg.ConfigSnapshot, spiffeIDs []string, sni string) (*pbproxystate.TransportSocket, error) { - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - case structs.ServiceKindMeshGateway: - default: - return nil, fmt.Errorf("cannot inject peering trust bundles for kind %q", cfgSnap.Kind) - } - - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - } - - // Add all trust bundle peer names, including local. - trustBundlePeerNames := []string{"local"} - for _, tb := range cfgSnap.PeeringTrustBundles() { - trustBundlePeerNames = append(trustBundlePeerNames, tb.PeerName) - } - // Arbitrary UUID to reference the identity by. - uuid, err := uuid.GenerateUUID() - if err != nil { - return nil, err - } - - // Create the transport socket - ts := &pbproxystate.TransportSocket{} - - ts.ConnectionTls = &pbproxystate.TransportSocket_OutboundMesh{ - OutboundMesh: &pbproxystate.OutboundMeshMTLS{ - IdentityKey: uuid, - ValidationContext: &pbproxystate.MeshOutboundValidationContext{ - TrustBundlePeerNameKey: trustBundlePeerNames[0], - SpiffeIds: spiffeIDs, - }, - Sni: sni, - }, - } - s.proxyState.LeafCertificates[uuid] = &pbproxystate.LeafCertificate{ - Cert: cfgSnap.Leaf().CertPEM, - Key: cfgSnap.Leaf().PrivateKeyPEM, - } - ts.TlsParameters = makeTLSParametersFromProxyTLSConfig(cfgSnap.MeshConfigTLSOutgoing()) - ts.AlpnProtocols = getAlpnProtocols(cfg.Protocol) - - return ts, nil -} -func (s *Converter) makeUpstreamClustersForDiscoveryChain( - uid proxycfg.UpstreamID, - upstream *structs.Upstream, - chain *structs.CompiledDiscoveryChain, - cfgSnap *proxycfg.ConfigSnapshot, - forMeshGateway bool, -) (map[string]*pbproxystate.Cluster, error) { - if chain == nil { - return nil, fmt.Errorf("cannot create upstream cluster without discovery chain for %s", uid) - } - - if uid.Peer != "" && forMeshGateway { - return nil, fmt.Errorf("impossible to get a peer discovery chain in a mesh gateway") - } - - upstreamConfigMap := make(map[string]interface{}) - if upstream != nil { - upstreamConfigMap = upstream.Config - } - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - - // Mesh gateways are exempt because upstreamsSnapshot is only used for - // cluster peering targets and transative failover/redirects are unsupported. - if err != nil && !forMeshGateway { - return nil, err - } - - rawUpstreamConfig, err := structs.ParseUpstreamConfigNoDefaults(upstreamConfigMap) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse", "upstream", uid, - "error", err) - } - - // TODO(proxystate): escapeHatches will be implemented in the future - //var escapeHatchCluster *pbproxystate.Cluster - //if !forMeshGateway { - // if rawUpstreamConfig.EnvoyClusterJSON != "" { - // if chain.Default { - // // If you haven't done anything to setup the discovery chain, then - // // you can use the envoy_cluster_json escape hatch. - // escapeHatchCluster = &pbproxystate.Cluster{ - // EscapeHatchClusterJson: rawUpstreamConfig.EnvoyClusterJSON, - // } - // } else { - // s.Logger.Warn("ignoring escape hatch setting, because a discovery chain is configured for", - // "discovery chain", chain.ServiceName, "upstream", uid, - // "envoy_cluster_json", chain.ServiceName) - // } - // } - //} - - out := make(map[string]*pbproxystate.Cluster) - for _, node := range chain.Nodes { - switch { - case node == nil: - return nil, fmt.Errorf("impossible to process a nil node") - case node.Type != structs.DiscoveryGraphNodeTypeResolver: - continue - case node.Resolver == nil: - return nil, fmt.Errorf("impossible to process a non-resolver node") - } - // These variables are prefixed with primary to avoid shaddowing bugs. - primaryTargetID := node.Resolver.Target - primaryTarget := chain.Targets[primaryTargetID] - primaryTargetClusterName := s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway) - if primaryTargetClusterName == "" { - continue - } - if forMeshGateway && !cfgSnap.Locality.Matches(primaryTarget.Datacenter, primaryTarget.Partition) { - s.Logger.Warn("ignoring discovery chain target that crosses a datacenter or partition boundary in a mesh gateway", - "target", primaryTarget, - "gatewayLocality", cfgSnap.Locality, - ) - continue - } - - upstreamConfig := finalizeUpstreamConfig(rawUpstreamConfig, chain, node.Resolver.ConnectTimeout) - - mappedTargets, err := s.mapDiscoChainTargets(cfgSnap, chain, node, upstreamConfig, forMeshGateway) - if err != nil { - return nil, err - } - - targetGroups, err := mappedTargets.groupedTargets() - if err != nil { - return nil, err - } - - var failoverGroup *pbproxystate.FailoverGroup - endpointGroups := make([]*pbproxystate.EndpointGroup, 0) - if mappedTargets.failover { - // Create a failover group. The endpoint groups that are part of this failover group are created by the loop - // below. - failoverGroup = &pbproxystate.FailoverGroup{ - Config: &pbproxystate.FailoverGroupConfig{ - ConnectTimeout: durationpb.New(node.Resolver.ConnectTimeout), - }, - } - } - - // Construct the target dynamic endpoint groups. If these are not part of a failover group, they will get added - // directly to the map of pbproxystate.Cluster, if they are a part of a failover group, they will be added to - // the failover group. - for _, groupedTarget := range targetGroups { - s.Logger.Debug("generating cluster for", "cluster", groupedTarget.ClusterName) - dynamic := &pbproxystate.DynamicEndpointGroup{ - Config: &pbproxystate.DynamicEndpointGroupConfig{ - UseAltStatName: true, - ConnectTimeout: durationpb.New(node.Resolver.ConnectTimeout), - // TODO(peering): make circuit breakers or outlier detection work? - CircuitBreakers: &pbproxystate.CircuitBreakers{ - UpstreamLimits: makeUpstreamLimitsIfNeeded(upstreamConfig.Limits), - }, - OutlierDetection: makeOutlierDetection(upstreamConfig.PassiveHealthCheck, nil, true), - }, - } - ti := groupedTarget.Targets[0] - transportSocket, err := s.createOutboundMeshMTLS(cfgSnap, ti.SpiffeIDs, ti.SNI) - if err != nil { - return nil, err - } - dynamic.OutboundTls = transportSocket - - var lb *structs.LoadBalancer - if node.LoadBalancer != nil { - lb = node.LoadBalancer - } - if err := injectLBToCluster(lb, dynamic.Config); err != nil { - return nil, fmt.Errorf("failed to apply load balancer configuration to cluster %q: %v", groupedTarget.ClusterName, err) - } - - // TODO: IR: http2 options not currently supported - //if upstreamConfig.Protocol == "http2" || upstreamConfig.Protocol == "grpc" { - // if err := s.setHttp2ProtocolOptions(c); err != nil { - // return nil, err - // } - //} - - switch len(groupedTarget.Targets) { - case 0: - continue - case 1: - // We expect one target so this passes through to continue setting the cluster up. - default: - return nil, fmt.Errorf("cannot have more than one target") - } - - if targetInfo := groupedTarget.Targets[0]; targetInfo.TransportSocket != nil { - dynamic.OutboundTls = targetInfo.TransportSocket - } - - // If the endpoint group is part of a failover group, add it to the failover group. Otherwise add it - // directly to the clusters. - if failoverGroup != nil { - eg := &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dynamic{ - Dynamic: dynamic, - }, - } - endpointGroups = append(endpointGroups, eg) - } else { - cluster := &pbproxystate.Cluster{ - AltStatName: mappedTargets.baseClusterName, - Protocol: upstreamConfig.Protocol, - Group: &pbproxystate.Cluster_EndpointGroup{ - EndpointGroup: &pbproxystate.EndpointGroup{ - Group: &pbproxystate.EndpointGroup_Dynamic{ - Dynamic: dynamic, - }, - }, - }, - } - - out[mappedTargets.baseClusterName] = cluster - } - } - - // If there's a failover group, we only add the failover group to the top level list of clusters. Its endpoint - // groups are inlined. - if failoverGroup != nil { - failoverGroup.EndpointGroups = endpointGroups - cluster := &pbproxystate.Cluster{ - AltStatName: mappedTargets.baseClusterName, - Protocol: upstreamConfig.Protocol, - Group: &pbproxystate.Cluster_FailoverGroup{ - FailoverGroup: failoverGroup, - }, - } - out[mappedTargets.baseClusterName] = cluster - } - } - - //if escapeHatchCluster != nil { - // if len(out) != 1 { - // return nil, fmt.Errorf("cannot inject escape hatch cluster when discovery chain had no nodes") - // } - // var defaultCluster *pbproxystate.Cluster - // for _, k := range out { - // defaultCluster = k - // break - // } - // - // // Overlay what the user provided. - // escapeHatchCluster.GetEndpointGroup().GetDynamic().OutboundTls.ConnectionTls = - // defaultCluster.GetEndpointGroup().GetDynamic().OutboundTls.ConnectionTls - // - // out = append(out, escapeHatchCluster) - //} - - return out, nil -} - -// TODO(proxystate): Mesh Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeExportedUpstreamClustersForMeshGateway - -// makeClusterFromUserConfig returns the listener config decoded from an -// arbitrary proto3 json format string or an error if it's invalid. -// -// For now we only support embedding in JSON strings because of the hcl parsing -// pain (see Background section in the comment for decode.HookWeakDecodeFromSlice). -// This may be fixed in decode.HookWeakDecodeFromSlice in the future. -// -// When we do that we can support just nesting the config directly into the -// JSON/hcl naturally but this is a stop-gap that gets us an escape hatch -// immediately. It's also probably not a bad thing to support long-term since -// any config generated by other systems will likely be in canonical protobuf -// from rather than our slight variant in JSON/hcl. - -// TODO(proxystate): Mesh and Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeGatewayCluster - -func configureClusterWithHostnames( - logger hclog.Logger, - dnsEndpointGroup *pbproxystate.DNSEndpointGroup, - endpointList *pbproxystate.Endpoints, - dnsDiscoveryType string, - // hostnameEndpoints is a list of endpoints with a hostname as their address - hostnameEndpoints structs.CheckServiceNodes, - // isRemote determines whether the cluster is in a remote DC or partition and we should prefer a WAN address - isRemote bool, - // onlyPassing determines whether endpoints that do not have a passing status should be considered unhealthy - onlyPassing bool, -) { - // When a service instance is addressed by a hostname we have Envoy do the DNS resolution - // by setting a DNS cluster type and passing the hostname endpoints via CDS. - if dnsEndpointGroup.Config == nil { - dnsEndpointGroup.Config = &pbproxystate.DNSEndpointGroupConfig{} - } - dnsEndpointGroup.Config.DiscoveryType = pbproxystate.DiscoveryType_DISCOVERY_TYPE_LOGICAL - if dnsDiscoveryType == "strict_dns" { - dnsEndpointGroup.Config.DiscoveryType = pbproxystate.DiscoveryType_DISCOVERY_TYPE_STRICT - } - - endpoints := make([]*envoy_endpoint_v3.LbEndpoint, 0, 1) - uniqueHostnames := make(map[string]bool) - - var ( - hostname string - idx int - fallback *pbproxystate.Endpoint - ) - for i, e := range hostnameEndpoints { - _, addr, port := e.BestAddress(isRemote) - uniqueHostnames[addr] = true - - health, weight := calculateEndpointHealthAndWeight(e, onlyPassing) - if health == pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY { - fallback = makeLbEndpoint(addr, port, health, weight) - continue - } - - if len(endpoints) == 0 { - endpointList.Endpoints = append(endpointList.Endpoints, makeLbEndpoint(addr, port, health, weight)) - - hostname = addr - idx = i - break - } - } - - dc := hostnameEndpoints[idx].Node.Datacenter - service := hostnameEndpoints[idx].Service.CompoundServiceName() - - // Fall back to last unhealthy endpoint if none were healthy - if len(endpoints) == 0 { - logger.Warn("upstream service does not contain any healthy instances", - "dc", dc, "service", service.String()) - - //endpoints = append(endpoints, fallback) - endpointList.Endpoints = append(endpointList.Endpoints, fallback) - } - if len(uniqueHostnames) > 1 { - logger.Warn(fmt.Sprintf("service contains instances with more than one unique hostname; only %q be resolved by Envoy", hostname), - "dc", dc, "service", service.String()) - } - -} - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeExternalIPCluster - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func makeExternalHostnameCluster - -func makeUpstreamLimitsIfNeeded(limits *structs.UpstreamLimits) *pbproxystate.UpstreamLimits { - if limits == nil { - return nil - } - - upstreamLimits := &pbproxystate.UpstreamLimits{} - - // Likewise, make sure to not set any threshold values on the zero-value in - // order to rely on Envoy defaults - if limits.MaxConnections != nil { - upstreamLimits.MaxConnections = response.MakeUint32Value(*limits.MaxConnections) - } - if limits.MaxPendingRequests != nil { - upstreamLimits.MaxPendingRequests = response.MakeUint32Value(*limits.MaxPendingRequests) - } - if limits.MaxConcurrentRequests != nil { - upstreamLimits.MaxConcurrentRequests = response.MakeUint32Value(*limits.MaxConcurrentRequests) - } - - return upstreamLimits -} - -func injectLBToCluster(ec *structs.LoadBalancer, dc *pbproxystate.DynamicEndpointGroupConfig) error { - if ec == nil { - return nil - } - - switch ec.Policy { - case "": - return nil - case structs.LBPolicyLeastRequest: - lr := &pbproxystate.DynamicEndpointGroupConfig_LeastRequest{ - LeastRequest: &pbproxystate.LBPolicyLeastRequest{}, - } - - dc.LbPolicy = lr - - if ec.LeastRequestConfig != nil { - lr.LeastRequest.ChoiceCount = &wrapperspb.UInt32Value{Value: ec.LeastRequestConfig.ChoiceCount} - } - case structs.LBPolicyRoundRobin: - dc.LbPolicy = &pbproxystate.DynamicEndpointGroupConfig_RoundRobin{ - RoundRobin: &pbproxystate.LBPolicyRoundRobin{}, - } - - case structs.LBPolicyRandom: - dc.LbPolicy = &pbproxystate.DynamicEndpointGroupConfig_Random{ - Random: &pbproxystate.LBPolicyRandom{}, - } - - case structs.LBPolicyRingHash: - rh := &pbproxystate.DynamicEndpointGroupConfig_RingHash{ - RingHash: &pbproxystate.LBPolicyRingHash{}, - } - - dc.LbPolicy = rh - - if ec.RingHashConfig != nil { - rh.RingHash.MinimumRingSize = &wrapperspb.UInt64Value{Value: ec.RingHashConfig.MinimumRingSize} - rh.RingHash.MaximumRingSize = &wrapperspb.UInt64Value{Value: ec.RingHashConfig.MaximumRingSize} - } - case structs.LBPolicyMaglev: - dc.LbPolicy = &pbproxystate.DynamicEndpointGroupConfig_Maglev{ - Maglev: &pbproxystate.LBPolicyMaglev{}, - } - - default: - return fmt.Errorf("unsupported load balancer policy %q", ec.Policy) - } - return nil -} - -// generatePeeredClusterName returns an SNI-like cluster name which mimics PeeredServiceSNI -// but excludes partition information which could be ambiguous (local vs remote partition). -func generatePeeredClusterName(uid proxycfg.UpstreamID, tb *pbpeering.PeeringTrustBundle) string { - return strings.Join([]string{ - uid.Name, - uid.NamespaceOrDefault(), - uid.Peer, - "external", - tb.TrustDomain, - }, ".") -} - -func (s *Converter) getTargetClusterName(upstreamsSnapshot *proxycfg.ConfigSnapshotUpstreams, chain *structs.CompiledDiscoveryChain, tid string, forMeshGateway bool) string { - target := chain.Targets[tid] - clusterName := target.Name - targetUID := proxycfg.NewUpstreamIDFromTargetID(tid) - if targetUID.Peer != "" { - tbs, ok := upstreamsSnapshot.UpstreamPeerTrustBundles.Get(targetUID.Peer) - // We can't generate cluster on peers without the trust bundle. The - // trust bundle should be ready soon. - if !ok { - s.Logger.Debug("peer trust bundle not ready for discovery chain target", - "peer", targetUID.Peer, - "target", tid, - ) - return "" - } - - clusterName = generatePeeredClusterName(targetUID, tbs) - } - clusterName = naming.CustomizeClusterName(clusterName, chain) - if forMeshGateway { - clusterName = meshGatewayExportedClusterNamePrefix + clusterName - } - return clusterName -} - -// Return an pbproxystate.OutlierDetection populated by the values from structs.PassiveHealthCheck. -// If all values are zero a default empty OutlierDetection will be returned to -// enable outlier detection with default values. -// - If override is not nil, it will overwrite the values from p, e.g., ingress gateway defaults -// - allowZero is added to handle the legacy case where connect-proxy and mesh gateway can set 0 -// for EnforcingConsecutive5xx. Due to the definition of proto of PassiveHealthCheck, ingress -// gateway's EnforcingConsecutive5xx must be > 0. -func makeOutlierDetection(p *structs.PassiveHealthCheck, override *structs.PassiveHealthCheck, allowZero bool) *pbproxystate.OutlierDetection { - od := &pbproxystate.OutlierDetection{} - if p != nil { - - if p.Interval != 0 { - od.Interval = durationpb.New(p.Interval) - } - if p.MaxFailures != 0 { - od.Consecutive_5Xx = &wrapperspb.UInt32Value{Value: p.MaxFailures} - } - - if p.EnforcingConsecutive5xx != nil { - // NOTE: EnforcingConsecutive5xx must be greater than 0 for ingress-gateway - if *p.EnforcingConsecutive5xx != 0 { - od.EnforcingConsecutive_5Xx = &wrapperspb.UInt32Value{Value: *p.EnforcingConsecutive5xx} - } else if allowZero { - od.EnforcingConsecutive_5Xx = &wrapperspb.UInt32Value{Value: *p.EnforcingConsecutive5xx} - } - } - - if p.MaxEjectionPercent != nil { - od.MaxEjectionPercent = &wrapperspb.UInt32Value{Value: *p.MaxEjectionPercent} - } - if p.BaseEjectionTime != nil { - od.BaseEjectionTime = durationpb.New(*p.BaseEjectionTime) - } - } - - if override == nil { - return od - } - - // override the default outlier detection value - if override.Interval != 0 { - od.Interval = durationpb.New(override.Interval) - } - if override.MaxFailures != 0 { - od.Consecutive_5Xx = &wrapperspb.UInt32Value{Value: override.MaxFailures} - } - - if override.EnforcingConsecutive5xx != nil { - // NOTE: EnforcingConsecutive5xx must be great than 0 for ingress-gateway - if *override.EnforcingConsecutive5xx != 0 { - od.EnforcingConsecutive_5Xx = &wrapperspb.UInt32Value{Value: *override.EnforcingConsecutive5xx} - } - // Because only ingress gateways have overrides and they cannot have a value of 0, there is no allowZero - // override case to handle - } - - if override.MaxEjectionPercent != nil { - od.MaxEjectionPercent = &wrapperspb.UInt32Value{Value: *override.MaxEjectionPercent} - } - if override.BaseEjectionTime != nil { - od.BaseEjectionTime = durationpb.New(*override.BaseEjectionTime) - } - - return od -} diff --git a/agent/xds/proxystateconverter/converter.go b/agent/xds/proxystateconverter/converter.go deleted file mode 100644 index 4cf9b95151c8e..0000000000000 --- a/agent/xds/proxystateconverter/converter.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "fmt" - - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/configfetcher" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" -) - -// Converter converts a single snapshot into a ProxyState. -type Converter struct { - Logger hclog.Logger - CfgFetcher configfetcher.ConfigFetcher - proxyState *pbmesh.ProxyState -} - -func NewConverter( - logger hclog.Logger, - cfgFetcher configfetcher.ConfigFetcher, -) *Converter { - return &Converter{ - Logger: logger, - CfgFetcher: cfgFetcher, - proxyState: &pbmesh.ProxyState{ - Listeners: make([]*pbproxystate.Listener, 0), - Clusters: make(map[string]*pbproxystate.Cluster), - Routes: make(map[string]*pbproxystate.Route), - Endpoints: make(map[string]*pbproxystate.Endpoints), - }, - } -} - -func (g *Converter) ProxyStateFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) (*pbmesh.ProxyState, error) { - err := g.resourcesFromSnapshot(cfgSnap) - if err != nil { - return nil, fmt.Errorf("failed to generate FullProxyState: %v", err) - } - - return g.proxyState, nil -} - -func (g *Converter) resourcesFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - err := g.tlsConfigFromSnapshot(cfgSnap) - if err != nil { - return err - } - - err = g.listenersFromSnapshot(cfgSnap) - if err != nil { - return err - } - - err = g.endpointsFromSnapshot(cfgSnap) - if err != nil { - return err - } - err = g.clustersFromSnapshot(cfgSnap) - if err != nil { - return err - } - - err = g.routesFromSnapshot(cfgSnap) - if err != nil { - return err - } - - //g.secretsFromSnapshot(cfgSnap) - return nil -} - -const localPeerKey = "local" - -func (g *Converter) tlsConfigFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - proxyStateTLS := &pbproxystate.TLS{} - g.proxyState.TrustBundles = make(map[string]*pbproxystate.TrustBundle) - g.proxyState.LeafCertificates = make(map[string]*pbproxystate.LeafCertificate) - - // Set the TLS in the top level proxyState - g.proxyState.Tls = proxyStateTLS - - // Add local trust bundle - g.proxyState.TrustBundles[localPeerKey] = &pbproxystate.TrustBundle{ - TrustDomain: cfgSnap.Roots.TrustDomain, - Roots: []string{cfgSnap.RootPEMs()}, - } - - // Add peered trust bundles for remote peers that will dial this proxy. - for _, peeringTrustBundle := range cfgSnap.PeeringTrustBundles() { - g.proxyState.TrustBundles[peeringTrustBundle.PeerName] = &pbproxystate.TrustBundle{ - TrustDomain: peeringTrustBundle.GetTrustDomain(), - Roots: peeringTrustBundle.RootPEMs, - } - } - - // Add upstream peer trust bundles for dialing upstreams in remote peers. - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil { - if !(cfgSnap.Kind == structs.ServiceKindMeshGateway || cfgSnap.Kind == structs.ServiceKindTerminatingGateway) { - return err - } - } - if upstreamsSnapshot != nil { - upstreamsSnapshot.UpstreamPeerTrustBundles.ForEachKeyE(func(k proxycfg.PeerName) error { - tbs, ok := upstreamsSnapshot.UpstreamPeerTrustBundles.Get(k) - if ok { - g.proxyState.TrustBundles[k] = &pbproxystate.TrustBundle{ - TrustDomain: tbs.TrustDomain, - Roots: tbs.RootPEMs, - } - } - return nil - }) - } - - if cfgSnap.MeshConfigTLSOutgoing() != nil { - proxyStateTLS.OutboundTlsParameters = makeTLSParametersFromTLSConfig(cfgSnap.MeshConfigTLSOutgoing().TLSMinVersion, - cfgSnap.MeshConfigTLSOutgoing().TLSMaxVersion, cfgSnap.MeshConfigTLSOutgoing().CipherSuites) - } - - if cfgSnap.MeshConfigTLSIncoming() != nil { - proxyStateTLS.InboundTlsParameters = makeTLSParametersFromTLSConfig(cfgSnap.MeshConfigTLSIncoming().TLSMinVersion, - cfgSnap.MeshConfigTLSIncoming().TLSMaxVersion, cfgSnap.MeshConfigTLSIncoming().CipherSuites) - } - - return nil -} diff --git a/agent/xds/proxystateconverter/endpoints.go b/agent/xds/proxystateconverter/endpoints.go deleted file mode 100644 index 28156a9b034f6..0000000000000 --- a/agent/xds/proxystateconverter/endpoints.go +++ /dev/null @@ -1,671 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "errors" - "fmt" - - "github.com/hashicorp/consul/agent/connect" - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/go-bexpr" - - "google.golang.org/protobuf/types/known/wrapperspb" -) - -func makeLbEndpoint(addr string, port int, health pbproxystate.HealthStatus, weight int) *pbproxystate.Endpoint { - ep := &pbproxystate.Endpoint{ - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: addr, - Port: uint32(port), - }, - }, - } - ep.HealthStatus = health - ep.LoadBalancingWeight = &wrapperspb.UInt32Value{Value: uint32(weight)} - return ep -} - -// endpointsFromSnapshot returns the mesh API representation of the "routes" in the snapshot. -func (s *Converter) endpointsFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - - if cfgSnap == nil { - return errors.New("nil config given") - } - - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - return s.endpointsFromSnapshotConnectProxy(cfgSnap) - //case structs.ServiceKindTerminatingGateway: - // return s.endpointsFromSnapshotTerminatingGateway(cfgSnap) - //case structs.ServiceKindMeshGateway: - // return s.endpointsFromSnapshotMeshGateway(cfgSnap) - //case structs.ServiceKindIngressGateway: - // return s.endpointsFromSnapshotIngressGateway(cfgSnap) - //case structs.ServiceKindAPIGateway: - // return s.endpointsFromSnapshotAPIGateway(cfgSnap) - default: - return fmt.Errorf("Invalid service kind: %v", cfgSnap.Kind) - } -} - -// endpointsFromSnapshotConnectProxy returns the xDS API representation of the "endpoints" -// (upstream instances) in the snapshot. -func (s *Converter) endpointsFromSnapshotConnectProxy(cfgSnap *proxycfg.ConfigSnapshot) error { - eps := make(map[string]*pbproxystate.Endpoints) - - // NOTE: Any time we skip a chain below we MUST also skip that discovery chain in clusters.go - // so that the sets of endpoints generated matches the sets of clusters. - for uid, chain := range cfgSnap.ConnectProxy.DiscoveryChain { - upstream, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - if skip { - // Discovery chain is not associated with a known explicit or implicit upstream so it is skipped. - continue - } - - var upstreamConfigMap map[string]interface{} - if upstream != nil { - upstreamConfigMap = upstream.Config - } - - es, err := s.endpointsFromDiscoveryChain( - uid, - chain, - cfgSnap, - cfgSnap.Locality, - upstreamConfigMap, - cfgSnap.ConnectProxy.WatchedUpstreamEndpoints[uid], - cfgSnap.ConnectProxy.WatchedGatewayEndpoints[uid], - false, - ) - if err != nil { - return err - } - - for clusterName, endpoints := range es { - eps[clusterName] = &pbproxystate.Endpoints{ - Endpoints: endpoints, - } - - } - } - - // NOTE: Any time we skip an upstream below we MUST also skip that same - // upstream in clusters.go so that the sets of endpoints generated matches - // the sets of clusters. - for _, uid := range cfgSnap.ConnectProxy.PeeredUpstreamIDs() { - upstream, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - if skip { - // Discovery chain is not associated with a known explicit or implicit upstream so it is skipped. - continue - } - - tbs, ok := cfgSnap.ConnectProxy.UpstreamPeerTrustBundles.Get(uid.Peer) - if !ok { - // this should never happen since we loop through upstreams with - // set trust bundles - return fmt.Errorf("trust bundle not ready for peer %s", uid.Peer) - } - - clusterName := generatePeeredClusterName(uid, tbs) - - mgwMode := structs.MeshGatewayModeDefault - if upstream != nil { - mgwMode = upstream.MeshGateway.Mode - } - peerServiceEndpoints, err := s.makeEndpointsForPeerService(cfgSnap, uid, mgwMode) - if err != nil { - return err - } - - if peerServiceEndpoints != nil { - pbEndpoints := &pbproxystate.Endpoints{ - Endpoints: peerServiceEndpoints, - } - - eps[clusterName] = pbEndpoints - } - } - - // Looping over explicit upstreams is only needed for prepared queries because they do not have discovery chains - for _, u := range cfgSnap.Proxy.Upstreams { - if u.DestinationType != structs.UpstreamDestTypePreparedQuery { - continue - } - uid := proxycfg.NewUpstreamID(&u) - - dc := u.Datacenter - if dc == "" { - dc = cfgSnap.Datacenter - } - clusterName := connect.UpstreamSNI(&u, "", dc, cfgSnap.Roots.TrustDomain) - - endpoints, ok := cfgSnap.ConnectProxy.PreparedQueryEndpoints[uid] - if ok { - epts := makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: endpoints}, - }, - cfgSnap.Locality, - ) - pbEndpoints := &pbproxystate.Endpoints{ - Endpoints: epts, - } - - eps[clusterName] = pbEndpoints - } - } - - // Loop over potential destinations in the mesh, then grab the gateway nodes associated with each - cfgSnap.ConnectProxy.DestinationsUpstream.ForEachKey(func(uid proxycfg.UpstreamID) bool { - svcConfig, ok := cfgSnap.ConnectProxy.DestinationsUpstream.Get(uid) - if !ok || svcConfig.Destination == nil { - return true - } - - for _, address := range svcConfig.Destination.Addresses { - clusterName := clusterNameForDestination(cfgSnap, uid.Name, address, uid.NamespaceOrDefault(), uid.PartitionOrDefault()) - - endpoints, ok := cfgSnap.ConnectProxy.DestinationGateways.Get(uid) - if ok { - epts := makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: endpoints}, - }, - proxycfg.GatewayKey{ /*empty so it never matches*/ }, - ) - pbEndpoints := &pbproxystate.Endpoints{ - Endpoints: epts, - } - eps[clusterName] = pbEndpoints - } - } - - return true - }) - - s.proxyState.Endpoints = eps - return nil -} - -func (s *Converter) makeEndpointsForPeerService( - cfgSnap *proxycfg.ConfigSnapshot, - uid proxycfg.UpstreamID, - upstreamGatewayMode structs.MeshGatewayMode, -) ([]*pbproxystate.Endpoint, error) { - var eps []*pbproxystate.Endpoint - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil { - return eps, err - } - - if upstreamGatewayMode == structs.MeshGatewayModeNone { - s.Logger.Warn(fmt.Sprintf("invalid mesh gateway mode 'none', defaulting to 'remote' for %q", uid)) - } - - // If an upstream is configured with local mesh gw mode, we make a load assignment - // from the gateway endpoints instead of those of the upstreams. - if upstreamGatewayMode == structs.MeshGatewayModeLocal { - localGw, ok := cfgSnap.ConnectProxy.WatchedLocalGWEndpoints.Get(cfgSnap.Locality.String()) - if !ok { - // local GW is not ready; return early - return eps, nil - } - eps = makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: localGw}, - }, - cfgSnap.Locality, - ) - return eps, nil - } - - // Also skip peer instances with a hostname as their address. EDS - // cannot resolve hostnames, so we provide them through CDS instead. - if _, ok := upstreamsSnapshot.PeerUpstreamEndpointsUseHostnames[uid]; ok { - return eps, nil - } - - endpoints, ok := upstreamsSnapshot.PeerUpstreamEndpoints.Get(uid) - if !ok { - return nil, nil - } - eps = makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: endpoints}, - }, - proxycfg.GatewayKey{ /*empty so it never matches*/ }, - ) - return eps, nil -} - -func (s *Converter) filterSubsetEndpoints(subset *structs.ServiceResolverSubset, endpoints structs.CheckServiceNodes) (structs.CheckServiceNodes, error) { - // locally execute the subsets filter - if subset.Filter != "" { - filter, err := bexpr.CreateFilter(subset.Filter, nil, endpoints) - if err != nil { - return nil, err - } - - raw, err := filter.Execute(endpoints) - if err != nil { - return nil, err - } - return raw.(structs.CheckServiceNodes), nil - } - return endpoints, nil -} - -// TODO(proxystate): Terminating Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func endpointsFromSnapshotTerminatingGateway - -// TODO(proxystate): Mesh Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func endpointsFromSnapshotMeshGateway - -// TODO(proxystate): Cluster Peering will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func makeEndpointsForOutgoingPeeredServices - -// TODO(proxystate): Mesh Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func endpointsFromServicesAndResolvers - -// TODO(proxystate): Mesh Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func makePeerServerEndpointsForMeshGateway - -// TODO(proxystate): Ingress Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func endpointsFromSnapshotIngressGateway - -// TODO(proxystate): API Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func endpointsFromSnapshotAPIGateway - -// used in clusters.go -func makeHostPortEndpoint(host string, port int) *pbproxystate.Endpoint { - return &pbproxystate.Endpoint{ - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: host, - Port: uint32(port), - }, - }, - } -} - -func makeUnixSocketEndpoint(path string) *pbproxystate.Endpoint { - return &pbproxystate.Endpoint{ - Address: &pbproxystate.Endpoint_UnixSocket{ - UnixSocket: &pbproxystate.UnixSocketAddress{ - Path: path, - // envoy's mode is particular to a pipe address and is uint32. - // it also says "The mode for the Pipe. Not applicable for abstract sockets." - // https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/address.proto#config-core-v3-pipe - Mode: "0", - }, - }, - } -} - -func (s *Converter) makeUpstreamLoadAssignmentEndpointForPeerService( - cfgSnap *proxycfg.ConfigSnapshot, - uid proxycfg.UpstreamID, - upstreamGatewayMode structs.MeshGatewayMode, -) ([]*pbproxystate.Endpoint, error) { - var eps []*pbproxystate.Endpoint - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil { - return eps, err - } - - if upstreamGatewayMode == structs.MeshGatewayModeNone { - s.Logger.Warn(fmt.Sprintf("invalid mesh gateway mode 'none', defaulting to 'remote' for %q", uid)) - } - - // If an upstream is configured with local mesh gw mode, we make a load assignment - // from the gateway endpoints instead of those of the upstreams. - if upstreamGatewayMode == structs.MeshGatewayModeLocal { - localGw, ok := cfgSnap.ConnectProxy.WatchedLocalGWEndpoints.Get(cfgSnap.Locality.String()) - if !ok { - // local GW is not ready; return early - return eps, nil - } - eps = makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: localGw}, - }, - cfgSnap.Locality, - ) - return eps, nil - } - - // Also skip peer instances with a hostname as their address. EDS - // cannot resolve hostnames, so we provide them through CDS instead. - if _, ok := upstreamsSnapshot.PeerUpstreamEndpointsUseHostnames[uid]; ok { - return eps, nil - } - - endpoints, ok := upstreamsSnapshot.PeerUpstreamEndpoints.Get(uid) - if !ok { - return nil, nil - } - eps = makeEndpointsForLoadAssignment( - cfgSnap, - nil, - []loadAssignmentEndpointGroup{ - {Endpoints: endpoints}, - }, - proxycfg.GatewayKey{ /*empty so it never matches*/ }, - ) - return eps, nil -} - -func (s *Converter) endpointsFromDiscoveryChain( - uid proxycfg.UpstreamID, - chain *structs.CompiledDiscoveryChain, - cfgSnap *proxycfg.ConfigSnapshot, - gatewayKey proxycfg.GatewayKey, - upstreamConfigMap map[string]interface{}, - upstreamEndpoints map[string]structs.CheckServiceNodes, - gatewayEndpoints map[string]structs.CheckServiceNodes, - forMeshGateway bool, -) (map[string][]*pbproxystate.Endpoint, error) { - if chain == nil { - if forMeshGateway { - return nil, fmt.Errorf("missing discovery chain for %s", uid) - } - return nil, nil - } - - if upstreamConfigMap == nil { - upstreamConfigMap = make(map[string]interface{}) // TODO:needed? - } - - clusterEndpoints := make(map[string][]*pbproxystate.Endpoint) - - // TODO(jm): escape hatches will be implemented in the future - //var escapeHatchCluster *pbproxystate.Cluster - //if !forMeshGateway { - - //cfg, err := structs.ParseUpstreamConfigNoDefaults(upstreamConfigMap) - //if err != nil { - // // Don't hard fail on a config typo, just warn. The parse func returns - // // default config if there is an error so it's safe to continue. - // s.Logger.Warn("failed to parse", "upstream", uid, - // "error", err) - //} - - //if cfg.EnvoyClusterJSON != "" { - // if chain.Default { - // // If you haven't done anything to setup the discovery chain, then - // // you can use the envoy_cluster_json escape hatch. - // escapeHatchCluster, err = makeClusterFromUserConfig(cfg.EnvoyClusterJSON) - // if err != nil { - // return ce, nil - // } - // } else { - // s.Logger.Warn("ignoring escape hatch setting, because a discovery chain is configued for", - // "discovery chain", chain.ServiceName, "upstream", uid, - // "envoy_cluster_json", chain.ServiceName) - // } - //} - //} - - mgwMode := structs.MeshGatewayModeDefault - if upstream, _ := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta); upstream != nil { - mgwMode = upstream.MeshGateway.Mode - } - - // Find all resolver nodes. - for _, node := range chain.Nodes { - switch { - case node == nil: - return nil, fmt.Errorf("impossible to process a nil node") - case node.Type != structs.DiscoveryGraphNodeTypeResolver: - continue - case node.Resolver == nil: - return nil, fmt.Errorf("impossible to process a non-resolver node") - } - rawUpstreamConfig, err := structs.ParseUpstreamConfigNoDefaults(upstreamConfigMap) - if err != nil { - return nil, err - } - upstreamConfig := finalizeUpstreamConfig(rawUpstreamConfig, chain, node.Resolver.ConnectTimeout) - - mappedTargets, err := s.mapDiscoChainTargets(cfgSnap, chain, node, upstreamConfig, forMeshGateway) - if err != nil { - return nil, err - } - - targetGroups, err := mappedTargets.groupedTargets() - if err != nil { - return nil, err - } - - for _, groupedTarget := range targetGroups { - clusterName := groupedTarget.ClusterName - // TODO(jm): escape hatches will be implemented in the future - //if escapeHatchCluster != nil { - // clusterName = escapeHatchCluster.Name - //} - switch len(groupedTarget.Targets) { - case 0: - continue - case 1: - // We expect one target so this passes through to continue setting the load assignment up. - default: - return nil, fmt.Errorf("cannot have more than one target") - } - ti := groupedTarget.Targets[0] - s.Logger.Debug("generating endpoints for", "cluster", clusterName, "targetID", ti.TargetID) - targetUID := proxycfg.NewUpstreamIDFromTargetID(ti.TargetID) - if targetUID.Peer != "" { - peerServiceEndpoints, err := s.makeEndpointsForPeerService(cfgSnap, targetUID, mgwMode) - if err != nil { - return nil, err - } - if peerServiceEndpoints != nil { - clusterEndpoints[clusterName] = peerServiceEndpoints - } - continue - } - - endpointGroup, valid := makeLoadAssignmentEndpointGroup( - chain.Targets, - upstreamEndpoints, - gatewayEndpoints, - ti.TargetID, - gatewayKey, - forMeshGateway, - ) - if !valid { - continue // skip the cluster if we're still populating the snapshot - } - - epts := makeEndpointsForLoadAssignment( - cfgSnap, - ti.PrioritizeByLocality, - []loadAssignmentEndpointGroup{endpointGroup}, - gatewayKey, - ) - clusterEndpoints[clusterName] = epts - } - } - - return clusterEndpoints, nil -} - -// TODO(proxystate): Mesh Gateway will be added in the future. -// Functions to add from agent/xds/endpoints.go: -// func makeExportedUpstreamEndpointsForMeshGateway - -type loadAssignmentEndpointGroup struct { - Endpoints structs.CheckServiceNodes - OnlyPassing bool - OverrideHealth pbproxystate.HealthStatus -} - -func makeEndpointsForLoadAssignment(cfgSnap *proxycfg.ConfigSnapshot, - policy *structs.DiscoveryPrioritizeByLocality, - endpointGroups []loadAssignmentEndpointGroup, - localKey proxycfg.GatewayKey) []*pbproxystate.Endpoint { - pbEndpoints := make([]*pbproxystate.Endpoint, 0, len(endpointGroups)) - - // TODO(jm): make this work in xdsv2 - //if len(endpointGroups) > 1 { - // cla.Policy = &envoy_endpoint_v3.ClusterLoadAssignment_Policy{ - // // We choose such a large value here that the failover math should - // // in effect not happen until zero instances are healthy. - // OverprovisioningFactor: response.MakeUint32Value(100000), - // } - //} - - var priority uint32 - - for _, endpointGroup := range endpointGroups { - endpointsByLocality, err := groupedEndpoints(cfgSnap.ServiceLocality, policy, endpointGroup.Endpoints) - - if err != nil { - continue - } - - for _, endpoints := range endpointsByLocality { - for _, ep := range endpoints { - // TODO (mesh-gateway) - should we respect the translate_wan_addrs configuration here or just always use the wan for cross-dc? - _, addr, port := ep.BestAddress(!localKey.Matches(ep.Node.Datacenter, ep.Node.PartitionOrDefault())) - healthStatus, weight := calculateEndpointHealthAndWeight(ep, endpointGroup.OnlyPassing) - - if endpointGroup.OverrideHealth != pbproxystate.HealthStatus_HEALTH_STATUS_UNKNOWN { - healthStatus = endpointGroup.OverrideHealth - } - - endpoint := makeHostPortEndpoint(addr, port) - endpoint.HealthStatus = healthStatus - endpoint.LoadBalancingWeight = response.MakeUint32Value(weight) - - pbEndpoints = append(pbEndpoints, endpoint) - } - - // TODO(jm): what do we do about priority downstream? - //cla.Endpoints = append(cla.Endpoints, &envoy_endpoint_v3.LocalityLbEndpoints{ - // Priority: priority, - // LbEndpoints: es, - //}) - - priority++ - } - } - - return pbEndpoints -} - -func makeLoadAssignmentEndpointGroup( - targets map[string]*structs.DiscoveryTarget, - targetHealth map[string]structs.CheckServiceNodes, - gatewayHealth map[string]structs.CheckServiceNodes, - targetID string, - localKey proxycfg.GatewayKey, - forMeshGateway bool, -) (loadAssignmentEndpointGroup, bool) { - realEndpoints, ok := targetHealth[targetID] - if !ok { - // skip the cluster if we're still populating the snapshot - return loadAssignmentEndpointGroup{}, false - } - target := targets[targetID] - - var gatewayKey proxycfg.GatewayKey - - switch target.MeshGateway.Mode { - case structs.MeshGatewayModeRemote: - gatewayKey.Datacenter = target.Datacenter - gatewayKey.Partition = target.Partition - case structs.MeshGatewayModeLocal: - gatewayKey = localKey - } - - if forMeshGateway || gatewayKey.IsEmpty() || localKey.Matches(target.Datacenter, target.Partition) { - // Gateways are not needed if the request isn't for a remote DC or partition. - return loadAssignmentEndpointGroup{ - Endpoints: realEndpoints, - OnlyPassing: target.Subset.OnlyPassing, - }, true - } - - // If using a mesh gateway we need to pull those endpoints instead. - gatewayEndpoints, ok := gatewayHealth[gatewayKey.String()] - if !ok { - // skip the cluster if we're still populating the snapshot - return loadAssignmentEndpointGroup{}, false - } - - // But we will use the health from the actual backend service. - overallHealth := pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - for _, ep := range realEndpoints { - health, _ := calculateEndpointHealthAndWeight(ep, target.Subset.OnlyPassing) - if health == pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY { - overallHealth = pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY - break - } - } - - return loadAssignmentEndpointGroup{ - Endpoints: gatewayEndpoints, - OverrideHealth: overallHealth, - }, true -} - -func calculateEndpointHealthAndWeight( - ep structs.CheckServiceNode, - onlyPassing bool, -) (pbproxystate.HealthStatus, int) { - healthStatus := pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY - weight := 1 - if ep.Service.Weights != nil { - weight = ep.Service.Weights.Passing - } - - for _, chk := range ep.Checks { - if chk.Status == api.HealthCritical { - healthStatus = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - } - if onlyPassing && chk.Status != api.HealthPassing { - healthStatus = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - } - if chk.Status == api.HealthWarning && ep.Service.Weights != nil { - weight = ep.Service.Weights.Warning - } - } - // Make weights fit Envoy's limits. A zero weight means that either Warning - // (likely) or Passing (weirdly) weight has been set to 0 effectively making - // this instance unhealthy and should not be sent traffic. - if weight < 1 { - healthStatus = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - weight = 1 - } - if weight > 128 { - weight = 128 - } - return healthStatus, weight -} diff --git a/agent/xds/proxystateconverter/failover_policy.go b/agent/xds/proxystateconverter/failover_policy.go deleted file mode 100644 index 6ae120eaf941e..0000000000000 --- a/agent/xds/proxystateconverter/failover_policy.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "fmt" - - "github.com/hashicorp/consul/agent/connect" - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" -) - -type discoChainTargets struct { - baseClusterName string - targets []targetInfo - failover bool - failoverPolicy structs.ServiceResolverFailoverPolicy -} - -type targetInfo struct { - TargetID string - TransportSocket *pbproxystate.TransportSocket - SNI string - RootPEMs string - SpiffeIDs []string - Region *string - - PrioritizeByLocality *structs.DiscoveryPrioritizeByLocality -} - -type discoChainTargetGroup struct { - Targets []targetInfo - ClusterName string -} - -func (ft discoChainTargets) groupedTargets() ([]discoChainTargetGroup, error) { - var targetGroups []discoChainTargetGroup - - if !ft.failover { - targetGroups = append(targetGroups, discoChainTargetGroup{ - ClusterName: ft.baseClusterName, - Targets: ft.targets, - }) - return targetGroups, nil - } - - switch ft.failoverPolicy.Mode { - case "sequential", "": - return ft.sequential() - case "order-by-locality": - return ft.orderByLocality() - default: - return targetGroups, fmt.Errorf("unexpected failover policy") - } -} - -func (s *Converter) mapDiscoChainTargets(cfgSnap *proxycfg.ConfigSnapshot, chain *structs.CompiledDiscoveryChain, node *structs.DiscoveryGraphNode, upstreamConfig structs.UpstreamConfig, forMeshGateway bool) (discoChainTargets, error) { - failoverTargets := discoChainTargets{} - - if node.Resolver == nil { - return discoChainTargets{}, fmt.Errorf("impossible to process a non-resolver node") - } - - primaryTargetID := node.Resolver.Target - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil && !forMeshGateway { - return discoChainTargets{}, err - } - - failoverTargets.baseClusterName = s.getTargetClusterName(upstreamsSnapshot, chain, primaryTargetID, forMeshGateway) - - tids := []string{primaryTargetID} - failover := node.Resolver.Failover - if failover != nil && !forMeshGateway { - tids = append(tids, failover.Targets...) - failoverTargets.failover = true - if failover.Policy == nil { - failoverTargets.failoverPolicy = structs.ServiceResolverFailoverPolicy{} - } else { - failoverTargets.failoverPolicy = *failover.Policy - } - } - - for _, tid := range tids { - target := chain.Targets[tid] - targetUID := proxycfg.NewUpstreamIDFromTargetID(tid) - ti := targetInfo{TargetID: tid, PrioritizeByLocality: target.PrioritizeByLocality} - - configureTLS := true - if forMeshGateway { - // We only initiate TLS if we're doing an L7 proxy. - configureTLS = structs.IsProtocolHTTPLike(upstreamConfig.Protocol) - } - - if !configureTLS { - failoverTargets.targets = append(failoverTargets.targets, ti) - continue - } - - if targetUID.Peer != "" { - tbs, _ := upstreamsSnapshot.UpstreamPeerTrustBundles.Get(targetUID.Peer) - - peerMeta, found := upstreamsSnapshot.UpstreamPeerMeta(targetUID) - if !found { - s.Logger.Warn("failed to fetch upstream peering metadata", "target", targetUID) - continue - } - ti.SNI = peerMeta.PrimarySNI() - ti.SpiffeIDs = peerMeta.SpiffeID - region := target.Locality.GetRegion() - ti.Region = ®ion - ti.RootPEMs = tbs.ConcatenatedRootPEMs() - } else { - ti.SNI = target.SNI - ti.RootPEMs = cfgSnap.RootPEMs() - ti.SpiffeIDs = []string{connect.SpiffeIDService{ - Host: cfgSnap.Roots.TrustDomain, - Namespace: target.Namespace, - Partition: target.Partition, - Datacenter: target.Datacenter, - Service: target.Service, - }.URI().String()} - } - //commonTLSContext := makeCommonTLSContext( - // cfgSnap.Leaf(), - // rootPEMs, - // makeTLSParametersFromProxyTLSConfig(cfgSnap.MeshConfigTLSOutgoing()), - //) - // - //err := injectSANMatcher(commonTLSContext, spiffeIDs...) - //if err != nil { - // return failoverTargets, fmt.Errorf("failed to inject SAN matcher rules for cluster %q: %v", sni, err) - //} - - //tlsContext := &envoy_tls_v3.UpstreamTlsContext{ - // CommonTlsContext: commonTLSContext, - // Sni: sni, - //} - //ti.TLSContext = tlsContext - failoverTargets.targets = append(failoverTargets.targets, ti) - } - - return failoverTargets, nil -} - -func (ft discoChainTargets) sequential() ([]discoChainTargetGroup, error) { - var targetGroups []discoChainTargetGroup - for i, t := range ft.targets { - targetGroups = append(targetGroups, discoChainTargetGroup{ - ClusterName: fmt.Sprintf("%s%d~%s", xdscommon.FailoverClusterNamePrefix, i, ft.baseClusterName), - Targets: []targetInfo{t}, - }) - } - return targetGroups, nil -} diff --git a/agent/xds/proxystateconverter/failover_policy_ce.go b/agent/xds/proxystateconverter/failover_policy_ce.go deleted file mode 100644 index a9b2ec24843c3..0000000000000 --- a/agent/xds/proxystateconverter/failover_policy_ce.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package proxystateconverter - -import ( - "fmt" -) - -func (ft discoChainTargets) orderByLocality() ([]discoChainTargetGroup, error) { - return nil, fmt.Errorf("order-by-locality is a Consul Enterprise feature") -} diff --git a/agent/xds/proxystateconverter/listeners.go b/agent/xds/proxystateconverter/listeners.go deleted file mode 100644 index 7e21819260ee9..0000000000000 --- a/agent/xds/proxystateconverter/listeners.go +++ /dev/null @@ -1,1693 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "errors" - "fmt" - "net" - "net/url" - "regexp" - "strconv" - "strings" - "time" - - envoy_http_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" - "github.com/hashicorp/go-uuid" - - "github.com/hashicorp/go-hclog" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/wrapperspb" - - "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/agent/connect" - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/config" - "github.com/hashicorp/consul/agent/xds/naming" - "github.com/hashicorp/consul/agent/xds/platform" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/consul/sdk/iptables" - "github.com/hashicorp/consul/types" -) - -// listenersFromSnapshot adds listeners to pbmesh.ProxyState using the config snapshot. -func (s *Converter) listenersFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - if cfgSnap == nil { - return errors.New("nil config given") - } - - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - return s.listenersFromSnapshotConnectProxy(cfgSnap) - case structs.ServiceKindTerminatingGateway, - structs.ServiceKindMeshGateway, - structs.ServiceKindIngressGateway, - structs.ServiceKindAPIGateway: - // TODO(proxystate): gateway support will be added in the future - //return s.listenersFromSnapshotGateway(cfgSnap) - default: - return fmt.Errorf("Invalid service kind: %v", cfgSnap.Kind) - } - return nil -} - -// listenersFromSnapshotConnectProxy returns the "listeners" for a connect proxy service -func (s *Converter) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg.ConfigSnapshot) error { - // This is the list of listeners we add to. It will be empty to start. - listeners := s.proxyState.Listeners - var err error - - // Configure inbound listener. - inboundListener, err := s.makeInboundListener(cfgSnap, xdscommon.PublicListenerName) - if err != nil { - return err - } - listeners = append(listeners, inboundListener) - - // This outboundListener is exclusively used when transparent proxy mode is active. - // In that situation there is a single listener where we are redirecting outbound traffic, - // and each upstream gets a filter chain attached to that listener. - var outboundListener *pbproxystate.Listener - - if cfgSnap.Proxy.Mode == structs.ProxyModeTransparent { - port := iptables.DefaultTProxyOutboundPort - if cfgSnap.Proxy.TransparentProxy.OutboundListenerPort != 0 { - port = cfgSnap.Proxy.TransparentProxy.OutboundListenerPort - } - - opts := makeListenerOpts{ - name: xdscommon.OutboundListenerName, - //accessLogs: cfgSnap.Proxy.AccessLogs, - addr: "127.0.0.1", - port: port, - direction: pbproxystate.Direction_DIRECTION_OUTBOUND, - logger: s.Logger, - } - outboundListener = makeListener(opts) - if outboundListener.Capabilities == nil { - outboundListener.Capabilities = []pbproxystate.Capability{} - } - outboundListener.Capabilities = append(outboundListener.Capabilities, pbproxystate.Capability_CAPABILITY_TRANSPARENT) - } - - // TODO(proxystate): tracing escape hatch will be added in the future. It will be added to the top level in proxystate, and used in xds generation. - //proxyCfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - //if err != nil { - // // Don't hard fail on a config typo, just warn. The parse func returns - // // default config if there is an error so it's safe to continue. - // s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - //} - //var tracing *envoy_http_v3.HttpConnectionManager_Tracing - //if proxyCfg.ListenerTracingJSON != "" { - // if tracing, err = makeTracingFromUserConfig(proxyCfg.ListenerTracingJSON); err != nil { - // s.Logger.Warn("failed to parse ListenerTracingJSON config", "error", err) - // } - //} - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil { - return err - } - - for uid, chain := range cfgSnap.ConnectProxy.DiscoveryChain { - upstreamCfg, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - if skip { - // Discovery chain is not associated with a known explicit or implicit upstream so it is skipped. - continue - } - - cfg := s.getAndModifyUpstreamConfigForListener(uid, upstreamCfg, chain) - - // If escape hatch is present, create a listener from it and move on to the next - if cfg.EnvoyListenerJSON != "" { - upstreamListener := &pbproxystate.Listener{ - EscapeHatchListener: cfg.EnvoyListenerJSON, - } - listeners = append(listeners, upstreamListener) - continue - } - - // RDS, Envoy's Route Discovery Service, is only used for HTTP services with a customized discovery chain. - useRDS := chain.Protocol != "tcp" && !chain.Default - - var clusterName string - if !useRDS { - // When not using RDS we must generate a cluster name to attach to the filter chain. - // With RDS, cluster names get attached to the dynamic routes instead. - target, err := simpleChainTarget(chain) - if err != nil { - return err - } - - clusterName = s.getTargetClusterName(upstreamsSnapshot, chain, target.ID, false) - if clusterName == "" { - continue - } - } - - filterName := fmt.Sprintf("%s.%s.%s.%s", chain.ServiceName, chain.Namespace, chain.Partition, chain.Datacenter) - - // Generate the upstream listeners for when they are explicitly set with a local bind port or socket path - if upstreamCfg != nil && upstreamCfg.HasLocalPortOrSocket() { - router, err := s.makeUpstreamRouter(routerOpts{ - // TODO(proxystate): access logs and tracing will be added in the future. - //accessLogs: &cfgSnap.Proxy.AccessLogs, - routeName: uid.EnvoyID(), - clusterName: clusterName, - filterName: filterName, - protocol: cfg.Protocol, - useRDS: useRDS, - //tracing: tracing, - }) - if err != nil { - return err - } - - opts := makeListenerOpts{ - name: uid.EnvoyID(), - //accessLogs: cfgSnap.Proxy.AccessLogs, - direction: pbproxystate.Direction_DIRECTION_OUTBOUND, - logger: s.Logger, - upstream: upstreamCfg, - } - upstreamListener := makeListener(opts) - upstreamListener.BalanceConnections = balanceConnections[cfg.BalanceOutboundConnections] - - upstreamListener.Routers = append(upstreamListener.Routers, router) - listeners = append(listeners, upstreamListener) - - // Avoid creating filter chains below for upstreams that have dedicated listeners - continue - } - - // The rest of this loop is used exclusively for transparent proxies. - // Below we create a filter chain per upstream, rather than a listener per upstream - // as we do for explicit upstreams above. - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - routeName: uid.EnvoyID(), - clusterName: clusterName, - filterName: filterName, - protocol: cfg.Protocol, - useRDS: useRDS, - //tracing: tracing, - }) - if err != nil { - return err - } - - endpoints := cfgSnap.ConnectProxy.WatchedUpstreamEndpoints[uid][chain.ID()] - uniqueAddrs := make(map[string]struct{}) - - if chain.Partition == cfgSnap.ProxyID.PartitionOrDefault() { - for _, ip := range chain.AutoVirtualIPs { - uniqueAddrs[ip] = struct{}{} - } - for _, ip := range chain.ManualVirtualIPs { - uniqueAddrs[ip] = struct{}{} - } - } - - // Match on the virtual IP for the upstream service (identified by the chain's ID). - // We do not match on all endpoints here since it would lead to load balancing across - // all instances when any instance address is dialed. - for _, e := range endpoints { - if e.Service.Kind == structs.ServiceKind(structs.TerminatingGateway) { - key := structs.ServiceGatewayVirtualIPTag(chain.CompoundServiceName()) - - if vip := e.Service.TaggedAddresses[key]; vip.Address != "" { - uniqueAddrs[vip.Address] = struct{}{} - } - - continue - } - if vip := e.Service.TaggedAddresses[structs.TaggedAddressVirtualIP]; vip.Address != "" { - uniqueAddrs[vip.Address] = struct{}{} - } - - // The virtualIPTag is used by consul-k8s to store the ClusterIP for a service. - // We only match on this virtual IP if the upstream is in the proxy's partition. - // This is because the IP is not guaranteed to be unique across k8s clusters. - if acl.EqualPartitions(e.Node.PartitionOrDefault(), cfgSnap.ProxyID.PartitionOrDefault()) { - if vip := e.Service.TaggedAddresses[naming.VirtualIPTag]; vip.Address != "" { - uniqueAddrs[vip.Address] = struct{}{} - } - } - } - if len(uniqueAddrs) > 2 { - s.Logger.Debug("detected multiple virtual IPs for an upstream, all will be used to match traffic", - "upstream", uid, "ip_count", len(uniqueAddrs)) - } - - // For every potential address we collected, create the appropriate address prefix to match on. - // In this case we are matching on exact addresses, so the prefix is the address itself, - // and the prefix length is based on whether it's IPv4 or IPv6. - upstreamRouter.Match = makeRouterMatchFromAddrs(uniqueAddrs) - - // Only attach the filter chain if there are addresses to match on - if upstreamRouter.Match != nil && len(upstreamRouter.Match.PrefixRanges) > 0 { - outboundListener.Routers = append(outboundListener.Routers, upstreamRouter) - } - } - requiresTLSInspector := false - requiresHTTPInspector := false - - configuredPorts := make(map[int]interface{}) - err = cfgSnap.ConnectProxy.DestinationsUpstream.ForEachKeyE(func(uid proxycfg.UpstreamID) error { - svcConfig, ok := cfgSnap.ConnectProxy.DestinationsUpstream.Get(uid) - if !ok || svcConfig == nil { - return nil - } - - if structs.IsProtocolHTTPLike(svcConfig.Protocol) { - if _, ok := configuredPorts[svcConfig.Destination.Port]; ok { - return nil - } - configuredPorts[svcConfig.Destination.Port] = struct{}{} - const name = "~http" // name used for the shared route name - routeName := clusterNameForDestination(cfgSnap, name, fmt.Sprintf("%d", svcConfig.Destination.Port), svcConfig.NamespaceOrDefault(), svcConfig.PartitionOrDefault()) - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - routeName: routeName, - filterName: routeName, - protocol: svcConfig.Protocol, - useRDS: true, - //tracing: tracing, - }) - if err != nil { - return err - } - upstreamRouter.Match = makeRouterMatchFromAddressWithPort("", svcConfig.Destination.Port) - outboundListener.Routers = append(outboundListener.Routers, upstreamRouter) - requiresHTTPInspector = true - } else { - for _, address := range svcConfig.Destination.Addresses { - clusterName := clusterNameForDestination(cfgSnap, uid.Name, address, uid.NamespaceOrDefault(), uid.PartitionOrDefault()) - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - routeName: uid.EnvoyID(), - clusterName: clusterName, - filterName: clusterName, - protocol: svcConfig.Protocol, - //tracing: tracing, - }) - if err != nil { - return err - } - - upstreamRouter.Match = makeRouterMatchFromAddressWithPort(address, svcConfig.Destination.Port) - outboundListener.Routers = append(outboundListener.Routers, upstreamRouter) - - requiresTLSInspector = len(upstreamRouter.Match.ServerNames) != 0 || requiresTLSInspector - } - } - return nil - }) - if err != nil { - return err - } - - if requiresTLSInspector { - outboundListener.Capabilities = append(outboundListener.Capabilities, pbproxystate.Capability_CAPABILITY_L4_TLS_INSPECTION) - } - - if requiresHTTPInspector { - outboundListener.Capabilities = append(outboundListener.Capabilities, pbproxystate.Capability_CAPABILITY_L7_PROTOCOL_INSPECTION) - } - - // Looping over explicit and implicit upstreams is only needed for cross-peer - // because they do not have discovery chains. - for _, uid := range cfgSnap.ConnectProxy.PeeredUpstreamIDs() { - upstreamCfg, skip := cfgSnap.ConnectProxy.GetUpstream(uid, &cfgSnap.ProxyID.EnterpriseMeta) - if skip { - // Not associated with a known explicit or implicit upstream so it is skipped. - continue - } - - peerMeta, found := cfgSnap.ConnectProxy.UpstreamPeerMeta(uid) - if !found { - s.Logger.Warn("failed to fetch upstream peering metadata for listener", "uid", uid) - } - cfg := s.getAndModifyUpstreamConfigForPeeredListener(uid, upstreamCfg, peerMeta) - - // If escape hatch is present, create a listener from it and move on to the next - if cfg.EnvoyListenerJSON != "" { - upstreamListener := &pbproxystate.Listener{ - EscapeHatchListener: cfg.EnvoyListenerJSON, - } - listeners = append(listeners, upstreamListener) - continue - } - - tbs, ok := cfgSnap.ConnectProxy.UpstreamPeerTrustBundles.Get(uid.Peer) - if !ok { - // this should never happen since we loop through upstreams with - // set trust bundles - return fmt.Errorf("trust bundle not ready for peer %s", uid.Peer) - } - - clusterName := generatePeeredClusterName(uid, tbs) - - // Generate the upstream listeners for when they are explicitly set with a local bind port or socket path - if upstreamCfg != nil && upstreamCfg.HasLocalPortOrSocket() { - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - clusterName: clusterName, - filterName: fmt.Sprintf("%s.%s.%s", - upstreamCfg.DestinationName, - upstreamCfg.DestinationNamespace, - upstreamCfg.DestinationPeer), - routeName: uid.EnvoyID(), - protocol: cfg.Protocol, - useRDS: false, - statPrefix: "upstream_peered.", - }) - if err != nil { - return err - } - - opts := makeListenerOpts{ - name: uid.EnvoyID(), - //accessLogs: cfgSnap.Proxy.AccessLogs, - direction: pbproxystate.Direction_DIRECTION_OUTBOUND, - logger: s.Logger, - upstream: upstreamCfg, - } - upstreamListener := makeListener(opts) - upstreamListener.BalanceConnections = balanceConnections[cfg.BalanceOutboundConnections] - - upstreamListener.Routers = []*pbproxystate.Router{ - upstreamRouter, - } - listeners = append(listeners, upstreamListener) - - // Avoid creating filter chains below for upstreams that have dedicated listeners - continue - } - - // The rest of this loop is used exclusively for transparent proxies. - // Below we create a filter chain per upstream, rather than a listener per upstream - // as we do for explicit upstreams above. - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - routeName: uid.EnvoyID(), - clusterName: clusterName, - filterName: fmt.Sprintf("%s.%s.%s", - uid.Name, - uid.NamespaceOrDefault(), - uid.Peer), - protocol: cfg.Protocol, - useRDS: false, - statPrefix: "upstream_peered.", - //tracing: tracing, - }) - if err != nil { - return err - } - - endpoints, _ := cfgSnap.ConnectProxy.PeerUpstreamEndpoints.Get(uid) - uniqueAddrs := make(map[string]struct{}) - - // Match on the virtual IP for the upstream service (identified by the chain's ID). - // We do not match on all endpoints here since it would lead to load balancing across - // all instances when any instance address is dialed. - for _, e := range endpoints { - if vip := e.Service.TaggedAddresses[structs.TaggedAddressVirtualIP]; vip.Address != "" { - uniqueAddrs[vip.Address] = struct{}{} - } - - // The virtualIPTag is used by consul-k8s to store the ClusterIP for a service. - // For services imported from a peer,the partition will be equal in all cases. - if acl.EqualPartitions(e.Node.PartitionOrDefault(), cfgSnap.ProxyID.PartitionOrDefault()) { - if vip := e.Service.TaggedAddresses[naming.VirtualIPTag]; vip.Address != "" { - uniqueAddrs[vip.Address] = struct{}{} - } - } - } - if len(uniqueAddrs) > 2 { - s.Logger.Debug("detected multiple virtual IPs for an upstream, all will be used to match traffic", - "upstream", uid, "ip_count", len(uniqueAddrs)) - } - - // For every potential address we collected, create the appropriate address prefix to match on. - // In this case we are matching on exact addresses, so the prefix is the address itself, - // and the prefix length is based on whether it's IPv4 or IPv6. - upstreamRouter.Match = makeRouterMatchFromAddrs(uniqueAddrs) - - // Only attach the filter chain if there are addresses to match on - if upstreamRouter.Match != nil && len(upstreamRouter.Match.PrefixRanges) > 0 { - outboundListener.Routers = append(outboundListener.Routers, upstreamRouter) - } - - } - - if outboundListener != nil { - // Add a passthrough for every mesh endpoint that can be dialed directly, - // as opposed to via a virtual IP. - var passthroughRouters []*pbproxystate.Router - - for _, targets := range cfgSnap.ConnectProxy.PassthroughUpstreams { - for tid, addrs := range targets { - uid := proxycfg.NewUpstreamIDFromTargetID(tid) - - sni := connect.ServiceSNI( - uid.Name, "", uid.NamespaceOrDefault(), uid.PartitionOrDefault(), cfgSnap.Datacenter, cfgSnap.Roots.TrustDomain) - - routerName := fmt.Sprintf("%s.%s.%s.%s", uid.Name, uid.NamespaceOrDefault(), uid.PartitionOrDefault(), cfgSnap.Datacenter) - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - clusterName: "passthrough~" + sni, - filterName: routerName, - protocol: "tcp", - }) - if err != nil { - return err - } - upstreamRouter.Match = makeRouterMatchFromAddrs(addrs) - - passthroughRouters = append(passthroughRouters, upstreamRouter) - } - } - - outboundListener.Routers = append(outboundListener.Routers, passthroughRouters...) - - // Add a catch-all filter chain that acts as a TCP proxy to destinations outside the mesh - if meshConf := cfgSnap.MeshConfig(); meshConf == nil || - !meshConf.TransparentProxy.MeshDestinationsOnly { - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - //accessLogs: &cfgSnap.Proxy.AccessLogs, - clusterName: naming.OriginalDestinationClusterName, - filterName: naming.OriginalDestinationClusterName, - protocol: "tcp", - }) - if err != nil { - return err - } - outboundListener.DefaultRouter = upstreamRouter - } - - // Only add the outbound listener if configured. - if len(outboundListener.Routers) > 0 || outboundListener.DefaultRouter != nil { - listeners = append(listeners, outboundListener) - - } - } - - // Looping over explicit upstreams is only needed for prepared queries because they do not have discovery chains - for uid, u := range cfgSnap.ConnectProxy.UpstreamConfig { - if u.DestinationType != structs.UpstreamDestTypePreparedQuery { - continue - } - - cfg, err := structs.ParseUpstreamConfig(u.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse", "upstream", uid, "error", err) - } - - // If escape hatch is present, create a listener from it and move on to the next - if cfg.EnvoyListenerJSON != "" { - upstreamListener := &pbproxystate.Listener{ - EscapeHatchListener: cfg.EnvoyListenerJSON, - } - listeners = append(listeners, upstreamListener) - continue - } - - opts := makeListenerOpts{ - name: uid.EnvoyID(), - //accessLogs: cfgSnap.Proxy.AccessLogs, - direction: pbproxystate.Direction_DIRECTION_OUTBOUND, - logger: s.Logger, - upstream: u, - } - upstreamListener := makeListener(opts) - upstreamListener.BalanceConnections = balanceConnections[cfg.BalanceOutboundConnections] - - upstreamRouter, err := s.makeUpstreamRouter(routerOpts{ - // TODO (SNI partition) add partition for upstream SNI - //accessLogs: &cfgSnap.Proxy.AccessLogs, - clusterName: connect.UpstreamSNI(u, "", cfgSnap.Datacenter, cfgSnap.Roots.TrustDomain), - filterName: uid.EnvoyID(), - routeName: uid.EnvoyID(), - protocol: cfg.Protocol, - //tracing: tracing, - }) - if err != nil { - return err - } - upstreamListener.Routers = []*pbproxystate.Router{ - upstreamRouter, - } - listeners = append(listeners, upstreamListener) - } - - cfgSnap.Proxy.Expose.Finalize() - paths := cfgSnap.Proxy.Expose.Paths - - // Add service health checks to the list of paths to create listeners for if needed - if cfgSnap.Proxy.Expose.Checks { - psid := structs.NewServiceID(cfgSnap.Proxy.DestinationServiceID, &cfgSnap.ProxyID.EnterpriseMeta) - for _, check := range cfgSnap.ConnectProxy.WatchedServiceChecks[psid] { - p, err := parseCheckPath(check) - if err != nil { - s.Logger.Warn("failed to create listener for", "check", check.CheckID, "error", err) - continue - } - paths = append(paths, p) - } - } - - // Configure additional listener for exposed check paths - for _, path := range paths { - clusterName := xdscommon.LocalAppClusterName - if path.LocalPathPort != cfgSnap.Proxy.LocalServicePort { - clusterName = makeExposeClusterName(path.LocalPathPort) - } - - l, err := s.makeExposedCheckListener(cfgSnap, clusterName, path) - if err != nil { - return err - } - listeners = append(listeners, l) - } - - // Set listeners on the proxy state. - s.proxyState.Listeners = listeners - - return nil -} - -func makeRouterMatchFromAddrs(addrs map[string]struct{}) *pbproxystate.Match { - ranges := make([]*pbproxystate.CidrRange, 0) - - for addr := range addrs { - ip := net.ParseIP(addr) - if ip == nil { - continue - } - - pfxLen := uint32(32) - if ip.To4() == nil { - pfxLen = 128 - } - ranges = append(ranges, &pbproxystate.CidrRange{ - AddressPrefix: addr, - PrefixLen: &wrapperspb.UInt32Value{Value: pfxLen}, - }) - } - - return &pbproxystate.Match{ - PrefixRanges: ranges, - } -} - -func makeRouterMatchFromAddressWithPort(address string, port int) *pbproxystate.Match { - ranges := make([]*pbproxystate.CidrRange, 0) - - ip := net.ParseIP(address) - if ip == nil { - if address != "" { - return &pbproxystate.Match{ - ServerNames: []string{address}, - DestinationPort: &wrapperspb.UInt32Value{Value: uint32(port)}, - } - } - return &pbproxystate.Match{ - DestinationPort: &wrapperspb.UInt32Value{Value: uint32(port)}, - } - } - - pfxLen := uint32(32) - if ip.To4() == nil { - pfxLen = 128 - } - ranges = append(ranges, &pbproxystate.CidrRange{ - AddressPrefix: address, - PrefixLen: &wrapperspb.UInt32Value{Value: pfxLen}, - }) - - return &pbproxystate.Match{ - PrefixRanges: ranges, - DestinationPort: &wrapperspb.UInt32Value{Value: uint32(port)}, - } -} - -func parseCheckPath(check structs.CheckType) (structs.ExposePath, error) { - var path structs.ExposePath - - if check.HTTP != "" { - path.Protocol = "http" - - // Get path and local port from original HTTP target - u, err := url.Parse(check.HTTP) - if err != nil { - return path, fmt.Errorf("failed to parse url '%s': %v", check.HTTP, err) - } - path.Path = u.Path - - _, portStr, err := net.SplitHostPort(u.Host) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.HTTP, err) - } - path.LocalPathPort, err = strconv.Atoi(portStr) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.HTTP, err) - } - - // Get listener port from proxied HTTP target - u, err = url.Parse(check.ProxyHTTP) - if err != nil { - return path, fmt.Errorf("failed to parse url '%s': %v", check.ProxyHTTP, err) - } - - _, portStr, err = net.SplitHostPort(u.Host) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.ProxyHTTP, err) - } - path.ListenerPort, err = strconv.Atoi(portStr) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.ProxyHTTP, err) - } - } - - if check.GRPC != "" { - path.Path = "/grpc.health.v1.Health/Check" - path.Protocol = "http2" - - // Get local port from original GRPC target of the form: host/service - proxyServerAndService := strings.SplitN(check.GRPC, "/", 2) - _, portStr, err := net.SplitHostPort(proxyServerAndService[0]) - if err != nil { - return path, fmt.Errorf("failed to split host/port from '%s': %v", check.GRPC, err) - } - path.LocalPathPort, err = strconv.Atoi(portStr) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.GRPC, err) - } - - // Get listener port from proxied GRPC target of the form: host/service - proxyServerAndService = strings.SplitN(check.ProxyGRPC, "/", 2) - _, portStr, err = net.SplitHostPort(proxyServerAndService[0]) - if err != nil { - return path, fmt.Errorf("failed to split host/port from '%s': %v", check.ProxyGRPC, err) - } - path.ListenerPort, err = strconv.Atoi(portStr) - if err != nil { - return path, fmt.Errorf("failed to parse port from '%s': %v", check.ProxyGRPC, err) - } - } - - path.ParsedFromCheck = true - - return path, nil -} - -// TODO(proxystate): Gateway support will be added in the future. -// Functions to add from agent/xds/listeners.go: -// func listenersFromSnapshotGateway - -// makeListener returns a listener with name and bind details set. Routers and destinations -// must be added before it's useful. -// -// Note on names: Envoy listeners attempt graceful transitions of connections -// when their config changes but that means they can't have their bind address -// or port changed in a running instance. Since our users might choose to change -// a bind address or port for the public or upstream listeners, we need to -// encode those into the unique name for the listener such that if the user -// changes them, we actually create a whole new listener on the new address and -// port. Envoy should take care of closing the old one once it sees it's no -// longer in the config. -type makeListenerOpts struct { - addr string - //accessLogs structs.AccessLogsConfig - logger hclog.Logger - mode string - name string - path string - port int - direction pbproxystate.Direction - upstream *structs.Upstream -} - -func makeListener(opts makeListenerOpts) *pbproxystate.Listener { - if opts.upstream != nil && opts.upstream.LocalBindPort == 0 && opts.upstream.LocalBindSocketPath != "" { - opts.path = opts.upstream.LocalBindSocketPath - opts.mode = opts.upstream.LocalBindSocketMode - return makePipeListener(opts) - } - if opts.upstream != nil { - opts.port = opts.upstream.LocalBindPort - opts.addr = opts.upstream.LocalBindAddress - return makeListenerWithDefault(opts) - } - - return makeListenerWithDefault(opts) -} - -func makeListenerWithDefault(opts makeListenerOpts) *pbproxystate.Listener { - if opts.addr == "" { - opts.addr = "127.0.0.1" - } - // TODO(proxystate): Access logs will be added in the future. It will be added to top level IR, and used by xds code generation. - //accessLog, err := accesslogs.MakeAccessLogs(&opts.accessLogs, true) - //if err != nil && opts.logger != nil { - // // Since access logging is non-essential for routing, warn and move on - // opts.logger.Warn("error generating access log xds", err) - //} - return &pbproxystate.Listener{ - Name: fmt.Sprintf("%s:%s:%d", opts.name, opts.addr, opts.port), - //AccessLog: accessLog, - BindAddress: &pbproxystate.Listener_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: opts.addr, - Port: uint32(opts.port), - }, - }, - Direction: opts.direction, - } -} - -func makePipeListener(opts makeListenerOpts) *pbproxystate.Listener { - // TODO(proxystate): Access logs will be added in the future. It will be added to top level IR, and used by xds code generation. - //accessLog, err := accesslogs.MakeAccessLogs(&opts.accessLogs, true) - //if err != nil && opts.logger != nil { - // // Since access logging is non-essential for routing, warn and move on - // opts.logger.Warn("error generating access log xds", err) - //} - return &pbproxystate.Listener{ - Name: fmt.Sprintf("%s:%s", opts.name, opts.path), - //AccessLog: accessLog, - BindAddress: &pbproxystate.Listener_UnixSocket{ - UnixSocket: &pbproxystate.UnixSocketAddress{Path: opts.path, Mode: opts.mode}, - }, - Direction: opts.direction, - } -} - -// TODO(proxystate): Escape hatches will be added in the future. -// Functions to add from agent/xds/listeners.go: -// func makeListenerFromUserConfig - -// TODO(proxystate): Intentions will be added in the future -// Functions to add from agent/xds/listeners.go: -// func injectConnectFilters - -// TODO(proxystate): httpConnectionManager constants will need to be added when used for listeners L7 in the future. -// Constants to add from agent/xds/listeners.go: -// const httpConnectionManagerOldName -// const httpConnectionManagerNewName - -// TODO(proxystate): Extracting RDS resource names will be used when wiring up xds v2 server in the future. -// Functions to add from agent/xds/listeners.go: -// func extractRdsResourceNames - -// TODO(proxystate): Intentions will be added in the future. -// Functions to add from agent/xds/listeners.go: -// func injectHTTPFilterOnFilterChains - -// NOTE: This method MUST only be used for connect proxy public listeners, -// since TLS validation will be done against root certs for all peers -// that might dial this proxy. -func (s *Converter) injectConnectTLSForPublicListener(cfgSnap *proxycfg.ConfigSnapshot, listener *pbproxystate.Listener) error { - transportSocket, err := s.createInboundMeshMTLS(cfgSnap) - if err != nil { - return err - } - - for idx := range listener.Routers { - listener.Routers[idx].InboundTls = transportSocket - } - return nil -} - -func getAlpnProtocols(protocol string) []string { - var alpnProtocols []string - - switch protocol { - case "grpc", "http2": - alpnProtocols = append(alpnProtocols, "h2", "http/1.1") - case "http": - alpnProtocols = append(alpnProtocols, "http/1.1") - } - - return alpnProtocols -} - -func (s *Converter) createInboundMeshMTLS(cfgSnap *proxycfg.ConfigSnapshot) (*pbproxystate.TransportSocket, error) { - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - case structs.ServiceKindMeshGateway: - default: - return nil, fmt.Errorf("cannot inject peering trust bundles for kind %q", cfgSnap.Kind) - } - - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - } - - // Add all trust bundle peer names, including local. - trustBundlePeerNames := []string{"local"} - for _, tb := range cfgSnap.PeeringTrustBundles() { - trustBundlePeerNames = append(trustBundlePeerNames, tb.PeerName) - } - // Arbitrary UUID to reference the identity by. - uuid, err := uuid.GenerateUUID() - if err != nil { - return nil, err - } - // Create the transport socket - ts := &pbproxystate.TransportSocket{} - ts.ConnectionTls = &pbproxystate.TransportSocket_InboundMesh{ - InboundMesh: &pbproxystate.InboundMeshMTLS{ - IdentityKey: uuid, - ValidationContext: &pbproxystate.MeshInboundValidationContext{ - TrustBundlePeerNameKeys: trustBundlePeerNames, - }, - }, - } - s.proxyState.LeafCertificates[uuid] = &pbproxystate.LeafCertificate{ - Cert: cfgSnap.Leaf().CertPEM, - Key: cfgSnap.Leaf().PrivateKeyPEM, - } - ts.TlsParameters = makeTLSParametersFromProxyTLSConfig(cfgSnap.MeshConfigTLSIncoming()) - ts.AlpnProtocols = getAlpnProtocols(cfg.Protocol) - - return ts, nil -} - -func (s *Converter) makeInboundListener(cfgSnap *proxycfg.ConfigSnapshot, name string) (*pbproxystate.Listener, error) { - l := &pbproxystate.Listener{} - l.Routers = make([]*pbproxystate.Router, 0) - var err error - - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - } - - // This controls if we do L4 or L7 intention checks. - useHTTPFilter := structs.IsProtocolHTTPLike(cfg.Protocol) - - // TODO(proxystate): Escape hatches will be added in the future. This one is a top level escape hatch. - // Generate and return custom public listener from config if one was provided. - //if cfg.PublicListenerJSON != "" { - // l, err = makeListenerFromUserConfig(cfg.PublicListenerJSON) - // if err != nil { - // return nil, err - // } - // - // // For HTTP-like services attach an RBAC http filter and do a best-effort insert - // if useHTTPFilter { - // httpAuthzFilter, err := makeRBACHTTPFilter( - // cfgSnap.ConnectProxy.Intentions, - // cfgSnap.IntentionDefaultAllow, - // rbacLocalInfo{ - // trustDomain: cfgSnap.Roots.TrustDomain, - // datacenter: cfgSnap.Datacenter, - // partition: cfgSnap.ProxyID.PartitionOrDefault(), - // }, - // cfgSnap.ConnectProxy.InboundPeerTrustBundles, - // ) - // if err != nil { - // return nil, err - // } - // - // // Try our best to inject the HTTP RBAC filter. - // if err := injectHTTPFilterOnFilterChains(l, httpAuthzFilter); err != nil { - // s.Logger.Warn( - // "could not inject the HTTP RBAC filter to enforce intentions on user-provided "+ - // "'envoy_public_listener_json' config; falling back on the RBAC network filter instead", - // "proxy", cfgSnap.ProxyID, - // "error", err, - // ) - // - // // If we get an error inject the RBAC network filter instead. - // useHTTPFilter = false - // } - // } - // - // err := s.finalizePublicListenerFromConfig(l, cfgSnap, useHTTPFilter) - // if err != nil { - // return nil, fmt.Errorf("failed to attach Consul filters and TLS context to custom public listener: %v", err) - // } - // return l, nil - //} - - // No JSON user config, use default listener address - // Default to listening on all addresses, but override with bind address if one is set. - addr := cfgSnap.Address - if addr == "" { - addr = "0.0.0.0" - } - if cfg.BindAddress != "" { - addr = cfg.BindAddress - } - - // Override with bind port if one is set, otherwise default to - // proxy service's address - port := cfgSnap.Port - if cfg.BindPort != 0 { - port = cfg.BindPort - } - - opts := makeListenerOpts{ - name: name, - //accessLogs: cfgSnap.Proxy.AccessLogs, - addr: addr, - port: port, - direction: pbproxystate.Direction_DIRECTION_INBOUND, - logger: s.Logger, - } - l = makeListener(opts) - l.BalanceConnections = balanceConnections[cfg.BalanceInboundConnections] - - // TODO(proxystate): Escape hatches will be added in the future. This one is a top level escape hatch. - //var tracing *envoy_http_v3.HttpConnectionManager_Tracing - //if cfg.ListenerTracingJSON != "" { - // if tracing, err = makeTracingFromUserConfig(cfg.ListenerTracingJSON); err != nil { - // s.Logger.Warn("failed to parse ListenerTracingJSON config", "error", err) - // } - //} - - // make local app cluster router - localAppRouter := &pbproxystate.Router{} - - destOpts := destinationOpts{ - protocol: cfg.Protocol, - filterName: name, - routeName: name, - cluster: xdscommon.LocalAppClusterName, - requestTimeoutMs: cfg.LocalRequestTimeoutMs, - idleTimeoutMs: cfg.LocalIdleTimeoutMs, - //tracing: tracing, - //accessLogs: &cfgSnap.Proxy.AccessLogs, - logger: s.Logger, - } - - err = s.addRouterDestination(destOpts, localAppRouter) - if err != nil { - return nil, err - } - - if useHTTPFilter { - l7Dest := localAppRouter.GetL7() - if l7Dest == nil { - return nil, fmt.Errorf("l7 destination on inbound listener should not be empty") - } - l7Dest.AddEmptyIntention = true - - // TODO(proxystate): L7 Intentions and JWT Auth will be added in the future. - //jwtFilter, jwtFilterErr := makeJWTAuthFilter(cfgSnap.JWTProviders, cfgSnap.ConnectProxy.Intentions) - //if jwtFilterErr != nil { - // return nil, jwtFilterErr - //} - //rbacFilter, err := makeRBACHTTPFilter( - // cfgSnap.ConnectProxy.Intentions, - // cfgSnap.IntentionDefaultAllow, - // rbacLocalInfo{ - // trustDomain: cfgSnap.Roots.TrustDomain, - // datacenter: cfgSnap.Datacenter, - // partition: cfgSnap.ProxyID.PartitionOrDefault(), - // }, - // cfgSnap.ConnectProxy.InboundPeerTrustBundles, - //) - //if err != nil { - // return nil, err - //} - // - //filterOpts.httpAuthzFilters = []*envoy_http_v3.HttpFilter{rbacFilter} - // - //if jwtFilter != nil { - // filterOpts.httpAuthzFilters = append(filterOpts.httpAuthzFilters, jwtFilter) - //} - - meshConfig := cfgSnap.MeshConfig() - includeXFCC := meshConfig == nil || meshConfig.HTTP == nil || !meshConfig.HTTP.SanitizeXForwardedClientCert - l7Dest.IncludeXfcc = includeXFCC - l7Dest.Protocol = l7Protocols[cfg.Protocol] - if cfg.MaxInboundConnections > 0 { - l7Dest.MaxInboundConnections = uint64(cfg.MaxInboundConnections) - } - } else { - l4Dest := localAppRouter.GetL4() - if l4Dest == nil { - return nil, fmt.Errorf("l4 destination on inbound listener should not be empty") - } - - if cfg.MaxInboundConnections > 0 { - l4Dest.MaxInboundConnections = uint64(cfg.MaxInboundConnections) - } - - // TODO(proxystate): Intentions will be added to l4 destination in the future. This is currently done in finalizePublicListenerFromConfig. - l4Dest.AddEmptyIntention = true - } - l.Routers = append(l.Routers, localAppRouter) - - err = s.finalizePublicListenerFromConfig(l, cfgSnap) - if err != nil { - return nil, fmt.Errorf("failed to attach Consul filters and TLS context to custom public listener: %v", err) - } - - // When permissive mTLS mode is enabled, include an additional router - // that matches on the `destination_port == `. Traffic sent - // directly to the service port is passed through to the application - // unmodified. - if cfgSnap.Proxy.Mode == structs.ProxyModeTransparent && - cfgSnap.Proxy.MutualTLSMode == structs.MutualTLSModePermissive { - router, err := makePermissiveRouter(cfgSnap, destOpts) - if err != nil { - return nil, fmt.Errorf("unable to add permissive mtls router: %w", err) - } - if router == nil { - s.Logger.Debug("no service port defined for service in permissive mTLS mode; not adding filter chain for non-mTLS traffic") - } else { - l.Routers = append(l.Routers, router) - - // With tproxy, the REDIRECT iptables target rewrites the destination ip/port - // to the proxy ip/port (e.g. 127.0.0.1:20000) for incoming packets. - // We need the original_dst filter to recover the original destination address. - l.Capabilities = append(l.Capabilities, pbproxystate.Capability_CAPABILITY_TRANSPARENT) - } - } - return l, err -} - -func makePermissiveRouter(cfgSnap *proxycfg.ConfigSnapshot, opts destinationOpts) (*pbproxystate.Router, error) { - servicePort := cfgSnap.Proxy.LocalServicePort - if servicePort <= 0 { - // No service port means the service does not accept incoming traffic, so - // the connect proxy does not need to listen for incoming non-mTLS traffic. - return nil, nil - } - - opts.statPrefix += "permissive_" - dest, err := makeL4Destination(opts) - if err != nil { - return nil, err - } - - router := &pbproxystate.Router{ - Match: &pbproxystate.Match{ - DestinationPort: &wrapperspb.UInt32Value{Value: uint32(servicePort)}, - }, - Destination: &pbproxystate.Router_L4{L4: dest}, - } - return router, nil -} - -// finalizePublicListenerFromConfig is used for best-effort injection of L4 intentions and TLS onto listeners. -func (s *Converter) finalizePublicListenerFromConfig(l *pbproxystate.Listener, cfgSnap *proxycfg.ConfigSnapshot) error { - // TODO(proxystate): L4 intentions will be added in the future. - //if !useHTTPFilter { - // // Best-effort injection of L4 intentions - // if err := s.injectConnectFilters(cfgSnap, l); err != nil { - // return nil - // } - //} - - // Always apply TLS certificates - if err := s.injectConnectTLSForPublicListener(cfgSnap, l); err != nil { - return nil - } - - return nil -} - -func (s *Converter) makeExposedCheckListener(cfgSnap *proxycfg.ConfigSnapshot, cluster string, path structs.ExposePath) (*pbproxystate.Listener, error) { - cfg, err := config.ParseProxyConfig(cfgSnap.Proxy.Config) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse Connect.Proxy.Config", "error", err) - } - - // No user config, use default listener - addr := cfgSnap.Address - - // Override with bind address if one is set, otherwise default to 0.0.0.0 - if cfg.BindAddress != "" { - addr = cfg.BindAddress - } else if addr == "" { - addr = "0.0.0.0" - } - - // Strip any special characters from path to make a valid and hopefully unique name - r := regexp.MustCompile(`[^a-zA-Z0-9]+`) - strippedPath := r.ReplaceAllString(path.Path, "") - listenerName := fmt.Sprintf("exposed_path_%s", strippedPath) - - listenerOpts := makeListenerOpts{ - name: listenerName, - //accessLogs: cfgSnap.Proxy.AccessLogs, - addr: addr, - port: path.ListenerPort, - direction: pbproxystate.Direction_DIRECTION_INBOUND, - logger: s.Logger, - } - l := makeListener(listenerOpts) - - filterName := fmt.Sprintf("exposed_path_filter_%s_%d", strippedPath, path.ListenerPort) - - destOpts := destinationOpts{ - useRDS: false, - protocol: path.Protocol, - filterName: filterName, - routeName: filterName, - cluster: cluster, - statPrefix: "", - routePath: path.Path, - httpAuthzFilters: nil, - //accessLogs: &cfgSnap.Proxy.AccessLogs, - logger: s.Logger, - // in the exposed check listener we don't set the tracing configuration - } - - router := &pbproxystate.Router{} - err = s.addRouterDestination(destOpts, router) - if err != nil { - return nil, err - } - - // For registered checks restrict traffic sources to localhost and Consul's advertise addr - if path.ParsedFromCheck { - - // For the advertise addr we use a CidrRange that only matches one address - advertise := s.CfgFetcher.AdvertiseAddrLAN() - - // Get prefix length based on whether address is ipv4 (32 bits) or ipv6 (128 bits) - advertiseLen := 32 - ip := net.ParseIP(advertise) - if ip != nil && strings.Contains(advertise, ":") { - advertiseLen = 128 - } - - ranges := make([]*pbproxystate.CidrRange, 0, 3) - ranges = append(ranges, - &pbproxystate.CidrRange{AddressPrefix: "127.0.0.1", PrefixLen: &wrapperspb.UInt32Value{Value: 8}}, - &pbproxystate.CidrRange{AddressPrefix: advertise, PrefixLen: &wrapperspb.UInt32Value{Value: uint32(advertiseLen)}}, - ) - - if ok, err := platform.SupportsIPv6(); err != nil { - return nil, err - } else if ok { - ranges = append(ranges, - &pbproxystate.CidrRange{AddressPrefix: "::1", PrefixLen: &wrapperspb.UInt32Value{Value: 128}}, - ) - } - - router.Match = &pbproxystate.Match{ - SourcePrefixRanges: ranges, - } - } - - l.Routers = []*pbproxystate.Router{router} - - return l, err -} - -// TODO(proxystate): Gateway support will be added in the future. -// Functions and types to convert from agent/xds/listeners.go: -// func makeTerminatingGatewayListener -// type terminatingGatewayFilterChainOpts -// func makeFilterChainTerminatingGateway -// func makeMeshGatewayListener -// func makeMeshGatewayPeerFilterChain - -type routerOpts struct { - //accessLogs *structs.AccessLogsConfig - routeName string - clusterName string - filterName string - protocol string - useRDS bool - statPrefix string - //forwardClientDetails bool - //forwardClientPolicy envoy_http_v3.HttpConnectionManager_ForwardClientCertDetails - //tracing *envoy_http_v3.HttpConnectionManager_Tracing -} - -func (g *Converter) makeUpstreamRouter(opts routerOpts) (*pbproxystate.Router, error) { - if opts.statPrefix == "" { - opts.statPrefix = "upstream." - } - - router := &pbproxystate.Router{} - - err := g.addRouterDestination(destinationOpts{ - useRDS: opts.useRDS, - protocol: opts.protocol, - filterName: opts.filterName, - routeName: opts.routeName, - cluster: opts.clusterName, - statPrefix: opts.statPrefix, - //forwardClientDetails: opts.forwardClientDetails, - //forwardClientPolicy: opts.forwardClientPolicy, - //tracing: opts.tracing, - //accessLogs: opts.accessLogs, - logger: g.Logger, - }, router) - if err != nil { - return nil, err - } - - return router, nil -} - -// simpleChainTarget returns the discovery target for a chain with a single node. -// A chain can have a single target if it is for a TCP service or an HTTP service without -// multiple splits/routes/failovers. -func simpleChainTarget(chain *structs.CompiledDiscoveryChain) (*structs.DiscoveryTarget, error) { - startNode := chain.Nodes[chain.StartNode] - if startNode == nil { - return nil, fmt.Errorf("missing first node in compiled discovery chain for: %s", chain.ServiceName) - } - if startNode.Type != structs.DiscoveryGraphNodeTypeResolver { - return nil, fmt.Errorf("expected discovery chain with single node, found unexpected start node: %s", startNode.Type) - } - targetID := startNode.Resolver.Target - return chain.Targets[targetID], nil -} - -func (s *Converter) getAndModifyUpstreamConfigForListener( - uid proxycfg.UpstreamID, - u *structs.Upstream, - chain *structs.CompiledDiscoveryChain, -) structs.UpstreamConfig { - var ( - cfg structs.UpstreamConfig - err error - ) - - configMap := make(map[string]interface{}) - if u != nil { - configMap = u.Config - } - if chain == nil || chain.Default { - cfg, err = structs.ParseUpstreamConfigNoDefaults(configMap) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse", "upstream", uid, "error", err) - } - } else { - // Use NoDefaults here so that we can set the protocol to the chain - // protocol if necessary - cfg, err = structs.ParseUpstreamConfigNoDefaults(configMap) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse", "upstream", uid, "error", err) - } - - if cfg.EnvoyListenerJSON != "" { - s.Logger.Warn("ignoring escape hatch setting because already configured for", - "discovery chain", chain.ServiceName, "upstream", uid, "config", "envoy_listener_json") - - // Remove from config struct so we don't use it later on - cfg.EnvoyListenerJSON = "" - } - } - protocol := cfg.Protocol - if chain != nil { - if protocol == "" { - protocol = chain.Protocol - } - if protocol == "" { - protocol = "tcp" - } - } else { - protocol = "tcp" - } - - // set back on the config so that we can use it from return value - cfg.Protocol = protocol - - return cfg -} - -func (s *Converter) getAndModifyUpstreamConfigForPeeredListener( - uid proxycfg.UpstreamID, - u *structs.Upstream, - peerMeta structs.PeeringServiceMeta, -) structs.UpstreamConfig { - var ( - cfg structs.UpstreamConfig - err error - ) - - configMap := make(map[string]interface{}) - if u != nil { - configMap = u.Config - } - - cfg, err = structs.ParseUpstreamConfigNoDefaults(configMap) - if err != nil { - // Don't hard fail on a config typo, just warn. The parse func returns - // default config if there is an error so it's safe to continue. - s.Logger.Warn("failed to parse", "upstream", uid, "error", err) - } - - // Ignore the configured protocol for peer upstreams, since it is defined by the remote - // cluster, which we cannot control. - protocol := peerMeta.Protocol - if protocol == "" { - protocol = "tcp" - } - - // set back on the config so that we can use it from return value - cfg.Protocol = protocol - - if cfg.ConnectTimeoutMs == 0 { - cfg.ConnectTimeoutMs = 5000 - } - - if cfg.MeshGateway.Mode == "" && u != nil { - cfg.MeshGateway = u.MeshGateway - } - - return cfg -} - -type destinationOpts struct { - // All listener filters - // TODO(proxystate): access logs support will be added later - //accessLogs *structs.AccessLogsConfig - cluster string - filterName string - logger hclog.Logger - protocol string - statPrefix string - - // HTTP listener filter options - forwardClientDetails bool - forwardClientPolicy envoy_http_v3.HttpConnectionManager_ForwardClientCertDetails - httpAuthzFilters []*envoy_http_v3.HttpFilter - idleTimeoutMs *int - requestTimeoutMs *int - routeName string - routePath string - // TODO(proxystate): tracing support will be added later - //tracing *envoy_http_v3.HttpConnectionManager_Tracing - useRDS bool -} - -func (g *Converter) addRouterDestination(opts destinationOpts, router *pbproxystate.Router) error { - switch opts.protocol { - case "grpc", "http2", "http": - dest, err := g.makeL7Destination(opts) - if err != nil { - return err - } - router.Destination = &pbproxystate.Router_L7{ - L7: dest, - } - return nil - case "tcp": - fallthrough - default: - if opts.useRDS { - return fmt.Errorf("RDS is not compatible with the tcp proxy filter") - } else if opts.cluster == "" { - return fmt.Errorf("cluster name is required for a tcp proxy filter") - } - dest, err := makeL4Destination(opts) - if err != nil { - return err - } - router.Destination = &pbproxystate.Router_L4{ - L4: dest, - } - return nil - } -} - -func makeL4Destination(opts destinationOpts) (*pbproxystate.L4Destination, error) { - // TODO(proxystate): implement access logs at top level - //accessLogs, err := accesslogs.MakeAccessLogs(opts.accessLogs, false) - //if err != nil && opts.logger != nil { - // opts.logger.Warn("could not make access log xds for tcp proxy", err) - //} - - l4Dest := &pbproxystate.L4Destination{ - //AccessLog: accessLogs, - Name: opts.cluster, - StatPrefix: makeStatPrefix(opts.statPrefix, opts.filterName), - } - return l4Dest, nil -} - -func makeStatPrefix(prefix, filterName string) string { - // Replace colons here because Envoy does that in the metrics for the actual - // clusters but doesn't in the stat prefix here while dashboards assume they - // will match. - return fmt.Sprintf("%s%s", prefix, strings.Replace(filterName, ":", "_", -1)) -} - -func (g *Converter) makeL7Destination(opts destinationOpts) (*pbproxystate.L7Destination, error) { - dest := &pbproxystate.L7Destination{} - - // TODO(proxystate) access logs will be added to proxystate top level and in xds generation - //accessLogs, err := accesslogs.MakeAccessLogs(opts.accessLogs, false) - //if err != nil && opts.logger != nil { - // opts.logger.Warn("could not make access log xds for http connection manager", err) - //} - - // An L7 Destination's name will be the route name, so during xds generation the route can be looked up. - dest.Name = opts.routeName - dest.StatPrefix = makeStatPrefix(opts.statPrefix, opts.filterName) - - // TODO(proxystate) tracing will be added at the top level proxystate and xds generation - //if opts.tracing != nil { - // cfg.Tracing = opts.tracing - //} - - if opts.useRDS { - if opts.cluster != "" { - return nil, fmt.Errorf("cannot specify cluster name when using RDS") - } - } else { - dest.StaticRoute = true - - if opts.cluster == "" { - return nil, fmt.Errorf("must specify cluster name when not using RDS") - } - - routeRule := &pbproxystate.RouteRule{ - Match: &pbproxystate.RouteMatch{ - PathMatch: &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Prefix{ - Prefix: "/", - }, - }, - // TODO(banks) Envoy supports matching only valid GRPC - // requests which might be nice to add here for gRPC services - // but it's not supported in our current envoy SDK version - // although docs say it was supported by 1.8.0. Going to defer - // that until we've updated the deps. - }, - Destination: &pbproxystate.RouteDestination{ - Destination: &pbproxystate.RouteDestination_Cluster{ - Cluster: &pbproxystate.DestinationCluster{ - Name: opts.cluster, - }, - }, - }, - } - - var timeoutCfg *pbproxystate.TimeoutConfig - r := routeRule.GetDestination() - - if opts.requestTimeoutMs != nil { - if timeoutCfg == nil { - timeoutCfg = &pbproxystate.TimeoutConfig{} - } - timeoutCfg.Timeout = durationpb.New(time.Duration(*opts.requestTimeoutMs) * time.Millisecond) - } - - if opts.idleTimeoutMs != nil { - if timeoutCfg == nil { - timeoutCfg = &pbproxystate.TimeoutConfig{} - } - timeoutCfg.IdleTimeout = durationpb.New(time.Duration(*opts.idleTimeoutMs) * time.Millisecond) - } - r.DestinationConfiguration = &pbproxystate.DestinationConfiguration{ - TimeoutConfig: timeoutCfg, - } - - // If a path is provided, do not match on a catch-all prefix - if opts.routePath != "" { - routeRule.Match.PathMatch = &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Exact{ - Exact: opts.routePath, - }, - } - } - - // Create static route object - route := &pbproxystate.Route{ - VirtualHosts: []*pbproxystate.VirtualHost{ - { - Name: opts.filterName, - Domains: []string{"*"}, - RouteRules: []*pbproxystate.RouteRule{ - routeRule, - }, - }, - }, - } - // Save the route to proxy state. - g.proxyState.Routes[opts.routeName] = route - } - - dest.Protocol = l7Protocols[opts.protocol] - - // TODO(proxystate) need to include xfcc policy in future L7 task - //// Note the default leads to setting HttpConnectionManager_SANITIZE - //if opts.forwardClientDetails { - // cfg.ForwardClientCertDetails = opts.forwardClientPolicy - // cfg.SetCurrentClientCertDetails = &envoy_http_v3.HttpConnectionManager_SetCurrentClientCertDetails{ - // Subject: &wrapperspb.BoolValue{Value: true}, - // Cert: true, - // Chain: true, - // Dns: true, - // Uri: true, - // } - //} - - // Like injectConnectFilters for L4, here we ensure that the first filter - // (other than the "envoy.grpc_http1_bridge" filter) in the http filter - // chain of a public listener is the authz filter to prevent unauthorized - // access and that every filter chain uses our TLS certs. - if len(opts.httpAuthzFilters) > 0 { - // TODO(proxystate) support intentions in the future - dest.Intentions = make([]*pbproxystate.L7Intention, 0) - //cfg.HttpFilters = append(opts.httpAuthzFilters, cfg.HttpFilters...) - } - - // TODO(proxystate) add grpc http filters in xds in future L7 task - //if opts.protocol == "grpc" { - // grpcHttp1Bridge, err := makeEnvoyHTTPFilter( - // "envoy.filters.http.grpc_http1_bridge", - // &envoy_grpc_http1_bridge_v3.Config{}, - // ) - // if err != nil { - // return nil, err - // } - // - // // In envoy 1.14.x the default value "stats_for_all_methods=true" was - // // deprecated, and was changed to "false" in 1.18.x. Avoid using the - // // default. TODO: we may want to expose this to users somehow easily. - // grpcStatsFilter, err := makeEnvoyHTTPFilter( - // "envoy.filters.http.grpc_stats", - // &envoy_grpc_stats_v3.FilterConfig{ - // PerMethodStatSpecifier: &envoy_grpc_stats_v3.FilterConfig_StatsForAllMethods{ - // StatsForAllMethods: makeBoolValue(true), - // }, - // }, - // ) - // if err != nil { - // return nil, err - // } - // - // // Add grpc bridge before router and authz, and the stats in front of that. - // cfg.HttpFilters = append([]*envoy_http_v3.HttpFilter{ - // grpcStatsFilter, - // grpcHttp1Bridge, - // }, cfg.HttpFilters...) - //} - - return dest, nil -} - -var tlsVersionsWithConfigurableCipherSuites = map[types.TLSVersion]struct{}{ - // Remove these two if Envoy ever sets TLS 1.3 as default minimum - types.TLSVersionUnspecified: {}, - types.TLSVersionAuto: {}, - - types.TLSv1_0: {}, - types.TLSv1_1: {}, - types.TLSv1_2: {}, -} - -func makeTLSParametersFromProxyTLSConfig(tlsConf *structs.MeshDirectionalTLSConfig) *pbproxystate.TLSParameters { - if tlsConf == nil { - return &pbproxystate.TLSParameters{} - } - - return makeTLSParametersFromTLSConfig(tlsConf.TLSMinVersion, tlsConf.TLSMaxVersion, tlsConf.CipherSuites) -} - -func makeTLSParametersFromTLSConfig( - tlsMinVersion types.TLSVersion, - tlsMaxVersion types.TLSVersion, - cipherSuites []types.TLSCipherSuite, -) *pbproxystate.TLSParameters { - tlsParams := pbproxystate.TLSParameters{} - - if tlsMinVersion != types.TLSVersionUnspecified { - tlsParams.MinVersion = tlsVersions[tlsMinVersion] - } - if tlsMaxVersion != types.TLSVersionUnspecified { - tlsParams.MaxVersion = tlsVersions[tlsMaxVersion] - } - if len(cipherSuites) != 0 { - var suites []pbproxystate.TLSCipherSuite - for _, cs := range cipherSuites { - suites = append(suites, tlsCipherSuites[cs]) - } - tlsParams.CipherSuites = suites - } - - return &tlsParams -} - -var tlsVersions = map[types.TLSVersion]pbproxystate.TLSVersion{ - types.TLSVersionAuto: pbproxystate.TLSVersion_TLS_VERSION_AUTO, - types.TLSv1_0: pbproxystate.TLSVersion_TLS_VERSION_1_0, - types.TLSv1_1: pbproxystate.TLSVersion_TLS_VERSION_1_1, - types.TLSv1_2: pbproxystate.TLSVersion_TLS_VERSION_1_2, - types.TLSv1_3: pbproxystate.TLSVersion_TLS_VERSION_1_3, -} - -var tlsCipherSuites = map[types.TLSCipherSuite]pbproxystate.TLSCipherSuite{ - types.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256, - types.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305, - types.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256, - types.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305, - types.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA, - types.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA, - types.TLS_RSA_WITH_AES_128_GCM_SHA256: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES128_GCM_SHA256, - types.TLS_RSA_WITH_AES_128_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES128_SHA, - types.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384, - types.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384, - types.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA, - types.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA, - types.TLS_RSA_WITH_AES_256_GCM_SHA384: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES256_GCM_SHA384, - types.TLS_RSA_WITH_AES_256_CBC_SHA: pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES256_SHA, -} - -var l7Protocols = map[string]pbproxystate.L7Protocol{ - "http": pbproxystate.L7Protocol_L7_PROTOCOL_HTTP, - "http2": pbproxystate.L7Protocol_L7_PROTOCOL_HTTP2, - "grpc": pbproxystate.L7Protocol_L7_PROTOCOL_GRPC, -} - -var balanceConnections = map[string]pbproxystate.BalanceConnections{ - "": pbproxystate.BalanceConnections_BALANCE_CONNECTIONS_DEFAULT, - structs.ConnectionExactBalance: pbproxystate.BalanceConnections_BALANCE_CONNECTIONS_EXACT, -} diff --git a/agent/xds/proxystateconverter/locality_policy.go b/agent/xds/proxystateconverter/locality_policy.go deleted file mode 100644 index c33f428fc2e27..0000000000000 --- a/agent/xds/proxystateconverter/locality_policy.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "fmt" - - "github.com/hashicorp/consul/agent/structs" -) - -func groupedEndpoints(locality *structs.Locality, policy *structs.DiscoveryPrioritizeByLocality, csns structs.CheckServiceNodes) ([]structs.CheckServiceNodes, error) { - switch { - case policy == nil || policy.Mode == "" || policy.Mode == "none": - return []structs.CheckServiceNodes{csns}, nil - case policy.Mode == "failover": - return prioritizeByLocalityFailover(locality, csns), nil - default: - return nil, fmt.Errorf("unexpected priortize-by-locality mode %q", policy.Mode) - } -} diff --git a/agent/xds/proxystateconverter/locality_policy_ce.go b/agent/xds/proxystateconverter/locality_policy_ce.go deleted file mode 100644 index 014ed0f8b9b57..0000000000000 --- a/agent/xds/proxystateconverter/locality_policy_ce.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package proxystateconverter - -import ( - "github.com/hashicorp/consul/agent/structs" -) - -func prioritizeByLocalityFailover(locality *structs.Locality, csns structs.CheckServiceNodes) []structs.CheckServiceNodes { - return nil -} diff --git a/agent/xds/proxystateconverter/routes.go b/agent/xds/proxystateconverter/routes.go deleted file mode 100644 index f9559f7878a89..0000000000000 --- a/agent/xds/proxystateconverter/routes.go +++ /dev/null @@ -1,777 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package proxystateconverter - -import ( - "errors" - "fmt" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "sort" - "strings" - "time" - - "github.com/hashicorp/consul/agent/xds/response" - - "github.com/hashicorp/consul/agent/proxycfg" - "github.com/hashicorp/consul/agent/structs" - "google.golang.org/protobuf/types/known/durationpb" -) - -// routesFromSnapshot returns the xDS API representation of the "routes" in the -// snapshot. -func (s *Converter) routesFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot) error { - if cfgSnap == nil { - return errors.New("nil config given") - } - - switch cfgSnap.Kind { - case structs.ServiceKindConnectProxy: - return s.routesForConnectProxy(cfgSnap) - // TODO(proxystate): Ingress Gateways will be added in the future. - //case structs.ServiceKindIngressGateway: - // return s.routesForIngressGateway(cfgSnap) - // TODO(proxystate): API Gateways will be added in the future. - //case structs.ServiceKindAPIGateway: - // return s.routesForAPIGateway(cfgSnap) - // TODO(proxystate): Terminating Gateways will be added in the future. - //case structs.ServiceKindTerminatingGateway: - // return s.routesForTerminatingGateway(cfgSnap) - // TODO(proxystate): Mesh Gateways will be added in the future. - //case structs.ServiceKindMeshGateway: - // return s.routesForMeshGateway(cfgSnap) - default: - return fmt.Errorf("Invalid service kind: %v", cfgSnap.Kind) - } -} - -// routesFromSnapshotConnectProxy returns the xDS API representation of the -// "routes" in the snapshot. -func (s *Converter) routesForConnectProxy(cfgSnap *proxycfg.ConfigSnapshot) error { - for uid, chain := range cfgSnap.ConnectProxy.DiscoveryChain { - if chain.Default { - continue - } - - virtualHost, err := s.makeUpstreamHostForDiscoveryChain(cfgSnap, uid, chain, []string{"*"}, false) - if err != nil { - return err - } - if virtualHost == nil { - continue - } - - route := &pbproxystate.Route{ - VirtualHosts: []*pbproxystate.VirtualHost{virtualHost}, - } - s.proxyState.Routes[uid.EnvoyID()] = route - } - addressesMap := make(map[string]map[string]string) - err := cfgSnap.ConnectProxy.DestinationsUpstream.ForEachKeyE(func(uid proxycfg.UpstreamID) error { - svcConfig, ok := cfgSnap.ConnectProxy.DestinationsUpstream.Get(uid) - if !ok || svcConfig == nil { - return nil - } - if !structs.IsProtocolHTTPLike(svcConfig.Protocol) { - // Routes can only be defined for HTTP services - return nil - } - - for _, address := range svcConfig.Destination.Addresses { - - routeName := clusterNameForDestination(cfgSnap, "~http", fmt.Sprintf("%d", svcConfig.Destination.Port), svcConfig.NamespaceOrDefault(), svcConfig.PartitionOrDefault()) - if _, ok := addressesMap[routeName]; !ok { - addressesMap[routeName] = make(map[string]string) - } - // cluster name is unique per address/port so we should not be doing any override here - clusterName := clusterNameForDestination(cfgSnap, svcConfig.Name, address, svcConfig.NamespaceOrDefault(), svcConfig.PartitionOrDefault()) - addressesMap[routeName][clusterName] = address - } - return nil - }) - - if err != nil { - return err - } - - for routeName, clusters := range addressesMap { - route, err := s.makeRouteForAddresses(clusters) - if err != nil { - return err - } - if route != nil { - s.proxyState.Routes[routeName] = route - } - } - - // TODO(rb): make sure we don't generate an empty result - return nil -} - -func (s *Converter) makeRouteForAddresses(addresses map[string]string) (*pbproxystate.Route, error) { - route, err := makeAddressesRoute(addresses) - if err != nil { - s.Logger.Error("failed to make route", "cluster", "error", err) - return nil, err - } - - return route, nil -} - -// TODO(proxystate): Terminating Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func routesForTerminatingGateway - -// TODO(proxystate): Mesh Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func routesForMeshGateway - -func makeAddressesRoute(addresses map[string]string) (*pbproxystate.Route, error) { - route := &pbproxystate.Route{} - for clusterName, address := range addresses { - destination := makeRouteDestinationFromName(clusterName) - virtualHost := &pbproxystate.VirtualHost{ - Name: clusterName, - Domains: []string{address}, - RouteRules: []*pbproxystate.RouteRule{ - { - Match: makeDefaultRouteMatch(), - Destination: destination, - }, - }, - } - route.VirtualHosts = append(route.VirtualHosts, virtualHost) - } - - // sort virtual hosts to have a stable order - sort.SliceStable(route.VirtualHosts, func(i, j int) bool { - return route.VirtualHosts[i].Name > route.VirtualHosts[j].Name - }) - return route, nil -} - -// makeRouteDestinationFromName (fka makeRouteActionFromName) -func makeRouteDestinationFromName(clusterName string) *pbproxystate.RouteDestination { - return &pbproxystate.RouteDestination{ - Destination: &pbproxystate.RouteDestination_Cluster{ - Cluster: &pbproxystate.DestinationCluster{ - Name: clusterName, - }, - }, - } -} - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func routesForIngressGateway - -// TODO(proxystate): API Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func routesForAPIGateway -// func buildHTTPRouteUpstream - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func findIngressServiceMatchingUpstream - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func generateUpstreamIngressDomains - -// TODO(proxystate): Ingress Gateways will be added in the future. -// Functions to add from agent/xds/clusters.go: -// func generateUpstreamAPIsDomains - -func (s *Converter) makeUpstreamHostForDiscoveryChain( - cfgSnap *proxycfg.ConfigSnapshot, - uid proxycfg.UpstreamID, - chain *structs.CompiledDiscoveryChain, - serviceDomains []string, - forMeshGateway bool, -) (*pbproxystate.VirtualHost, error) { - var routeRules []*pbproxystate.RouteRule - - startNode := chain.Nodes[chain.StartNode] - if startNode == nil { - return nil, fmt.Errorf("missing first node in compiled discovery chain for: %s", chain.ServiceName) - } - - upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() - if err != nil && !forMeshGateway { - return nil, err - } - - switch startNode.Type { - case structs.DiscoveryGraphNodeTypeRouter: - routeRules = make([]*pbproxystate.RouteRule, 0, len(startNode.Routes)) - - for _, discoveryRoute := range startNode.Routes { - routeMatch := makeRouteMatchForDiscoveryRoute(discoveryRoute) - - var ( - routeDestination *pbproxystate.RouteDestination - err error - ) - - nextNode := chain.Nodes[discoveryRoute.NextNode] - - var lb *structs.LoadBalancer - if nextNode.LoadBalancer != nil { - lb = nextNode.LoadBalancer - } - - switch nextNode.Type { - case structs.DiscoveryGraphNodeTypeSplitter: - routeDestination, err = s.makeRouteDestinationForSplitter(upstreamsSnapshot, nextNode.Splits, chain, forMeshGateway) - if err != nil { - return nil, err - } - - case structs.DiscoveryGraphNodeTypeResolver: - rd, ok := s.makeRouteDestinationForChainCluster(upstreamsSnapshot, nextNode.Resolver.Target, chain, forMeshGateway) - if !ok { - continue - } - routeDestination = rd - - default: - return nil, fmt.Errorf("unexpected graph node after route %q", nextNode.Type) - } - - routeDestination.DestinationConfiguration = &pbproxystate.DestinationConfiguration{} - if err := injectLBToDestinationConfiguration(lb, routeDestination.DestinationConfiguration); err != nil { - return nil, fmt.Errorf("failed to apply load balancer configuration to route action: %v", err) - } - - // TODO(rb): Better help handle the envoy case where you need (prefix=/foo/,rewrite=/) and (exact=/foo,rewrite=/) to do a full rewrite - - destination := discoveryRoute.Definition.Destination - - routeRule := &pbproxystate.RouteRule{} - - if destination != nil { - configHandle := routeDestination.DestinationConfiguration - if destination.PrefixRewrite != "" { - configHandle.PrefixRewrite = destination.PrefixRewrite - } - - if destination.RequestTimeout > 0 || destination.IdleTimeout > 0 { - configHandle.TimeoutConfig = &pbproxystate.TimeoutConfig{} - } - if destination.RequestTimeout > 0 { - configHandle.TimeoutConfig.Timeout = durationpb.New(destination.RequestTimeout) - } - if destination.IdleTimeout > 0 { - configHandle.TimeoutConfig.IdleTimeout = durationpb.New(destination.IdleTimeout) - } - - if destination.HasRetryFeatures() { - configHandle.RetryPolicy = getRetryPolicyForDestination(destination) - } - - if err := injectHeaderManipToRoute(destination, routeRule); err != nil { - return nil, fmt.Errorf("failed to apply header manipulation configuration to route: %v", err) - } - } - - routeRule.Match = routeMatch - routeRule.Destination = routeDestination - - routeRules = append(routeRules, routeRule) - } - - case structs.DiscoveryGraphNodeTypeSplitter: - routeDestination, err := s.makeRouteDestinationForSplitter(upstreamsSnapshot, startNode.Splits, chain, forMeshGateway) - if err != nil { - return nil, err - } - var lb *structs.LoadBalancer - if startNode.LoadBalancer != nil { - lb = startNode.LoadBalancer - } - routeDestination.DestinationConfiguration = &pbproxystate.DestinationConfiguration{} - if err := injectLBToDestinationConfiguration(lb, routeDestination.DestinationConfiguration); err != nil { - return nil, fmt.Errorf("failed to apply load balancer configuration to route action: %v", err) - } - - defaultRoute := &pbproxystate.RouteRule{ - Match: makeDefaultRouteMatch(), - Destination: routeDestination, - } - - routeRules = []*pbproxystate.RouteRule{defaultRoute} - - case structs.DiscoveryGraphNodeTypeResolver: - routeDestination, ok := s.makeRouteDestinationForChainCluster(upstreamsSnapshot, startNode.Resolver.Target, chain, forMeshGateway) - if !ok { - break - } - var lb *structs.LoadBalancer - if startNode.LoadBalancer != nil { - lb = startNode.LoadBalancer - } - routeDestination.DestinationConfiguration = &pbproxystate.DestinationConfiguration{} - if err := injectLBToDestinationConfiguration(lb, routeDestination.DestinationConfiguration); err != nil { - return nil, fmt.Errorf("failed to apply load balancer configuration to route action: %v", err) - } - - if startNode.Resolver.RequestTimeout > 0 { - to := &pbproxystate.TimeoutConfig{ - Timeout: durationpb.New(startNode.Resolver.RequestTimeout), - } - routeDestination.DestinationConfiguration.TimeoutConfig = to - } - defaultRoute := &pbproxystate.RouteRule{ - Match: makeDefaultRouteMatch(), - Destination: routeDestination, - } - - routeRules = []*pbproxystate.RouteRule{defaultRoute} - - default: - return nil, fmt.Errorf("unknown first node in discovery chain of type: %s", startNode.Type) - } - - host := &pbproxystate.VirtualHost{ - Name: uid.EnvoyID(), - Domains: serviceDomains, - RouteRules: routeRules, - } - - return host, nil -} - -func getRetryPolicyForDestination(destination *structs.ServiceRouteDestination) *pbproxystate.RetryPolicy { - retryPolicy := &pbproxystate.RetryPolicy{} - if destination.NumRetries > 0 { - retryPolicy.NumRetries = response.MakeUint32Value(int(destination.NumRetries)) - } - - // The RetryOn magic values come from: https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/http_filters/router_filter#config-http-filters-router-x-envoy-retry-on - var retryStrings []string - - if len(destination.RetryOn) > 0 { - retryStrings = append(retryStrings, destination.RetryOn...) - } - - if destination.RetryOnConnectFailure { - // connect-failure can be enabled by either adding connect-failure to the RetryOn list or by using the legacy RetryOnConnectFailure option - // Check that it's not already in the RetryOn list, so we don't set it twice - connectFailureExists := false - for _, r := range retryStrings { - if r == "connect-failure" { - connectFailureExists = true - } - } - if !connectFailureExists { - retryStrings = append(retryStrings, "connect-failure") - } - } - - if len(destination.RetryOnStatusCodes) > 0 { - retryStrings = append(retryStrings, "retriable-status-codes") - retryPolicy.RetriableStatusCodes = destination.RetryOnStatusCodes - } - - retryPolicy.RetryOn = strings.Join(retryStrings, ",") - - return retryPolicy -} - -func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute) *pbproxystate.RouteMatch { - match := discoveryRoute.Definition.Match - if match == nil || match.IsEmpty() { - return makeDefaultRouteMatch() - } - - routeMatch := &pbproxystate.RouteMatch{} - - switch { - case match.HTTP.PathExact != "": - routeMatch.PathMatch = &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Exact{ - Exact: match.HTTP.PathExact, - }, - } - case match.HTTP.PathPrefix != "": - routeMatch.PathMatch = &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Prefix{ - Prefix: match.HTTP.PathPrefix, - }, - } - case match.HTTP.PathRegex != "": - routeMatch.PathMatch = &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Regex{ - Regex: match.HTTP.PathRegex, - }, - } - default: - routeMatch.PathMatch = &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Prefix{ - Prefix: "/", - }, - } - } - - if len(match.HTTP.Header) > 0 { - routeMatch.HeaderMatches = make([]*pbproxystate.HeaderMatch, 0, len(match.HTTP.Header)) - for _, hdr := range match.HTTP.Header { - headerMatch := &pbproxystate.HeaderMatch{ - Name: hdr.Name, - } - - switch { - case hdr.Exact != "": - headerMatch.Match = &pbproxystate.HeaderMatch_Exact{ - Exact: hdr.Exact, - } - case hdr.Regex != "": - headerMatch.Match = &pbproxystate.HeaderMatch_Regex{ - Regex: hdr.Regex, - } - case hdr.Prefix != "": - headerMatch.Match = &pbproxystate.HeaderMatch_Prefix{ - Prefix: hdr.Prefix, - } - case hdr.Suffix != "": - headerMatch.Match = &pbproxystate.HeaderMatch_Suffix{ - Suffix: hdr.Suffix, - } - case hdr.Present: - headerMatch.Match = &pbproxystate.HeaderMatch_Present{ - Present: true, - } - default: - continue // skip this impossible situation - } - - if hdr.Invert { - headerMatch.InvertMatch = true - } - - routeMatch.HeaderMatches = append(routeMatch.HeaderMatches, headerMatch) - } - } - - if len(match.HTTP.Methods) > 0 { - routeMatch.MethodMatches = append(routeMatch.MethodMatches, match.HTTP.Methods...) - } - - if len(match.HTTP.QueryParam) > 0 { - routeMatch.QueryParameterMatches = make([]*pbproxystate.QueryParameterMatch, 0, len(match.HTTP.QueryParam)) - for _, qm := range match.HTTP.QueryParam { - - queryMatcher := &pbproxystate.QueryParameterMatch{ - Name: qm.Name, - } - - switch { - case qm.Exact != "": - queryMatcher.Match = &pbproxystate.QueryParameterMatch_Exact{ - Exact: qm.Exact, - } - case qm.Regex != "": - queryMatcher.Match = &pbproxystate.QueryParameterMatch_Regex{ - Regex: qm.Regex, - } - case qm.Present: - queryMatcher.Match = &pbproxystate.QueryParameterMatch_Present{ - Present: true, - } - default: - continue // skip this impossible situation - } - - routeMatch.QueryParameterMatches = append(routeMatch.QueryParameterMatches, queryMatcher) - } - } - - return routeMatch -} - -func makeDefaultRouteMatch() *pbproxystate.RouteMatch { - return &pbproxystate.RouteMatch{ - PathMatch: &pbproxystate.PathMatch{ - PathMatch: &pbproxystate.PathMatch_Prefix{ - Prefix: "/", - }, - }, - // TODO(banks) Envoy supports matching only valid GRPC - // requests which might be nice to add here for gRPC services - // but it's not supported in our current envoy SDK version - // although docs say it was supported by 1.8.0. Going to defer - // that until we've updated the deps. - } -} - -func (s *Converter) makeRouteDestinationForChainCluster( - upstreamsSnapshot *proxycfg.ConfigSnapshotUpstreams, - targetID string, - chain *structs.CompiledDiscoveryChain, - forMeshGateway bool, -) (*pbproxystate.RouteDestination, bool) { - clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway) - if clusterName == "" { - return nil, false - } - return makeRouteDestinationFromName(clusterName), true -} - -func (s *Converter) makeRouteDestinationForSplitter( - upstreamsSnapshot *proxycfg.ConfigSnapshotUpstreams, - splits []*structs.DiscoverySplit, - chain *structs.CompiledDiscoveryChain, - forMeshGateway bool, -) (*pbproxystate.RouteDestination, error) { - clusters := make([]*pbproxystate.L7WeightedDestinationCluster, 0, len(splits)) - for _, split := range splits { - nextNode := chain.Nodes[split.NextNode] - - if nextNode.Type != structs.DiscoveryGraphNodeTypeResolver { - return nil, fmt.Errorf("unexpected splitter destination node type: %s", nextNode.Type) - } - targetID := nextNode.Resolver.Target - - clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway) - if clusterName == "" { - continue - } - - // The smallest representable weight is 1/10000 or .01% but envoy - // deals with integers so scale everything up by 100x. - weight := int(split.Weight * 100) - - clusterWeight := &pbproxystate.L7WeightedDestinationCluster{ - Name: clusterName, - Weight: response.MakeUint32Value(weight), - } - if err := injectHeaderManipToWeightedCluster(split.Definition, clusterWeight); err != nil { - return nil, err - } - - clusters = append(clusters, clusterWeight) - } - - if len(clusters) <= 0 { - return nil, fmt.Errorf("number of clusters in splitter must be > 0; got %d", len(clusters)) - } - - return &pbproxystate.RouteDestination{ - Destination: &pbproxystate.RouteDestination_WeightedClusters{ - WeightedClusters: &pbproxystate.L7WeightedClusterGroup{ - Clusters: clusters, - }, - }, - }, nil -} - -func injectLBToDestinationConfiguration(lb *structs.LoadBalancer, destinationConfig *pbproxystate.DestinationConfiguration) error { - if lb == nil || !lb.IsHashBased() { - return nil - } - - result := make([]*pbproxystate.LoadBalancerHashPolicy, 0, len(lb.HashPolicies)) - for _, policy := range lb.HashPolicies { - if policy.SourceIP { - p := &pbproxystate.LoadBalancerHashPolicy{ - Policy: &pbproxystate.LoadBalancerHashPolicy_ConnectionProperties{ - ConnectionProperties: &pbproxystate.ConnectionPropertiesPolicy{ - SourceIp: true, - Terminal: policy.Terminal, - }, - }, - } - result = append(result, p) - continue - } - - switch policy.Field { - case structs.HashPolicyHeader: - p := &pbproxystate.LoadBalancerHashPolicy{ - Policy: &pbproxystate.LoadBalancerHashPolicy_Header{ - Header: &pbproxystate.HeaderPolicy{ - Name: policy.FieldValue, - Terminal: policy.Terminal, - }, - }, - } - result = append(result, p) - - case structs.HashPolicyCookie: - - cookie := &pbproxystate.CookiePolicy{ - Name: policy.FieldValue, - Terminal: policy.Terminal, - } - if policy.CookieConfig != nil { - cookie.Path = policy.CookieConfig.Path - - if policy.CookieConfig.TTL != 0*time.Second { - cookie.Ttl = durationpb.New(policy.CookieConfig.TTL) - } - - // Envoy will generate a session cookie if the ttl is present and zero. - if policy.CookieConfig.Session { - cookie.Ttl = durationpb.New(0 * time.Second) - } - } - p := &pbproxystate.LoadBalancerHashPolicy{ - Policy: &pbproxystate.LoadBalancerHashPolicy_Cookie{ - Cookie: cookie, - }, - } - result = append(result, p) - - case structs.HashPolicyQueryParam: - p := &pbproxystate.LoadBalancerHashPolicy{ - Policy: &pbproxystate.LoadBalancerHashPolicy_QueryParameter{ - QueryParameter: &pbproxystate.QueryParameterPolicy{ - Name: policy.FieldValue, - Terminal: policy.Terminal, - }, - }, - } - result = append(result, p) - - default: - return fmt.Errorf("unsupported load balancer hash policy field: %v", policy.Field) - } - } - - destinationConfig.HashPolicies = result - return nil -} - -func injectHeaderManipToRoute(dest *structs.ServiceRouteDestination, r *pbproxystate.RouteRule) error { - if !dest.RequestHeaders.IsZero() { - r.HeaderMutations = append( - r.HeaderMutations, - makeRequestHeaderAdd(dest.RequestHeaders.Add, true)..., - ) - r.HeaderMutations = append( - r.HeaderMutations, - makeRequestHeaderAdd(dest.RequestHeaders.Set, false)..., - ) - r.HeaderMutations = append( - r.HeaderMutations, - makeRequestHeaderRemove(dest.RequestHeaders.Remove), - ) - } - if !dest.ResponseHeaders.IsZero() { - r.HeaderMutations = append( - r.HeaderMutations, - makeResponseHeaderAdd(dest.ResponseHeaders.Add, true)..., - ) - r.HeaderMutations = append( - r.HeaderMutations, - makeResponseHeaderAdd(dest.ResponseHeaders.Set, false)..., - ) - r.HeaderMutations = append( - r.HeaderMutations, - makeResponseHeaderRemove(dest.ResponseHeaders.Remove), - ) - } - return nil -} - -func injectHeaderManipToWeightedCluster(split *structs.ServiceSplit, c *pbproxystate.L7WeightedDestinationCluster) error { - if !split.RequestHeaders.IsZero() { - c.HeaderMutations = append( - c.HeaderMutations, - makeRequestHeaderAdd(split.RequestHeaders.Add, true)..., - ) - c.HeaderMutations = append( - c.HeaderMutations, - makeRequestHeaderAdd(split.RequestHeaders.Set, false)..., - ) - c.HeaderMutations = append( - c.HeaderMutations, - makeRequestHeaderRemove(split.RequestHeaders.Remove), - ) - } - if !split.ResponseHeaders.IsZero() { - c.HeaderMutations = append( - c.HeaderMutations, - makeResponseHeaderAdd(split.ResponseHeaders.Add, true)..., - ) - c.HeaderMutations = append( - c.HeaderMutations, - makeResponseHeaderAdd(split.ResponseHeaders.Set, false)..., - ) - c.HeaderMutations = append( - c.HeaderMutations, - makeResponseHeaderRemove(split.ResponseHeaders.Remove), - ) - } - return nil -} - -func makeRequestHeaderAdd(vals map[string]string, add bool) []*pbproxystate.HeaderMutation { - mutations := make([]*pbproxystate.HeaderMutation, 0, len(vals)) - - appendAction := pbproxystate.AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD - if add { - appendAction = pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - } - - for k, v := range vals { - m := &pbproxystate.HeaderMutation{ - Action: &pbproxystate.HeaderMutation_RequestHeaderAdd{ - RequestHeaderAdd: &pbproxystate.RequestHeaderAdd{ - Header: &pbproxystate.Header{ - Key: k, - Value: v, - }, - AppendAction: appendAction, - }, - }, - } - mutations = append(mutations, m) - } - return mutations -} - -func makeRequestHeaderRemove(values []string) *pbproxystate.HeaderMutation { - return &pbproxystate.HeaderMutation{ - Action: &pbproxystate.HeaderMutation_RequestHeaderRemove{ - RequestHeaderRemove: &pbproxystate.RequestHeaderRemove{ - HeaderKeys: values, - }, - }, - } -} - -func makeResponseHeaderAdd(vals map[string]string, add bool) []*pbproxystate.HeaderMutation { - mutations := make([]*pbproxystate.HeaderMutation, 0, len(vals)) - - appendAction := pbproxystate.AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD - if add { - appendAction = pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - } - - for k, v := range vals { - m := &pbproxystate.HeaderMutation{ - Action: &pbproxystate.HeaderMutation_ResponseHeaderAdd{ - ResponseHeaderAdd: &pbproxystate.ResponseHeaderAdd{ - Header: &pbproxystate.Header{ - Key: k, - Value: v, - }, - AppendAction: appendAction, - }, - }, - } - mutations = append(mutations, m) - } - return mutations -} - -func makeResponseHeaderRemove(values []string) *pbproxystate.HeaderMutation { - return &pbproxystate.HeaderMutation{ - Action: &pbproxystate.HeaderMutation_ResponseHeaderRemove{ - ResponseHeaderRemove: &pbproxystate.ResponseHeaderRemove{ - HeaderKeys: values, - }, - }, - } -} diff --git a/agent/xds/rbac.go b/agent/xds/rbac.go index 0c00cb92cb0c2..f38525abb78d9 100644 --- a/agent/xds/rbac.go +++ b/agent/xds/rbac.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -19,7 +19,6 @@ import ( "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/proto/private/pbpeering" ) @@ -834,9 +833,6 @@ func optimizePrincipals(orig []*envoy_rbac_v3.Principal) []*envoy_rbac_v3.Princi if !ok { return orig } - // In practice, you can't hit this - // Only JWTs (HTTP-only) generate orPrinciples, but optimizePrinciples is only called - // against the combined list of principles for L4 intentions. orIds = append(orIds, or.OrIds.Ids...) } @@ -988,7 +984,7 @@ func authenticatedPatternPrincipal(pattern string) *envoy_rbac_v3.Principal { Authenticated: &envoy_rbac_v3.Principal_Authenticated{ PrincipalName: &envoy_matcher_v3.StringMatcher{ MatchPattern: &envoy_matcher_v3.StringMatcher_SafeRegex{ - SafeRegex: response.MakeEnvoyRegexMatch(pattern), + SafeRegex: makeEnvoyRegexMatch(pattern), }, }, }, @@ -1020,7 +1016,7 @@ func xfccPrincipal(src rbacService) *envoy_rbac_v3.Principal { HeaderMatchSpecifier: &envoy_route_v3.HeaderMatcher_StringMatch{ StringMatch: &envoy_matcher_v3.StringMatcher{ MatchPattern: &envoy_matcher_v3.StringMatcher_SafeRegex{ - SafeRegex: response.MakeEnvoyRegexMatch(pattern), + SafeRegex: makeEnvoyRegexMatch(pattern), }, }, }, @@ -1225,7 +1221,7 @@ func convertPermission(perm *structs.IntentionPermission) *envoy_rbac_v3.Permiss Rule: &envoy_matcher_v3.PathMatcher_Path{ Path: &envoy_matcher_v3.StringMatcher{ MatchPattern: &envoy_matcher_v3.StringMatcher_SafeRegex{ - SafeRegex: response.MakeEnvoyRegexMatch(perm.HTTP.PathRegex), + SafeRegex: makeEnvoyRegexMatch(perm.HTTP.PathRegex), }, }, }, @@ -1246,7 +1242,7 @@ func convertPermission(perm *structs.IntentionPermission) *envoy_rbac_v3.Permiss } case hdr.Regex != "": eh.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: response.MakeEnvoyRegexMatch(hdr.Regex), + SafeRegexMatch: makeEnvoyRegexMatch(hdr.Regex), } case hdr.Prefix != "": eh.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_PrefixMatch{ @@ -1281,7 +1277,7 @@ func convertPermission(perm *structs.IntentionPermission) *envoy_rbac_v3.Permiss eh := &envoy_route_v3.HeaderMatcher{ Name: ":method", HeaderMatchSpecifier: &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: response.MakeEnvoyRegexMatch(methodHeaderRegex), + SafeRegexMatch: makeEnvoyRegexMatch(methodHeaderRegex), }, } diff --git a/agent/xds/rbac_test.go b/agent/xds/rbac_test.go index 9885052250aa0..6bc36028707a5 100644 --- a/agent/xds/rbac_test.go +++ b/agent/xds/rbac_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/resources.go b/agent/xds/resources.go index fc761040029c2..c7099e5cb50a0 100644 --- a/agent/xds/resources.go +++ b/agent/xds/resources.go @@ -1,12 +1,11 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds import ( "fmt" - "github.com/hashicorp/consul/agent/xds/configfetcher" "github.com/hashicorp/go-hclog" "google.golang.org/protobuf/proto" @@ -19,7 +18,7 @@ import ( // resources for a single client. type ResourceGenerator struct { Logger hclog.Logger - CfgFetcher configfetcher.ConfigFetcher + CfgFetcher ConfigFetcher IncrementalXDS bool ProxyFeatures xdscommon.SupportedProxyFeatures @@ -27,7 +26,7 @@ type ResourceGenerator struct { func NewResourceGenerator( logger hclog.Logger, - cfgFetcher configfetcher.ConfigFetcher, + cfgFetcher ConfigFetcher, incrementalXDS bool, ) *ResourceGenerator { return &ResourceGenerator{ diff --git a/agent/xds/resources_ce_test.go b/agent/xds/resources_ce_test.go index fa71348172353..5da963940ccba 100644 --- a/agent/xds/resources_ce_test.go +++ b/agent/xds/resources_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/xds/resources_test.go b/agent/xds/resources_test.go index 926c44fab86e8..29743c060bfd4 100644 --- a/agent/xds/resources_test.go +++ b/agent/xds/resources_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -7,27 +7,23 @@ import ( "path/filepath" "sort" "testing" - "time" envoy_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" envoy_endpoint_v3 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" envoy_route_v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" envoy_tls_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" - "k8s.io/utils/pointer" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/consul/discoverychain" "github.com/hashicorp/consul/agent/xds/testcommon" "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/types" testinf "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/response" "github.com/hashicorp/consul/sdk/testutil" ) @@ -121,7 +117,7 @@ func TestAllResourcesFromSnapshot(t *testing.T) { } }) - r, err := response.CreateResponse(typeUrl, "00000001", "00000001", items) + r, err := createResponse(typeUrl, "00000001", "00000001", items) require.NoError(t, err) gotJSON := protoToJSON(t, r) @@ -160,23 +156,13 @@ func TestAllResourcesFromSnapshot(t *testing.T) { }, }, { - name: "transparent-proxy", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotTransparentProxy(t) - }, + name: "transparent-proxy", + create: proxycfg.TestConfigSnapshotTransparentProxy, }, { name: "connect-proxy-with-peered-upstreams", create: proxycfg.TestConfigSnapshotPeering, }, - { - name: "connect-proxy-with-peered-upstreams-escape-overrides", - create: proxycfg.TestConfigSnapshotPeeringWithEscapeOverrides, - }, - { - name: "connect-proxy-with-peered-upstreams-http2", - create: proxycfg.TestConfigSnapshotPeeringWithHTTP2, - }, { name: "transparent-proxy-with-peered-upstreams", create: proxycfg.TestConfigSnapshotPeeringTProxy, @@ -260,11 +246,7 @@ func getMeshGatewayPeeringGoldenTestCases() []goldenTestCase { { name: "mesh-gateway-with-imported-peered-services", create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotPeeredMeshGateway(t, "imported-services", func(ns *structs.NodeService) { - ns.Proxy.Config = map[string]interface{}{ - "envoy_dns_discovery_type": "STRICT_DNS", - } - }, nil) + return proxycfg.TestConfigSnapshotPeeredMeshGateway(t, "imported-services", nil, nil) }, }, { @@ -344,54 +326,6 @@ RahYIzNLRBTLrwadLAZkApUpZvB8qDK4knsTWFYujNsylCww2A6ajzIMFNU4GkUK NtyHRuD+KYRmjXtyX1yHNqfGN3vOQmwavHq2R8wHYuBSc6LAHHV9vG+j0VsgMELO qwxn8SmLkSKbf2+MsQVzLCXXN5u+D8Yv+4py+oKP4EQ5aFZuDEx+r/G/31rTthww AAJAMaoXmoYVdgXV+CPuBb2M4XCpuzLu3bcA2PXm5ipSyIgntMKwXV7r ------END CERTIFICATE-----` - // openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 3650 \ - // -nodes -subj "/C=XX/CN=secondcert.com" -addext "subjectAltName = DNS:secondcert.com" - gatewayTestPrivateKeyTwo = `-----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCiPr2HCbVzbZ1M -IW89rfLLrciPTWWl48DF9CmYHS0C2gSD1W6bxzO7zdA+ced0ajI+YsQ9aBAXRhKl -EHgnhBJ6sGsz1XBQ9+lNDHrg9AjugIiHoscYOeCcxMeXhp97ti+vpVsc2/AvEf2K -GIUuOjcufXuRXkWQ2aB4RGyodkgRF6n8YrLJb7pWIjoCNwDAWtZX4wIVFgGq1ew0 -E/E9EyStMYTb5h1lvCpXYRN9AeSFKUQI/y0xsT3+nZ/gyzx3CrgzuSYRgptbuVwm -5F2Q16sLR/EtCBIhA8npKagx/4U7KOilF31I2locH4Aq5l9VJd/6pTA5F4KCAW/E -ybXz6DojAgMBAAECggEAPcOuuRqsFf4ztIjB5XQ0Cu/kexFW0flLKNDTiNIKkZxX -vaxhyDHkculeDnekSkAnUnKdDFdyULnfXTFQ3JI9yrEgjoIBmQFXsno+ySZ9w/Xw -g9om+wUFigirhva7/geUTcSgU/Myk2jA4XKGONv2p98jTGrcBtGickZyKwukUcTa -M18phLdjejg09d45QV5pEtU5m0HuydvtMNCxL2UeWMxyIVezAH2S48m7IAn7Xs4p -J9bwjboDWQYs+zLPfEZyosiJiKugpEKvApIKsJXf4JqRXHN+vvKKDeXkKrrGR+pg -3e5foPjFrLcDltZMkrfnlm8fa0yLnoxdiyd1pDcJaQKBgQDSnJbM6CDb0b3bUyiz -LpfJSBzEPqABM8mNeVHfEjHcBJ7YBOceBxDNasmAPvFbhoDrlHiEYW2QnDLRXKeF -XVdXjSsUV30SPMeg6yeSd8L+LKXLjrGMNGDcJfnjLavv7Glu1xDnYyFSmeVIhWoo -cOhfaFQ69vnHiU1idrOlz6zhPwKBgQDFNcY0S59f3tht7kgnItg8PSfJqJQrIdLt -x6MC2Nc7Eui7/LTuO2rMG6HRA/8zQa/TfnfG7CsUwLB1NiC2R1TtM9YBYPxhMl1o -JeGTfM+tD0lBwPhYpgnOCppuayRCfAsPYA6NcvXcGZbxOigxliOuvgVBH47EAApA -zJ+8b6nKHQKBgQCZ0GDV/4XX5KNq5Z3o1tNl3jOcIzyKBD9kAkGHz+r4C6vSiioc -pP5hd2b4MX/l3yKSapll3R2+qkT24Fs8LEJYn7Hhpk+inR8SaAs7jhmrtgHT2z/R -7IL85QNOJhHXJGqP16PxyVUR1XE9eKpiJKug2joB4lPjpWQN0DE9nKFe0wKBgEo3 -qpgTva7+1sTIYC8aVfaVrVufLePtnswNzbNMl/OLcjsNJ6pgghi+bW+T6X8IwXr+ -pWUfjDcLLV1vOXBf9/4s++UY8uJBahW/69zto9qlXhR44v25vwbjxqq3d7XtqNvo -cpGZKh3jI4M1N9sxfcxNhvyzO69XtIQefh8UhvmhAoGBAKzSA51l50ocOnWSNAXs -QQoU+dYQjLDMtzc5N68EUf1GSjtgkpa3PYjVo09OMeb7+W9LhwHQDNMqgeeEDCsm -B6NDnI4VyjVae7Hqz48WBERJBFMFWiLxEa1m2UwaV2jAubN8FKgH4KzDzOKtJEUy -Rz9IUct6HXsDSs+Q3/zdFmPo ------END PRIVATE KEY-----` - gatewayTestCertificateTwo = `-----BEGIN CERTIFICATE----- -MIIC7DCCAdSgAwIBAgIJAMHpuSA3ioNPMA0GCSqGSIb3DQEBCwUAMCYxCzAJBgNV -BAYTAlhYMRcwFQYDVQQDDA5zZWNvbmRjZXJ0LmNvbTAeFw0yMzA3MTExNTE1MjBa -Fw0zMzA3MDgxNTE1MjBaMCYxCzAJBgNVBAYTAlhYMRcwFQYDVQQDDA5zZWNvbmRj -ZXJ0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKI+vYcJtXNt -nUwhbz2t8sutyI9NZaXjwMX0KZgdLQLaBIPVbpvHM7vN0D5x53RqMj5ixD1oEBdG -EqUQeCeEEnqwazPVcFD36U0MeuD0CO6AiIeixxg54JzEx5eGn3u2L6+lWxzb8C8R -/YoYhS46Ny59e5FeRZDZoHhEbKh2SBEXqfxisslvulYiOgI3AMBa1lfjAhUWAarV -7DQT8T0TJK0xhNvmHWW8KldhE30B5IUpRAj/LTGxPf6dn+DLPHcKuDO5JhGCm1u5 -XCbkXZDXqwtH8S0IEiEDyekpqDH/hTso6KUXfUjaWhwfgCrmX1Ul3/qlMDkXgoIB -b8TJtfPoOiMCAwEAAaMdMBswGQYDVR0RBBIwEIIOc2Vjb25kY2VydC5jb20wDQYJ -KoZIhvcNAQELBQADggEBAJvP3deuEpJZktAny6/az09GLSUYddiNCE4sG/2ASj7C -mwRTh2HM4BDnkhW9PNjfHoaWa2TDIhOyHQ5hLYz2tnaeU1sOrADCuFSxGiQqgr8J -prahKh6AzNsXba4rumoO08QTTtJzoa8L6TV4PTQ6gi+OMdbyBe3CQ7DSRzLseHNH -KG5tqRRu+Jm7dUuOXDV4MDHoloyZlksOvIYSC+gaS+ke3XlR+GzOW7hpgn5SIDlv -aR/zlIKXUCvVux3/pNFgW6rduFE0f5Hbc1+J4ghTl8EQu1dwDTax7blXQwE+VDgJ -u4fZGRmoUvvO/bjVCbehBxfJn0rHsxpuD5b4Jg2OZNc= -----END CERTIFICATE-----` ) @@ -457,161 +391,7 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase { }, }, { - name: "api-gateway-with-multiple-inline-certificates", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotAPIGateway(t, "default", nil, func(entry *structs.APIGatewayConfigEntry, bound *structs.BoundAPIGatewayConfigEntry) { - entry.Listeners = []structs.APIGatewayListener{ - { - Name: "listener", - Protocol: structs.ListenerProtocolTCP, - Port: 8080, - TLS: structs.APIGatewayTLSConfiguration{ - Certificates: []structs.ResourceReference{{ - Kind: structs.InlineCertificate, - Name: "certificate", - }}, - MinVersion: types.TLSv1_2, - MaxVersion: types.TLSv1_3, - CipherSuites: []types.TLSCipherSuite{ - types.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - types.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, - }, - }, - }, - } - bound.Listeners = []structs.BoundAPIGatewayListener{ - { - Name: "listener", - Certificates: []structs.ResourceReference{ - { - Kind: structs.InlineCertificate, - Name: "certificate", - }, - { - Kind: structs.InlineCertificate, - Name: "certificate-too", - }, - }, - Routes: []structs.ResourceReference{{ - Kind: structs.TCPRoute, - Name: "route", - }}, - }, - } - }, - []structs.BoundRoute{ - &structs.TCPRouteConfigEntry{ - Kind: structs.TCPRoute, - Name: "route", - Services: []structs.TCPService{{ - Name: "service", - }}, - Parents: []structs.ResourceReference{ - { - Kind: structs.APIGateway, - Name: "api-gateway", - }, - }, - }, - }, []structs.InlineCertificateConfigEntry{ - { - Kind: structs.InlineCertificate, - Name: "certificate", - PrivateKey: gatewayTestPrivateKey, - Certificate: gatewayTestCertificate, - }, - { - Kind: structs.InlineCertificate, - Name: "certificate-too", - PrivateKey: gatewayTestPrivateKeyTwo, - Certificate: gatewayTestCertificateTwo, - }, - }, nil) - }, - }, - { - name: "api-gateway-with-http-route", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotAPIGateway(t, "default", nil, func(entry *structs.APIGatewayConfigEntry, bound *structs.BoundAPIGatewayConfigEntry) { - entry.Listeners = []structs.APIGatewayListener{ - { - Name: "listener", - Protocol: structs.ListenerProtocolHTTP, - Port: 8080, - }, - } - bound.Listeners = []structs.BoundAPIGatewayListener{ - { - Name: "listener", - Certificates: []structs.ResourceReference{{ - Kind: structs.InlineCertificate, - Name: "certificate", - }}, - Routes: []structs.ResourceReference{{ - Kind: structs.HTTPRoute, - Name: "route", - }}, - }, - } - }, []structs.BoundRoute{ - &structs.HTTPRouteConfigEntry{ - Kind: structs.HTTPRoute, - Name: "route", - Rules: []structs.HTTPRouteRule{{ - Filters: structs.HTTPFilters{ - Headers: []structs.HTTPHeaderFilter{ - { - Add: map[string]string{ - "X-Header-Add": "added", - }, - Set: map[string]string{ - "X-Header-Set": "set", - }, - Remove: []string{"X-Header-Remove"}, - }, - }, - RetryFilter: &structs.RetryFilter{ - NumRetries: pointer.Uint32(3), - RetryOn: []string{"cancelled"}, - RetryOnStatusCodes: []uint32{500}, - RetryOnConnectFailure: pointer.Bool(true), - }, - TimeoutFilter: &structs.TimeoutFilter{ - IdleTimeout: time.Second * 30, - RequestTimeout: time.Second * 30, - }, - }, - Services: []structs.HTTPService{{ - Name: "service", - }}, - }}, - Parents: []structs.ResourceReference{ - { - Kind: structs.APIGateway, - Name: "api-gateway", - }, - }, - }, - }, []structs.InlineCertificateConfigEntry{{ - Kind: structs.InlineCertificate, - Name: "certificate", - PrivateKey: gatewayTestPrivateKey, - Certificate: gatewayTestCertificate, - }}, []proxycfg.UpdateEvent{{ - CorrelationID: "discovery-chain:" + serviceUID.String(), - Result: &structs.DiscoveryChainResponse{ - Chain: serviceChain, - }, - }, { - CorrelationID: "upstream-target:" + serviceChain.ID() + ":" + serviceUID.String(), - Result: &structs.IndexedCheckServiceNodes{ - Nodes: proxycfg.TestUpstreamNodes(t, "service"), - }, - }}) - }, - }, - { - name: "api-gateway-with-http-route-timeoutfilter-one-set", + name: "api-gateway-with-http-route-and-inline-certificate", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotAPIGateway(t, "default", nil, func(entry *structs.APIGatewayConfigEntry, bound *structs.BoundAPIGatewayConfigEntry) { entry.Listeners = []structs.APIGatewayListener{ @@ -624,10 +404,6 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase { bound.Listeners = []structs.BoundAPIGatewayListener{ { Name: "listener", - Certificates: []structs.ResourceReference{{ - Kind: structs.InlineCertificate, - Name: "certificate", - }}, Routes: []structs.ResourceReference{{ Kind: structs.HTTPRoute, Name: "route", @@ -651,9 +427,6 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase { Remove: []string{"X-Header-Remove"}, }, }, - TimeoutFilter: &structs.TimeoutFilter{ - IdleTimeout: time.Second * 30, - }, }, Services: []structs.HTTPService{{ Name: "service", @@ -666,12 +439,7 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase { }, }, }, - }, []structs.InlineCertificateConfigEntry{{ - Kind: structs.InlineCertificate, - Name: "certificate", - PrivateKey: gatewayTestPrivateKey, - Certificate: gatewayTestCertificate, - }}, []proxycfg.UpdateEvent{{ + }, nil, []proxycfg.UpdateEvent{{ CorrelationID: "discovery-chain:" + serviceUID.String(), Result: &structs.DiscoveryChainResponse{ Chain: serviceChain, diff --git a/agent/xds/response/response.go b/agent/xds/response.go similarity index 80% rename from agent/xds/response/response.go rename to agent/xds/response.go index 91ce6d7397386..e452e8a2f26e4 100644 --- a/agent/xds/response/response.go +++ b/agent/xds/response.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 -package response +package xds import ( envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" @@ -13,7 +13,7 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) -func CreateResponse(typeURL string, version, nonce string, resources []proto.Message) (*envoy_discovery_v3.DiscoveryResponse, error) { +func createResponse(typeURL string, version, nonce string, resources []proto.Message) (*envoy_discovery_v3.DiscoveryResponse, error) { anys := make([]*anypb.Any, 0, len(resources)) for _, r := range resources { if r == nil { @@ -41,7 +41,7 @@ func CreateResponse(typeURL string, version, nonce string, resources []proto.Mes return resp, nil } -func MakePipeAddress(path string, mode uint32) *envoy_core_v3.Address { +func makePipeAddress(path string, mode uint32) *envoy_core_v3.Address { return &envoy_core_v3.Address{ Address: &envoy_core_v3.Address_Pipe{ Pipe: &envoy_core_v3.Pipe{ @@ -52,7 +52,7 @@ func MakePipeAddress(path string, mode uint32) *envoy_core_v3.Address { } } -func MakeAddress(ip string, port int) *envoy_core_v3.Address { +func makeAddress(ip string, port int) *envoy_core_v3.Address { return &envoy_core_v3.Address{ Address: &envoy_core_v3.Address_SocketAddress{ SocketAddress: &envoy_core_v3.SocketAddress{ @@ -65,15 +65,15 @@ func MakeAddress(ip string, port int) *envoy_core_v3.Address { } } -func MakeUint32Value(n int) *wrapperspb.UInt32Value { +func makeUint32Value(n int) *wrapperspb.UInt32Value { return &wrapperspb.UInt32Value{Value: uint32(n)} } -func MakeBoolValue(n bool) *wrapperspb.BoolValue { +func makeBoolValue(n bool) *wrapperspb.BoolValue { return &wrapperspb.BoolValue{Value: n} } -func MakeEnvoyRegexMatch(patt string) *envoy_matcher_v3.RegexMatcher { +func makeEnvoyRegexMatch(patt string) *envoy_matcher_v3.RegexMatcher { return &envoy_matcher_v3.RegexMatcher{ EngineType: &envoy_matcher_v3.RegexMatcher_GoogleRe2{ GoogleRe2: &envoy_matcher_v3.RegexMatcher_GoogleRE2{}, diff --git a/agent/xds/routes.go b/agent/xds/routes.go index 6f0d18b05dcbd..a86747a9c0806 100644 --- a/agent/xds/routes.go +++ b/agent/xds/routes.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -14,16 +14,14 @@ import ( envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_route_v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" envoy_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/wrapperspb" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/consul/discoverychain" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/config" - "github.com/hashicorp/consul/agent/xds/response" ) // routesFromSnapshot returns the xDS API representation of the "routes" in the @@ -58,13 +56,17 @@ func (s *ResourceGenerator) routesForConnectProxy(cfgSnap *proxycfg.ConfigSnapsh continue } + explicit := cfgSnap.ConnectProxy.UpstreamConfig[uid].HasLocalPortOrSocket() + implicit := cfgSnap.ConnectProxy.IsImplicitUpstream(uid) + if !implicit && !explicit { + // Discovery chain is not associated with a known explicit or implicit upstream so it is skipped. + continue + } + virtualHost, err := s.makeUpstreamRouteForDiscoveryChain(cfgSnap, uid, chain, []string{"*"}, false) if err != nil { return nil, err } - if virtualHost == nil { - continue - } route := &envoy_route_v3.RouteConfiguration{ Name: uid.EnvoyID(), @@ -72,7 +74,7 @@ func (s *ResourceGenerator) routesForConnectProxy(cfgSnap *proxycfg.ConfigSnapsh // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), } resources = append(resources, route) } @@ -142,7 +144,7 @@ func (s *ResourceGenerator) routesForTerminatingGateway(cfgSnap *proxycfg.Config var resources []proto.Message for _, svc := range cfgSnap.TerminatingGateway.ValidServices() { clusterName := connect.ServiceSNI(svc.Name, "", svc.NamespaceOrDefault(), svc.PartitionOrDefault(), cfgSnap.Datacenter, cfgSnap.Roots.TrustDomain) - cfg, err := config.ParseProxyConfig(cfgSnap.TerminatingGateway.ServiceConfigs[svc].ProxyConfig) + cfg, err := ParseProxyConfig(cfgSnap.TerminatingGateway.ServiceConfigs[svc].ProxyConfig) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -170,7 +172,7 @@ func (s *ResourceGenerator) routesForTerminatingGateway(cfgSnap *proxycfg.Config for _, address := range svcConfig.Destination.Addresses { clusterName := clusterNameForDestination(cfgSnap, svc.Name, address, svc.NamespaceOrDefault(), svc.PartitionOrDefault()) - cfg, err := config.ParseProxyConfig(cfgSnap.TerminatingGateway.ServiceConfigs[svc].ProxyConfig) + cfg, err := ParseProxyConfig(cfgSnap.TerminatingGateway.ServiceConfigs[svc].ProxyConfig) if err != nil { // Don't hard fail on a config typo, just warn. The parse func returns // default config if there is an error so it's safe to continue. @@ -247,6 +249,10 @@ func (s *ResourceGenerator) routesForMeshGateway(cfgSnap *proxycfg.ConfigSnapsho continue // ignore; not relevant } + if cfgSnap.MeshGateway.Leaf == nil { + continue // ignore; not ready + } + uid := proxycfg.NewUpstreamIDFromServiceName(svc) virtualHost, err := s.makeUpstreamRouteForDiscoveryChain( @@ -259,9 +265,6 @@ func (s *ResourceGenerator) routesForMeshGateway(cfgSnap *proxycfg.ConfigSnapsho if err != nil { return nil, err } - if virtualHost == nil { - continue - } route := &envoy_route_v3.RouteConfiguration{ Name: uid.EnvoyID(), @@ -269,7 +272,7 @@ func (s *ResourceGenerator) routesForMeshGateway(cfgSnap *proxycfg.ConfigSnapsho // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), } resources = append(resources, route) } @@ -287,7 +290,7 @@ func makeNamedDefaultRouteWithLB(clusterName string, lb *structs.LoadBalancer, t // Configure Envoy to rewrite Host header if autoHostRewrite { action.Route.HostRewriteSpecifier = &envoy_route_v3.RouteAction_AutoHostRewrite{ - AutoHostRewrite: response.MakeBoolValue(true), + AutoHostRewrite: makeBoolValue(true), } } @@ -312,7 +315,7 @@ func makeNamedDefaultRouteWithLB(clusterName string, lb *structs.LoadBalancer, t // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), }, nil } @@ -322,7 +325,7 @@ func makeNamedAddressesRoute(routeName string, addresses map[string]string) (*en // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), } for clusterName, address := range addresses { action := makeRouteActionFromName(clusterName) @@ -364,16 +367,13 @@ func (s *ResourceGenerator) routesForIngressGateway(cfgSnap *proxycfg.ConfigSnap // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), } for _, u := range upstreams { uid := proxycfg.NewUpstreamID(&u) chain := cfgSnap.IngressGateway.DiscoveryChain[uid] if chain == nil { - // Note that if we continue here we must also do this in the cluster generation - s.Logger.Warn("could not find discovery chain for ingress upstream", - "listener", listenerKey, "upstream", uid) continue } @@ -382,9 +382,6 @@ func (s *ResourceGenerator) routesForIngressGateway(cfgSnap *proxycfg.ConfigSnap if err != nil { return nil, err } - if virtualHost == nil { - continue - } // Lookup listener and service config details from ingress gateway // definition. @@ -413,7 +410,7 @@ func (s *ResourceGenerator) routesForIngressGateway(cfgSnap *proxycfg.ConfigSnap } else { svcRoute := &envoy_route_v3.RouteConfiguration{ Name: svcRouteName, - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), VirtualHosts: []*envoy_route_v3.VirtualHost{virtualHost}, } result = append(result, svcRoute) @@ -449,7 +446,7 @@ func (s *ResourceGenerator) routesForAPIGateway(cfgSnap *proxycfg.ConfigSnapshot // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the reasonable value of true to prevent // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), } route, ok := cfgSnap.APIGateway.HTTPRoutes.Get(routeRef) @@ -469,7 +466,6 @@ func (s *ResourceGenerator) routesForAPIGateway(cfgSnap *proxycfg.ConfigSnapshot uid := proxycfg.NewUpstreamID(&upstream) chain := cfgSnap.APIGateway.DiscoveryChain[uid] if chain == nil { - // Note that if we continue here we must also do this in the cluster generation s.Logger.Debug("Discovery chain not found for flattened route", "discovery chain ID", uid) continue } @@ -480,9 +476,6 @@ func (s *ResourceGenerator) routesForAPIGateway(cfgSnap *proxycfg.ConfigSnapshot if err != nil { return nil, err } - if virtualHost == nil { - continue - } defaultRoute.VirtualHosts = append(defaultRoute.VirtualHosts, virtualHost) } @@ -516,7 +509,7 @@ func makeHeadersValueOptions(vals map[string]string, add bool) []*envoy_core_v3. Key: k, Value: v, }, - Append: response.MakeBoolValue(add), + Append: makeBoolValue(add), } opts = append(opts, o) } @@ -753,7 +746,7 @@ func (s *ResourceGenerator) makeUpstreamRouteForDiscoveryChain( func getRetryPolicyForDestination(destination *structs.ServiceRouteDestination) *envoy_route_v3.RetryPolicy { retryPolicy := &envoy_route_v3.RetryPolicy{} if destination.NumRetries > 0 { - retryPolicy.NumRetries = response.MakeUint32Value(int(destination.NumRetries)) + retryPolicy.NumRetries = makeUint32Value(int(destination.NumRetries)) } // The RetryOn magic values come from: https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/http_filters/router_filter#config-http-filters-router-x-envoy-retry-on @@ -806,7 +799,7 @@ func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute) *en } case match.HTTP.PathRegex != "": em.PathSpecifier = &envoy_route_v3.RouteMatch_SafeRegex{ - SafeRegex: response.MakeEnvoyRegexMatch(match.HTTP.PathRegex), + SafeRegex: makeEnvoyRegexMatch(match.HTTP.PathRegex), } default: em.PathSpecifier = &envoy_route_v3.RouteMatch_Prefix{ @@ -828,7 +821,7 @@ func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute) *en } case hdr.Regex != "": eh.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: response.MakeEnvoyRegexMatch(hdr.Regex), + SafeRegexMatch: makeEnvoyRegexMatch(hdr.Regex), } case hdr.Prefix != "": eh.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_PrefixMatch{ @@ -860,7 +853,7 @@ func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute) *en eh := &envoy_route_v3.HeaderMatcher{ Name: ":method", HeaderMatchSpecifier: &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: response.MakeEnvoyRegexMatch(methodHeaderRegex), + SafeRegexMatch: makeEnvoyRegexMatch(methodHeaderRegex), }, } @@ -887,7 +880,7 @@ func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute) *en eq.QueryParameterMatchSpecifier = &envoy_route_v3.QueryParameterMatcher_StringMatch{ StringMatch: &envoy_matcher_v3.StringMatcher{ MatchPattern: &envoy_matcher_v3.StringMatcher_SafeRegex{ - SafeRegex: response.MakeEnvoyRegexMatch(qm.Regex), + SafeRegex: makeEnvoyRegexMatch(qm.Regex), }, }, } @@ -925,7 +918,7 @@ func (s *ResourceGenerator) makeRouteActionForChainCluster( chain *structs.CompiledDiscoveryChain, forMeshGateway bool, ) (*envoy_route_v3.Route_Route, bool) { - clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway) + clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway, false) if clusterName == "" { return nil, false } @@ -958,7 +951,7 @@ func (s *ResourceGenerator) makeRouteActionForSplitter( } targetID := nextNode.Resolver.Target - clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway) + clusterName := s.getTargetClusterName(upstreamsSnapshot, chain, targetID, forMeshGateway, false) if clusterName == "" { continue } @@ -968,7 +961,7 @@ func (s *ResourceGenerator) makeRouteActionForSplitter( weight := int(split.Weight * 100) totalWeight += weight cw := &envoy_route_v3.WeightedCluster_ClusterWeight{ - Weight: response.MakeUint32Value(weight), + Weight: makeUint32Value(weight), Name: clusterName, } if err := injectHeaderManipToWeightedCluster(split.Definition, cw); err != nil { @@ -982,18 +975,19 @@ func (s *ResourceGenerator) makeRouteActionForSplitter( return nil, fmt.Errorf("number of clusters in splitter must be > 0; got %d", len(clusters)) } - var envoyWeightScale *wrapperspb.UInt32Value - if totalWeight == 10000 { - envoyWeightScale = response.MakeUint32Value(10000) + envoyWeightScale := 10000 + if envoyWeightScale < totalWeight { + clusters[0].Weight.Value += uint32(totalWeight - envoyWeightScale) + } else { + clusters[0].Weight.Value += uint32(envoyWeightScale - totalWeight) } return &envoy_route_v3.Route_Route{ Route: &envoy_route_v3.RouteAction{ ClusterSpecifier: &envoy_route_v3.RouteAction_WeightedClusters{ WeightedClusters: &envoy_route_v3.WeightedCluster{ - Clusters: clusters, - // this field is deprecated, and we should get the desired behavior with the front-end validation - TotalWeight: envoyWeightScale, // scaled up 100% + Clusters: clusters, + TotalWeight: makeUint32Value(envoyWeightScale), // scaled up 100% }, }, }, diff --git a/agent/xds/routes_test.go b/agent/xds/routes_test.go index e2f7d73b5e7ca..eaa8d48c0fc3b 100644 --- a/agent/xds/routes_test.go +++ b/agent/xds/routes_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -10,16 +10,14 @@ import ( "time" envoy_route_v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" + "github.com/hashicorp/consul/agent/xds/testcommon" + testinf "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/durationpb" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/agent/xds/proxystateconverter" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/agent/xds/testcommon" - "github.com/hashicorp/consul/agent/xdsv2" "github.com/hashicorp/consul/envoyextensions/xdscommon" "github.com/hashicorp/consul/sdk/testutil" ) @@ -28,7 +26,6 @@ type routeTestCase struct { name string create func(t testinf.T) *proxycfg.ConfigSnapshot overrideGoldenName string - alsoRunTestForV2 bool } func makeRouteDiscoChainTests(enterprise bool) []routeTestCase { @@ -38,77 +35,48 @@ func makeRouteDiscoChainTests(enterprise bool) []routeTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-external-sni", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "external-sni", enterprise, nil, nil) }, - alsoRunTestForV2: true, - }, - { - name: "connect-proxy-splitter-overweight", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotDiscoveryChain(t, "splitter-overweight", enterprise, nil, nil) - }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-overrides", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "simple-with-overrides", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "splitter-with-resolver-redirect", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "splitter-with-resolver-redirect-multidc", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-splitter", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "chain-and-splitter", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-grpc-router", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "grpc-router", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-with-chain-and-router", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "chain-and-router", enterprise, nil, nil) }, - alsoRunTestForV2: true, }, { name: "connect-proxy-lb-in-resolver", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotDiscoveryChain(t, "lb-resolver", enterprise, nil, nil) }, - alsoRunTestForV2: true, - }, - { - name: "connect-proxy-route-to-lb-resolver", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotDiscoveryChain(t, "redirect-to-lb-node", enterprise, nil, nil) - }, - alsoRunTestForV2: true, - }, - { - name: "connect-proxy-resolver-with-lb", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotDiscoveryChain(t, "resolver-with-lb", enterprise, nil, nil) - }, - alsoRunTestForV2: true, }, } } @@ -129,8 +97,6 @@ func TestRoutesFromSnapshot(t *testing.T) { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGateway_NilConfigEntry(t) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-defaults-no-chain", @@ -138,8 +104,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, false, "tcp", "default", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain", @@ -147,8 +111,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "simple", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-external-sni", @@ -156,8 +118,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "tcp", "external-sni", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-splitter-with-resolver-redirect", @@ -165,8 +125,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "splitter-with-resolver-redirect-multidc", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-splitter", @@ -174,8 +132,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "chain-and-splitter", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-grpc-router", @@ -183,8 +139,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "grpc-router", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-router", @@ -192,8 +146,6 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "chain-and-router", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-lb-in-resolver", @@ -201,66 +153,48 @@ func TestRoutesFromSnapshot(t *testing.T) { return proxycfg.TestConfigSnapshotIngressGateway(t, true, "http", "lb-resolver", nil, nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-http-multiple-services", create: proxycfg.TestConfigSnapshotIngress_HTTPMultipleServices, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-grpc-multiple-services", create: proxycfg.TestConfigSnapshotIngress_GRPCMultipleServices, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-chain-and-router-header-manip", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGatewayWithChain(t, "router-header-manip", nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-sds-listener-level", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGatewayWithChain(t, "sds-listener-level", nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-sds-listener-level-wildcard", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGatewayWithChain(t, "sds-listener-level-wildcard", nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-sds-service-level", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGatewayWithChain(t, "sds-service-level", nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "ingress-with-sds-service-level-mixed-tls", create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotIngressGatewayWithChain(t, "sds-service-level-mixed-tls", nil, nil) }, - // TODO(proxystate): ingress gateway will come at a later time - alsoRunTestForV2: false, }, { name: "terminating-gateway-lb-config", create: proxycfg.TestConfigSnapshotTerminatingGatewayLBConfig, - // TODO(proxystate): terminating gateway will come at a later time - alsoRunTestForV2: false, }, } @@ -290,10 +224,10 @@ func TestRoutesFromSnapshot(t *testing.T) { sort.Slice(routes, func(i, j int) bool { return routes[i].(*envoy_route_v3.RouteConfiguration).Name < routes[j].(*envoy_route_v3.RouteConfiguration).Name }) - r, err := response.CreateResponse(xdscommon.RouteType, "00000001", "00000001", routes) + r, err := createResponse(xdscommon.RouteType, "00000001", "00000001", routes) require.NoError(t, err) - t.Run("current-xdsv1", func(t *testing.T) { + t.Run("current", func(t *testing.T) { gotJSON := protoToJSON(t, r) gName := tt.name @@ -303,39 +237,6 @@ func TestRoutesFromSnapshot(t *testing.T) { require.JSONEq(t, goldenEnvoy(t, filepath.Join("routes", gName), envoyVersion, latestEnvoyVersion, gotJSON), gotJSON) }) - - if tt.alsoRunTestForV2 { - generator := xdsv2.NewResourceGenerator(testutil.Logger(t)) - - converter := proxystateconverter.NewConverter(testutil.Logger(t), &mockCfgFetcher{addressLan: "10.10.10.10"}) - proxyState, err := converter.ProxyStateFromSnapshot(snap) - require.NoError(t, err) - - res, err := generator.AllResourcesFromIR(proxyState) - require.NoError(t, err) - - routes = res[xdscommon.RouteType] - // The order of routes returned via RDS isn't relevant, so it's safe - // to sort these for the purposes of test comparisons. - sort.Slice(routes, func(i, j int) bool { - return routes[i].(*envoy_route_v3.Route).Name < routes[j].(*envoy_route_v3.Route).Name - }) - - r, err := response.CreateResponse(xdscommon.RouteType, "00000001", "00000001", routes) - require.NoError(t, err) - - t.Run("current-xdsv2", func(t *testing.T) { - gotJSON := protoToJSON(t, r) - - gName := tt.name - if tt.overrideGoldenName != "" { - gName = tt.overrideGoldenName - } - - expectedJSON := goldenEnvoy(t, filepath.Join("routes", gName), envoyVersion, latestEnvoyVersion, gotJSON) - require.JSONEq(t, expectedJSON, gotJSON) - }) - } }) } }) @@ -542,11 +443,6 @@ func TestEnvoyLBConfig_InjectToRouteAction(t *testing.T) { FieldValue: "special-header", Terminal: true, }, - { - Field: structs.HashPolicyQueryParam, - FieldValue: "my-pretty-param", - Terminal: true, - }, }, }, expected: &envoy_route_v3.RouteAction{ @@ -585,14 +481,6 @@ func TestEnvoyLBConfig_InjectToRouteAction(t *testing.T) { }, Terminal: true, }, - { - PolicySpecifier: &envoy_route_v3.RouteAction_HashPolicy_QueryParameter_{ - QueryParameter: &envoy_route_v3.RouteAction_HashPolicy_QueryParameter{ - Name: "my-pretty-param", - }, - }, - Terminal: true, - }, }, }, }, diff --git a/agent/xds/secrets.go b/agent/xds/secrets.go index 628cec7905ba1..d150a12dc1611 100644 --- a/agent/xds/secrets.go +++ b/agent/xds/secrets.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/server.go b/agent/xds/server.go index c8ffeef842dd6..2e012a4cb6fd5 100644 --- a/agent/xds/server.go +++ b/agent/xds/server.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds @@ -10,7 +10,6 @@ import ( "time" envoy_discovery_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - "github.com/hashicorp/consul/agent/xds/configfetcher" "github.com/hashicorp/consul/envoyextensions/xdscommon" @@ -71,6 +70,13 @@ const ( // services named "local_agent" in the future. LocalAgentClusterName = "local_agent" + // OriginalDestinationClusterName is the name we give to the passthrough + // cluster which redirects transparently-proxied requests to their original + // destination outside the mesh. This cluster prevents Consul from blocking + // connections to destinations outside of the catalog when in transparent + // proxy mode. + OriginalDestinationClusterName = "original-destination" + // DefaultAuthCheckFrequency is the default value for // Server.AuthCheckFrequency to use when the zero value is provided. DefaultAuthCheckFrequency = 5 * time.Minute @@ -82,6 +88,12 @@ const ( // coupling this to the agent. type ACLResolverFunc func(id string) (acl.Authorizer, error) +// ConfigFetcher is the interface the agent needs to expose +// for the xDS server to fetch agent config, currently only one field is fetched +type ConfigFetcher interface { + AdvertiseAddrLAN() string +} + // ProxyConfigSource is the interface xds.Server requires to consume proxy // config updates. type ProxyConfigSource interface { @@ -98,7 +110,7 @@ type Server struct { Logger hclog.Logger CfgSrc ProxyConfigSource ResolveToken ACLResolverFunc - CfgFetcher configfetcher.ConfigFetcher + CfgFetcher ConfigFetcher // AuthCheckFrequency is how often we should re-check the credentials used // during a long-lived gRPC Stream after it has been initially established. @@ -149,7 +161,7 @@ func NewServer( logger hclog.Logger, cfgMgr ProxyConfigSource, resolveTokenSecret ACLResolverFunc, - cfgFetcher configfetcher.ConfigFetcher, + cfgFetcher ConfigFetcher, ) *Server { return &Server{ NodeName: nodeName, diff --git a/agent/xds/server_ce.go b/agent/xds/server_ce.go index a01e9bf493f71..c1d651c0ad59a 100644 --- a/agent/xds/server_ce.go +++ b/agent/xds/server_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/agent/xds/testcommon/testcommon.go b/agent/xds/testcommon/testcommon.go index 44d2cc3bbe6da..1b0d6ebcbf507 100644 --- a/agent/xds/testcommon/testcommon.go +++ b/agent/xds/testcommon/testcommon.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testcommon diff --git a/agent/xds/testdata/clusters/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/clusters/api-gateway-with-http-route-and-inline-certificate.latest.golden similarity index 100% rename from agent/xds/testdata/clusters/api-gateway-with-http-route.latest.golden rename to agent/xds/testdata/clusters/api-gateway-with-http-route-and-inline-certificate.latest.golden diff --git a/agent/xds/testdata/clusters/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/clusters/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden deleted file mode 100644 index f18e7e0d97665..0000000000000 --- a/agent/xds/testdata/clusters/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ /dev/null @@ -1,55 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/service" - } - ] - } - }, - "sni": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/api-gateway-with-multiple-inline-certificates.latest.golden b/agent/xds/testdata/clusters/api-gateway-with-multiple-inline-certificates.latest.golden deleted file mode 100644 index e20479dfd1cfc..0000000000000 --- a/agent/xds/testdata/clusters/api-gateway-with-multiple-inline-certificates.latest.golden +++ /dev/null @@ -1,55 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/service" - } - ] - } - }, - "sni": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/connect-proxy-with-chain-and-overrides.latest.golden b/agent/xds/testdata/clusters/connect-proxy-with-chain-and-overrides.latest.golden index a6334a035a797..fd63324de86c4 100644 --- a/agent/xds/testdata/clusters/connect-proxy-with-chain-and-overrides.latest.golden +++ b/agent/xds/testdata/clusters/connect-proxy-with-chain-and-overrides.latest.golden @@ -8,30 +8,42 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "66s", - "circuitBreakers": {}, + "circuitBreakers": { + + }, "typedExtensionProtocolOptions": { "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", "explicitHttpConfig": { - "http2ProtocolOptions": {} + "http2ProtocolOptions": { + + } } } }, - "outlierDetection": {}, + "outlierDetection": { + + }, "commonLbConfig": { - "healthyPanicThreshold": {} + "healthyPanicThreshold": { + + } }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { @@ -63,19 +75,27 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, + "circuitBreakers": { + + }, + "outlierDetection": { + + }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { diff --git a/agent/xds/testdata/clusters/connect-proxy-with-chain-http2.latest.golden b/agent/xds/testdata/clusters/connect-proxy-with-chain-http2.latest.golden deleted file mode 100644 index 4e3181dcffc9a..0000000000000 --- a/agent/xds/testdata/clusters/connect-proxy-with-chain-http2.latest.golden +++ /dev/null @@ -1,135 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "33s", - "circuitBreakers": {}, - "typedExtensionProtocolOptions": { - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { - "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", - "explicitHttpConfig": { - "http2ProtocolOptions": {} - } - } - }, - "outlierDetection": {}, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" - } - ] - } - }, - "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/geo-cache-target" - }, - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc2/svc/geo-cache-target" - } - ] - } - }, - "sni": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden b/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden deleted file mode 100644 index 23c82215d715d..0000000000000 --- a/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden +++ /dev/null @@ -1,135 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "payments?peer=cloud:custom-upstream", - "connectTimeout": "15s", - "loadAssignment": { - "clusterName": "payments?peer=cloud:custom-upstream", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - } - } - } - ] - } - ] - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICczCCAdwCCQC3BLnEmLCrSjANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQVoxEjAQBgNVBAcMCUZsYWdzdGFmZjEMMAoGA1UECgwDRm9v\nMRAwDgYDVQQLDAdleGFtcGxlMQ8wDQYDVQQDDAZwZWVyLWExHTAbBgkqhkiG9w0B\nCQEWDmZvb0BwZWVyLWEuY29tMB4XDTIyMDUyNjAxMDQ0NFoXDTIzMDUyNjAxMDQ0\nNFowfjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMRIwEAYDVQQHDAlGbGFnc3Rh\nZmYxDDAKBgNVBAoMA0ZvbzEQMA4GA1UECwwHZXhhbXBsZTEPMA0GA1UEAwwGcGVl\nci1hMR0wGwYJKoZIhvcNAQkBFg5mb29AcGVlci1hLmNvbTCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA2zFYGTbXDAntT5pLTpZ2+VTiqx4J63VRJH1kdu11f0FV\nc2jl1pqCuYDbQXknDU0Pv1Q5y0+nSAihD2KqGS571r+vHQiPtKYPYRqPEe9FzAhR\n2KhWH6v/tk5DG1HqOjV9/zWRKB12gdFNZZqnw/e7NjLNq3wZ2UAwxXip5uJ8uwMC\nAwEAATANBgkqhkiG9w0BAQsFAAOBgQC/CJ9Syf4aL91wZizKTejwouRYoWv4gRAk\nyto45ZcNMHfJ0G2z+XAMl9ZbQsLgXmzAx4IM6y5Jckq8pKC4PEijCjlKTktLHlEy\n0ggmFxtNB1tid2NC8dOzcQ3l45+gDjDqdILhAvLDjlAIebdkqVqb2CfFNW/I2CQH\nZAuKN1aoKA==\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://1c053652-8512-4373-90cf-5a7f6263a994.consul/ns/default/dc/cloud-dc/svc/payments" - } - ] - } - }, - "sni": "payments.default.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": { - "maxEjectionPercent": 100 - }, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICczCCAdwCCQC3BLnEmLCrSjANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQVoxEjAQBgNVBAcMCUZsYWdzdGFmZjEMMAoGA1UECgwDRm9v\nMRAwDgYDVQQLDAdleGFtcGxlMQ8wDQYDVQQDDAZwZWVyLWExHTAbBgkqhkiG9w0B\nCQEWDmZvb0BwZWVyLWEuY29tMB4XDTIyMDUyNjAxMDQ0NFoXDTIzMDUyNjAxMDQ0\nNFowfjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMRIwEAYDVQQHDAlGbGFnc3Rh\nZmYxDDAKBgNVBAoMA0ZvbzEQMA4GA1UECwwHZXhhbXBsZTEPMA0GA1UEAwwGcGVl\nci1hMR0wGwYJKoZIhvcNAQkBFg5mb29AcGVlci1hLmNvbTCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA2zFYGTbXDAntT5pLTpZ2+VTiqx4J63VRJH1kdu11f0FV\nc2jl1pqCuYDbQXknDU0Pv1Q5y0+nSAihD2KqGS571r+vHQiPtKYPYRqPEe9FzAhR\n2KhWH6v/tk5DG1HqOjV9/zWRKB12gdFNZZqnw/e7NjLNq3wZ2UAwxXip5uJ8uwMC\nAwEAATANBgkqhkiG9w0BAQsFAAOBgQC/CJ9Syf4aL91wZizKTejwouRYoWv4gRAk\nyto45ZcNMHfJ0G2z+XAMl9ZbQsLgXmzAx4IM6y5Jckq8pKC4PEijCjlKTktLHlEy\n0ggmFxtNB1tid2NC8dOzcQ3l45+gDjDqdILhAvLDjlAIebdkqVqb2CfFNW/I2CQH\nZAuKN1aoKA==\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://1c053652-8512-4373-90cf-5a7f6263a994.consul/ns/default/dc/cloud-dc/svc/refunds" - } - ] - } - }, - "sni": "refunds.default.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-http2.latest.golden b/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-http2.latest.golden deleted file mode 100644 index 8f3b49b0a2e74..0000000000000 --- a/agent/xds/testdata/clusters/connect-proxy-with-peered-upstreams-http2.latest.golden +++ /dev/null @@ -1,163 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "payments.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "type": "LOGICAL_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "payments.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "123.us-east-1.elb.notaws.com", - "portValue": 8443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - "circuitBreakers": {}, - "typedExtensionProtocolOptions": { - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { - "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", - "explicitHttpConfig": { - "http2ProtocolOptions": {} - } - } - }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": { - "maxEjectionPercent": 100 - }, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICczCCAdwCCQC3BLnEmLCrSjANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQVoxEjAQBgNVBAcMCUZsYWdzdGFmZjEMMAoGA1UECgwDRm9v\nMRAwDgYDVQQLDAdleGFtcGxlMQ8wDQYDVQQDDAZwZWVyLWExHTAbBgkqhkiG9w0B\nCQEWDmZvb0BwZWVyLWEuY29tMB4XDTIyMDUyNjAxMDQ0NFoXDTIzMDUyNjAxMDQ0\nNFowfjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMRIwEAYDVQQHDAlGbGFnc3Rh\nZmYxDDAKBgNVBAoMA0ZvbzEQMA4GA1UECwwHZXhhbXBsZTEPMA0GA1UEAwwGcGVl\nci1hMR0wGwYJKoZIhvcNAQkBFg5mb29AcGVlci1hLmNvbTCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA2zFYGTbXDAntT5pLTpZ2+VTiqx4J63VRJH1kdu11f0FV\nc2jl1pqCuYDbQXknDU0Pv1Q5y0+nSAihD2KqGS571r+vHQiPtKYPYRqPEe9FzAhR\n2KhWH6v/tk5DG1HqOjV9/zWRKB12gdFNZZqnw/e7NjLNq3wZ2UAwxXip5uJ8uwMC\nAwEAATANBgkqhkiG9w0BAQsFAAOBgQC/CJ9Syf4aL91wZizKTejwouRYoWv4gRAk\nyto45ZcNMHfJ0G2z+XAMl9ZbQsLgXmzAx4IM6y5Jckq8pKC4PEijCjlKTktLHlEy\n0ggmFxtNB1tid2NC8dOzcQ3l45+gDjDqdILhAvLDjlAIebdkqVqb2CfFNW/I2CQH\nZAuKN1aoKA==\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://1c053652-8512-4373-90cf-5a7f6263a994.consul/ns/default/dc/cloud-dc/svc/payments" - } - ] - } - }, - "sni": "payments.default.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "typedExtensionProtocolOptions": { - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { - "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", - "explicitHttpConfig": { - "http2ProtocolOptions": {} - } - } - }, - "outlierDetection": { - "maxEjectionPercent": 100 - }, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICczCCAdwCCQC3BLnEmLCrSjANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQVoxEjAQBgNVBAcMCUZsYWdzdGFmZjEMMAoGA1UECgwDRm9v\nMRAwDgYDVQQLDAdleGFtcGxlMQ8wDQYDVQQDDAZwZWVyLWExHTAbBgkqhkiG9w0B\nCQEWDmZvb0BwZWVyLWEuY29tMB4XDTIyMDUyNjAxMDQ0NFoXDTIzMDUyNjAxMDQ0\nNFowfjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMRIwEAYDVQQHDAlGbGFnc3Rh\nZmYxDDAKBgNVBAoMA0ZvbzEQMA4GA1UECwwHZXhhbXBsZTEPMA0GA1UEAwwGcGVl\nci1hMR0wGwYJKoZIhvcNAQkBFg5mb29AcGVlci1hLmNvbTCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA2zFYGTbXDAntT5pLTpZ2+VTiqx4J63VRJH1kdu11f0FV\nc2jl1pqCuYDbQXknDU0Pv1Q5y0+nSAihD2KqGS571r+vHQiPtKYPYRqPEe9FzAhR\n2KhWH6v/tk5DG1HqOjV9/zWRKB12gdFNZZqnw/e7NjLNq3wZ2UAwxXip5uJ8uwMC\nAwEAATANBgkqhkiG9w0BAQsFAAOBgQC/CJ9Syf4aL91wZizKTejwouRYoWv4gRAk\nyto45ZcNMHfJ0G2z+XAMl9ZbQsLgXmzAx4IM6y5Jckq8pKC4PEijCjlKTktLHlEy\n0ggmFxtNB1tid2NC8dOzcQ3l45+gDjDqdILhAvLDjlAIebdkqVqb2CfFNW/I2CQH\nZAuKN1aoKA==\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://1c053652-8512-4373-90cf-5a7f6263a994.consul/ns/default/dc/cloud-dc/svc/refunds" - } - ] - } - }, - "sni": "refunds.default.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/custom-passive-healthcheck-zero-consecutive_5xx.latest.golden b/agent/xds/testdata/clusters/custom-passive-healthcheck-zero-consecutive_5xx.latest.golden deleted file mode 100644 index 4cc45b94c841a..0000000000000 --- a/agent/xds/testdata/clusters/custom-passive-healthcheck-zero-consecutive_5xx.latest.golden +++ /dev/null @@ -1,133 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": { - "consecutive5xx": 5, - "interval": "10s", - "baseEjectionTime": "10s", - "maxEjectionPercent": 100, - "enforcingConsecutive5xx": 0 - }, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" - } - ] - } - }, - "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/geo-cache-target" - }, - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc2/svc/geo-cache-target" - } - ] - } - }, - "sni": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/custom-upstream-with-prepared-query.latest.golden b/agent/xds/testdata/clusters/custom-upstream-with-prepared-query.latest.golden deleted file mode 100644 index b57d44e8ab56c..0000000000000 --- a/agent/xds/testdata/clusters/custom-upstream-with-prepared-query.latest.golden +++ /dev/null @@ -1,136 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db:custom-upstream", - "connectTimeout": "15s", - "loadAssignment": { - "clusterName": "db:custom-upstream", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - } - } - } - ] - } - ] - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "sni": "db.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "typedExtensionProtocolOptions": { - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { - "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", - "explicitHttpConfig": { - "http2ProtocolOptions": {} - } - } - }, - "outlierDetection": {}, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/geo-cache-target" - }, - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc2/svc/geo-cache-target" - } - ] - } - }, - "sni": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/enterprise-connect-proxy-with-chain-http2.latest.golden b/agent/xds/testdata/clusters/enterprise-connect-proxy-with-chain-http2.latest.golden deleted file mode 100644 index 322c36c0b0fbe..0000000000000 --- a/agent/xds/testdata/clusters/enterprise-connect-proxy-with-chain-http2.latest.golden +++ /dev/null @@ -1,135 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.foo.bar.dc1.internal-v1.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "db.foo.bar.dc1.internal-v1.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "33s", - "circuitBreakers": {}, - "typedExtensionProtocolOptions": { - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { - "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", - "explicitHttpConfig": { - "http2ProtocolOptions": {} - } - } - }, - "outlierDetection": {}, - "commonLbConfig": { - "healthyPanicThreshold": {} - }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ap/bar/ns/foo/dc/dc1/svc/db" - } - ] - } - }, - "sni": "db.foo.bar.dc1.internal-v1.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - }, - "matchSubjectAltNames": [ - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/geo-cache-target" - }, - { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc2/svc/geo-cache-target" - } - ] - } - }, - "sni": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/expose-checks.latest.golden b/agent/xds/testdata/clusters/expose-checks.latest.golden deleted file mode 100644 index 4079d6267ed35..0000000000000 --- a/agent/xds/testdata/clusters/expose-checks.latest.golden +++ /dev/null @@ -1,57 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "exposed_cluster_8181", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "exposed_cluster_8181", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8181 - } - } - } - } - ] - } - ] - } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "local_app", - "type": "STATIC", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "local_app", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8080 - } - } - } - } - ] - } - ] - } - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/ingress-with-defaults-passive-health-check.latest.golden b/agent/xds/testdata/clusters/ingress-with-defaults-passive-health-check.latest.golden index 71ec2c92ac2ef..fbbcc9856c65f 100644 --- a/agent/xds/testdata/clusters/ingress-with-defaults-passive-health-check.latest.golden +++ b/agent/xds/testdata/clusters/ingress-with-defaults-passive-health-check.latest.golden @@ -8,7 +8,9 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, @@ -25,18 +27,21 @@ "outlierDetection": { "consecutive5xx": 10, "interval": "5s", - "maxEjectionPercent": 90, "enforcingConsecutive5xx": 80 }, "commonLbConfig": { - "healthyPanicThreshold": {} + "healthyPanicThreshold": { + + } }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { diff --git a/agent/xds/testdata/clusters/ingress-with-overwrite-defaults-passive-health-check.latest.golden b/agent/xds/testdata/clusters/ingress-with-overwrite-defaults-passive-health-check.latest.golden index af2488846500e..6c9e0802a3dcc 100644 --- a/agent/xds/testdata/clusters/ingress-with-overwrite-defaults-passive-health-check.latest.golden +++ b/agent/xds/testdata/clusters/ingress-with-overwrite-defaults-passive-health-check.latest.golden @@ -1,67 +1,71 @@ { - "versionInfo": "00000001", - "resources": [ + "versionInfo": "00000001", + "resources": [ { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + }, + "resourceApiVersion": "V3" } }, - "connectTimeout": "33s", - "circuitBreakers": { - "thresholds": [ + "connectTimeout": "33s", + "circuitBreakers": { + "thresholds": [ { - "maxConnections": 4096, - "maxPendingRequests": 2048 + "maxConnections": 4096, + "maxPendingRequests": 2048 } ] }, - "outlierDetection": { - "interval": "8s", - "baseEjectionTime": "12s", - "maxEjectionPercent": 90, - "enforcingConsecutive5xx": 50 + "outlierDetection": { + "interval": "8s", + "enforcingConsecutive5xx": 50 }, - "commonLbConfig": { - "healthyPanicThreshold": {} + "commonLbConfig": { + "healthyPanicThreshold": { + + } }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ + "transportSocket": { + "name": "tls", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" + "certificateChain": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" + "privateKey": { + "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" } } ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" + "validationContext": { + "trustedCa": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" }, - "matchSubjectAltNames": [ + "matchSubjectAltNames": [ { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" + "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" } ] } }, - "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" + "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } } ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "nonce": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/clusters/ingress-with-service-passive-health-check.latest.golden b/agent/xds/testdata/clusters/ingress-with-service-passive-health-check.latest.golden index 2122e1f3a75e2..892846151b9a3 100644 --- a/agent/xds/testdata/clusters/ingress-with-service-passive-health-check.latest.golden +++ b/agent/xds/testdata/clusters/ingress-with-service-passive-health-check.latest.golden @@ -1,65 +1,70 @@ { - "versionInfo": "00000001", - "resources": [ + "versionInfo": "00000001", + "resources": [ { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "altStatName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + }, + "resourceApiVersion": "V3" } }, - "connectTimeout": "33s", - "circuitBreakers": { - "thresholds": [ + "connectTimeout": "33s", + "circuitBreakers": { + "thresholds": [ { - "maxConnections": 4096 + "maxConnections": 4096 } ] }, - "outlierDetection": { - "consecutive5xx": 10, - "interval": "5s", - "maxEjectionPercent": 90 + "outlierDetection": { + "consecutive5xx": 10, + "interval": "5s" }, - "commonLbConfig": { - "healthyPanicThreshold": {} + "commonLbConfig": { + "healthyPanicThreshold": { + + } }, - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ + "transportSocket": { + "name": "tls", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" + "certificateChain": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" + "privateKey": { + "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" } } ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" + "validationContext": { + "trustedCa": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" }, - "matchSubjectAltNames": [ + "matchSubjectAltNames": [ { - "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" + "exact": "spiffe://11111111-2222-3333-4444-555555555555.consul/ns/default/dc/dc1/svc/db" } ] } }, - "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" + "sni": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } } ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "nonce": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/clusters/mesh-gateway-using-federation-control-plane.latest.golden b/agent/xds/testdata/clusters/mesh-gateway-using-federation-control-plane.latest.golden deleted file mode 100644 index 9b177efb46521..0000000000000 --- a/agent/xds/testdata/clusters/mesh-gateway-using-federation-control-plane.latest.golden +++ /dev/null @@ -1,205 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "LOGICAL_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "123.us-west-2.elb.notaws.com", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "LOGICAL_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "123.us-east-1.elb.notaws.com", - "portValue": 443 - } - } - }, - "healthStatus": "UNHEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "foo.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "node1.server.dc1.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "node2.server.dc1.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "server.dc2.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "server.dc4.consul", - "type": "LOGICAL_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "server.dc4.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "123.us-west-2.elb.notaws.com", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "server.dc6.consul", - "type": "LOGICAL_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "server.dc6.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "123.us-east-1.elb.notaws.com", - "portValue": 443 - } - } - }, - "healthStatus": "UNHEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": {} - } - ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden b/agent/xds/testdata/clusters/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden index 36b196675ca19..8c85bbc827ad1 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden @@ -7,25 +7,16 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "5s", - "outlierDetection": {} + "outlierDetection": { + + } }, { "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", @@ -33,12 +24,16 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "5s", - "outlierDetection": {} + "outlierDetection": { + + } }, { "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", @@ -47,22 +42,32 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, + "circuitBreakers": { + + }, + "outlierDetection": { + + }, "commonLbConfig": { - "healthyPanicThreshold": {} + "healthyPanicThreshold": { + + } }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { @@ -95,22 +100,32 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "33s", - "circuitBreakers": {}, - "outlierDetection": {}, + "circuitBreakers": { + + }, + "outlierDetection": { + + }, "commonLbConfig": { - "healthyPanicThreshold": {} + "healthyPanicThreshold": { + + } }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { @@ -143,22 +158,32 @@ "type": "EDS", "edsClusterConfig": { "edsConfig": { - "ads": {}, + "ads": { + + }, "resourceApiVersion": "V3" } }, "connectTimeout": "5s", - "circuitBreakers": {}, - "outlierDetection": {}, + "circuitBreakers": { + + }, + "outlierDetection": { + + }, "commonLbConfig": { - "healthyPanicThreshold": {} + "healthyPanicThreshold": { + + } }, "transportSocket": { "name": "tls", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "commonTlsContext": { - "tlsParams": {}, + "tlsParams": { + + }, "tlsCertificates": [ { "certificateChain": { @@ -183,34 +208,8 @@ "sni": "v2.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "v1.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} - }, - { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "v2.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" - } - }, - "connectTimeout": "5s", - "outlierDetection": {} } ], "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", "nonce": "00000001" -} +} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden b/agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden index f69ce54c6cb37..88f75c8868909 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden @@ -1,50 +1,56 @@ { - "versionInfo": "00000001", - "resources": [ + "versionInfo": "00000001", + "resources": [ { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "type": "STRICT_DNS", - "connectTimeout": "5s", - "loadAssignment": { - "clusterName": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "endpoints": [ + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "name": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", + "endpoints": [ { - "lbEndpoints": [ + "lbEndpoints": [ { - "endpoint": { - "address": { - "socketAddress": { - "address": "alt.us-east-1.elb.notaws.com", - "portValue": 8443 + "endpoint": { + "address": { + "socketAddress": { + "address": "alt.us-east-1.elb.notaws.com", + "portValue": 8443 } } }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 } ] } ] }, - "dnsRefreshRate": "10s", - "dnsLookupFamily": "V4_ONLY", - "outlierDetection": {} + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } }, { - "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "name": "db.default.default.peer-a.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "type": "EDS", - "edsClusterConfig": { - "edsConfig": { - "ads": {}, - "resourceApiVersion": "V3" + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "name": "db.default.default.peer-a.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + }, + "resourceApiVersion": "V3" } }, - "connectTimeout": "5s", - "outlierDetection": {} + "connectTimeout": "5s", + "outlierDetection": { + + } } ], - "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", - "nonce": "00000001" + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "nonce": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/endpoints/api-gateway-with-http-route-and-inline-certificate.latest.golden similarity index 100% rename from agent/xds/testdata/endpoints/api-gateway-with-http-route.latest.golden rename to agent/xds/testdata/endpoints/api-gateway-with-http-route-and-inline-certificate.latest.golden diff --git a/agent/xds/testdata/endpoints/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/endpoints/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden deleted file mode 100644 index bda159302a84d..0000000000000 --- a/agent/xds/testdata/endpoints/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ /dev/null @@ -1,41 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.1", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.2", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - } - ], - "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/api-gateway-with-multiple-inline-certificates.latest.golden b/agent/xds/testdata/endpoints/api-gateway-with-multiple-inline-certificates.latest.golden deleted file mode 100644 index 47b46bca225bf..0000000000000 --- a/agent/xds/testdata/endpoints/api-gateway-with-multiple-inline-certificates.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden b/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden deleted file mode 100644 index 9dc909faf7c06..0000000000000 --- a/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden +++ /dev/null @@ -1,29 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "106.96.90.233", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - } - ], - "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-http2.latest.golden b/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-http2.latest.golden deleted file mode 100644 index edcc68b8acda1..0000000000000 --- a/agent/xds/testdata/endpoints/connect-proxy-with-peered-upstreams-http2.latest.golden +++ /dev/null @@ -1,29 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "106.96.90.233", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - } - ], - "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/mesh-gateway-using-federation-control-plane.latest.golden b/agent/xds/testdata/endpoints/mesh-gateway-using-federation-control-plane.latest.golden deleted file mode 100644 index 231f4b9b2c99a..0000000000000 --- a/agent/xds/testdata/endpoints/mesh-gateway-using-federation-control-plane.latest.golden +++ /dev/null @@ -1,249 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.6", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.7", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.8", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "198.18.1.1", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "198.18.1.2", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "foo.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.3", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.4", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.5", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "172.16.1.9", - "portValue": 2222 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "node1.server.dc1.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 0 - } - } - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "node2.server.dc1.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.2", - "portValue": 0 - } - } - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "server.dc1.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 0 - } - } - } - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.2", - "portValue": 0 - } - } - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "server.dc2.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "198.18.1.1", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "198.18.1.2", - "portValue": 443 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - } - ], - "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden b/agent/xds/testdata/endpoints/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden index 03bd971ef6e88..b993f6a71e49f 100644 --- a/agent/xds/testdata/endpoints/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden +++ b/agent/xds/testdata/endpoints/mesh-gateway-with-exported-peered-services-http-with-router.latest.golden @@ -35,40 +35,6 @@ } ] }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.3", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 128 - }, - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.4", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, { "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", "clusterName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", @@ -170,72 +136,6 @@ ] } ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "exported~v2.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.4", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "v1.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.3", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 128 - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "v2.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "10.10.1.4", - "portValue": 8080 - } - } - }, - "healthStatus": "HEALTHY", - "loadBalancingWeight": 1 - } - ] - } - ] } ], "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", diff --git a/agent/xds/testdata/listeners/api-gateway-with-http-route-and-inline-certificate.latest.golden b/agent/xds/testdata/listeners/api-gateway-with-http-route-and-inline-certificate.latest.golden new file mode 100644 index 0000000000000..97fe8332eecf1 --- /dev/null +++ b/agent/xds/testdata/listeners/api-gateway-with-http-route-and-inline-certificate.latest.golden @@ -0,0 +1,54 @@ +{ + "versionInfo": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "name": "http:1.2.3.4:8080", + "address": { + "socketAddress": { + "address": "1.2.3.4", + "portValue": 8080 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.http_connection_manager", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", + "statPrefix": "ingress_upstream_8080", + "rds": { + "configSource": { + "ads": {}, + "resourceApiVersion": "V3" + }, + "routeConfigName": "8080" + }, + "httpFilters": [ + { + "name": "envoy.filters.http.router", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" + } + } + ], + "tracing": { + "randomSampling": {} + }, + "upgradeConfigs": [ + { + "upgradeType": "websocket" + } + ] + } + } + ] + } + ], + "trafficDirection": "OUTBOUND" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", + "nonce": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/listeners/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden deleted file mode 100644 index 935e330a59836..0000000000000 --- a/agent/xds/testdata/listeners/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ /dev/null @@ -1,85 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8080", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_certificate", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8080" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICljCCAX4CCQCQMDsYO8FrPjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJV\nUzAeFw0yMjEyMjAxNzUwMjVaFw0yNzEyMTkxNzUwMjVaMA0xCzAJBgNVBAYTAlVT\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx95Opa6t4lGEpiTUogEB\nptqOdam2ch4BHQGhNhX/MrDwwuZQhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2\njQlhqTodElkbsd5vWY8R/bxJWQSoNvVE12TlzECxGpJEiHt4W0r8pGffk+rvplji\nUyCfnT1kGF3znOSjK1hRMTn6RKWCyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409\ng9X5VU88/Bmmrz4cMyxce86Kc2ug5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftr\nXOvuCbO5IBRHMOBHiHTZ4rtGuhMaIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+W\nmQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBfCqoUIdPf/HGSbOorPyZWbyizNtHJ\nGL7x9cAeIYxpI5Y/WcO1o5v94lvrgm3FNfJoGKbV66+JxOge731FrfMpHplhar1Z\nRahYIzNLRBTLrwadLAZkApUpZvB8qDK4knsTWFYujNsylCww2A6ajzIMFNU4GkUK\nNtyHRuD+KYRmjXtyX1yHNqfGN3vOQmwavHq2R8wHYuBSc6LAHHV9vG+j0VsgMELO\nqwxn8SmLkSKbf2+MsQVzLCXXN5u+D8Yv+4py+oKP4EQ5aFZuDEx+r/G/31rTthww\nAAJAMaoXmoYVdgXV+CPuBb2M4XCpuzLu3bcA2PXm5ipSyIgntMKwXV7r\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAx95Opa6t4lGEpiTUogEBptqOdam2ch4BHQGhNhX/MrDwwuZQ\nhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2jQlhqTodElkbsd5vWY8R/bxJWQSo\nNvVE12TlzECxGpJEiHt4W0r8pGffk+rvpljiUyCfnT1kGF3znOSjK1hRMTn6RKWC\nyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409g9X5VU88/Bmmrz4cMyxce86Kc2ug\n5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftrXOvuCbO5IBRHMOBHiHTZ4rtGuhMa\nIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+WmQIDAQABAoIBACYvceUzp2MK4gYA\nGWPOP2uKbBdM0l+hHeNV0WAM+dHMfmMuL4pkT36ucqt0ySOLjw6rQyOZG5nmA6t9\nsv0g4ae2eCMlyDIeNi1Yavu4Wt6YX4cTXbQKThm83C6W2X9THKbauBbxD621bsDK\n7PhiGPN60yPue7YwFQAPqqD4YaK+s22HFIzk9gwM/rkvAUNwRv7SyHMiFe4Igc1C\nEev7iHWzvj5Heoz6XfF+XNF9DU+TieSUAdjd56VyUb8XL4+uBTOhHwLiXvAmfaMR\nHvpcxeKnYZusS6NaOxcUHiJnsLNWrxmJj9WEGgQzuLxcLjTe4vVmELVZD8t3QUKj\nPAxu8tUCgYEA7KIWVn9dfVpokReorFym+J8FzLwSktP9RZYEMonJo00i8aii3K9s\nu/aSwRWQSCzmON1ZcxZzWhwQF9usz6kGCk//9+4hlVW90GtNK0RD+j7sp4aT2JI8\n9eLEjTG+xSXa7XWe98QncjjL9lu/yrRncSTxHs13q/XP198nn2aYuQ8CgYEA2Dnt\nsRBzv0fFEvzzFv7G/5f85mouN38TUYvxNRTjBLCXl9DeKjDkOVZ2b6qlfQnYXIru\nH+W+v+AZEb6fySXc8FRab7lkgTMrwE+aeI4rkW7asVwtclv01QJ5wMnyT84AgDD/\nDgt/RThFaHgtU9TW5GOZveL+l9fVPn7vKFdTJdcCgYEArJ99zjHxwJ1whNAOk1av\n09UmRPm6TvRo4heTDk8oEoIWCNatoHI0z1YMLuENNSnT9Q280FFDayvnrY/qnD7A\nkktT/sjwJOG8q8trKzIMqQS4XWm2dxoPcIyyOBJfCbEY6XuRsUuePxwh5qF942EB\nyS9a2s6nC4Ix0lgPrqAIr48CgYBgS/Q6riwOXSU8nqCYdiEkBYlhCJrKpnJxF9T1\nofa0yPzKZP/8ZEfP7VzTwHjxJehQ1qLUW9pG08P2biH1UEKEWdzo8vT6wVJT1F/k\nHtTycR8+a+Hlk2SHVRHqNUYQGpuIe8mrdJ1as4Pd0d/F/P0zO9Rlh+mAsGPM8HUM\nT0+9gwKBgHDoerX7NTskg0H0t8O+iSMevdxpEWp34ZYa9gHiftTQGyrRgERCa7Gj\nnZPAxKb2JoWyfnu3v7G5gZ8fhDFsiOxLbZv6UZJBbUIh1MjJISpXrForDrC2QNLX\nkHrHfwBFDB3KMudhQknsJzEJKCL/KmFH6o0MvsoaT9yzEl3K+ah/\n-----END RSA PRIVATE KEY-----\n" - } - } - ], - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "listenerFilters": [ - { - "name": "envoy.filters.listener.tls_inspector", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector" - } - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/listeners/api-gateway-with-http-route.latest.golden deleted file mode 100644 index 935e330a59836..0000000000000 --- a/agent/xds/testdata/listeners/api-gateway-with-http-route.latest.golden +++ /dev/null @@ -1,85 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8080", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_certificate", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8080" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICljCCAX4CCQCQMDsYO8FrPjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJV\nUzAeFw0yMjEyMjAxNzUwMjVaFw0yNzEyMTkxNzUwMjVaMA0xCzAJBgNVBAYTAlVT\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx95Opa6t4lGEpiTUogEB\nptqOdam2ch4BHQGhNhX/MrDwwuZQhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2\njQlhqTodElkbsd5vWY8R/bxJWQSoNvVE12TlzECxGpJEiHt4W0r8pGffk+rvplji\nUyCfnT1kGF3znOSjK1hRMTn6RKWCyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409\ng9X5VU88/Bmmrz4cMyxce86Kc2ug5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftr\nXOvuCbO5IBRHMOBHiHTZ4rtGuhMaIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+W\nmQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBfCqoUIdPf/HGSbOorPyZWbyizNtHJ\nGL7x9cAeIYxpI5Y/WcO1o5v94lvrgm3FNfJoGKbV66+JxOge731FrfMpHplhar1Z\nRahYIzNLRBTLrwadLAZkApUpZvB8qDK4knsTWFYujNsylCww2A6ajzIMFNU4GkUK\nNtyHRuD+KYRmjXtyX1yHNqfGN3vOQmwavHq2R8wHYuBSc6LAHHV9vG+j0VsgMELO\nqwxn8SmLkSKbf2+MsQVzLCXXN5u+D8Yv+4py+oKP4EQ5aFZuDEx+r/G/31rTthww\nAAJAMaoXmoYVdgXV+CPuBb2M4XCpuzLu3bcA2PXm5ipSyIgntMKwXV7r\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAx95Opa6t4lGEpiTUogEBptqOdam2ch4BHQGhNhX/MrDwwuZQ\nhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2jQlhqTodElkbsd5vWY8R/bxJWQSo\nNvVE12TlzECxGpJEiHt4W0r8pGffk+rvpljiUyCfnT1kGF3znOSjK1hRMTn6RKWC\nyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409g9X5VU88/Bmmrz4cMyxce86Kc2ug\n5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftrXOvuCbO5IBRHMOBHiHTZ4rtGuhMa\nIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+WmQIDAQABAoIBACYvceUzp2MK4gYA\nGWPOP2uKbBdM0l+hHeNV0WAM+dHMfmMuL4pkT36ucqt0ySOLjw6rQyOZG5nmA6t9\nsv0g4ae2eCMlyDIeNi1Yavu4Wt6YX4cTXbQKThm83C6W2X9THKbauBbxD621bsDK\n7PhiGPN60yPue7YwFQAPqqD4YaK+s22HFIzk9gwM/rkvAUNwRv7SyHMiFe4Igc1C\nEev7iHWzvj5Heoz6XfF+XNF9DU+TieSUAdjd56VyUb8XL4+uBTOhHwLiXvAmfaMR\nHvpcxeKnYZusS6NaOxcUHiJnsLNWrxmJj9WEGgQzuLxcLjTe4vVmELVZD8t3QUKj\nPAxu8tUCgYEA7KIWVn9dfVpokReorFym+J8FzLwSktP9RZYEMonJo00i8aii3K9s\nu/aSwRWQSCzmON1ZcxZzWhwQF9usz6kGCk//9+4hlVW90GtNK0RD+j7sp4aT2JI8\n9eLEjTG+xSXa7XWe98QncjjL9lu/yrRncSTxHs13q/XP198nn2aYuQ8CgYEA2Dnt\nsRBzv0fFEvzzFv7G/5f85mouN38TUYvxNRTjBLCXl9DeKjDkOVZ2b6qlfQnYXIru\nH+W+v+AZEb6fySXc8FRab7lkgTMrwE+aeI4rkW7asVwtclv01QJ5wMnyT84AgDD/\nDgt/RThFaHgtU9TW5GOZveL+l9fVPn7vKFdTJdcCgYEArJ99zjHxwJ1whNAOk1av\n09UmRPm6TvRo4heTDk8oEoIWCNatoHI0z1YMLuENNSnT9Q280FFDayvnrY/qnD7A\nkktT/sjwJOG8q8trKzIMqQS4XWm2dxoPcIyyOBJfCbEY6XuRsUuePxwh5qF942EB\nyS9a2s6nC4Ix0lgPrqAIr48CgYBgS/Q6riwOXSU8nqCYdiEkBYlhCJrKpnJxF9T1\nofa0yPzKZP/8ZEfP7VzTwHjxJehQ1qLUW9pG08P2biH1UEKEWdzo8vT6wVJT1F/k\nHtTycR8+a+Hlk2SHVRHqNUYQGpuIe8mrdJ1as4Pd0d/F/P0zO9Rlh+mAsGPM8HUM\nT0+9gwKBgHDoerX7NTskg0H0t8O+iSMevdxpEWp34ZYa9gHiftTQGyrRgERCa7Gj\nnZPAxKb2JoWyfnu3v7G5gZ8fhDFsiOxLbZv6UZJBbUIh1MjJISpXrForDrC2QNLX\nkHrHfwBFDB3KMudhQknsJzEJKCL/KmFH6o0MvsoaT9yzEl3K+ah/\n-----END RSA PRIVATE KEY-----\n" - } - } - ], - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "listenerFilters": [ - { - "name": "envoy.filters.listener.tls_inspector", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector" - } - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/api-gateway-with-multiple-inline-certificates.latest.golden b/agent/xds/testdata/listeners/api-gateway-with-multiple-inline-certificates.latest.golden deleted file mode 100644 index 2729468123744..0000000000000 --- a/agent/xds/testdata/listeners/api-gateway-with-multiple-inline-certificates.latest.golden +++ /dev/null @@ -1,102 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "service:1.2.3.4:8080", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filterChainMatch": { - "serverNames": [ - "" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "ingress_upstream_certificate", - "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICljCCAX4CCQCQMDsYO8FrPjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJV\nUzAeFw0yMjEyMjAxNzUwMjVaFw0yNzEyMTkxNzUwMjVaMA0xCzAJBgNVBAYTAlVT\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx95Opa6t4lGEpiTUogEB\nptqOdam2ch4BHQGhNhX/MrDwwuZQhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2\njQlhqTodElkbsd5vWY8R/bxJWQSoNvVE12TlzECxGpJEiHt4W0r8pGffk+rvplji\nUyCfnT1kGF3znOSjK1hRMTn6RKWCyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409\ng9X5VU88/Bmmrz4cMyxce86Kc2ug5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftr\nXOvuCbO5IBRHMOBHiHTZ4rtGuhMaIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+W\nmQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBfCqoUIdPf/HGSbOorPyZWbyizNtHJ\nGL7x9cAeIYxpI5Y/WcO1o5v94lvrgm3FNfJoGKbV66+JxOge731FrfMpHplhar1Z\nRahYIzNLRBTLrwadLAZkApUpZvB8qDK4knsTWFYujNsylCww2A6ajzIMFNU4GkUK\nNtyHRuD+KYRmjXtyX1yHNqfGN3vOQmwavHq2R8wHYuBSc6LAHHV9vG+j0VsgMELO\nqwxn8SmLkSKbf2+MsQVzLCXXN5u+D8Yv+4py+oKP4EQ5aFZuDEx+r/G/31rTthww\nAAJAMaoXmoYVdgXV+CPuBb2M4XCpuzLu3bcA2PXm5ipSyIgntMKwXV7r\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAx95Opa6t4lGEpiTUogEBptqOdam2ch4BHQGhNhX/MrDwwuZQ\nhttBwMfngQ/wd9NmYEPAwj0dumUoAITIq6i2jQlhqTodElkbsd5vWY8R/bxJWQSo\nNvVE12TlzECxGpJEiHt4W0r8pGffk+rvpljiUyCfnT1kGF3znOSjK1hRMTn6RKWC\nyYaBvXQiB4SGilfLgJcEpOJKtISIxmZ+S409g9X5VU88/Bmmrz4cMyxce86Kc2ug\n5/MOv0CjWDJwlrv8njneV2zvraQ61DDwQftrXOvuCbO5IBRHMOBHiHTZ4rtGuhMa\nIr21V4vb6n8c4YzXiFvhUYcyX7rltGZzVd+WmQIDAQABAoIBACYvceUzp2MK4gYA\nGWPOP2uKbBdM0l+hHeNV0WAM+dHMfmMuL4pkT36ucqt0ySOLjw6rQyOZG5nmA6t9\nsv0g4ae2eCMlyDIeNi1Yavu4Wt6YX4cTXbQKThm83C6W2X9THKbauBbxD621bsDK\n7PhiGPN60yPue7YwFQAPqqD4YaK+s22HFIzk9gwM/rkvAUNwRv7SyHMiFe4Igc1C\nEev7iHWzvj5Heoz6XfF+XNF9DU+TieSUAdjd56VyUb8XL4+uBTOhHwLiXvAmfaMR\nHvpcxeKnYZusS6NaOxcUHiJnsLNWrxmJj9WEGgQzuLxcLjTe4vVmELVZD8t3QUKj\nPAxu8tUCgYEA7KIWVn9dfVpokReorFym+J8FzLwSktP9RZYEMonJo00i8aii3K9s\nu/aSwRWQSCzmON1ZcxZzWhwQF9usz6kGCk//9+4hlVW90GtNK0RD+j7sp4aT2JI8\n9eLEjTG+xSXa7XWe98QncjjL9lu/yrRncSTxHs13q/XP198nn2aYuQ8CgYEA2Dnt\nsRBzv0fFEvzzFv7G/5f85mouN38TUYvxNRTjBLCXl9DeKjDkOVZ2b6qlfQnYXIru\nH+W+v+AZEb6fySXc8FRab7lkgTMrwE+aeI4rkW7asVwtclv01QJ5wMnyT84AgDD/\nDgt/RThFaHgtU9TW5GOZveL+l9fVPn7vKFdTJdcCgYEArJ99zjHxwJ1whNAOk1av\n09UmRPm6TvRo4heTDk8oEoIWCNatoHI0z1YMLuENNSnT9Q280FFDayvnrY/qnD7A\nkktT/sjwJOG8q8trKzIMqQS4XWm2dxoPcIyyOBJfCbEY6XuRsUuePxwh5qF942EB\nyS9a2s6nC4Ix0lgPrqAIr48CgYBgS/Q6riwOXSU8nqCYdiEkBYlhCJrKpnJxF9T1\nofa0yPzKZP/8ZEfP7VzTwHjxJehQ1qLUW9pG08P2biH1UEKEWdzo8vT6wVJT1F/k\nHtTycR8+a+Hlk2SHVRHqNUYQGpuIe8mrdJ1as4Pd0d/F/P0zO9Rlh+mAsGPM8HUM\nT0+9gwKBgHDoerX7NTskg0H0t8O+iSMevdxpEWp34ZYa9gHiftTQGyrRgERCa7Gj\nnZPAxKb2JoWyfnu3v7G5gZ8fhDFsiOxLbZv6UZJBbUIh1MjJISpXrForDrC2QNLX\nkHrHfwBFDB3KMudhQknsJzEJKCL/KmFH6o0MvsoaT9yzEl3K+ah/\n-----END RSA PRIVATE KEY-----\n" - } - } - ] - }, - "requireClientCertificate": false - } - } - }, - { - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "ingress_upstream_default", - "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": false - } - } - } - ], - "listenerFilters": [ - { - "name": "envoy.filters.listener.tls_inspector", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector" - } - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.latest.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.latest.golden index 1fc03f74705de..03e15abeaa728 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.latest.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.latest.golden @@ -148,4 +148,4 @@ ], "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", "nonce": "00000001" -} +} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden b/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden deleted file mode 100644 index 76c41c8b7c979..0000000000000 --- a/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden +++ /dev/null @@ -1,114 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "payments?peer=cloud:custom-upstream", - "address": { - "socketAddress": { - "address": "11.11.11.11", - "portValue": 11111 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "foo-stats", - "cluster": "random-cluster" - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "public_listener:0.0.0.0:9999", - "address": { - "socketAddress": { - "address": "0.0.0.0", - "portValue": 9999 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "public_listener", - "cluster": "local_app" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - } - ], - "trafficDirection": "INBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "refunds?peer=cloud:127.0.0.1:9090", - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 9090 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream_peered.refunds.default.cloud", - "cluster": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - ] - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-http2.latest.golden b/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-http2.latest.golden deleted file mode 100644 index a18dfc1484021..0000000000000 --- a/agent/xds/testdata/listeners/connect-proxy-with-peered-upstreams-http2.latest.golden +++ /dev/null @@ -1,189 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "payments?peer=cloud:127.0.0.1:9090", - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 9090 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream_peered.payments.default.cloud", - "routeConfig": { - "name": "payments?peer=cloud", - "virtualHosts": [ - { - "name": "payments.default.cloud", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "payments.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - ] - } - ] - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "http2ProtocolOptions": {}, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ] - } - ], - "trafficDirection": "OUTBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "public_listener:0.0.0.0:9999", - "address": { - "socketAddress": { - "address": "0.0.0.0", - "portValue": 9999 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "public_listener", - "cluster": "local_app" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - } - ], - "trafficDirection": "INBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "refunds?peer=cloud:127.0.0.1:9090", - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 9090 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream_peered.refunds.default.cloud", - "routeConfig": { - "name": "refunds?peer=cloud", - "virtualHosts": [ - { - "name": "refunds.default.cloud", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "refunds.default.cloud.external.1c053652-8512-4373-90cf-5a7f6263a994.consul" - } - } - ] - } - ] - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "http2ProtocolOptions": {}, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ] - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tproxy-and-permissive-mtls.latest.golden b/agent/xds/testdata/listeners/connect-proxy-with-tproxy-and-permissive-mtls.latest.golden index f091cd40b5521..549af29cb4456 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tproxy-and-permissive-mtls.latest.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tproxy-and-permissive-mtls.latest.golden @@ -28,11 +28,11 @@ }, { "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "outbound_listener:127.0.0.1:1234", + "name": "outbound_listener:127.0.0.1:15001", "address": { "socketAddress": { "address": "127.0.0.1", - "portValue": 1234 + "portValue": 15001 } }, "defaultFilterChain": { @@ -166,4 +166,4 @@ ], "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", "nonce": "00000001" -} \ No newline at end of file +} diff --git a/agent/xds/testdata/listeners/custom-upstream-with-prepared-query.latest.golden b/agent/xds/testdata/listeners/custom-upstream-with-prepared-query.latest.golden deleted file mode 100644 index 636fb2f606b8f..0000000000000 --- a/agent/xds/testdata/listeners/custom-upstream-with-prepared-query.latest.golden +++ /dev/null @@ -1,114 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "db:custom-upstream", - "address": { - "socketAddress": { - "address": "11.11.11.11", - "portValue": 11111 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "foo-stats", - "cluster": "random-cluster" - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "prepared_query:geo-cache:127.10.10.10:8181", - "address": { - "socketAddress": { - "address": "127.10.10.10", - "portValue": 8181 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream.prepared_query_geo-cache", - "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - } - ], - "trafficDirection": "OUTBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "public_listener:0.0.0.0:9999", - "address": { - "socketAddress": { - "address": "0.0.0.0", - "portValue": 9999 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "public_listener", - "cluster": "local_app" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - } - ], - "trafficDirection": "INBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-checks-grpc.latest.golden b/agent/xds/testdata/listeners/expose-checks-grpc.latest.golden deleted file mode 100644 index 6551d151fc66e..0000000000000 --- a/agent/xds/testdata/listeners/expose-checks-grpc.latest.golden +++ /dev/null @@ -1,143 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "exposed_path_grpchealthv1HealthCheck:1.2.3.4:21501", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 21501 - } - }, - "filterChains": [ - { - "filterChainMatch": { - "sourcePrefixRanges": [ - { - "addressPrefix": "127.0.0.1", - "prefixLen": 8 - }, - { - "addressPrefix": "192.0.2.1", - "prefixLen": 32 - }, - { - "addressPrefix": "::1", - "prefixLen": 128 - } - ] - }, - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "exposed_path_filter_grpchealthv1HealthCheck_21501", - "routeConfig": { - "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", - "virtualHosts": [ - { - "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "path": "/grpc.health.v1.Health/Check" - }, - "route": { - "cluster": "exposed_cluster_9090" - } - } - ] - } - ] - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "http2ProtocolOptions": {}, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ] - } - ], - "trafficDirection": "INBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "public_listener:1.2.3.4:9090", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 9090 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "public_listener", - "cluster": "local_app" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - } - ], - "trafficDirection": "INBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-checks-http-with-bind-override.latest.golden b/agent/xds/testdata/listeners/expose-checks-http-with-bind-override.latest.golden deleted file mode 100644 index 79f3555eb2782..0000000000000 --- a/agent/xds/testdata/listeners/expose-checks-http-with-bind-override.latest.golden +++ /dev/null @@ -1,142 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "exposed_path_debug:6.7.8.9:21500", - "address": { - "socketAddress": { - "address": "6.7.8.9", - "portValue": 21500 - } - }, - "filterChains": [ - { - "filterChainMatch": { - "sourcePrefixRanges": [ - { - "addressPrefix": "127.0.0.1", - "prefixLen": 8 - }, - { - "addressPrefix": "192.0.2.1", - "prefixLen": 32 - }, - { - "addressPrefix": "::1", - "prefixLen": 128 - } - ] - }, - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "exposed_path_filter_debug_21500", - "routeConfig": { - "name": "exposed_path_filter_debug_21500", - "virtualHosts": [ - { - "name": "exposed_path_filter_debug_21500", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "path": "/debug" - }, - "route": { - "cluster": "exposed_cluster_8181" - } - } - ] - } - ] - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ] - } - ], - "trafficDirection": "INBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "public_listener:6.7.8.9:8080", - "address": { - "socketAddress": { - "address": "6.7.8.9", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "public_listener", - "cluster": "local_app" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - } - ], - "trafficDirection": "INBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-checks-http.latest.golden b/agent/xds/testdata/listeners/expose-checks.latest.golden similarity index 100% rename from agent/xds/testdata/listeners/expose-checks-http.latest.golden rename to agent/xds/testdata/listeners/expose-checks.latest.golden diff --git a/agent/xds/testdata/listeners/ingress-with-tls-mixed-cipher-suites-listeners.latest.golden b/agent/xds/testdata/listeners/ingress-with-tls-mixed-cipher-suites-listeners.latest.golden deleted file mode 100644 index 08b36fef24334..0000000000000 --- a/agent/xds/testdata/listeners/ingress-with-tls-mixed-cipher-suites-listeners.latest.golden +++ /dev/null @@ -1,166 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8080", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_8080", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8080" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": { - "cipherSuites": [ - "ECDHE-RSA-AES256-SHA" - ] - }, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - }, - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "trafficDirection": "OUTBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8081", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8081 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_8081", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8081" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": { - "cipherSuites": [ - "ECDHE-RSA-CHACHA20-POLY1305", - "ECDHE-ECDSA-CHACHA20-POLY1305" - ] - }, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - }, - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/ingress-with-tls-mixed-max-version-listeners.latest.golden b/agent/xds/testdata/listeners/ingress-with-tls-mixed-max-version-listeners.latest.golden deleted file mode 100644 index c9e56105a5c56..0000000000000 --- a/agent/xds/testdata/listeners/ingress-with-tls-mixed-max-version-listeners.latest.golden +++ /dev/null @@ -1,238 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8080", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8080 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_8080", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8080" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": { - "tlsMaximumProtocolVersion": "TLSv1_2" - }, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - }, - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "trafficDirection": "OUTBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8081", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8081 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_8081", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8081" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": { - "tlsMaximumProtocolVersion": "TLSv1_0" - }, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - }, - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "trafficDirection": "OUTBOUND" - }, - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "http:1.2.3.4:8082", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8082 - } - }, - "filterChains": [ - { - "filters": [ - { - "name": "envoy.filters.network.http_connection_manager", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "ingress_upstream_8082", - "rds": { - "configSource": { - "ads": {}, - "resourceApiVersion": "V3" - }, - "routeConfigName": "8082" - }, - "httpFilters": [ - { - "name": "envoy.filters.http.router", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" - } - } - ], - "tracing": { - "randomSampling": {} - }, - "upgradeConfigs": [ - { - "upgradeType": "websocket" - } - ] - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": { - "tlsMaximumProtocolVersion": "TLSv1_3" - }, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - }, - "alpnProtocols": [ - "http/1.1" - ] - }, - "requireClientCertificate": false - } - } - } - ], - "trafficDirection": "OUTBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/mesh-gateway-using-federation-control-plane.latest.golden b/agent/xds/testdata/listeners/mesh-gateway-using-federation-control-plane.latest.golden deleted file mode 100644 index fef17ff195aea..0000000000000 --- a/agent/xds/testdata/listeners/mesh-gateway-using-federation-control-plane.latest.golden +++ /dev/null @@ -1,181 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "default:1.2.3.4:8443", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - }, - "filterChains": [ - { - "filterChainMatch": { - "serverNames": [ - "*.dc2.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc2", - "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "*.dc4.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc4", - "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "*.dc6.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc6", - "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "*.server.dc2.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc2", - "cluster": "server.dc2.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "*.server.dc4.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc4", - "cluster": "server.dc4.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "*.server.dc6.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_remote.default.dc6", - "cluster": "server.dc6.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "node1.server.dc1.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_local_server.default.dc1", - "cluster": "node1.server.dc1.consul" - } - } - ] - }, - { - "filterChainMatch": { - "serverNames": [ - "node2.server.dc1.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_local_server.default.dc1", - "cluster": "node2.server.dc1.consul" - } - } - ] - }, - { - "filters": [ - { - "name": "envoy.filters.network.sni_cluster", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.sni_cluster.v3.SniCluster" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "mesh_gateway_local.default", - "cluster": "" - } - } - ] - } - ], - "listenerFilters": [ - { - "name": "envoy.filters.listener.tls_inspector", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector" - } - } - ] - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-trace-listener.latest.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-trace-listener.latest.golden deleted file mode 100644 index e85075430303e..0000000000000 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-trace-listener.latest.golden +++ /dev/null @@ -1,246 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", - "name": "default:1.2.3.4:8443", - "address": { - "socketAddress": { - "address": "1.2.3.4", - "portValue": 8443 - } - }, - "filterChains": [ - { - "filterChainMatch": { - "serverNames": [ - "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream.api.default.default.dc1", - "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICnTCCAkKgAwIBAgIRAJrvEdaRAkSltrotd/l/j2cwCgYIKoZIzj0EAwIwgbgx\nCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj\nbzEaMBgGA1UECRMRMTAxIFNlY29uZCBTdHJlZXQxDjAMBgNVBBETBTk0MTA1MRcw\nFQYDVQQKEw5IYXNoaUNvcnAgSW5jLjE/MD0GA1UEAxM2Q29uc3VsIEFnZW50IENB\nIDk2NjM4NzM1MDkzNTU5NTIwNDk3MTQwOTU3MDY1MTc0OTg3NDMxMB4XDTIwMDQx\nNDIyMzE1MloXDTIxMDQxNDIyMzE1MlowHDEaMBgGA1UEAxMRc2VydmVyLmRjMS5j\nb25zdWwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ4v0FoIYI0OWmxE2MR6w5l\n0pWGhc02RpsOPj/6RS1fmXMMu7JzPzwCmkGcR16RlwwhNFKCZsWpvAjVRHf/pTp+\no4HHMIHEMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB\nBQUHAwIwDAYDVR0TAQH/BAIwADApBgNVHQ4EIgQgk7kABFitAy3PluyNtmzYiC7H\njSN8W/K/OXNJQAQAscMwKwYDVR0jBCQwIoAgNKbPPepvRHXSAPTc+a/BXBzFX1qJ\ny+Zi7qtjlFX7qtUwLQYDVR0RBCYwJIIRc2VydmVyLmRjMS5jb25zdWyCCWxvY2Fs\naG9zdIcEfwAAATAKBggqhkjOPQQDAgNJADBGAiEAhP4HmN5BWysWTbQWClXaWUah\nLpBGFrvc/2cCQuyEZKsCIQD6JyYCYMArtWwZ4G499zktxrFlqfX14bqyONrxtA5I\nDw==\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIE3KbKXHdsa0vvC1fysQaGdoJRgjRALIolI4XJanie+coAoGCCqGSM49\nAwEHoUQDQgAEOL9BaCGCNDlpsRNjEesOZdKVhoXNNkabDj4/+kUtX5lzDLuycz88\nAppBnEdekZcMITRSgmbFqbwI1UR3/6U6fg==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - }, - { - "filterChainMatch": { - "serverNames": [ - "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream.cache.default.default.dc1", - "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICmjCCAkGgAwIBAgIQe1ZmC0rzRwer6jaH1YIUIjAKBggqhkjOPQQDAjCBuDEL\nMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2Nv\nMRowGAYDVQQJExExMDEgU2Vjb25kIFN0cmVldDEOMAwGA1UEERMFOTQxMDUxFzAV\nBgNVBAoTDkhhc2hpQ29ycCBJbmMuMT8wPQYDVQQDEzZDb25zdWwgQWdlbnQgQ0Eg\nODE5ODAwNjg0MDM0MTM3ODkyNDYxNTA1MDk0NDU3OTU1MTQxNjEwHhcNMjAwNjE5\nMTU1MjAzWhcNMjEwNjE5MTU1MjAzWjAcMRowGAYDVQQDExFzZXJ2ZXIuZGMxLmNv\nbnN1bDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH2aWaaa3fpQLBayheHiKlrH\n+z53m0frfGknKjOhOPVYDVHV8x0OE01negswVQbKHAtxPf1M8Zy+WbI9rK7Ua1mj\ngccwgcQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF\nBQcDAjAMBgNVHRMBAf8EAjAAMCkGA1UdDgQiBCDf9CPBSUwwZvpeW73oJLTmgQE2\ntW1NKpL5t1uq9WFcqDArBgNVHSMEJDAigCCPPd/NxgZB0tq2M8pdVpPj3Cr79iTv\ni4/T1ysodfMb7zAtBgNVHREEJjAkghFzZXJ2ZXIuZGMxLmNvbnN1bIIJbG9jYWxo\nb3N0hwR/AAABMAoGCCqGSM49BAMCA0cAMEQCIFCjFZAoXq0s2ied2eIBv0i1KoW5\nIhCylnKFt6iHkyDeAiBBCByTcjHRgEQmqyPojQKoO584EFiczTub9aWdnf9tEw==\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEINsen3S8xzxMrKcRZIvxXzhKDn43Tw9ttqWEFU9TqS5hoAoGCCqGSM49\nAwEHoUQDQgAEfZpZpprd+lAsFrKF4eIqWsf7PnebR+t8aScqM6E49VgNUdXzHQ4T\nTWd6CzBVBsocC3E9/UzxnL5Zsj2srtRrWQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - }, - { - "filterChainMatch": { - "serverNames": [ - "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream.db.default.default.dc1", - "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICnTCCAkOgAwIBAgIRAKF+qDJbaOULNL1TIatrsBowCgYIKoZIzj0EAwIwgbkx\nCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj\nbzEaMBgGA1UECRMRMTAxIFNlY29uZCBTdHJlZXQxDjAMBgNVBBETBTk0MTA1MRcw\nFQYDVQQKEw5IYXNoaUNvcnAgSW5jLjFAMD4GA1UEAxM3Q29uc3VsIEFnZW50IENB\nIDE4Nzg3MDAwNjUzMDcxOTYzNTk1ODkwNTE1ODY1NjEzMDA2MTU0NDAeFw0yMDA2\nMTkxNTMxMzRaFw0yMTA2MTkxNTMxMzRaMBwxGjAYBgNVBAMTEXNlcnZlci5kYzEu\nY29uc3VsMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdQ8Igci5f7ZvvCVsxXt9\ntLfvczD+60XHg0OC0+Aka7ZjQfbEjQwZbz/82EwPoS7Dqo3LTK4IuelOimoNNxuk\nkaOBxzCBxDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG\nAQUFBwMCMAwGA1UdEwEB/wQCMAAwKQYDVR0OBCIEILzTLkfJcdWQnTMKUcai/YJq\n0RqH1pjCqtY7SOU4gGOTMCsGA1UdIwQkMCKAIMa2vNcTEC5AGfHIYARJ/4sodX0o\nLzCj3lpw7BcEzPTcMC0GA1UdEQQmMCSCEXNlcnZlci5kYzEuY29uc3Vsgglsb2Nh\nbGhvc3SHBH8AAAEwCgYIKoZIzj0EAwIDSAAwRQIgBZ/Z4GSLEc98WvT/qjTVCNTG\n1WNaAaesVbkRx+J0yl8CIQDAVoqY9ByA5vKHjnQrxWlc/JUtJz8wudg7e/OCRriP\nSg==\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIN1v14FaNxgY4MgjDOOWthen8dgwB0lNMs9/j2TfrnxzoAoGCCqGSM49\nAwEHoUQDQgAEdQ8Igci5f7ZvvCVsxXt9tLfvczD+60XHg0OC0+Aka7ZjQfbEjQwZ\nbz/82EwPoS7Dqo3LTK4IuelOimoNNxukkQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - }, - { - "filterChainMatch": { - "serverNames": [ - "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - ] - }, - "filters": [ - { - "name": "envoy.filters.network.rbac", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", - "rules": {}, - "statPrefix": "connect_authz" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "upstream.web.default.default.dc1", - "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ], - "transportSocket": { - "name": "tls", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", - "commonTlsContext": { - "tlsParams": {}, - "tlsCertificates": [ - { - "certificateChain": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" - }, - "privateKey": { - "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" - } - } - ], - "validationContext": { - "trustedCa": { - "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" - } - } - }, - "requireClientCertificate": true - } - } - }, - { - "filters": [ - { - "name": "envoy.filters.network.sni_cluster", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.sni_cluster.v3.SniCluster" - } - }, - { - "name": "envoy.filters.network.tcp_proxy", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default", - "cluster": "" - } - } - ] - } - ], - "listenerFilters": [ - { - "name": "envoy.filters.listener.tls_inspector", - "typedConfig": { - "@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector" - } - } - ], - "trafficDirection": "INBOUND" - } - ], - "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/routes/api-gateway-with-http-route-and-inline-certificate.latest.golden similarity index 94% rename from agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden rename to agent/xds/testdata/routes/api-gateway-with-http-route-and-inline-certificate.latest.golden index 4a41a6d6dfb10..a1669268ec4e0 100644 --- a/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ b/agent/xds/testdata/routes/api-gateway-with-http-route-and-inline-certificate.latest.golden @@ -17,8 +17,7 @@ "prefix": "/" }, "route": { - "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "idleTimeout": "30s" + "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, "requestHeadersToAdd": [ { diff --git a/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden deleted file mode 100644 index c79697246fc78..0000000000000 --- a/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden +++ /dev/null @@ -1,59 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "8080", - "virtualHosts": [ - { - "name": "api-gateway-listener-9b9265b", - "domains": [ - "*", - "*:8080" - ], - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "timeout": "30s", - "idleTimeout": "30s", - "retryPolicy": { - "retryOn": "cancelled,connect-failure,retriable-status-codes", - "numRetries": 3, - "retriableStatusCodes": [ - 500 - ] - } - }, - "requestHeadersToAdd": [ - { - "header": { - "key": "X-Header-Add", - "value": "added" - }, - "append": true - }, - { - "header": { - "key": "X-Header-Set", - "value": "set" - }, - "append": false - } - ], - "requestHeadersToRemove": [ - "X-Header-Remove" - ] - } - ] - } - ], - "validateClusters": true - } - ], - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/api-gateway-with-multiple-inline-certificates.latest.golden b/agent/xds/testdata/routes/api-gateway-with-multiple-inline-certificates.latest.golden deleted file mode 100644 index 306f5220e7b9c..0000000000000 --- a/agent/xds/testdata/routes/api-gateway-with-multiple-inline-certificates.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/connect-proxy-lb-in-resolver.latest.golden b/agent/xds/testdata/routes/connect-proxy-lb-in-resolver.latest.golden index 75fe8ccc350fa..9cac480402557 100644 --- a/agent/xds/testdata/routes/connect-proxy-lb-in-resolver.latest.golden +++ b/agent/xds/testdata/routes/connect-proxy-lb-in-resolver.latest.golden @@ -47,11 +47,6 @@ "headerName": "x-user-id" } }, - { - "queryParameter": { - "name": "my-pretty-param" - } - }, { "connectionProperties": { "sourceIp": true diff --git a/agent/xds/testdata/routes/connect-proxy-resolver-with-lb.latest.golden b/agent/xds/testdata/routes/connect-proxy-resolver-with-lb.latest.golden deleted file mode 100644 index 547b923b0d6e7..0000000000000 --- a/agent/xds/testdata/routes/connect-proxy-resolver-with-lb.latest.golden +++ /dev/null @@ -1,30 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "db", - "virtualHosts": [ - { - "name": "db", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - } - ], - "validateClusters": true - } - ], - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/connect-proxy-route-to-lb-resolver.latest.golden b/agent/xds/testdata/routes/connect-proxy-route-to-lb-resolver.latest.golden deleted file mode 100644 index b364c9f9d0c7d..0000000000000 --- a/agent/xds/testdata/routes/connect-proxy-route-to-lb-resolver.latest.golden +++ /dev/null @@ -1,38 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "db", - "virtualHosts": [ - { - "name": "db", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "prefix": "/web" - }, - "route": { - "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - }, - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" - } - } - ] - } - ], - "validateClusters": true - } - ], - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden b/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden deleted file mode 100644 index 776509501f62c..0000000000000 --- a/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden +++ /dev/null @@ -1,99 +0,0 @@ -{ - "versionInfo": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "db", - "virtualHosts": [ - { - "name": "db", - "domains": [ - "*" - ], - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "weightedClusters": { - "clusters": [ - { - "name": "big-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "weight": 10000, - "requestHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "big" - }, - "append": false - } - ], - "responseHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "big" - }, - "append": false - } - ] - }, - { - "name": "goldilocks-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "weight": 10000, - "requestHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "goldilocks" - }, - "append": false - } - ], - "responseHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "goldilocks" - }, - "append": false - } - ] - }, - { - "name": "lil-bit-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "weight": 10000, - "requestHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "small" - }, - "append": false - } - ], - "responseHeadersToAdd": [ - { - "header": { - "key": "x-split-leg", - "value": "small" - }, - "append": false - } - ] - } - ] - } - } - } - ] - } - ], - "validateClusters": true - } - ], - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden b/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden deleted file mode 100644 index 9c050cbe6b4d4..0000000000000 --- a/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-http2.latest.golden b/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-http2.latest.golden deleted file mode 100644 index 306f5220e7b9c..0000000000000 --- a/agent/xds/testdata/routes/connect-proxy-with-peered-upstreams-http2.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/routes/ingress-lb-in-resolver.latest.golden b/agent/xds/testdata/routes/ingress-lb-in-resolver.latest.golden index 959cc72d4ef0b..f2bc276d8e99b 100644 --- a/agent/xds/testdata/routes/ingress-lb-in-resolver.latest.golden +++ b/agent/xds/testdata/routes/ingress-lb-in-resolver.latest.golden @@ -48,11 +48,6 @@ "headerName": "x-user-id" } }, - { - "queryParameter": { - "name": "my-pretty-param" - } - }, { "connectionProperties": { "sourceIp": true diff --git a/agent/xds/testdata/routes/terminating-gateway-lb-config.latest.golden b/agent/xds/testdata/routes/terminating-gateway-lb-config.latest.golden index 30b36d92d1943..cc49c907cce5c 100644 --- a/agent/xds/testdata/routes/terminating-gateway-lb-config.latest.golden +++ b/agent/xds/testdata/routes/terminating-gateway-lb-config.latest.golden @@ -1,41 +1,40 @@ { - "versionInfo": "00000001", - "resources": [ + "versionInfo": "00000001", + "resources": [ { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "virtualHosts": [ + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "virtualHosts": [ { - "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "domains": [ + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "domains": [ "*" ], - "routes": [ + "routes": [ { - "match": { - "prefix": "/" + "match": { + "prefix": "/" }, - "route": { - "cluster": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "autoHostRewrite": true, - "timeout": "0.200s", - "hashPolicy": [ + "route": { + "cluster": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "autoHostRewrite": true, + "hashPolicy": [ { - "cookie": { - "name": "chocolate-chip" + "cookie": { + "name": "chocolate-chip" }, - "terminal": true + "terminal": true }, { - "header": { - "headerName": "x-user-id" + "header": { + "headerName": "x-user-id" } }, { - "connectionProperties": { - "sourceIp": true + "connectionProperties": { + "sourceIp": true }, - "terminal": true + "terminal": true } ] } @@ -43,43 +42,42 @@ ] } ], - "validateClusters": true + "validateClusters": true }, { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "virtualHosts": [ + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "virtualHosts": [ { - "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "domains": [ + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "domains": [ "*" ], - "routes": [ + "routes": [ { - "match": { - "prefix": "/" + "match": { + "prefix": "/" }, - "route": { - "cluster": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "autoHostRewrite": true, - "timeout": "0.200s", - "hashPolicy": [ + "route": { + "cluster": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "autoHostRewrite": true, + "hashPolicy": [ { - "cookie": { - "name": "chocolate-chip" + "cookie": { + "name": "chocolate-chip" }, - "terminal": true + "terminal": true }, { - "header": { - "headerName": "x-user-id" + "header": { + "headerName": "x-user-id" } }, { - "connectionProperties": { - "sourceIp": true + "connectionProperties": { + "sourceIp": true }, - "terminal": true + "terminal": true } ] } @@ -87,43 +85,42 @@ ] } ], - "validateClusters": true + "validateClusters": true }, { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "virtualHosts": [ + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "virtualHosts": [ { - "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "domains": [ + "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "domains": [ "*" ], - "routes": [ + "routes": [ { - "match": { - "prefix": "/" + "match": { + "prefix": "/" }, - "route": { - "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "autoHostRewrite": true, - "timeout": "0.200s", - "hashPolicy": [ + "route": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "autoHostRewrite": true, + "hashPolicy": [ { - "cookie": { - "name": "chocolate-chip" + "cookie": { + "name": "chocolate-chip" }, - "terminal": true + "terminal": true }, { - "header": { - "headerName": "x-user-id" + "header": { + "headerName": "x-user-id" } }, { - "connectionProperties": { - "sourceIp": true + "connectionProperties": { + "sourceIp": true }, - "terminal": true + "terminal": true } ] } @@ -131,9 +128,9 @@ ] } ], - "validateClusters": true + "validateClusters": true } ], - "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "nonce": "00000001" + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "nonce": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/secrets/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/secrets/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden deleted file mode 100644 index 95612291de707..0000000000000 --- a/agent/xds/testdata/secrets/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/secrets/api-gateway-with-http-route.latest.golden deleted file mode 100644 index e6c25e165c65d..0000000000000 --- a/agent/xds/testdata/secrets/api-gateway-with-http-route.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/api-gateway-with-multiple-inline-certificates.latest.golden b/agent/xds/testdata/secrets/api-gateway-with-multiple-inline-certificates.latest.golden deleted file mode 100644 index e6c25e165c65d..0000000000000 --- a/agent/xds/testdata/secrets/api-gateway-with-multiple-inline-certificates.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden b/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden deleted file mode 100644 index 95612291de707..0000000000000 --- a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-escape-overrides.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-http2.latest.golden b/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-http2.latest.golden deleted file mode 100644 index e6c25e165c65d..0000000000000 --- a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-http2.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-listener-override.latest.golden b/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-listener-override.latest.golden deleted file mode 100644 index 95612291de707..0000000000000 --- a/agent/xds/testdata/secrets/connect-proxy-with-peered-upstreams-listener-override.latest.golden +++ /dev/null @@ -1,5 +0,0 @@ -{ - "versionInfo": "00000001", - "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", - "nonce": "00000001" -} \ No newline at end of file diff --git a/agent/xds/testing.go b/agent/xds/testing.go index 916bbd9b50777..446f1a37a6518 100644 --- a/agent/xds/testing.go +++ b/agent/xds/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xds/validateupstream-test/validateupstream_test.go b/agent/xds/validateupstream-test/validateupstream_test.go index 9c57bdf81aaf2..f2810bb1c02e4 100644 --- a/agent/xds/validateupstream-test/validateupstream_test.go +++ b/agent/xds/validateupstream-test/validateupstream_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package validateupstream_test diff --git a/agent/xds/xds.go b/agent/xds/xds.go index aab5bc7aaf14c..07fe1c4731079 100644 --- a/agent/xds/xds.go +++ b/agent/xds/xds.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package xds provides an implementation of a gRPC service that exports Envoy's // xDS API for config discovery. Specifically we support the Aggregated diff --git a/agent/xds/xds_protocol_helpers_test.go b/agent/xds/xds_protocol_helpers_test.go index bf632217d7eeb..958a27474c441 100644 --- a/agent/xds/xds_protocol_helpers_test.go +++ b/agent/xds/xds_protocol_helpers_test.go @@ -1,10 +1,9 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds import ( - "github.com/hashicorp/consul/agent/xds/response" "sort" "sync" "testing" @@ -229,7 +228,7 @@ func xdsNewEndpoint(ip string, port int) *envoy_endpoint_v3.LbEndpoint { return &envoy_endpoint_v3.LbEndpoint{ HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ Endpoint: &envoy_endpoint_v3.Endpoint{ - Address: response.MakeAddress(ip, port), + Address: makeAddress(ip, port), }, }, } @@ -238,7 +237,7 @@ func xdsNewEndpoint(ip string, port int) *envoy_endpoint_v3.LbEndpoint { func xdsNewEndpointWithHealth(ip string, port int, health envoy_core_v3.HealthStatus, weight int) *envoy_endpoint_v3.LbEndpoint { ep := xdsNewEndpoint(ip, port) ep.HealthStatus = health - ep.LoadBalancingWeight = response.MakeUint32Value(weight) + ep.LoadBalancingWeight = makeUint32Value(weight) return ep } @@ -298,7 +297,7 @@ func xdsNewTransportSocket( if downstream { var requireClientCertPB *wrapperspb.BoolValue if requireClientCert { - requireClientCertPB = response.MakeBoolValue(true) + requireClientCertPB = makeBoolValue(true) } tlsContext = &envoy_tls_v3.DownstreamTlsContext{ @@ -598,7 +597,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s return &envoy_listener_v3.Listener{ // Envoy can't bind to port 1 Name: "public_listener:0.0.0.0:1", - Address: response.MakeAddress("0.0.0.0", 1), + Address: makeAddress("0.0.0.0", 1), TrafficDirection: envoy_core_v3.TrafficDirection_INBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -621,7 +620,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "tcp:public_listener": return &envoy_listener_v3.Listener{ Name: "public_listener:0.0.0.0:9999", - Address: response.MakeAddress("0.0.0.0", 9999), + Address: makeAddress("0.0.0.0", 9999), TrafficDirection: envoy_core_v3.TrafficDirection_INBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -644,7 +643,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "tcp:db": return &envoy_listener_v3.Listener{ Name: "db:127.0.0.1:9191", - Address: response.MakeAddress("127.0.0.1", 9191), + Address: makeAddress("127.0.0.1", 9191), TrafficDirection: envoy_core_v3.TrafficDirection_OUTBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -662,7 +661,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "http2:db": return &envoy_listener_v3.Listener{ Name: "db:127.0.0.1:9191", - Address: response.MakeAddress("127.0.0.1", 9191), + Address: makeAddress("127.0.0.1", 9191), TrafficDirection: envoy_core_v3.TrafficDirection_OUTBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -690,7 +689,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "http2:db:rds": return &envoy_listener_v3.Listener{ Name: "db:127.0.0.1:9191", - Address: response.MakeAddress("127.0.0.1", 9191), + Address: makeAddress("127.0.0.1", 9191), TrafficDirection: envoy_core_v3.TrafficDirection_OUTBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -721,7 +720,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "http:db:rds": return &envoy_listener_v3.Listener{ Name: "db:127.0.0.1:9191", - Address: response.MakeAddress("127.0.0.1", 9191), + Address: makeAddress("127.0.0.1", 9191), TrafficDirection: envoy_core_v3.TrafficDirection_OUTBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -752,7 +751,7 @@ func makeTestListener(t *testing.T, snap *proxycfg.ConfigSnapshot, fixtureName s case "tcp:geo-cache": return &envoy_listener_v3.Listener{ Name: "prepared_query:geo-cache:127.10.10.10:8181", - Address: response.MakeAddress("127.10.10.10", 8181), + Address: makeAddress("127.10.10.10", 8181), TrafficDirection: envoy_core_v3.TrafficDirection_OUTBOUND, FilterChains: []*envoy_listener_v3.FilterChain{ { @@ -778,7 +777,7 @@ func makeTestRoute(t *testing.T, fixtureName string) *envoy_route_v3.RouteConfig case "http2:db", "http:db": return &envoy_route_v3.RouteConfiguration{ Name: "db", - ValidateClusters: response.MakeBoolValue(true), + ValidateClusters: makeBoolValue(true), VirtualHosts: []*envoy_route_v3.VirtualHost{ { Name: "db", diff --git a/agent/xds/z_xds_packages_test.go b/agent/xds/z_xds_packages_test.go index f5f0435189338..149490678cf27 100644 --- a/agent/xds/z_xds_packages_test.go +++ b/agent/xds/z_xds_packages_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xds diff --git a/agent/xdsv2/cluster_resources.go b/agent/xdsv2/cluster_resources.go deleted file mode 100644 index 5eedd1f21f378..0000000000000 --- a/agent/xdsv2/cluster_resources.go +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xdsv2 - -import ( - "errors" - "fmt" - - envoy_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" - envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - envoy_aggregate_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/aggregate/v3" - envoy_upstreams_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3" - envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" - - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" -) - -func (pr *ProxyResources) doesEnvoyClusterAlreadyExist(name string) bool { - // TODO(proxystate): consider using a map instead of [] for this kind of lookup - for _, envoyCluster := range pr.envoyResources[xdscommon.ClusterType] { - if envoyCluster.(*envoy_cluster_v3.Cluster).Name == name { - return true - } - } - return false -} - -func (pr *ProxyResources) makeXDSClusters() ([]proto.Message, error) { - clusters := make([]proto.Message, 0) - - for clusterName := range pr.proxyState.Clusters { - protoCluster, err := pr.makeClusters(clusterName) - // TODO: aggregate errors for clusters and still return any properly formed clusters. - if err != nil { - return nil, err - } - clusters = append(clusters, protoCluster...) - } - - return clusters, nil -} - -func (pr *ProxyResources) makeClusters(name string) ([]proto.Message, error) { - clusters := make([]proto.Message, 0) - proxyStateCluster, ok := pr.proxyState.Clusters[name] - if !ok { - return nil, fmt.Errorf("cluster %q not found", name) - } - - if pr.doesEnvoyClusterAlreadyExist(name) { - // don't error - return []proto.Message{}, nil - } - - switch proxyStateCluster.Group.(type) { - case *pbproxystate.Cluster_FailoverGroup: - fg := proxyStateCluster.GetFailoverGroup() - clusters, err := pr.makeEnvoyAggregateCluster(name, proxyStateCluster.Protocol, fg) - if err != nil { - return nil, err - } - for _, c := range clusters { - clusters = append(clusters, c) - } - - case *pbproxystate.Cluster_EndpointGroup: - eg := proxyStateCluster.GetEndpointGroup() - cluster, err := pr.makeEnvoyCluster(name, proxyStateCluster.Protocol, eg) - if err != nil { - return nil, err - } - clusters = append(clusters, cluster) - - default: - return nil, errors.New("cluster group type should be Endpoint Group or Failover Group") - } - return clusters, nil -} - -func (pr *ProxyResources) makeEnvoyCluster(name string, protocol string, eg *pbproxystate.EndpointGroup) (*envoy_cluster_v3.Cluster, error) { - if eg != nil { - switch t := eg.Group.(type) { - case *pbproxystate.EndpointGroup_Dynamic: - dynamic := eg.GetDynamic() - return pr.makeEnvoyDynamicCluster(name, protocol, dynamic) - case *pbproxystate.EndpointGroup_Static: - static := eg.GetStatic() - return pr.makeEnvoyStaticCluster(name, protocol, static) - case *pbproxystate.EndpointGroup_Dns: - dns := eg.GetDns() - return pr.makeEnvoyDnsCluster(name, protocol, dns) - case *pbproxystate.EndpointGroup_Passthrough: - passthrough := eg.GetPassthrough() - return pr.makeEnvoyPassthroughCluster(name, protocol, passthrough) - default: - return nil, fmt.Errorf("unsupported endpoint group type: %s", t) - } - } - return nil, fmt.Errorf("no endpoint group") -} - -func (pr *ProxyResources) makeEnvoyDynamicCluster(name string, protocol string, dynamic *pbproxystate.DynamicEndpointGroup) (*envoy_cluster_v3.Cluster, error) { - cluster := &envoy_cluster_v3.Cluster{ - Name: name, - ClusterDiscoveryType: &envoy_cluster_v3.Cluster_Type{Type: envoy_cluster_v3.Cluster_EDS}, - EdsClusterConfig: &envoy_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: &envoy_core_v3.ConfigSource{ - ResourceApiVersion: envoy_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_core_v3.ConfigSource_Ads{ - Ads: &envoy_core_v3.AggregatedConfigSource{}, - }, - }, - }, - } - err := addHttpProtocolOptions(protocol, cluster) - if err != nil { - return nil, err - } - if dynamic.Config != nil { - if dynamic.Config.UseAltStatName { - cluster.AltStatName = name - } - cluster.ConnectTimeout = dynamic.Config.ConnectTimeout - if !dynamic.Config.DisablePanicThreshold { - cluster.CommonLbConfig = &envoy_cluster_v3.Cluster_CommonLbConfig{ - HealthyPanicThreshold: &envoy_type_v3.Percent{ - Value: 0, // disable panic threshold - }, - } - } - addEnvoyCircuitBreakers(dynamic.Config.CircuitBreakers, cluster) - addEnvoyOutlierDetection(dynamic.Config.OutlierDetection, cluster) - - err := addEnvoyLBToCluster(dynamic.Config, cluster) - if err != nil { - return nil, err - } - } - - if dynamic.OutboundTls != nil { - envoyTransportSocket, err := pr.makeEnvoyTransportSocket(dynamic.OutboundTls) - if err != nil { - return nil, err - } - cluster.TransportSocket = envoyTransportSocket - } - - return cluster, nil - -} - -func (pr *ProxyResources) makeEnvoyStaticCluster(name string, protocol string, static *pbproxystate.StaticEndpointGroup) (*envoy_cluster_v3.Cluster, error) { - endpointList, ok := pr.proxyState.Endpoints[name] - if !ok || endpointList == nil { - return nil, fmt.Errorf("static cluster %q is missing endpoints", name) - } - cluster := &envoy_cluster_v3.Cluster{ - Name: name, - ClusterDiscoveryType: &envoy_cluster_v3.Cluster_Type{Type: envoy_cluster_v3.Cluster_STATIC}, - LoadAssignment: makeEnvoyClusterLoadAssignment(name, endpointList.Endpoints), - } - err := addHttpProtocolOptions(protocol, cluster) - if err != nil { - return nil, err - } - - if static.Config != nil { - cluster.ConnectTimeout = static.Config.ConnectTimeout - addEnvoyCircuitBreakers(static.GetConfig().CircuitBreakers, cluster) - } - return cluster, nil -} -func (pr *ProxyResources) makeEnvoyDnsCluster(name string, protocol string, dns *pbproxystate.DNSEndpointGroup) (*envoy_cluster_v3.Cluster, error) { - return nil, nil -} -func (pr *ProxyResources) makeEnvoyPassthroughCluster(name string, protocol string, passthrough *pbproxystate.PassthroughEndpointGroup) (*envoy_cluster_v3.Cluster, error) { - cluster := &envoy_cluster_v3.Cluster{ - Name: name, - ConnectTimeout: passthrough.Config.ConnectTimeout, - LbPolicy: envoy_cluster_v3.Cluster_CLUSTER_PROVIDED, - ClusterDiscoveryType: &envoy_cluster_v3.Cluster_Type{Type: envoy_cluster_v3.Cluster_ORIGINAL_DST}, - } - if passthrough.OutboundTls != nil { - envoyTransportSocket, err := pr.makeEnvoyTransportSocket(passthrough.OutboundTls) - if err != nil { - return nil, err - } - cluster.TransportSocket = envoyTransportSocket - } - err := addHttpProtocolOptions(protocol, cluster) - if err != nil { - return nil, err - } - return cluster, nil -} - -func (pr *ProxyResources) makeEnvoyAggregateCluster(name string, protocol string, fg *pbproxystate.FailoverGroup) ([]*envoy_cluster_v3.Cluster, error) { - var clusters []*envoy_cluster_v3.Cluster - if fg != nil { - - var egNames []string - for _, eg := range fg.EndpointGroups { - cluster, err := pr.makeEnvoyCluster(name, protocol, eg) - if err != nil { - return nil, err - } - egNames = append(egNames, cluster.Name) - clusters = append(clusters, cluster) - } - aggregateClusterConfig, err := anypb.New(&envoy_aggregate_cluster_v3.ClusterConfig{ - Clusters: egNames, - }) - - if err != nil { - return nil, err - } - - c := &envoy_cluster_v3.Cluster{ - Name: name, - AltStatName: name, - ConnectTimeout: fg.Config.ConnectTimeout, - LbPolicy: envoy_cluster_v3.Cluster_CLUSTER_PROVIDED, - ClusterDiscoveryType: &envoy_cluster_v3.Cluster_ClusterType{ - ClusterType: &envoy_cluster_v3.Cluster_CustomClusterType{ - Name: "envoy.clusters.aggregate", - TypedConfig: aggregateClusterConfig, - }, - }, - } - err = addHttpProtocolOptions(protocol, c) - if err != nil { - return nil, err - } - clusters = append(clusters, c) - } - return clusters, nil -} - -func addHttpProtocolOptions(protocol string, c *envoy_cluster_v3.Cluster) error { - if !(protocol == "http2" || protocol == "grpc") { - // do not error. returning nil means it won't get set. - return nil - } - cfg := &envoy_upstreams_v3.HttpProtocolOptions{ - UpstreamProtocolOptions: &envoy_upstreams_v3.HttpProtocolOptions_ExplicitHttpConfig_{ - ExplicitHttpConfig: &envoy_upstreams_v3.HttpProtocolOptions_ExplicitHttpConfig{ - ProtocolConfig: &envoy_upstreams_v3.HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions{ - Http2ProtocolOptions: &envoy_core_v3.Http2ProtocolOptions{}, - }, - }, - }, - } - any, err := anypb.New(cfg) - if err != nil { - return err - } - c.TypedExtensionProtocolOptions = map[string]*anypb.Any{ - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": any, - } - return nil -} - -// addEnvoyOutlierDetection will add outlier detection config to the cluster, and if nil, add empty OutlierDetection to -// enable it with default values -func addEnvoyOutlierDetection(outlierDetection *pbproxystate.OutlierDetection, c *envoy_cluster_v3.Cluster) { - if outlierDetection == nil { - return - } - od := &envoy_cluster_v3.OutlierDetection{ - BaseEjectionTime: outlierDetection.GetBaseEjectionTime(), - Consecutive_5Xx: outlierDetection.GetConsecutive_5Xx(), - EnforcingConsecutive_5Xx: outlierDetection.GetEnforcingConsecutive_5Xx(), - Interval: outlierDetection.GetInterval(), - MaxEjectionPercent: outlierDetection.GetMaxEjectionPercent(), - } - c.OutlierDetection = od - -} - -func addEnvoyCircuitBreakers(circuitBreakers *pbproxystate.CircuitBreakers, c *envoy_cluster_v3.Cluster) { - if circuitBreakers != nil { - if circuitBreakers.UpstreamLimits == nil { - c.CircuitBreakers = &envoy_cluster_v3.CircuitBreakers{} - return - } - threshold := &envoy_cluster_v3.CircuitBreakers_Thresholds{} - threshold.MaxConnections = circuitBreakers.UpstreamLimits.MaxConnections - threshold.MaxPendingRequests = circuitBreakers.UpstreamLimits.MaxPendingRequests - threshold.MaxRequests = circuitBreakers.UpstreamLimits.MaxConcurrentRequests - - c.CircuitBreakers = &envoy_cluster_v3.CircuitBreakers{ - Thresholds: []*envoy_cluster_v3.CircuitBreakers_Thresholds{threshold}, - } - } -} - -func addEnvoyLBToCluster(dynamicConfig *pbproxystate.DynamicEndpointGroupConfig, c *envoy_cluster_v3.Cluster) error { - if dynamicConfig == nil || dynamicConfig.LbPolicy == nil { - return nil - } - - switch d := dynamicConfig.LbPolicy.(type) { - case *pbproxystate.DynamicEndpointGroupConfig_LeastRequest: - c.LbPolicy = envoy_cluster_v3.Cluster_LEAST_REQUEST - - lb := dynamicConfig.LbPolicy.(*pbproxystate.DynamicEndpointGroupConfig_LeastRequest) - if lb.LeastRequest != nil { - c.LbConfig = &envoy_cluster_v3.Cluster_LeastRequestLbConfig_{ - LeastRequestLbConfig: &envoy_cluster_v3.Cluster_LeastRequestLbConfig{ - ChoiceCount: lb.LeastRequest.ChoiceCount, - }, - } - } - case *pbproxystate.DynamicEndpointGroupConfig_RoundRobin: - c.LbPolicy = envoy_cluster_v3.Cluster_ROUND_ROBIN - - case *pbproxystate.DynamicEndpointGroupConfig_Random: - c.LbPolicy = envoy_cluster_v3.Cluster_RANDOM - - case *pbproxystate.DynamicEndpointGroupConfig_RingHash: - c.LbPolicy = envoy_cluster_v3.Cluster_RING_HASH - - lb := dynamicConfig.LbPolicy.(*pbproxystate.DynamicEndpointGroupConfig_RingHash) - if lb.RingHash != nil { - c.LbConfig = &envoy_cluster_v3.Cluster_RingHashLbConfig_{ - RingHashLbConfig: &envoy_cluster_v3.Cluster_RingHashLbConfig{ - MinimumRingSize: lb.RingHash.MinimumRingSize, - MaximumRingSize: lb.RingHash.MaximumRingSize, - }, - } - } - case *pbproxystate.DynamicEndpointGroupConfig_Maglev: - c.LbPolicy = envoy_cluster_v3.Cluster_MAGLEV - - default: - return fmt.Errorf("unsupported load balancer policy %q for cluster %q", d, c.Name) - } - return nil -} - -// TODO(proxystate): In a future PR this will create clusters and add it to ProxyResources.proxyState -func (pr *ProxyResources) makeEnvoyClusterFromL4Destination(name string) error { - return nil -} diff --git a/agent/xdsv2/endpoint_resources.go b/agent/xdsv2/endpoint_resources.go deleted file mode 100644 index c493c48f640d2..0000000000000 --- a/agent/xdsv2/endpoint_resources.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xdsv2 - -import ( - envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - envoy_endpoint_v3 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "google.golang.org/protobuf/proto" -) - -func makeEnvoyLbEndpoint(endpoint *pbproxystate.Endpoint) *envoy_endpoint_v3.LbEndpoint { - hs := int32(endpoint.GetHealthStatus().Number()) - return &envoy_endpoint_v3.LbEndpoint{ - HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{ - Endpoint: makeEnvoyEndpoint(endpoint), - }, - HealthStatus: envoy_core_v3.HealthStatus(hs), - LoadBalancingWeight: endpoint.GetLoadBalancingWeight(), - } -} - -func makeEnvoyEndpoint(endpoint *pbproxystate.Endpoint) *envoy_endpoint_v3.Endpoint { - var address *envoy_core_v3.Address - if endpoint.GetUnixSocket() != nil { - address = response.MakePipeAddress(endpoint.GetUnixSocket().GetPath(), 0) - } else { - address = response.MakeAddress(endpoint.GetHostPort().GetHost(), int(endpoint.GetHostPort().Port)) - } - - return &envoy_endpoint_v3.Endpoint{ - Address: address, - } -} - -func makeEnvoyClusterLoadAssignment(clusterName string, endpoints []*pbproxystate.Endpoint) *envoy_endpoint_v3.ClusterLoadAssignment { - localityLbEndpoints := &envoy_endpoint_v3.LocalityLbEndpoints{} - for _, endpoint := range endpoints { - localityLbEndpoints.LbEndpoints = append(localityLbEndpoints.LbEndpoints, makeEnvoyLbEndpoint(endpoint)) - } - return &envoy_endpoint_v3.ClusterLoadAssignment{ - ClusterName: clusterName, - Endpoints: []*envoy_endpoint_v3.LocalityLbEndpoints{localityLbEndpoints}, - } -} - -func (pr *ProxyResources) makeXDSEndpoints() ([]proto.Message, error) { - endpoints := make([]proto.Message, 0) - - for clusterName, eps := range pr.proxyState.GetEndpoints() { - // TODO(jm): this does not seem like the best way. - if clusterName != xdscommon.LocalAppClusterName { - protoEndpoint := makeEnvoyClusterLoadAssignment(clusterName, eps.Endpoints) - endpoints = append(endpoints, protoEndpoint) - } - } - - return endpoints, nil -} diff --git a/agent/xdsv2/listener_resources.go b/agent/xdsv2/listener_resources.go deleted file mode 100644 index f3a241f0cbe31..0000000000000 --- a/agent/xdsv2/listener_resources.go +++ /dev/null @@ -1,984 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xdsv2 - -import ( - "fmt" - "sort" - "strconv" - - envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - envoy_listener_v3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" - envoy_rbac_v3 "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v3" - envoy_grpc_http1_bridge_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_bridge/v3" - envoy_grpc_stats_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_stats/v3" - envoy_http_router_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3" - envoy_extensions_filters_listener_http_inspector_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/http_inspector/v3" - envoy_original_dst_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/original_dst/v3" - envoy_tls_inspector_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/tls_inspector/v3" - envoy_connection_limit_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/connection_limit/v3" - envoy_http_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" - envoy_network_rbac_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/rbac/v3" - envoy_sni_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_cluster/v3" - envoy_tcp_proxy_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3" - envoy_tls_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" - envoy_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" - envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/wrapperspb" - - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/lib" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" -) - -const ( - envoyNetworkFilterName = "envoy.filters.network.tcp_proxy" - envoyOriginalDestinationListenerFilterName = "envoy.filters.listener.original_dst" - envoyTLSInspectorListenerFilterName = "envoy.filters.listener.tls_inspector" - envoyHttpInspectorListenerFilterName = "envoy.filters.listener.http_inspector" - envoyHttpConnectionManagerFilterName = "envoy.filters.network.http_connection_manager" -) - -func (pr *ProxyResources) makeXDSListeners() ([]proto.Message, error) { - listeners := make([]proto.Message, 0) - - for _, l := range pr.proxyState.Listeners { - protoListener, err := pr.makeListener(l) - // TODO: aggregate errors for listeners and still return any properly formed listeners. - if err != nil { - return nil, err - } - listeners = append(listeners, protoListener) - } - return listeners, nil -} - -func (pr *ProxyResources) makeListener(listener *pbproxystate.Listener) (*envoy_listener_v3.Listener, error) { - envoyListener := &envoy_listener_v3.Listener{} - - // Listener Address - var address *envoy_core_v3.Address - switch listener.BindAddress.(type) { - case *pbproxystate.Listener_HostPort: - address = makeIpPortEnvoyAddress(listener.BindAddress.(*pbproxystate.Listener_HostPort)) - case *pbproxystate.Listener_UnixSocket: - address = makeUnixSocketEnvoyAddress(listener.BindAddress.(*pbproxystate.Listener_UnixSocket)) - default: - // This should be impossible to reach because we're using protobufs. - return nil, fmt.Errorf("invalid listener bind address type: %t", listener.BindAddress) - } - envoyListener.Address = address - - // Listener Direction - var direction envoy_core_v3.TrafficDirection - switch listener.Direction { - case pbproxystate.Direction_DIRECTION_OUTBOUND: - direction = envoy_core_v3.TrafficDirection_OUTBOUND - case pbproxystate.Direction_DIRECTION_INBOUND: - direction = envoy_core_v3.TrafficDirection_INBOUND - case pbproxystate.Direction_DIRECTION_UNSPECIFIED: - direction = envoy_core_v3.TrafficDirection_UNSPECIFIED - default: - return nil, fmt.Errorf("no direction for listener %+v", listener.Name) - } - envoyListener.TrafficDirection = direction - - // Before creating the filter chains, sort routers by match to avoid draining if the list is provided out of order. - sortRouters(listener.Routers) - - // Listener filter chains - for _, r := range listener.Routers { - filterChain, err := pr.makeEnvoyListenerFilterChain(r) - if err != nil { - return nil, fmt.Errorf("could not make filter chain: %w", err) - } - envoyListener.FilterChains = append(envoyListener.FilterChains, filterChain) - } - - if listener.DefaultRouter != nil { - defaultFilterChain, err := pr.makeEnvoyListenerFilterChain(listener.DefaultRouter) - if err != nil { - return nil, fmt.Errorf("could not make filter chain: %w", err) - } - envoyListener.DefaultFilterChain = defaultFilterChain - } - - // Envoy builtin listener filters - for _, c := range listener.Capabilities { - listenerFilter, err := makeEnvoyListenerFilter(c) - if err != nil { - return nil, fmt.Errorf("could not make listener filter: %w", err) - } - envoyListener.ListenerFilters = append(envoyListener.ListenerFilters, listenerFilter) - } - - err := addEnvoyListenerConnectionBalanceConfig(listener.BalanceConnections, envoyListener) - if err != nil { - return nil, err - } - - envoyListener.Name = listener.Name - envoyListener.Address = address - envoyListener.TrafficDirection = direction - - return envoyListener, nil -} - -func makeEnvoyConnectionLimitFilter(maxInboundConns uint64) (*envoy_listener_v3.Filter, error) { - cfg := &envoy_connection_limit_v3.ConnectionLimit{ - StatPrefix: "inbound_connection_limit", - MaxConnections: wrapperspb.UInt64(maxInboundConns), - } - - return makeEnvoyFilter("envoy.filters.network.connection_limit", cfg) -} - -func addEnvoyListenerConnectionBalanceConfig(balanceType pbproxystate.BalanceConnections, listener *envoy_listener_v3.Listener) error { - switch balanceType { - case pbproxystate.BalanceConnections_BALANCE_CONNECTIONS_DEFAULT: - // Default with no balancing. - return nil - case pbproxystate.BalanceConnections_BALANCE_CONNECTIONS_EXACT: - listener.ConnectionBalanceConfig = &envoy_listener_v3.Listener_ConnectionBalanceConfig{ - BalanceType: &envoy_listener_v3.Listener_ConnectionBalanceConfig_ExactBalance_{}, - } - return nil - default: - // This should be impossible using protobufs. - return fmt.Errorf("unsupported connection balance option: %+v", balanceType) - } -} - -func makeIpPortEnvoyAddress(address *pbproxystate.Listener_HostPort) *envoy_core_v3.Address { - return &envoy_core_v3.Address{ - Address: &envoy_core_v3.Address_SocketAddress{ - SocketAddress: &envoy_core_v3.SocketAddress{ - Address: address.HostPort.Host, - PortSpecifier: &envoy_core_v3.SocketAddress_PortValue{ - PortValue: address.HostPort.Port, - }, - }, - }, - } -} - -func makeUnixSocketEnvoyAddress(address *pbproxystate.Listener_UnixSocket) *envoy_core_v3.Address { - modeInt, err := strconv.ParseUint(address.UnixSocket.Mode, 0, 32) - if err != nil { - modeInt = 0 - } - return &envoy_core_v3.Address{ - Address: &envoy_core_v3.Address_Pipe{ - Pipe: &envoy_core_v3.Pipe{ - Path: address.UnixSocket.Path, - Mode: uint32(modeInt), - }, - }, - } -} - -func (pr *ProxyResources) makeEnvoyListenerFilterChain(router *pbproxystate.Router) (*envoy_listener_v3.FilterChain, error) { - envoyFilterChain := &envoy_listener_v3.FilterChain{} - - if router == nil { - return nil, fmt.Errorf("no router to create filter chain") - } - - // Router Match - match := makeEnvoyFilterChainMatch(router.Match) - if match != nil { - envoyFilterChain.FilterChainMatch = match - } - - // Router Destination - var envoyFilters []*envoy_listener_v3.Filter - switch router.Destination.(type) { - case *pbproxystate.Router_L4: - l4Filters, err := pr.makeEnvoyResourcesForL4Destination(router.Destination.(*pbproxystate.Router_L4)) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, l4Filters...) - case *pbproxystate.Router_L7: - l7 := router.Destination.(*pbproxystate.Router_L7) - l7Filters, err := pr.makeEnvoyResourcesForL7Destination(l7) - if err != nil { - return nil, err - } - - // Inject ALPN protocols to router's TLS if destination is L7 - if router.InboundTls != nil { - router.InboundTls.AlpnProtocols = getAlpnProtocols(l7.L7.Protocol) - } - envoyFilters = append(envoyFilters, l7Filters...) - case *pbproxystate.Router_Sni: - sniFilters, err := pr.makeEnvoyResourcesForSNIDestination(router.Destination.(*pbproxystate.Router_Sni)) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, sniFilters...) - default: - // This should be impossible using protobufs. - return nil, fmt.Errorf("unsupported destination type: %t", router.Destination) - - } - - // Router TLS - ts, err := pr.makeEnvoyTransportSocket(router.InboundTls) - if err != nil { - return nil, err - } - envoyFilterChain.TransportSocket = ts - - envoyFilterChain.Filters = envoyFilters - return envoyFilterChain, err -} - -func makeEnvoyFilterChainMatch(routerMatch *pbproxystate.Match) *envoy_listener_v3.FilterChainMatch { - var envoyFilterChainMatch *envoy_listener_v3.FilterChainMatch - if routerMatch != nil { - envoyFilterChainMatch = &envoy_listener_v3.FilterChainMatch{} - - envoyFilterChainMatch.DestinationPort = routerMatch.DestinationPort - - if len(routerMatch.ServerNames) > 0 { - var serverNames []string - for _, n := range routerMatch.ServerNames { - serverNames = append(serverNames, n) - } - envoyFilterChainMatch.ServerNames = serverNames - } - if len(routerMatch.PrefixRanges) > 0 { - sortPrefixRanges(routerMatch.PrefixRanges) - var ranges []*envoy_core_v3.CidrRange - for _, r := range routerMatch.PrefixRanges { - cidrRange := &envoy_core_v3.CidrRange{ - PrefixLen: r.PrefixLen, - AddressPrefix: r.AddressPrefix, - } - ranges = append(ranges, cidrRange) - } - envoyFilterChainMatch.PrefixRanges = ranges - } - if len(routerMatch.SourcePrefixRanges) > 0 { - var ranges []*envoy_core_v3.CidrRange - for _, r := range routerMatch.SourcePrefixRanges { - cidrRange := &envoy_core_v3.CidrRange{ - PrefixLen: r.PrefixLen, - AddressPrefix: r.AddressPrefix, - } - ranges = append(ranges, cidrRange) - } - envoyFilterChainMatch.SourcePrefixRanges = ranges - } - } - return envoyFilterChainMatch -} - -func (pr *ProxyResources) makeEnvoyResourcesForSNIDestination(sni *pbproxystate.Router_Sni) ([]*envoy_listener_v3.Filter, error) { - var envoyFilters []*envoy_listener_v3.Filter - sniFilter, err := makeEnvoyFilter("envoy.filters.network.sni_cluster", &envoy_sni_cluster_v3.SniCluster{}) - if err != nil { - return nil, err - } - tcp := &envoy_tcp_proxy_v3.TcpProxy{ - StatPrefix: sni.Sni.StatPrefix, - ClusterSpecifier: &envoy_tcp_proxy_v3.TcpProxy_Cluster{Cluster: ""}, - } - tcpFilter, err := makeEnvoyFilter(envoyNetworkFilterName, tcp) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, sniFilter, tcpFilter) - return envoyFilters, err -} - -func (pr *ProxyResources) makeEnvoyResourcesForL4Destination(l4 *pbproxystate.Router_L4) ([]*envoy_listener_v3.Filter, error) { - err := pr.makeEnvoyClusterFromL4Destination(l4.L4.Name) - if err != nil { - return nil, err - } - envoyFilters, err := makeL4Filters(l4.L4) - return envoyFilters, err -} - -func (pr *ProxyResources) makeEnvoyResourcesForL7Destination(l7 *pbproxystate.Router_L7) ([]*envoy_listener_v3.Filter, error) { - envoyFilters, err := pr.makeL7Filters(l7.L7) - if err != nil { - return nil, err - } - return envoyFilters, err -} - -func getAlpnProtocols(protocol pbproxystate.L7Protocol) []string { - var alpnProtocols []string - - switch protocol { - case pbproxystate.L7Protocol_L7_PROTOCOL_GRPC, pbproxystate.L7Protocol_L7_PROTOCOL_HTTP2: - alpnProtocols = append(alpnProtocols, "h2", "http/1.1") - case pbproxystate.L7Protocol_L7_PROTOCOL_HTTP: - alpnProtocols = append(alpnProtocols, "http/1.1") - } - - return alpnProtocols -} - -func makeL4Filters(l4 *pbproxystate.L4Destination) ([]*envoy_listener_v3.Filter, error) { - var envoyFilters []*envoy_listener_v3.Filter - if l4 != nil { - // Add rbac filter. RBAC filter needs to be added first so any - // unauthorized connections will get rejected. - // TODO(proxystate): Intentions will be added in the future. - if l4.AddEmptyIntention { - rbacFilter, err := makeEmptyRBACNetworkFilter() - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, rbacFilter) - } - - if l4.MaxInboundConnections > 0 { - connectionLimitFilter, err := makeEnvoyConnectionLimitFilter(l4.MaxInboundConnections) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, connectionLimitFilter) - } - - // Add tcp proxy filter - tcp := &envoy_tcp_proxy_v3.TcpProxy{ - ClusterSpecifier: &envoy_tcp_proxy_v3.TcpProxy_Cluster{Cluster: l4.Name}, - StatPrefix: l4.StatPrefix, - } - tcpFilter, err := makeEnvoyFilter(envoyNetworkFilterName, tcp) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, tcpFilter) - } - return envoyFilters, nil - -} - -func makeEmptyRBACNetworkFilter() (*envoy_listener_v3.Filter, error) { - cfg := &envoy_network_rbac_v3.RBAC{ - StatPrefix: "connect_authz", - Rules: &envoy_rbac_v3.RBAC{}, - } - filter, err := makeEnvoyFilter("envoy.filters.network.rbac", cfg) - if err != nil { - return nil, err - } - return filter, nil -} - -// TODO: Forward client cert details will be added as part of L7 listeners task. -func (pr *ProxyResources) makeL7Filters(l7 *pbproxystate.L7Destination) ([]*envoy_listener_v3.Filter, error) { - var envoyFilters []*envoy_listener_v3.Filter - var httpConnMgr *envoy_http_v3.HttpConnectionManager - - if l7 != nil { - // TODO: Intentions will be added in the future. - if l7.MaxInboundConnections > 0 { - connLimitFilter, err := makeEnvoyConnectionLimitFilter(l7.MaxInboundConnections) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, connLimitFilter) - } - envoyHttpRouter, err := makeEnvoyHTTPFilter("envoy.filters.http.router", &envoy_http_router_v3.Router{}) - if err != nil { - return nil, err - } - - httpConnMgr = &envoy_http_v3.HttpConnectionManager{ - StatPrefix: l7.StatPrefix, - CodecType: envoy_http_v3.HttpConnectionManager_AUTO, - HttpFilters: []*envoy_http_v3.HttpFilter{ - envoyHttpRouter, - }, - Tracing: &envoy_http_v3.HttpConnectionManager_Tracing{ - // Don't trace any requests by default unless the client application - // explicitly propagates trace headers that indicate this should be - // sampled. - RandomSampling: &envoy_type_v3.Percent{Value: 0.0}, - }, - // Explicitly enable WebSocket upgrades for all HTTP listeners - UpgradeConfigs: []*envoy_http_v3.HttpConnectionManager_UpgradeConfig{ - {UpgradeType: "websocket"}, - }, - } - - routeConfig, err := pr.makeEnvoyRoute(l7.Name) - if err != nil { - return nil, err - } - - if l7.StaticRoute { - httpConnMgr.RouteSpecifier = &envoy_http_v3.HttpConnectionManager_RouteConfig{ - RouteConfig: routeConfig, - } - } else { - // Add Envoy route under the route resource since it's not inlined. - pr.envoyResources[xdscommon.RouteType] = append(pr.envoyResources[xdscommon.RouteType], routeConfig) - - httpConnMgr.RouteSpecifier = &envoy_http_v3.HttpConnectionManager_Rds{ - Rds: &envoy_http_v3.Rds{ - RouteConfigName: l7.Name, - ConfigSource: &envoy_core_v3.ConfigSource{ - ResourceApiVersion: envoy_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_core_v3.ConfigSource_Ads{ - Ads: &envoy_core_v3.AggregatedConfigSource{}, - }, - }, - }, - } - } - - // Add http2 protocol options - if l7.Protocol == pbproxystate.L7Protocol_L7_PROTOCOL_HTTP2 || l7.Protocol == pbproxystate.L7Protocol_L7_PROTOCOL_GRPC { - httpConnMgr.Http2ProtocolOptions = &envoy_core_v3.Http2ProtocolOptions{} - } - - // Add grpc envoy http filters. - if l7.Protocol == pbproxystate.L7Protocol_L7_PROTOCOL_GRPC { - grpcHttp1Bridge, err := makeEnvoyHTTPFilter( - "envoy.filters.http.grpc_http1_bridge", - &envoy_grpc_http1_bridge_v3.Config{}, - ) - if err != nil { - return nil, err - } - - // In envoy 1.14.x the default value "stats_for_all_methods=true" was - // deprecated, and was changed to "false" in 1.18.x. Avoid using the - // default. TODO: we may want to expose this to users somehow easily. - grpcStatsFilter, err := makeEnvoyHTTPFilter( - "envoy.filters.http.grpc_stats", - &envoy_grpc_stats_v3.FilterConfig{ - PerMethodStatSpecifier: &envoy_grpc_stats_v3.FilterConfig_StatsForAllMethods{ - StatsForAllMethods: &wrapperspb.BoolValue{Value: true}, - }, - }, - ) - if err != nil { - return nil, err - } - - // Add grpc bridge before envoyRouter and authz, and the stats in front of that. - httpConnMgr.HttpFilters = append([]*envoy_http_v3.HttpFilter{ - grpcStatsFilter, - grpcHttp1Bridge, - }, httpConnMgr.HttpFilters...) - } - - httpFilter, err := makeEnvoyFilter(envoyHttpConnectionManagerFilterName, httpConnMgr) - if err != nil { - return nil, err - } - envoyFilters = append(envoyFilters, httpFilter) - } - return envoyFilters, nil -} - -func (pr *ProxyResources) makeEnvoyTLSParameters(defaultParams *pbproxystate.TLSParameters, overrideParams *pbproxystate.TLSParameters) *envoy_tls_v3.TlsParameters { - tlsParams := &envoy_tls_v3.TlsParameters{} - - if overrideParams != nil { - if overrideParams.MinVersion != pbproxystate.TLSVersion_TLS_VERSION_UNSPECIFIED { - if minVersion, ok := envoyTLSVersions[overrideParams.MinVersion]; ok { - tlsParams.TlsMinimumProtocolVersion = minVersion - } - } - if overrideParams.MaxVersion != pbproxystate.TLSVersion_TLS_VERSION_UNSPECIFIED { - if maxVersion, ok := envoyTLSVersions[overrideParams.MaxVersion]; ok { - tlsParams.TlsMaximumProtocolVersion = maxVersion - } - } - if len(overrideParams.CipherSuites) != 0 { - tlsParams.CipherSuites = marshalEnvoyTLSCipherSuiteStrings(overrideParams.CipherSuites) - } - return tlsParams - } - - if defaultParams != nil { - if defaultParams.MinVersion != pbproxystate.TLSVersion_TLS_VERSION_UNSPECIFIED { - if minVersion, ok := envoyTLSVersions[defaultParams.MinVersion]; ok { - tlsParams.TlsMinimumProtocolVersion = minVersion - } - } - if defaultParams.MaxVersion != pbproxystate.TLSVersion_TLS_VERSION_UNSPECIFIED { - if maxVersion, ok := envoyTLSVersions[defaultParams.MaxVersion]; ok { - tlsParams.TlsMaximumProtocolVersion = maxVersion - } - } - if len(defaultParams.CipherSuites) != 0 { - tlsParams.CipherSuites = marshalEnvoyTLSCipherSuiteStrings(defaultParams.CipherSuites) - } - return tlsParams - } - - return tlsParams - -} - -func (pr *ProxyResources) makeEnvoyTransportSocket(ts *pbproxystate.TransportSocket) (*envoy_core_v3.TransportSocket, error) { - if ts == nil { - return nil, nil - } - commonTLSContext := &envoy_tls_v3.CommonTlsContext{} - - // Create connection TLS. Listeners should only look at inbound TLS. - switch ts.ConnectionTls.(type) { - case *pbproxystate.TransportSocket_InboundMesh: - downstreamContext := &envoy_tls_v3.DownstreamTlsContext{} - downstreamContext.CommonTlsContext = commonTLSContext - // Set TLS Parameters. - tlsParams := pr.makeEnvoyTLSParameters(pr.proxyState.Tls.InboundTlsParameters, ts.TlsParameters) - commonTLSContext.TlsParams = tlsParams - - // Set the certificate config on the tls context. - // For inbound mesh, we need to add the identity certificate - // and the validation context for the mesh depending on the provided trust bundle names. - if pr.proxyState.Tls == nil { - // if tls is nil but connection tls is provided, then the proxy state is misconfigured - return nil, fmt.Errorf("proxyState.Tls is required to generate router's transport socket") - } - im := ts.ConnectionTls.(*pbproxystate.TransportSocket_InboundMesh).InboundMesh - leaf, ok := pr.proxyState.LeafCertificates[im.IdentityKey] - if !ok { - return nil, fmt.Errorf("failed to create transport socket: leaf certificate %q not found", im.IdentityKey) - } - err := pr.makeEnvoyCertConfig(commonTLSContext, leaf) - if err != nil { - return nil, fmt.Errorf("failed to create transport socket: %w", err) - } - - // Create validation context. - // When there's only one trust bundle name, we create a simple validation context - if len(im.ValidationContext.TrustBundlePeerNameKeys) == 1 { - peerName := im.ValidationContext.TrustBundlePeerNameKeys[0] - tb, ok := pr.proxyState.TrustBundles[peerName] - if !ok { - return nil, fmt.Errorf("failed to create transport socket: provided trust bundle name does not exist in proxystate trust bundle map: %s", peerName) - } - commonTLSContext.ValidationContextType = &envoy_tls_v3.CommonTlsContext_ValidationContext{ - ValidationContext: &envoy_tls_v3.CertificateValidationContext{ - // TODO(banks): later for L7 support we may need to configure ALPN here. - TrustedCa: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: RootPEMsAsString(tb.Roots), - }, - }, - }, - } - } else if len(im.ValidationContext.TrustBundlePeerNameKeys) > 1 { - cfg := &envoy_tls_v3.SPIFFECertValidatorConfig{ - TrustDomains: make([]*envoy_tls_v3.SPIFFECertValidatorConfig_TrustDomain, 0, len(im.ValidationContext.TrustBundlePeerNameKeys)), - } - - for _, peerName := range im.ValidationContext.TrustBundlePeerNameKeys { - // Look up the trust bundle ca in the map. - tb, ok := pr.proxyState.TrustBundles[peerName] - if !ok { - return nil, fmt.Errorf("failed to create transport socket: provided bundle name does not exist in trust bundle map: %s", peerName) - } - cfg.TrustDomains = append(cfg.TrustDomains, &envoy_tls_v3.SPIFFECertValidatorConfig_TrustDomain{ - Name: tb.TrustDomain, - TrustBundle: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: RootPEMsAsString(tb.Roots), - }, - }, - }) - } - // Sort the trust domains so the output is stable. - sortTrustDomains(cfg.TrustDomains) - - spiffeConfig, err := anypb.New(cfg) - if err != nil { - return nil, err - } - commonTLSContext.ValidationContextType = &envoy_tls_v3.CommonTlsContext_ValidationContext{ - ValidationContext: &envoy_tls_v3.CertificateValidationContext{ - CustomValidatorConfig: &envoy_core_v3.TypedExtensionConfig{ - // The typed config name is hard-coded because it is not available as a wellknown var in the control plane lib. - Name: "envoy.tls.cert_validator.spiffe", - TypedConfig: spiffeConfig, - }, - }, - } - } - // Always require client certificate - downstreamContext.RequireClientCertificate = &wrapperspb.BoolValue{Value: true} - transportSocket, err := makeTransportSocket("tls", downstreamContext) - if err != nil { - return nil, err - } - return transportSocket, nil - case *pbproxystate.TransportSocket_InboundNonMesh: - downstreamContext := &envoy_tls_v3.DownstreamTlsContext{} - downstreamContext.CommonTlsContext = commonTLSContext - // Set TLS Parameters - tlsParams := pr.makeEnvoyTLSParameters(pr.proxyState.Tls.InboundTlsParameters, ts.TlsParameters) - commonTLSContext.TlsParams = tlsParams - // For non-mesh, we don't care about validation context as currently we don't support mTLS for non-mesh connections. - nonMeshTLS := ts.ConnectionTls.(*pbproxystate.TransportSocket_InboundNonMesh).InboundNonMesh - err := pr.addNonMeshCertConfig(commonTLSContext, nonMeshTLS) - if err != nil { - return nil, fmt.Errorf("failed to create transport socket: %w", err) - } - transportSocket, err := makeTransportSocket("tls", downstreamContext) - if err != nil { - return nil, err - } - return transportSocket, nil - case *pbproxystate.TransportSocket_OutboundMesh: - upstreamContext := &envoy_tls_v3.UpstreamTlsContext{} - upstreamContext.CommonTlsContext = commonTLSContext - // Set TLS Parameters - tlsParams := pr.makeEnvoyTLSParameters(pr.proxyState.Tls.OutboundTlsParameters, ts.TlsParameters) - commonTLSContext.TlsParams = tlsParams - // For outbound mesh, we need to insert the mesh identity certificate - // and the validation context for the mesh depending on the provided trust bundle names. - if pr.proxyState.Tls == nil { - // if tls is nil but connection tls is provided, then the proxy state is misconfigured - return nil, fmt.Errorf("proxyState.Tls is required to generate router's transport socket") - } - om := ts.GetOutboundMesh() - leaf, ok := pr.proxyState.LeafCertificates[om.IdentityKey] - if !ok { - return nil, fmt.Errorf("leaf %s not found in proxyState", om.IdentityKey) - } - err := pr.makeEnvoyCertConfig(commonTLSContext, leaf) - if err != nil { - return nil, fmt.Errorf("failed to create transport socket: %w", err) - } - - // Create validation context - peerName := om.ValidationContext.TrustBundlePeerNameKey - tb, ok := pr.proxyState.TrustBundles[peerName] - if !ok { - return nil, fmt.Errorf("failed to create transport socket: provided peer name does not exist in trust bundle map: %s", peerName) - } - - var matchers []*envoy_matcher_v3.StringMatcher - if len(om.ValidationContext.SpiffeIds) > 0 { - matchers = make([]*envoy_matcher_v3.StringMatcher, 0) - for _, m := range om.ValidationContext.SpiffeIds { - matchers = append(matchers, &envoy_matcher_v3.StringMatcher{ - MatchPattern: &envoy_matcher_v3.StringMatcher_Exact{ - Exact: m, - }, - }) - } - } - commonTLSContext.ValidationContextType = &envoy_tls_v3.CommonTlsContext_ValidationContext{ - ValidationContext: &envoy_tls_v3.CertificateValidationContext{ - // TODO(banks): later for L7 support we may need to configure ALPN here. - TrustedCa: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: RootPEMsAsString(tb.Roots), - }, - }, - MatchSubjectAltNames: matchers, - }, - } - - upstreamContext.Sni = om.Sni - transportSocket, err := makeTransportSocket("tls", upstreamContext) - if err != nil { - return nil, err - } - return transportSocket, nil - default: - return nil, nil - } - -} - -func (pr *ProxyResources) makeEnvoyCertConfig(common *envoy_tls_v3.CommonTlsContext, certificate *pbproxystate.LeafCertificate) error { - if certificate == nil { - return fmt.Errorf("no leaf certificate provided") - } - common.TlsCertificates = []*envoy_tls_v3.TlsCertificate{ - { - CertificateChain: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: lib.EnsureTrailingNewline(certificate.Cert), - }, - }, - PrivateKey: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: lib.EnsureTrailingNewline(certificate.Key), - }, - }, - }, - } - return nil -} - -func (pr *ProxyResources) makeEnvoySDSCertConfig(common *envoy_tls_v3.CommonTlsContext, certificate *pbproxystate.SDSCertificate) error { - if certificate == nil { - return fmt.Errorf("no SDS certificate provided") - } - common.TlsCertificateSdsSecretConfigs = []*envoy_tls_v3.SdsSecretConfig{ - { - Name: certificate.CertResource, - SdsConfig: &envoy_core_v3.ConfigSource{ - ConfigSourceSpecifier: &envoy_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_core_v3.ApiConfigSource{ - ApiType: envoy_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_core_v3.ApiVersion_V3, - // Note ClusterNames can't be set here - that's only for REST type - // we need a full GRPC config instead. - GrpcServices: []*envoy_core_v3.GrpcService{ - { - TargetSpecifier: &envoy_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: certificate.ClusterName, - }, - }, - Timeout: &durationpb.Duration{Seconds: 5}, - }, - }, - }, - }, - ResourceApiVersion: envoy_core_v3.ApiVersion_V3, - }, - }, - } - return nil -} - -func (pr *ProxyResources) addNonMeshCertConfig(common *envoy_tls_v3.CommonTlsContext, tls *pbproxystate.InboundNonMeshTLS) error { - if tls == nil { - return fmt.Errorf("no inbound non-mesh TLS provided") - } - - switch tls.Identity.(type) { - case *pbproxystate.InboundNonMeshTLS_LeafKey: - leafKey := tls.Identity.(*pbproxystate.InboundNonMeshTLS_LeafKey).LeafKey - leaf, ok := pr.proxyState.LeafCertificates[leafKey] - if !ok { - return fmt.Errorf("leaf key %s not found in leaf certificate map", leafKey) - } - common.TlsCertificates = []*envoy_tls_v3.TlsCertificate{ - { - CertificateChain: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: lib.EnsureTrailingNewline(leaf.Cert), - }, - }, - PrivateKey: &envoy_core_v3.DataSource{ - Specifier: &envoy_core_v3.DataSource_InlineString{ - InlineString: lib.EnsureTrailingNewline(leaf.Key), - }, - }, - }, - } - case *pbproxystate.InboundNonMeshTLS_Sds: - c := tls.Identity.(*pbproxystate.InboundNonMeshTLS_Sds).Sds - common.TlsCertificateSdsSecretConfigs = []*envoy_tls_v3.SdsSecretConfig{ - { - Name: c.CertResource, - SdsConfig: &envoy_core_v3.ConfigSource{ - ConfigSourceSpecifier: &envoy_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_core_v3.ApiConfigSource{ - ApiType: envoy_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_core_v3.ApiVersion_V3, - // Note ClusterNames can't be set here - that's only for REST type - // we need a full GRPC config instead. - GrpcServices: []*envoy_core_v3.GrpcService{ - { - TargetSpecifier: &envoy_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: c.ClusterName, - }, - }, - Timeout: &durationpb.Duration{Seconds: 5}, - }, - }, - }, - }, - ResourceApiVersion: envoy_core_v3.ApiVersion_V3, - }, - }, - } - } - - return nil -} - -func makeTransportSocket(name string, config proto.Message) (*envoy_core_v3.TransportSocket, error) { - any, err := anypb.New(config) - if err != nil { - return nil, err - } - return &envoy_core_v3.TransportSocket{ - Name: name, - ConfigType: &envoy_core_v3.TransportSocket_TypedConfig{ - TypedConfig: any, - }, - }, nil -} - -func makeEnvoyListenerFilter(c pbproxystate.Capability) (*envoy_listener_v3.ListenerFilter, error) { - var lf proto.Message - var name string - - switch c { - case pbproxystate.Capability_CAPABILITY_TRANSPARENT: - lf = &envoy_original_dst_v3.OriginalDst{} - name = envoyOriginalDestinationListenerFilterName - case pbproxystate.Capability_CAPABILITY_L4_TLS_INSPECTION: - name = envoyTLSInspectorListenerFilterName - lf = &envoy_tls_inspector_v3.TlsInspector{} - case pbproxystate.Capability_CAPABILITY_L7_PROTOCOL_INSPECTION: - name = envoyHttpInspectorListenerFilterName - lf = &envoy_extensions_filters_listener_http_inspector_v3.HttpInspector{} - default: - return nil, fmt.Errorf("unsupported listener captability: %s", c) - } - lfAsAny, err := anypb.New(lf) - if err != nil { - return nil, err - } - - return &envoy_listener_v3.ListenerFilter{ - Name: name, - ConfigType: &envoy_listener_v3.ListenerFilter_TypedConfig{TypedConfig: lfAsAny}, - }, nil -} - -func makeEnvoyFilter(name string, cfg proto.Message) (*envoy_listener_v3.Filter, error) { - any, err := anypb.New(cfg) - if err != nil { - return nil, err - } - - return &envoy_listener_v3.Filter{ - Name: name, - ConfigType: &envoy_listener_v3.Filter_TypedConfig{TypedConfig: any}, - }, nil -} - -func makeEnvoyHTTPFilter(name string, cfg proto.Message) (*envoy_http_v3.HttpFilter, error) { - any, err := anypb.New(cfg) - if err != nil { - return nil, err - } - - return &envoy_http_v3.HttpFilter{ - Name: name, - ConfigType: &envoy_http_v3.HttpFilter_TypedConfig{TypedConfig: any}, - }, nil -} - -func RootPEMsAsString(rootPEMs []string) string { - var rootPEMsString string - for _, root := range rootPEMs { - rootPEMsString += lib.EnsureTrailingNewline(root) - } - return rootPEMsString -} - -func marshalEnvoyTLSCipherSuiteStrings(cipherSuites []pbproxystate.TLSCipherSuite) []string { - envoyTLSCipherSuiteStrings := map[pbproxystate.TLSCipherSuite]string{ - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256: "ECDHE-ECDSA-AES128-GCM-SHA256", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305: "ECDHE-ECDSA-CHACHA20-POLY1305", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256: "ECDHE-RSA-AES128-GCM-SHA256", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305: "ECDHE-RSA-CHACHA20-POLY1305", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA: "ECDHE-ECDSA-AES128-SHA", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA: "ECDHE-RSA-AES128-SHA", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES128_GCM_SHA256: "AES128-GCM-SHA256", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES128_SHA: "AES128-SHA", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384: "ECDHE-ECDSA-AES256-GCM-SHA384", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384: "ECDHE-RSA-AES256-GCM-SHA384", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA: "ECDHE-ECDSA-AES256-SHA", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA: "ECDHE-RSA-AES256-SHA", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES256_GCM_SHA384: "AES256-GCM-SHA384", - pbproxystate.TLSCipherSuite_TLS_CIPHER_SUITE_AES256_SHA: "AES256-SHA", - } - - var cipherSuiteStrings []string - - for _, c := range cipherSuites { - if s, ok := envoyTLSCipherSuiteStrings[c]; ok { - cipherSuiteStrings = append(cipherSuiteStrings, s) - } - } - - return cipherSuiteStrings -} - -var envoyTLSVersions = map[pbproxystate.TLSVersion]envoy_tls_v3.TlsParameters_TlsProtocol{ - pbproxystate.TLSVersion_TLS_VERSION_AUTO: envoy_tls_v3.TlsParameters_TLS_AUTO, - pbproxystate.TLSVersion_TLS_VERSION_1_0: envoy_tls_v3.TlsParameters_TLSv1_0, - pbproxystate.TLSVersion_TLS_VERSION_1_1: envoy_tls_v3.TlsParameters_TLSv1_1, - pbproxystate.TLSVersion_TLS_VERSION_1_2: envoy_tls_v3.TlsParameters_TLSv1_2, - pbproxystate.TLSVersion_TLS_VERSION_1_3: envoy_tls_v3.TlsParameters_TLSv1_3, -} - -// Sort the trust domains so that the output is stable. -// This benefits tests but also prevents Envoy from mistakenly thinking the listener -// changed and needs to be drained only because this ordering is different. -func sortTrustDomains(trustDomains []*envoy_tls_v3.SPIFFECertValidatorConfig_TrustDomain) { - sort.Slice(trustDomains, func(i int, j int) bool { - return trustDomains[i].Name < trustDomains[j].Name - }) -} - -// sortRouters stable sorts routers with a Match to avoid draining if the list is provided out of order. -// xdsv1 used to sort the filter chains on outbound listeners, so this adds that functionality by sorting routers with matches. -func sortRouters(routers []*pbproxystate.Router) { - if routers == nil { - return - } - sort.SliceStable(routers, func(i, j int) bool { - si := "" - sj := "" - if routers[i].Match != nil { - if len(routers[i].Match.PrefixRanges) > 0 { - si += routers[i].Match.PrefixRanges[0].AddressPrefix + - "/" + routers[i].Match.PrefixRanges[0].PrefixLen.String() + - ":" + routers[i].Match.DestinationPort.String() - } - if len(routers[i].Match.ServerNames) > 0 { - si += routers[i].Match.ServerNames[0] + - ":" + routers[i].Match.DestinationPort.String() - } else { - si += routers[i].Match.DestinationPort.String() - } - } - - if routers[j].Match != nil { - if len(routers[j].Match.PrefixRanges) > 0 { - sj += routers[j].Match.PrefixRanges[0].AddressPrefix + - "/" + routers[j].Match.PrefixRanges[0].PrefixLen.String() + - ":" + routers[j].Match.DestinationPort.String() - } - if len(routers[j].Match.ServerNames) > 0 { - sj += routers[j].Match.ServerNames[0] + - ":" + routers[j].Match.DestinationPort.String() - } else { - sj += routers[j].Match.DestinationPort.String() - } - } - - return si < sj - }) -} - -func sortPrefixRanges(prefixRanges []*pbproxystate.CidrRange) { - if prefixRanges == nil { - return - } - sort.SliceStable(prefixRanges, func(i, j int) bool { - return prefixRanges[i].AddressPrefix < prefixRanges[j].AddressPrefix - }) -} diff --git a/agent/xdsv2/resources.go b/agent/xdsv2/resources.go deleted file mode 100644 index 46bdd08d6c500..0000000000000 --- a/agent/xdsv2/resources.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xdsv2 - -import ( - "fmt" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/go-hclog" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/envoyextensions/xdscommon" -) - -// ResourceGenerator is associated with a single gRPC stream and creates xDS -// resources for a single client. -type ResourceGenerator struct { - Logger hclog.Logger - ProxyFeatures xdscommon.SupportedProxyFeatures -} - -func NewResourceGenerator( - logger hclog.Logger, -) *ResourceGenerator { - return &ResourceGenerator{ - Logger: logger, - } -} - -type ProxyResources struct { - proxyState *pbmesh.ProxyState - envoyResources map[string][]proto.Message -} - -func (g *ResourceGenerator) AllResourcesFromIR(proxyState *pbmesh.ProxyState) (map[string][]proto.Message, error) { - pr := &ProxyResources{ - proxyState: proxyState, - envoyResources: make(map[string][]proto.Message), - } - err := pr.generateXDSResources() - if err != nil { - return nil, fmt.Errorf("failed to generate xDS resources for ProxyState: %v", err) - } - return pr.envoyResources, nil -} - -func (pr *ProxyResources) generateXDSResources() error { - listeners, err := pr.makeXDSListeners() - if err != nil { - return err - } - pr.envoyResources[xdscommon.ListenerType] = listeners - - pr.envoyResources[xdscommon.ListenerType] = listeners - - clusters, err := pr.makeXDSClusters() - if err != nil { - return err - } - pr.envoyResources[xdscommon.ClusterType] = clusters - - endpoints, err := pr.makeXDSEndpoints() - if err != nil { - return err - } - pr.envoyResources[xdscommon.EndpointType] = endpoints - - routes, err := pr.makeXDSRoutes() - if err != nil { - return err - } - pr.envoyResources[xdscommon.RouteType] = routes - - return nil -} diff --git a/agent/xdsv2/route_resources.go b/agent/xdsv2/route_resources.go deleted file mode 100644 index 931d48f26078b..0000000000000 --- a/agent/xdsv2/route_resources.go +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xdsv2 - -import ( - "fmt" - envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - envoy_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" - "github.com/hashicorp/consul/agent/xds/response" - "github.com/hashicorp/consul/envoyextensions/xdscommon" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "google.golang.org/protobuf/types/known/wrapperspb" - "strings" - - envoy_route_v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" - "google.golang.org/protobuf/proto" -) - -func (pr *ProxyResources) makeXDSRoutes() ([]proto.Message, error) { - routes := make([]proto.Message, 0) - - for name, r := range pr.proxyState.Routes { - protoRoute := pr.makeEnvoyRouteConfigFromProxystateRoute(name, r) - // TODO: aggregate errors for routes and still return any properly formed routes. - routes = append(routes, protoRoute) - } - - return routes, nil -} - -func (pr *ProxyResources) makeEnvoyRoute(name string) (*envoy_route_v3.RouteConfiguration, error) { - var route *envoy_route_v3.RouteConfiguration - // TODO(proxystate): This will make routes in the future. This function should distinguish between static routes - // inlined into listeners and non-static routes that should be added as top level Envoy resources. - _, ok := pr.proxyState.Routes[name] - if !ok { - // This should not happen with a valid proxy state. - return nil, fmt.Errorf("could not find route in ProxyState: %s", name) - - } - return route, nil -} - -// makeEnvoyRouteConfigFromProxystateRoute converts the proxystate representation of a Route into Envoy proto message -// form. We don't throw any errors here, since the proxystate has already been validated. -func (pr *ProxyResources) makeEnvoyRouteConfigFromProxystateRoute(name string, psRoute *pbproxystate.Route) *envoy_route_v3.RouteConfiguration { - - envoyRouteConfig := &envoy_route_v3.RouteConfiguration{ - Name: name, - // ValidateClusters defaults to true when defined statically and false - // when done via RDS. Re-set the reasonable value of true to prevent - // null-routing traffic. - ValidateClusters: response.MakeBoolValue(true), - } - - for _, vh := range psRoute.GetVirtualHosts() { - envoyRouteConfig.VirtualHosts = append(envoyRouteConfig.VirtualHosts, pr.makeEnvoyVHFromProxystateVH(vh)) - } - - return envoyRouteConfig -} - -func (pr *ProxyResources) makeEnvoyVHFromProxystateVH(psVirtualHost *pbproxystate.VirtualHost) *envoy_route_v3.VirtualHost { - envoyVirtualHost := &envoy_route_v3.VirtualHost{ - Name: psVirtualHost.Name, - Domains: psVirtualHost.GetDomains(), - } - - for _, rr := range psVirtualHost.GetRouteRules() { - envoyVirtualHost.Routes = append(envoyVirtualHost.Routes, pr.makeEnvoyRouteFromProxystateRouteRule(rr)) - } - - for _, hm := range psVirtualHost.GetHeaderMutations() { - injectEnvoyVirtualHostWithProxystateHeaderMutation(envoyVirtualHost, hm) - } - - return envoyVirtualHost -} - -func (pr *ProxyResources) makeEnvoyRouteFromProxystateRouteRule(psRouteRule *pbproxystate.RouteRule) *envoy_route_v3.Route { - envoyRouteRule := &envoy_route_v3.Route{ - Match: makeEnvoyRouteMatchFromProxystateRouteMatch(psRouteRule.GetMatch()), - Action: pr.makeEnvoyRouteActionFromProxystateRouteDestination(psRouteRule.GetDestination()), - } - - for _, hm := range psRouteRule.GetHeaderMutations() { - injectEnvoyRouteRuleWithProxystateHeaderMutation(envoyRouteRule, hm) - } - - return envoyRouteRule -} - -func makeEnvoyRouteMatchFromProxystateRouteMatch(psRouteMatch *pbproxystate.RouteMatch) *envoy_route_v3.RouteMatch { - envoyRouteMatch := &envoy_route_v3.RouteMatch{} - - switch psRouteMatch.PathMatch.GetPathMatch().(type) { - case *pbproxystate.PathMatch_Exact: - envoyRouteMatch.PathSpecifier = &envoy_route_v3.RouteMatch_Path{ - Path: psRouteMatch.PathMatch.GetExact(), - } - case *pbproxystate.PathMatch_Prefix: - envoyRouteMatch.PathSpecifier = &envoy_route_v3.RouteMatch_Prefix{ - Prefix: psRouteMatch.PathMatch.GetPrefix(), - } - case *pbproxystate.PathMatch_Regex: - envoyRouteMatch.PathSpecifier = &envoy_route_v3.RouteMatch_SafeRegex{ - SafeRegex: makeEnvoyRegexMatch(psRouteMatch.PathMatch.GetRegex()), - } - default: - // This shouldn't be possible considering the types of PathMatch - return nil - } - - if len(psRouteMatch.GetHeaderMatches()) > 0 { - envoyRouteMatch.Headers = make([]*envoy_route_v3.HeaderMatcher, 0, len(psRouteMatch.GetHeaderMatches())) - } - for _, psHM := range psRouteMatch.GetHeaderMatches() { - envoyRouteMatch.Headers = append(envoyRouteMatch.Headers, makeEnvoyHeaderMatcherFromProxystateHeaderMatch(psHM)) - } - - if len(psRouteMatch.MethodMatches) > 0 { - methodHeaderRegex := strings.Join(psRouteMatch.MethodMatches, "|") - - eh := &envoy_route_v3.HeaderMatcher{ - Name: ":method", - HeaderMatchSpecifier: &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: makeEnvoyRegexMatch(methodHeaderRegex), - }, - } - - envoyRouteMatch.Headers = append(envoyRouteMatch.Headers, eh) - } - - if len(psRouteMatch.GetQueryParameterMatches()) > 0 { - envoyRouteMatch.QueryParameters = make([]*envoy_route_v3.QueryParameterMatcher, 0, len(psRouteMatch.GetQueryParameterMatches())) - } - for _, psQM := range psRouteMatch.GetQueryParameterMatches() { - envoyRouteMatch.QueryParameters = append(envoyRouteMatch.QueryParameters, makeEnvoyQueryParamFromProxystateQueryMatch(psQM)) - } - - return envoyRouteMatch -} - -func makeEnvoyRegexMatch(pattern string) *envoy_matcher_v3.RegexMatcher { - return &envoy_matcher_v3.RegexMatcher{ - EngineType: &envoy_matcher_v3.RegexMatcher_GoogleRe2{ - GoogleRe2: &envoy_matcher_v3.RegexMatcher_GoogleRE2{}, - }, - Regex: pattern, - } -} - -func makeEnvoyHeaderMatcherFromProxystateHeaderMatch(psMatch *pbproxystate.HeaderMatch) *envoy_route_v3.HeaderMatcher { - envoyHeaderMatcher := &envoy_route_v3.HeaderMatcher{ - Name: psMatch.Name, - } - - switch psMatch.Match.(type) { - case *pbproxystate.HeaderMatch_Exact: - envoyHeaderMatcher.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_ExactMatch{ - ExactMatch: psMatch.GetExact(), - } - case *pbproxystate.HeaderMatch_Regex: - envoyHeaderMatcher.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_SafeRegexMatch{ - SafeRegexMatch: makeEnvoyRegexMatch(psMatch.GetRegex()), - } - case *pbproxystate.HeaderMatch_Prefix: - envoyHeaderMatcher.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_PrefixMatch{ - PrefixMatch: psMatch.GetPrefix(), - } - case *pbproxystate.HeaderMatch_Suffix: - envoyHeaderMatcher.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_SuffixMatch{ - SuffixMatch: psMatch.GetSuffix(), - } - case *pbproxystate.HeaderMatch_Present: - envoyHeaderMatcher.HeaderMatchSpecifier = &envoy_route_v3.HeaderMatcher_PresentMatch{ - PresentMatch: true, - } - default: - // This shouldn't be possible considering the types of HeaderMatch - return nil - } - - if psMatch.GetInvertMatch() { - envoyHeaderMatcher.InvertMatch = true - } - - return envoyHeaderMatcher -} - -func makeEnvoyQueryParamFromProxystateQueryMatch(psMatch *pbproxystate.QueryParameterMatch) *envoy_route_v3.QueryParameterMatcher { - envoyQueryParamMatcher := &envoy_route_v3.QueryParameterMatcher{ - Name: psMatch.Name, - } - - switch psMatch.Match.(type) { - case *pbproxystate.QueryParameterMatch_Exact: - envoyQueryParamMatcher.QueryParameterMatchSpecifier = &envoy_route_v3.QueryParameterMatcher_StringMatch{ - StringMatch: &envoy_matcher_v3.StringMatcher{ - MatchPattern: &envoy_matcher_v3.StringMatcher_Exact{ - Exact: psMatch.GetExact(), - }, - }, - } - - case *pbproxystate.QueryParameterMatch_Regex: - envoyQueryParamMatcher.QueryParameterMatchSpecifier = &envoy_route_v3.QueryParameterMatcher_StringMatch{ - StringMatch: &envoy_matcher_v3.StringMatcher{ - MatchPattern: &envoy_matcher_v3.StringMatcher_SafeRegex{ - SafeRegex: makeEnvoyRegexMatch(psMatch.GetRegex()), - }, - }, - } - case *pbproxystate.QueryParameterMatch_Present: - envoyQueryParamMatcher.QueryParameterMatchSpecifier = &envoy_route_v3.QueryParameterMatcher_PresentMatch{ - PresentMatch: true, - } - default: - // This shouldn't be possible considering the types of QueryMatch - return nil - } - - return envoyQueryParamMatcher -} - -// TODO (dans): Will this always be envoy_route_v3.Route_Route? -// Definitely for connect proxies this is the only option. -func (pr *ProxyResources) makeEnvoyRouteActionFromProxystateRouteDestination(psRouteDestination *pbproxystate.RouteDestination) *envoy_route_v3.Route_Route { - envoyRouteRoute := &envoy_route_v3.Route_Route{ - Route: &envoy_route_v3.RouteAction{}, - } - - switch psRouteDestination.Destination.(type) { - case *pbproxystate.RouteDestination_Cluster: - psCluster := psRouteDestination.GetCluster() - envoyRouteRoute.Route.ClusterSpecifier = &envoy_route_v3.RouteAction_Cluster{ - Cluster: psCluster.GetName(), - } - clusters, _ := pr.makeClusters(psCluster.Name) - pr.envoyResources[xdscommon.ClusterType] = append(pr.envoyResources[xdscommon.ClusterType], clusters...) - - case *pbproxystate.RouteDestination_WeightedClusters: - psWeightedClusters := psRouteDestination.GetWeightedClusters() - envoyClusters := make([]*envoy_route_v3.WeightedCluster_ClusterWeight, 0, len(psWeightedClusters.GetClusters())) - totalWeight := 0 - for _, psCluster := range psWeightedClusters.GetClusters() { - clusters, _ := pr.makeClusters(psCluster.Name) - pr.envoyResources[xdscommon.ClusterType] = append(pr.envoyResources[xdscommon.ClusterType], clusters...) - totalWeight += int(psCluster.Weight.GetValue()) - envoyClusters = append(envoyClusters, makeEnvoyClusterWeightFromProxystateWeightedCluster(psCluster)) - } - var envoyWeightScale *wrapperspb.UInt32Value - if totalWeight == 10000 { - envoyWeightScale = response.MakeUint32Value(10000) - } - - envoyRouteRoute.Route.ClusterSpecifier = &envoy_route_v3.RouteAction_WeightedClusters{ - WeightedClusters: &envoy_route_v3.WeightedCluster{ - Clusters: envoyClusters, - TotalWeight: envoyWeightScale, - }, - } - default: - // This shouldn't be possible considering the types of Destination - return nil - } - - injectEnvoyRouteActionWithProxystateDestinationConfig(envoyRouteRoute.Route, psRouteDestination.GetDestinationConfiguration()) - - if psRouteDestination.GetDestinationConfiguration() != nil { - config := psRouteDestination.GetDestinationConfiguration() - action := envoyRouteRoute.Route - - action.PrefixRewrite = config.GetPrefixRewrite() - - if config.GetTimeoutConfig().GetTimeout() != nil { - action.Timeout = config.GetTimeoutConfig().GetTimeout() - } - - if config.GetTimeoutConfig().GetTimeout() != nil { - action.Timeout = config.GetTimeoutConfig().GetTimeout() - } - - if config.GetTimeoutConfig().GetIdleTimeout() != nil { - action.IdleTimeout = config.GetTimeoutConfig().GetIdleTimeout() - } - - if config.GetRetryPolicy() != nil { - action.RetryPolicy = makeEnvoyRetryPolicyFromProxystateRetryPolicy(config.GetRetryPolicy()) - } - } - - return envoyRouteRoute -} - -func makeEnvoyClusterWeightFromProxystateWeightedCluster(cluster *pbproxystate.L7WeightedDestinationCluster) *envoy_route_v3.WeightedCluster_ClusterWeight { - envoyClusterWeight := &envoy_route_v3.WeightedCluster_ClusterWeight{ - Name: cluster.GetName(), - Weight: cluster.GetWeight(), - } - - for _, hm := range cluster.GetHeaderMutations() { - injectEnvoyClusterWeightWithProxystateHeaderMutation(envoyClusterWeight, hm) - } - - return envoyClusterWeight -} - -func injectEnvoyClusterWeightWithProxystateHeaderMutation(envoyClusterWeight *envoy_route_v3.WeightedCluster_ClusterWeight, mutation *pbproxystate.HeaderMutation) { - - mutation.GetAction() - switch mutation.GetAction().(type) { - case *pbproxystate.HeaderMutation_RequestHeaderAdd: - action := mutation.GetRequestHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyClusterWeight.RequestHeadersToAdd = append(envoyClusterWeight.RequestHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_RequestHeaderRemove: - action := mutation.GetRequestHeaderRemove() - envoyClusterWeight.RequestHeadersToRemove = append(envoyClusterWeight.RequestHeadersToRemove, action.GetHeaderKeys()...) - - case *pbproxystate.HeaderMutation_ResponseHeaderAdd: - action := mutation.GetResponseHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyClusterWeight.ResponseHeadersToAdd = append(envoyClusterWeight.ResponseHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_ResponseHeaderRemove: - action := mutation.GetResponseHeaderRemove() - envoyClusterWeight.ResponseHeadersToRemove = append(envoyClusterWeight.ResponseHeadersToRemove, action.GetHeaderKeys()...) - - default: - // This shouldn't be possible considering the types of Destination - return - } -} - -func injectEnvoyRouteActionWithProxystateDestinationConfig(envoyAction *envoy_route_v3.RouteAction, config *pbproxystate.DestinationConfiguration) { - if config == nil { - return - } - - if len(config.GetHashPolicies()) > 0 { - envoyAction.HashPolicy = make([]*envoy_route_v3.RouteAction_HashPolicy, 0, len(config.GetHashPolicies())) - } - for _, policy := range config.GetHashPolicies() { - envoyPolicy := makeEnvoyHashPolicyFromProxystateLBHashPolicy(policy) - envoyAction.HashPolicy = append(envoyAction.HashPolicy, envoyPolicy) - } - - if config.AutoHostRewrite != nil { - envoyAction.HostRewriteSpecifier = &envoy_route_v3.RouteAction_AutoHostRewrite{ - AutoHostRewrite: config.AutoHostRewrite, - } - } -} - -func makeEnvoyHashPolicyFromProxystateLBHashPolicy(psPolicy *pbproxystate.LoadBalancerHashPolicy) *envoy_route_v3.RouteAction_HashPolicy { - - switch psPolicy.GetPolicy().(type) { - case *pbproxystate.LoadBalancerHashPolicy_ConnectionProperties: - return &envoy_route_v3.RouteAction_HashPolicy{ - PolicySpecifier: &envoy_route_v3.RouteAction_HashPolicy_ConnectionProperties_{ - ConnectionProperties: &envoy_route_v3.RouteAction_HashPolicy_ConnectionProperties{ - SourceIp: true, // always true - }, - }, - Terminal: psPolicy.GetConnectionProperties().GetTerminal(), - } - - case *pbproxystate.LoadBalancerHashPolicy_Header: - return &envoy_route_v3.RouteAction_HashPolicy{ - PolicySpecifier: &envoy_route_v3.RouteAction_HashPolicy_Header_{ - Header: &envoy_route_v3.RouteAction_HashPolicy_Header{ - HeaderName: psPolicy.GetHeader().GetName(), - }, - }, - Terminal: psPolicy.GetHeader().GetTerminal(), - } - - case *pbproxystate.LoadBalancerHashPolicy_Cookie: - cookie := &envoy_route_v3.RouteAction_HashPolicy_Cookie{ - Name: psPolicy.GetCookie().GetName(), - Path: psPolicy.GetCookie().GetPath(), - Ttl: psPolicy.GetCookie().GetTtl(), - } - - return &envoy_route_v3.RouteAction_HashPolicy{ - PolicySpecifier: &envoy_route_v3.RouteAction_HashPolicy_Cookie_{ - Cookie: cookie, - }, - Terminal: psPolicy.GetCookie().GetTerminal(), - } - - case *pbproxystate.LoadBalancerHashPolicy_QueryParameter: - return &envoy_route_v3.RouteAction_HashPolicy{ - PolicySpecifier: &envoy_route_v3.RouteAction_HashPolicy_QueryParameter_{ - QueryParameter: &envoy_route_v3.RouteAction_HashPolicy_QueryParameter{ - Name: psPolicy.GetQueryParameter().GetName(), - }, - }, - Terminal: psPolicy.GetQueryParameter().GetTerminal(), - } - } - // This shouldn't be possible considering the types of LoadBalancerPolicy - return nil -} - -func makeEnvoyRetryPolicyFromProxystateRetryPolicy(psRetryPolicy *pbproxystate.RetryPolicy) *envoy_route_v3.RetryPolicy { - return &envoy_route_v3.RetryPolicy{ - NumRetries: psRetryPolicy.GetNumRetries(), - RetriableStatusCodes: psRetryPolicy.GetRetriableStatusCodes(), - RetryOn: psRetryPolicy.GetRetryOn(), - } -} - -func injectEnvoyRouteRuleWithProxystateHeaderMutation(envoyRouteRule *envoy_route_v3.Route, mutation *pbproxystate.HeaderMutation) { - - mutation.GetAction() - switch mutation.GetAction().(type) { - case *pbproxystate.HeaderMutation_RequestHeaderAdd: - action := mutation.GetRequestHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyRouteRule.RequestHeadersToAdd = append(envoyRouteRule.RequestHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_RequestHeaderRemove: - action := mutation.GetRequestHeaderRemove() - envoyRouteRule.RequestHeadersToRemove = append(envoyRouteRule.RequestHeadersToRemove, action.GetHeaderKeys()...) - - case *pbproxystate.HeaderMutation_ResponseHeaderAdd: - action := mutation.GetResponseHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyRouteRule.ResponseHeadersToAdd = append(envoyRouteRule.ResponseHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_ResponseHeaderRemove: - action := mutation.GetResponseHeaderRemove() - envoyRouteRule.ResponseHeadersToRemove = append(envoyRouteRule.ResponseHeadersToRemove, action.GetHeaderKeys()...) - - default: - // This shouldn't be possible considering the types of Destination - return - } -} - -func injectEnvoyVirtualHostWithProxystateHeaderMutation(envoyVirtualHost *envoy_route_v3.VirtualHost, mutation *pbproxystate.HeaderMutation) { - - mutation.GetAction() - switch mutation.GetAction().(type) { - case *pbproxystate.HeaderMutation_RequestHeaderAdd: - action := mutation.GetRequestHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyVirtualHost.RequestHeadersToAdd = append(envoyVirtualHost.RequestHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_RequestHeaderRemove: - action := mutation.GetRequestHeaderRemove() - envoyVirtualHost.RequestHeadersToRemove = append(envoyVirtualHost.RequestHeadersToRemove, action.GetHeaderKeys()...) - - case *pbproxystate.HeaderMutation_ResponseHeaderAdd: - action := mutation.GetResponseHeaderAdd() - header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - - hvo := &envoy_core_v3.HeaderValueOption{ - Header: &envoy_core_v3.HeaderValue{ - Key: header.GetKey(), - Value: header.GetValue(), - }, - Append: response.MakeBoolValue(app), - } - envoyVirtualHost.ResponseHeadersToAdd = append(envoyVirtualHost.ResponseHeadersToAdd, hvo) - - case *pbproxystate.HeaderMutation_ResponseHeaderRemove: - action := mutation.GetResponseHeaderRemove() - envoyVirtualHost.ResponseHeadersToRemove = append(envoyVirtualHost.ResponseHeadersToRemove, action.GetHeaderKeys()...) - - default: - // This shouldn't be possible considering the types of Destination - return - } -} diff --git a/api/LICENSE b/api/LICENSE deleted file mode 100644 index 7c5baa45e1c29..0000000000000 --- a/api/LICENSE +++ /dev/null @@ -1,365 +0,0 @@ -Copyright (c) 2020 HashiCorp, Inc. - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/api/agent_test.go b/api/agent_test.go index e6731bb29ad67..dce525ebc322c 100644 --- a/api/agent_test.go +++ b/api/agent_test.go @@ -165,21 +165,6 @@ func TestAPI_AgentMembersOpts(t *testing.T) { } require.Equal(t, 1, len(members)) - - members, err = agent.MembersOpts(MembersOpts{ - WAN: true, - Filter: `Tags["dc"] == "not-Exist"`, - }) - if err != nil { - t.Fatalf("err: %v", err) - } - require.Equal(t, 0, len(members)) - - _, err = agent.MembersOpts(MembersOpts{ - WAN: true, - Filter: `Tags["dc"] == invalid-bexpr-value`, - }) - require.ErrorContains(t, err, "Failed to create boolean expression evaluator") } func TestAPI_AgentMembers(t *testing.T) { diff --git a/api/config_entry_gateways.go b/api/config_entry_gateways.go index baf274e2da027..b59f1c0621ff6 100644 --- a/api/config_entry_gateways.go +++ b/api/config_entry_gateways.go @@ -284,10 +284,6 @@ type APIGatewayListener struct { Protocol string // TLS is the TLS settings for the listener. TLS APIGatewayTLSConfiguration - // Override is the policy that overrides all other policy and route specific configuration - Override *APIGatewayPolicy `json:",omitempty"` - // Default is the policy that is the default for the listener and route, routes can override this behavior - Default *APIGatewayPolicy `json:",omitempty"` } // APIGatewayTLSConfiguration specifies the configuration of a listener’s @@ -306,39 +302,3 @@ type APIGatewayTLSConfiguration struct { // Only applicable to connections negotiated via TLS 1.2 or earlier CipherSuites []string `json:",omitempty" alias:"cipher_suites"` } - -// APIGatewayPolicy holds the policy that configures the gateway listener, this is used in the `Override` and `Default` fields of a listener -type APIGatewayPolicy struct { - // JWT holds the JWT configuration for the Listener - JWT *APIGatewayJWTRequirement `json:",omitempty"` -} - -// APIGatewayJWTRequirement holds the list of JWT providers to be verified against -type APIGatewayJWTRequirement struct { - // Providers is a list of providers to consider when verifying a JWT. - Providers []*APIGatewayJWTProvider `json:",omitempty"` -} - -// APIGatewayJWTProvider holds the provider and claim verification information -type APIGatewayJWTProvider struct { - // Name is the name of the JWT provider. There MUST be a corresponding - // "jwt-provider" config entry with this name. - Name string `json:",omitempty"` - - // VerifyClaims is a list of additional claims to verify in a JWT's payload. - VerifyClaims []*APIGatewayJWTClaimVerification `json:",omitempty" alias:"verify_claims"` -} - -// APIGatewayJWTClaimVerification holds the actual claim information to be verified -type APIGatewayJWTClaimVerification struct { - // Path is the path to the claim in the token JSON. - Path []string `json:",omitempty"` - - // Value is the expected value at the given path: - // - If the type at the path is a list then we verify - // that this value is contained in the list. - // - // - If the type at the path is a string then we verify - // that this value matches. - Value string `json:",omitempty"` -} diff --git a/api/config_entry_gateways_test.go b/api/config_entry_gateways_test.go index 7383b0ae68038..25b0a2d515c26 100644 --- a/api/config_entry_gateways_test.go +++ b/api/config_entry_gateways_test.go @@ -348,150 +348,3 @@ func TestAPI_ConfigEntries_TerminatingGateway(t *testing.T) { _, _, err = configEntries.Get(TerminatingGateway, "foo", nil) require.Error(t, err) } - -func TestAPI_ConfigEntries_APIGateway(t *testing.T) { - t.Parallel() - c, s := makeClient(t) - defer s.Stop() - - configEntries := c.ConfigEntries() - listener1 := APIGatewayListener{ - Name: "listener1", - Hostname: "host.com", - Port: 3360, - Protocol: "http", - } - - listener2 := APIGatewayListener{ - Name: "listener2", - Hostname: "host2.com", - Port: 3362, - Protocol: "http", - } - - apigw1 := &APIGatewayConfigEntry{ - Kind: APIGateway, - Name: "foo", - Meta: map[string]string{ - "foo": "bar", - "gir": "zim", - }, - Listeners: []APIGatewayListener{listener1}, - } - - apigw2 := &APIGatewayConfigEntry{ - Kind: APIGateway, - Name: "bar", - Listeners: []APIGatewayListener{listener2}, - } - - // set it - _, wm, err := configEntries.Set(apigw1, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // also set the second one - _, wm, err = configEntries.Set(apigw2, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // get it - entry, qm, err := configEntries.Get(APIGateway, "foo", nil) - require.NoError(t, err) - require.NotNil(t, qm) - require.NotEqual(t, 0, qm.RequestTime) - - // verify it - readGW, ok := entry.(*APIGatewayConfigEntry) - require.True(t, ok) - require.Equal(t, apigw1.Kind, readGW.Kind) - require.Equal(t, apigw1.Name, readGW.Name) - require.Equal(t, apigw1.Meta, readGW.Meta) - require.Equal(t, apigw1.Meta, readGW.GetMeta()) - - // update it - apigw1.Listeners = []APIGatewayListener{ - listener1, - { - Name: "listener3", - Hostname: "host3.com", - Port: 3363, - Protocol: "http", - }, - } - - // CAS fail - written, _, err := configEntries.CAS(apigw1, 0, nil) - require.NoError(t, err) - require.False(t, written) - - // CAS success - written, wm, err = configEntries.CAS(apigw1, readGW.ModifyIndex, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - require.True(t, written) - - // re-setting should not yield an error - _, wm, err = configEntries.Set(apigw1, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - apigw2.Listeners = []APIGatewayListener{ - listener2, - { - Name: "listener4", - Hostname: "host4.com", - Port: 3364, - Protocol: "http", - }, - } - - _, wm, err = configEntries.Set(apigw2, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // list them - entries, qm, err := configEntries.List(APIGateway, nil) - require.NoError(t, err) - require.NotNil(t, qm) - require.NotEqual(t, 0, qm.RequestTime) - require.Len(t, entries, 2) - - for _, entry = range entries { - switch entry.GetName() { - case "foo": - // this also verifies that the update value was persisted and - // the updated values are seen - readGW, ok = entry.(*APIGatewayConfigEntry) - require.True(t, ok) - require.Equal(t, apigw1.Kind, readGW.Kind) - require.Equal(t, apigw1.Name, readGW.Name) - require.Len(t, readGW.Listeners, 2) - - require.Equal(t, apigw1.Listeners, readGW.Listeners) - case "bar": - readGW, ok = entry.(*APIGatewayConfigEntry) - require.True(t, ok) - require.Equal(t, apigw2.Kind, readGW.Kind) - require.Equal(t, apigw2.Name, readGW.Name) - require.Len(t, readGW.Listeners, 2) - - require.Equal(t, apigw2.Listeners, readGW.Listeners) - } - } - - // delete it - wm, err = configEntries.Delete(APIGateway, "foo", nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // verify deletion - _, _, err = configEntries.Get(APIGateway, "foo", nil) - require.Error(t, err) -} diff --git a/api/config_entry_routes.go b/api/config_entry_routes.go index 8df367093fe2d..cfea394535dbb 100644 --- a/api/config_entry_routes.go +++ b/api/config_entry_routes.go @@ -3,8 +3,6 @@ package api -import "time" - // TCPRouteConfigEntry -- TODO stub type TCPRouteConfigEntry struct { // Kind of the config entry. This should be set to api.TCPRoute. @@ -197,11 +195,8 @@ type HTTPQueryMatch struct { // HTTPFilters specifies a list of filters used to modify a request // before it is routed to an upstream. type HTTPFilters struct { - Headers []HTTPHeaderFilter - URLRewrite *URLRewrite - RetryFilter *RetryFilter - TimeoutFilter *TimeoutFilter - JWT *JWTFilter + Headers []HTTPHeaderFilter + URLRewrite *URLRewrite } // HTTPHeaderFilter specifies how HTTP headers should be modified. @@ -215,23 +210,6 @@ type URLRewrite struct { Path string } -type RetryFilter struct { - NumRetries *uint32 - RetryOn []string - RetryOnStatusCodes []uint32 - RetryOnConnectFailure *bool -} - -type TimeoutFilter struct { - RequestTimeout time.Duration - IdleTimeout time.Duration -} - -// JWTFilter specifies the JWT configuration for a route -type JWTFilter struct { - Providers []*APIGatewayJWTProvider `json:",omitempty"` -} - // HTTPRouteRule specifies the routing rules used to determine what upstream // service an HTTP request is routed to. type HTTPRouteRule struct { diff --git a/api/config_entry_routes_test.go b/api/config_entry_routes_test.go deleted file mode 100644 index b878612e907e4..0000000000000 --- a/api/config_entry_routes_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package api - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestAPI_ConfigEntries_HTTPRoute(t *testing.T) { - t.Parallel() - c, s := makeClient(t) - defer s.Stop() - - configEntries := c.ConfigEntries() - route1 := &HTTPRouteConfigEntry{ - Kind: HTTPRoute, - Name: "route1", - } - - route2 := &HTTPRouteConfigEntry{ - Kind: HTTPRoute, - Name: "route2", - } - - // set it - _, wm, err := configEntries.Set(route1, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // also set the second one - _, wm, err = configEntries.Set(route2, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // get it - entry, qm, err := configEntries.Get(HTTPRoute, "route1", nil) - require.NoError(t, err) - require.NotNil(t, qm) - require.NotEqual(t, 0, qm.RequestTime) - - // verify it - readRoute, ok := entry.(*HTTPRouteConfigEntry) - require.True(t, ok) - require.Equal(t, route1.Kind, readRoute.Kind) - require.Equal(t, route1.Name, readRoute.Name) - require.Equal(t, route1.Meta, readRoute.Meta) - require.Equal(t, route1.Meta, readRoute.GetMeta()) - - // update it - route1.Rules = []HTTPRouteRule{ - { - Filters: HTTPFilters{ - URLRewrite: &URLRewrite{ - Path: "abc", - }, - }, - }, - } - - // CAS fail - written, _, err := configEntries.CAS(route1, 0, nil) - require.NoError(t, err) - require.False(t, written) - - // CAS success - written, wm, err = configEntries.CAS(route1, readRoute.ModifyIndex, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - require.True(t, written) - - // re-setting should not yield an error - _, wm, err = configEntries.Set(route1, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - route2.Rules = []HTTPRouteRule{ - { - Filters: HTTPFilters{ - URLRewrite: &URLRewrite{ - Path: "def", - }, - }, - }, - } - - _, wm, err = configEntries.Set(route2, nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // list them - entries, qm, err := configEntries.List(HTTPRoute, nil) - require.NoError(t, err) - require.NotNil(t, qm) - require.NotEqual(t, 0, qm.RequestTime) - require.Len(t, entries, 2) - - for _, entry = range entries { - switch entry.GetName() { - case "route1": - // this also verifies that the update value was persisted and - // the updated values are seen - readRoute, ok = entry.(*HTTPRouteConfigEntry) - require.True(t, ok) - require.Equal(t, route1.Kind, readRoute.Kind) - require.Equal(t, route1.Name, readRoute.Name) - require.Len(t, readRoute.Rules, 1) - - require.Equal(t, route1.Rules, readRoute.Rules) - case "route2": - readRoute, ok = entry.(*HTTPRouteConfigEntry) - require.True(t, ok) - require.Equal(t, route2.Kind, readRoute.Kind) - require.Equal(t, route2.Name, readRoute.Name) - require.Len(t, readRoute.Rules, 1) - - require.Equal(t, route2.Rules, readRoute.Rules) - } - } - - // delete it - wm, err = configEntries.Delete(HTTPRoute, "route1", nil) - require.NoError(t, err) - require.NotNil(t, wm) - require.NotEqual(t, 0, wm.RequestTime) - - // verify deletion - _, _, err = configEntries.Get(HTTPRoute, "route1", nil) - require.Error(t, err) -} diff --git a/api/watch/funcs_test.go b/api/watch/funcs_test.go index 4bd79a59c14f9..91318009ceac9 100644 --- a/api/watch/funcs_test.go +++ b/api/watch/funcs_test.go @@ -1196,110 +1196,6 @@ func TestChecksWatch_Filter(t *testing.T) { } } -func TestChecksWatch_Filter_by_ServiceNameStatus(t *testing.T) { - t.Parallel() - c, s := makeClient(t) - defer s.Stop() - - s.WaitForSerfCheck(t) - - var ( - wakeups [][]*api.HealthCheck - notifyCh = make(chan struct{}) - ) - - plan := mustParse(t, `{"type":"checks", "filter":"ServiceName == bar and Status == critical"}`) - plan.Handler = func(idx uint64, raw interface{}) { - if raw == nil { - return // ignore - } - v, ok := raw.([]*api.HealthCheck) - if !ok { - return // ignore - } - wakeups = append(wakeups, v) - notifyCh <- struct{}{} - } - - var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() - if err := plan.Run(s.HTTPAddr); err != nil { - t.Errorf("err: %v", err) - } - }() - defer plan.Stop() - - // Wait for first wakeup. - <-notifyCh - { - catalog := c.Catalog() - - // we don't want to find this one - reg := &api.CatalogRegistration{ - Node: "foo", - Address: "1.1.1.1", - Datacenter: "dc1", - Service: &api.AgentService{ - ID: "foo", - Service: "foo", - Tags: []string{"a"}, - }, - Check: &api.AgentCheck{ - Node: "foo", - CheckID: "foo", - Name: "foo", - Status: api.HealthPassing, - ServiceID: "foo", - }, - } - if _, err := catalog.Register(reg, nil); err != nil { - t.Fatalf("err: %v", err) - } - - // we want to find this one - reg = &api.CatalogRegistration{ - Node: "bar", - Address: "2.2.2.2", - Datacenter: "dc1", - Service: &api.AgentService{ - ID: "bar", - Service: "bar", - Tags: []string{"a", "b"}, - }, - Check: &api.AgentCheck{ - Node: "bar", - CheckID: "bar", - Name: "bar", - Status: api.HealthCritical, - ServiceID: "bar", - }, - } - if _, err := catalog.Register(reg, nil); err != nil { - t.Fatalf("err: %v", err) - } - } - - // Wait for second wakeup. - <-notifyCh - - plan.Stop() - wg.Wait() - - require.Len(t, wakeups, 2) - - { - v := wakeups[0] - require.Len(t, v, 0) - } - { - v := wakeups[1] - require.Len(t, v, 1) - require.Equal(t, "bar", v[0].CheckID) - } -} - func TestEventWatch(t *testing.T) { t.Parallel() c, s := makeClient(t) diff --git a/buf.work.yaml b/buf.work.yaml index 5fab419b164bf..f89f53a2bd8a2 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 version: v1 directories: diff --git a/build-support/docker/Build-Go.dockerfile b/build-support/docker/Build-Go.dockerfile index 2337a72702093..c5b3c8394ea38 100644 --- a/build-support/docker/Build-Go.dockerfile +++ b/build-support/docker/Build-Go.dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 ARG GOLANG_VERSION=1.20.7 FROM golang:${GOLANG_VERSION} diff --git a/build-support/docker/Build-UI.dockerfile b/build-support/docker/Build-UI.dockerfile index 9d646fb6ea69c..6682458137dce 100644 --- a/build-support/docker/Build-UI.dockerfile +++ b/build-support/docker/Build-UI.dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 FROM docker.mirror.hashicorp.services/circleci/node:16-browsers diff --git a/build-support/docker/Consul-Dev-Dbg.dockerfile b/build-support/docker/Consul-Dev-Dbg.dockerfile index 488fb053264ed..cf1ae388d1f71 100644 --- a/build-support/docker/Consul-Dev-Dbg.dockerfile +++ b/build-support/docker/Consul-Dev-Dbg.dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 FROM consul:local EXPOSE 4000 diff --git a/build-support/docker/Consul-Dev-Multiarch.dockerfile b/build-support/docker/Consul-Dev-Multiarch.dockerfile index e35a98d5f8902..265a1804cf11a 100644 --- a/build-support/docker/Consul-Dev-Multiarch.dockerfile +++ b/build-support/docker/Consul-Dev-Multiarch.dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 ARG CONSUL_IMAGE_VERSION=latest FROM hashicorp/consul:${CONSUL_IMAGE_VERSION} diff --git a/build-support/docker/Consul-Dev.dockerfile b/build-support/docker/Consul-Dev.dockerfile index 12f014969ab51..122bc3192a7f5 100644 --- a/build-support/docker/Consul-Dev.dockerfile +++ b/build-support/docker/Consul-Dev.dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 ARG CONSUL_IMAGE_VERSION=latest FROM hashicorp/consul:${CONSUL_IMAGE_VERSION} diff --git a/build-support/functions/00-vars.sh b/build-support/functions/00-vars.sh index ef8433c34ebb5..2f16f8ce74cab 100644 --- a/build-support/functions/00-vars.sh +++ b/build-support/functions/00-vars.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # GPG Key ID to use for publically released builds HASHICORP_GPG_KEY="348FFC4C" diff --git a/build-support/functions/10-util.sh b/build-support/functions/10-util.sh index 4bb9f35a9f381..9a47ea3722dcb 100644 --- a/build-support/functions/10-util.sh +++ b/build-support/functions/10-util.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 function err { if test "${COLORIZE}" -eq 1 diff --git a/build-support/functions/20-build.sh b/build-support/functions/20-build.sh index c49ff0c592986..a2e5830196b6c 100644 --- a/build-support/functions/20-build.sh +++ b/build-support/functions/20-build.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 function supported_osarch { # Arguments: diff --git a/build-support/functions/30-release.sh b/build-support/functions/30-release.sh index 26f7c1048995e..d83d9f4155039 100644 --- a/build-support/functions/30-release.sh +++ b/build-support/functions/30-release.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 function tag_release { # Arguments: diff --git a/build-support/scripts/build-date.sh b/build-support/scripts/build-date.sh index 49f3851bef47c..5b52bffa26473 100755 --- a/build-support/scripts/build-date.sh +++ b/build-support/scripts/build-date.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" readonly SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" diff --git a/build-support/scripts/build-docker.sh b/build-support/scripts/build-docker.sh index d36196e66bfd0..2b72aa5fb0616 100755 --- a/build-support/scripts/build-docker.sh +++ b/build-support/scripts/build-docker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" diff --git a/build-support/scripts/check-allowed-imports.sh b/build-support/scripts/check-allowed-imports.sh deleted file mode 100755 index efba156c79377..0000000000000 --- a/build-support/scripts/check-allowed-imports.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" -readonly SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")" -readonly SOURCE_DIR="$(dirname "$(dirname "${SCRIPT_DIR}")")" -readonly FN_DIR="$(dirname "${SCRIPT_DIR}")/functions" - -source "${SCRIPT_DIR}/functions.sh" - - -set -uo pipefail - -usage() { -cat <<-EOF -Usage: ${SCRIPT_NAME} [...] - -Description: - Verifies that only the specified packages may be imported from the given module - -Options: - -h | --help Print this help text. -EOF -} - -function err_usage { - err "$1" - err "" - err "$(usage)" -} - -function main { - local module_root="" - declare -a allowed_packages=() - while test $# -gt 0 - do - case "$1" in - -h | --help ) - usage - return 0 - ;; - * ) - if test -z "$module_root" - then - module_root="$1" - else - allowed_packages+="$1" - fi - shift - esac - done - - # If we could guarantee this ran with bash 4.2+ then the final argument could - # be just ${allowed_packages[@]}. However that with older versions of bash - # in combination with set -u causes bash to emit errors about using unbound - # variables when no allowed packages have been specified (i.e. the module should - # generally be disallowed with no exceptions). This syntax is very strange - # but seems to be the prescribed workaround I found. - check_imports "$module_root" ${allowed_packages[@]+"${allowed_packages[@]}"} - return $? -} - -function check_imports { - local module_root="$1" - shift - local allowed_packages="$@" - - module_imports=$( go list -test -f '{{join .TestImports "\n"}}' ./... | grep "$module_root" | sort | uniq) - module_test_imports=$( go list -test -f '{{join .TestImports "\n"}}' ./... | grep "$module_root" | sort | uniq) - - any_error=0 - - for imp in $module_imports - do - is_import_allowed "$imp" "$module_root" $allowed_packages - allowed=$? - - if test $any_error -ne 1 - then - any_error=$allowed - fi - done - - if test $any_error -eq 1 - then - echo "Only the following direct imports are allowed from module $module_root:" - for pkg in $allowed_packages - do - echo " * $pkg" - done - fi - - return $any_error -} - -function is_import_allowed { - local pkg_import=$1 - shift - local module_root=$1 - shift - local allowed_packages="$@" - - # check if the import path is a part of the module we are restricting imports for - if test "$( go list -f '{{.Module.Path}}' $pkg_import)" != "$module_root" - then - return 0 - fi - - for pkg in $allowed_packages - do - if test "${module_root}/$pkg" == "$pkg_import" - then - return 0 - fi - done - - err "Import of package $pkg_import is not allowed" - return 1 -} - -main "$@" -exit $? \ No newline at end of file diff --git a/build-support/scripts/devtools.sh b/build-support/scripts/devtools.sh index edf4b83eae66c..82cf316cb3340 100755 --- a/build-support/scripts/devtools.sh +++ b/build-support/scripts/devtools.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" diff --git a/build-support/scripts/envoy-library-references.sh b/build-support/scripts/envoy-library-references.sh index bca15806c7e47..7f5413bbf78f8 100644 --- a/build-support/scripts/envoy-library-references.sh +++ b/build-support/scripts/envoy-library-references.sh @@ -23,7 +23,7 @@ unset CDPATH cd "$(dirname "$0")" # build-support/scripts cd ../.. # -if [[ ! -f Makefile ]] || [[ ! -f go.mod ]]; then +if [[ ! -f GNUmakefile ]] || [[ ! -f go.mod ]]; then echo "not in root consul checkout: ${PWD}" >&2 exit 1 fi diff --git a/build-support/scripts/functions.sh b/build-support/scripts/functions.sh index 4db767f13c559..42fe385c012ed 100755 --- a/build-support/scripts/functions.sh +++ b/build-support/scripts/functions.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # # NOTE: This file is meant to be sourced from other bash scripts/shells diff --git a/build-support/scripts/protobuf.sh b/build-support/scripts/protobuf.sh index 20d06c807763b..420d66d6a11bd 100755 --- a/build-support/scripts/protobuf.sh +++ b/build-support/scripts/protobuf.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" @@ -72,10 +72,6 @@ function main { status "Generated gRPC rate limit mapping file" - generate_protoset_file - - status "Generated protoset file" - return 0 } @@ -156,11 +152,5 @@ function generate_rate_limit_mappings { } } -function generate_protoset_file { - local pkg_dir="${SOURCE_DIR}/pkg" - mkdir -p "$pkg_dir" - print_run buf build -o "${pkg_dir}/consul.protoset" -} - main "$@" exit $? diff --git a/build-support/scripts/release.sh b/build-support/scripts/release.sh index fa7e7c066d458..a8fbe84d89117 100755 --- a/build-support/scripts/release.sh +++ b/build-support/scripts/release.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" diff --git a/build-support/scripts/version.sh b/build-support/scripts/version.sh index 2bc9998813ed1..46630636bbfca 100755 --- a/build-support/scripts/version.sh +++ b/build-support/scripts/version.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" diff --git a/build-support/windows/Dockerfile-consul-dev-windows b/build-support/windows/Dockerfile-consul-dev-windows deleted file mode 100644 index 4e35ccb6e5eba..0000000000000 --- a/build-support/windows/Dockerfile-consul-dev-windows +++ /dev/null @@ -1,4 +0,0 @@ -ARG VERSION=1.16.0 - -FROM windows/consul:${VERSION}-local -COPY dist/ C:\\consul diff --git a/build-support/windows/Dockerfile-consul-local-windows b/build-support/windows/Dockerfile-consul-local-windows deleted file mode 100644 index 992c48c286a27..0000000000000 --- a/build-support/windows/Dockerfile-consul-local-windows +++ /dev/null @@ -1,52 +0,0 @@ -ARG VERSION=1.13.3 - -FROM windows/test-sds-server as test-sds-server -FROM docker.mirror.hashicorp.services/windows/openzipkin as openzipkin -FROM windows/consul:${VERSION} - -# Fortio binary downloaded -RUN mkdir fortio -ENV FORTIO_URL=https://github.com/fortio/fortio/releases/download/v1.33.0/fortio_win_1.33.0.zip -RUN curl %FORTIO_URL% -L -o fortio.zip -RUN tar -xf fortio.zip -C fortio - -RUN choco install openssl -yf -RUN choco install jq -yf -RUN choco install netcat -yf -RUN choco install openjdk -yf - -# Install Bats -ENV BATS_URL=https://github.com/bats-core/bats-core/archive/refs/tags/v1.7.0.zip -RUN curl %BATS_URL% -L -o bats.zip -RUN mkdir bats-core -RUN tar -xf bats.zip -C bats-core --strip-components=1 -RUN cd "C:\\Program Files\\Git\\bin" && bash.exe -c "/c/bats-core/install.sh /c/bats" - -# Install Jaeger -ENV JAEGER_URL=https://github.com/jaegertracing/jaeger/releases/download/v1.11.0/jaeger-1.11.0-windows-amd64.tar.gz -RUN curl %JAEGER_URL% -L -o jaeger.tar.gz -RUN mkdir jaeger -RUN tar -xf jaeger.tar.gz -C jaeger --strip-components=1 - -# Install Socat -ENV SOCAT_URL=https://github.com/tech128/socat-1.7.3.0-windows/archive/refs/heads/master.zip -RUN curl %SOCAT_URL% -L -o socat.zip -RUN mkdir socat -RUN tar -xf socat.zip -C socat --strip-components=1 - -# Copy test-sds-server binary and certs -COPY --from=test-sds-server ["C:/go/src/", "C:/test-sds-server/"] - -# Copy openzipkin .jar file -COPY --from=openzipkin ["C:/zipkin", "C:/zipkin"] - -EXPOSE 8300 -EXPOSE 8301 8301/udp 8302 8302/udp -EXPOSE 8500 8600 8600/udp -EXPOSE 8502 - -EXPOSE 19000 19001 19002 19003 19004 -EXPOSE 21000 21001 21002 21003 21004 -EXPOSE 5000 1234 2345 - -RUN SETX /M path "%PATH%;C:\consul;C:\fortio;C:\jaeger;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenSSL-Win64\bin;C:\bats\bin\;C:\ProgramData\chocolatey\lib\jq\tools;C:\socat" diff --git a/build-support/windows/Dockerfile-openzipkin-windows b/build-support/windows/Dockerfile-openzipkin-windows deleted file mode 100644 index b23867f0b22cf..0000000000000 --- a/build-support/windows/Dockerfile-openzipkin-windows +++ /dev/null @@ -1,12 +0,0 @@ -FROM docker.mirror.hashicorp.services/windows/openjdk:1809 - -RUN mkdir zipkin -RUN curl.exe -sSL 'https://search.maven.org/remote_content?g=io.zipkin&a=zipkin-server&v=LATEST&c=exec' -o zipkin/zipkin.jar - -EXPOSE 9410/tcp - -EXPOSE 9411/tcp - -WORKDIR /zipkin - -ENTRYPOINT ["java", "-jar", "zipkin.jar"] \ No newline at end of file diff --git a/build-support/windows/build-consul-dev-image.sh b/build-support/windows/build-consul-dev-image.sh deleted file mode 100644 index ddc5e521d11aa..0000000000000 --- a/build-support/windows/build-consul-dev-image.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -cd ../../ -rm -rf dist - -export GOOS=windows GOARCH=amd64 -VERSION=1.16.0 -CONSUL_BUILDDATE=$(date +"%Y-%m-%dT%H:%M:%SZ") -GIT_IMPORT=github.com/hashicorp/consul/version -GOLDFLAGS=" -X $GIT_IMPORT.Version=$VERSION -X $GIT_IMPORT.VersionPrerelease=dev -X $GIT_IMPORT.BuildDate=$CONSUL_BUILDDATE " - -go build -ldflags "$GOLDFLAGS" -o ./dist/ . - -docker build -t windows/consul:${VERSION}-dev -f build-support/windows/Dockerfile-consul-dev-windows . --build-arg VERSION=${VERSION} diff --git a/build-support/windows/build-consul-local-images.sh b/build-support/windows/build-consul-local-images.sh deleted file mode 100644 index 8398e813bb173..0000000000000 --- a/build-support/windows/build-consul-local-images.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -readonly HASHICORP_DOCKER_PROXY="docker.mirror.hashicorp.services" - -# Build Consul Version 1.13.3 / 1.12.6 / 1.11.11 -VERSION=${VERSION:-"1.16.0"} -export VERSION - -# Build Windows Envoy Version 1.23.1 / 1.21.5 / 1.20.7 -ENVOY_VERSION=${ENVOY_VERSION:-"1.23.1"} -export ENVOY_VERSION - -echo "Building Images" - - -# Pull Windows Servercore image -echo " " -echo "Pull Windows Servercore image" -docker pull mcr.microsoft.com/windows/servercore:1809 -# Tag Windows Servercore image -echo " " -echo "Tag Windows Servercore image" -docker tag mcr.microsoft.com/windows/servercore:1809 "${HASHICORP_DOCKER_PROXY}/windows/servercore:1809" - - -# Pull Windows Nanoserver image -echo " " -echo "Pull Windows Nanoserver image" -docker pull mcr.microsoft.com/windows/nanoserver:1809 -# Tag Windows Nanoserver image -echo " " -echo "Tag Windows Nanoserver image" -docker tag mcr.microsoft.com/windows/nanoserver:1809 "${HASHICORP_DOCKER_PROXY}/windows/nanoserver:1809" - - -# Pull Windows OpenJDK image -echo " " -echo "Pull Windows OpenJDK image" -docker pull openjdk:windowsservercore-1809 -# Tag Windows OpenJDK image -echo " " -echo "Tag Windows OpenJDK image" -docker tag openjdk:windowsservercore-1809 "${HASHICORP_DOCKER_PROXY}/windows/openjdk:1809" - -# Pull Windows Golang image -echo " " -echo "Pull Windows Golang image" -docker pull golang:1.18.1-nanoserver-1809 -# Tag Windows Golang image -echo " " -echo "Tag Windows Golang image" -docker tag golang:1.18.1-nanoserver-1809 "${HASHICORP_DOCKER_PROXY}/windows/golang:1809" - - -# Pull Kubernetes/pause image -echo " " -echo "Pull Kubernetes/pause image" -docker pull mcr.microsoft.com/oss/kubernetes/pause:3.6 -# Tag Kubernetes/pause image -echo " " -echo "Tag Kubernetes/pause image" -docker tag mcr.microsoft.com/oss/kubernetes/pause:3.6 "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" - -# Pull envoy-windows image -echo " " -echo "Pull envoyproxy/envoy-windows image" -docker pull envoyproxy/envoy-windows:v${ENVOY_VERSION} -# Tag envoy-windows image -echo " " -echo "Tag envoyproxy/envoy-windows image" -docker tag envoyproxy/envoy-windows:v${ENVOY_VERSION} "${HASHICORP_DOCKER_PROXY}/windows/envoy-windows:v${ENVOY_VERSION}" - -# Build Windows Openzipkin Image -docker build -t "${HASHICORP_DOCKER_PROXY}/windows/openzipkin" -f Dockerfile-openzipkin-windows . - - -# Build Windows Test sds server Image -./build-test-sds-server-image.sh - - -# Build windows/consul:${VERSION} Image -echo " " -echo "Build windows/consul:${VERSION} Image" -docker build -t "windows/consul:${VERSION}" -f ../../Dockerfile-windows ../../ --build-arg VERSION=${VERSION} - - -# Build windows/consul:${VERSION}-local Image -echo " " -echo "Build windows/consul:${VERSION}-local Image" -docker build -t windows/consul:${VERSION}-local -f ./Dockerfile-consul-local-windows . --build-arg VERSION=${VERSION} - -echo "Building Complete!" diff --git a/build-support/windows/build-test-sds-server-image.sh b/build-support/windows/build-test-sds-server-image.sh deleted file mode 100644 index 6856c2f4394d6..0000000000000 --- a/build-support/windows/build-test-sds-server-image.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -cd ../../test/integration/connect/envoy - -docker build -t windows/test-sds-server -f ./Dockerfile-test-sds-server-windows test-sds-server diff --git a/build-support/windows/windows-test.md b/build-support/windows/windows-test.md deleted file mode 100644 index 5295e40757ef6..0000000000000 --- a/build-support/windows/windows-test.md +++ /dev/null @@ -1,119 +0,0 @@ -# Dockerfiles for Windows Integration Tests - -## Index - -- [About](#about-this-file) -- [Consul Windows](#consul-windows) -- [Consul Windows Local](#consul-windows-local) -- [Consul Windows Dev](#consul-windows-dev) -- [Dockerfile-openzipkin-windows](#dockerfile-openzipkin-windows) - -## About this File - -In this file you will find which Docker images that need to be pre-built to run the Envoy integration tests on Windows, as well as information on how to run each of these files individually for testing purposes. - -## Consul Windows - -The Windows/Consul:_{VERSION}_ image is built from the "Dockerfile-windows" file located at the root of the project. -To do this, the official [windows/servercore image](https://hub.docker.com/_/microsoft-windows-servercore) is used as base image. -To build the image, use the following command: - -```shell -docker build -t windows/consul -f Dockerfile-windows . --build-arg VERSION=${VERSION} -``` - -You can test the built file by running the following command: - -```shell -docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" -``` - -If everything works properly you should openning the browser and check the Consul UI running on: `http://localhost:8500` - -## Consul Windows Local - -The Windows/Consul:_{VERSION}_-local custom image deployed in the "Dockerfile-consul-local-windows" DockerFile is built from the selected by the shell script _build-consul-local-images.sh_. -When executing it, all the tools required to run the Windows Connect Envoy Integration Tests will be added to the image. -It is necessary that the _"windows/consul"_ image has been built first. This script also takes care of that. - -To build this image you need to run the following command on your terminal: - -```shell -./build-consul-local-images.sh -``` - -> [!NOTE] -> Shell script execution may vary depending on your terminal, we recommend using **Git Bash** for Windows. - -```shell -docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul-local --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul:_{VERSION}_-local agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" -``` - -If everything works properly you can use your browser and check the Consul UI running on: `http://localhost:8500` - -## Consul Windows Dev - -The Windows/Consul:_{VERSION}_-dev custom image deployed in the "Dockerfile-consul-dev-windows" DockerFile is generated by the shell script named _build-consul-dev-image.sh_. -When executing it, the compilation of Consul is carried out and it is saved in the _"dist"_ directory, this file is then copied to the _"windows/consul:_{VERSION}_-dev"_ image. -It is necessary that the _"windows/consul_{VERSION}_-local"_ image has been built first. - -To build this image you need to run the following command on your terminal: - -```shell -./build-consul-dev-image.sh -``` - -> [!NOTE] -> Shell script execution may vary depending on your terminal, we recommend using **Git Bash** for Windows. - -You can test the built file by running the following command: - -```shell -docker run --rm -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 --name consul-local --hostname "consul-primary-server" --network-alias "consul-primary-server" windows/consul:_{VERSION}_-dev agent -dev -datacenter "primary" -grpc-port -1 -client "0.0.0.0" -bind "0.0.0.0" -``` - -If everything works properly you can use your browser and check the Consul UI running on: `http://localhost:8500` - -## Dockerfile-openzipkin-windows - -Due to the unavailability of an official Openzipkin Docker image for Windows, the [openjdk Windows image](https://hub.docker.com/layers/openjdk/library/openjdk/jdk-windowsservercore-1809/images/sha256-b0cc238d2ec5fb58109a0006ff9e1bcaf66a5301f49bcb8dece9599ac5be6331) was used, where the latest self-contained executable Openzipkin .jar file is downloaded. - -To build this image you need to run the following command on your terminal: - -```shell -docker build -t openzipkin -f Dockerfile-openzipkin-windows . -``` - -You can test the built file by running the following command: - -```shell -docker run --rm --name openzipkin -``` - -If everything works as it should, you will see the zipkin logo being displayed, along with the current version and port configuration: - -```shell -:: version 2.23.18 :: commit 4b71677 :: - -20XX-XX-XX XX:XX:XX.XXX INFO [/] 1252 --- [oss-http-*:9411] c.l.a.s.Server : Serving HTTP at /[0:0:0:0:0:0:0:0]:9411 - http://127.0.0.1:9411/ -``` - -# Testing - -During development, it may be more convenient to check your work-in-progress by running only the tests which you expect to be affected by your changes, as the full test suite can take several minutes to execute. [Go's built-in test tool](https://golang.org/pkg/cmd/go/internal/test/) allows specifying a list of packages to test and the `-run` option to only include test names matching a regular expression. -The `go test -short` flag can also be used to skip slower tests. - -Examples (run from the repository root): - -- `go test -v ./connect` will run all tests in the connect package (see `./connect` folder) -- `go test -v -run TestRetryJoin ./command/agent` will run all tests in the agent package (see `./command/agent` folder) with name substring `TestRetryJoin` - -When a pull request is opened CI will run all tests and lint to verify the change. - -If you want to run the tests on Windows images you must attach the win=true flag. - -Example: - -```shell -go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true -``` diff --git a/command/acl/acl.go b/command/acl/acl.go index 745fa78175d5e..71ef8c9a06171 100644 --- a/command/acl/acl.go +++ b/command/acl/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/command/acl/acl_helpers.go b/command/acl/acl_helpers.go index 3459228c61edb..b0e65d224c756 100644 --- a/command/acl/acl_helpers.go +++ b/command/acl/acl_helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/command/acl/acl_test.go b/command/acl/acl_test.go index c2a46f18b0423..2095795ff00be 100644 --- a/command/acl/acl_test.go +++ b/command/acl/acl_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package acl diff --git a/command/acl/agenttokens/agent_tokens.go b/command/acl/agenttokens/agent_tokens.go index f4e0c496acf62..4e4a359ace77d 100644 --- a/command/acl/agenttokens/agent_tokens.go +++ b/command/acl/agenttokens/agent_tokens.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agenttokens diff --git a/command/acl/agenttokens/agent_tokens_test.go b/command/acl/agenttokens/agent_tokens_test.go index 84f7fa3358011..d735b66d83a37 100644 --- a/command/acl/agenttokens/agent_tokens_test.go +++ b/command/acl/agenttokens/agent_tokens_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agenttokens diff --git a/command/acl/authmethod/authmethod.go b/command/acl/authmethod/authmethod.go index 18b9e58c2633a..897498024c84e 100644 --- a/command/acl/authmethod/authmethod.go +++ b/command/acl/authmethod/authmethod.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethod diff --git a/command/acl/authmethod/create/authmethod_create.go b/command/acl/authmethod/create/authmethod_create.go index 17f328d2b8be5..912a647d41155 100644 --- a/command/acl/authmethod/create/authmethod_create.go +++ b/command/acl/authmethod/create/authmethod_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodcreate diff --git a/command/acl/authmethod/create/authmethod_create_ce.go b/command/acl/authmethod/create/authmethod_create_ce.go index 5c6ad2468393f..ff2d488897eda 100644 --- a/command/acl/authmethod/create/authmethod_create_ce.go +++ b/command/acl/authmethod/create/authmethod_create_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/acl/authmethod/create/authmethod_create_test.go b/command/acl/authmethod/create/authmethod_create_test.go index b9392544929af..b0d6a8cfe181b 100644 --- a/command/acl/authmethod/create/authmethod_create_test.go +++ b/command/acl/authmethod/create/authmethod_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodcreate diff --git a/command/acl/authmethod/delete/authmethod_delete.go b/command/acl/authmethod/delete/authmethod_delete.go index e3ccd0efdd01e..44548a5983746 100644 --- a/command/acl/authmethod/delete/authmethod_delete.go +++ b/command/acl/authmethod/delete/authmethod_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethoddelete diff --git a/command/acl/authmethod/delete/authmethod_delete_test.go b/command/acl/authmethod/delete/authmethod_delete_test.go index fc513fde7ebd4..45bd3ac561cd8 100644 --- a/command/acl/authmethod/delete/authmethod_delete_test.go +++ b/command/acl/authmethod/delete/authmethod_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethoddelete diff --git a/command/acl/authmethod/formatter.go b/command/acl/authmethod/formatter.go index 6a22443d58dd4..3204af910b714 100644 --- a/command/acl/authmethod/formatter.go +++ b/command/acl/authmethod/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethod diff --git a/command/acl/authmethod/list/authmethod_list.go b/command/acl/authmethod/list/authmethod_list.go index cae9916c12b29..1bcf24b75a638 100644 --- a/command/acl/authmethod/list/authmethod_list.go +++ b/command/acl/authmethod/list/authmethod_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodlist diff --git a/command/acl/authmethod/list/authmethod_list_test.go b/command/acl/authmethod/list/authmethod_list_test.go index cd1aa2ac767b8..9064b252cd447 100644 --- a/command/acl/authmethod/list/authmethod_list_test.go +++ b/command/acl/authmethod/list/authmethod_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodlist diff --git a/command/acl/authmethod/read/authmethod_read.go b/command/acl/authmethod/read/authmethod_read.go index 72d3a6f181634..b7860ca0660d2 100644 --- a/command/acl/authmethod/read/authmethod_read.go +++ b/command/acl/authmethod/read/authmethod_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodread diff --git a/command/acl/authmethod/read/authmethod_read_test.go b/command/acl/authmethod/read/authmethod_read_test.go index 20a18c76dfdae..a24c1d2e55f21 100644 --- a/command/acl/authmethod/read/authmethod_read_test.go +++ b/command/acl/authmethod/read/authmethod_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodread diff --git a/command/acl/authmethod/update/authmethod_update.go b/command/acl/authmethod/update/authmethod_update.go index 1c5422e88dea2..2798e6e6da8f6 100644 --- a/command/acl/authmethod/update/authmethod_update.go +++ b/command/acl/authmethod/update/authmethod_update.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodupdate diff --git a/command/acl/authmethod/update/authmethod_update_ce.go b/command/acl/authmethod/update/authmethod_update_ce.go index d2c10d45869ed..c1ea32042473e 100644 --- a/command/acl/authmethod/update/authmethod_update_ce.go +++ b/command/acl/authmethod/update/authmethod_update_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/acl/authmethod/update/authmethod_update_test.go b/command/acl/authmethod/update/authmethod_update_test.go index 87ddf2f2c0bc4..e85f270cdf699 100644 --- a/command/acl/authmethod/update/authmethod_update_test.go +++ b/command/acl/authmethod/update/authmethod_update_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package authmethodupdate diff --git a/command/acl/bindingrule/bindingrule.go b/command/acl/bindingrule/bindingrule.go index 8d23e3ee37fab..782041e1ac672 100644 --- a/command/acl/bindingrule/bindingrule.go +++ b/command/acl/bindingrule/bindingrule.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrule diff --git a/command/acl/bindingrule/create/bindingrule_create.go b/command/acl/bindingrule/create/bindingrule_create.go index cdedbb744dbfd..d5253c456e79d 100644 --- a/command/acl/bindingrule/create/bindingrule_create.go +++ b/command/acl/bindingrule/create/bindingrule_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrulecreate diff --git a/command/acl/bindingrule/create/bindingrule_create_test.go b/command/acl/bindingrule/create/bindingrule_create_test.go index 2985c41abf467..43189f784c128 100644 --- a/command/acl/bindingrule/create/bindingrule_create_test.go +++ b/command/acl/bindingrule/create/bindingrule_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrulecreate diff --git a/command/acl/bindingrule/delete/bindingrule_delete.go b/command/acl/bindingrule/delete/bindingrule_delete.go index 3fc02d788b4b6..ffb22fc73d357 100644 --- a/command/acl/bindingrule/delete/bindingrule_delete.go +++ b/command/acl/bindingrule/delete/bindingrule_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruledelete diff --git a/command/acl/bindingrule/delete/bindingrule_delete_test.go b/command/acl/bindingrule/delete/bindingrule_delete_test.go index 9655fbb101a4c..abd10f8add5d7 100644 --- a/command/acl/bindingrule/delete/bindingrule_delete_test.go +++ b/command/acl/bindingrule/delete/bindingrule_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruledelete diff --git a/command/acl/bindingrule/formatter.go b/command/acl/bindingrule/formatter.go index 6d96f4b71b4e7..1fb1feeafcc1c 100644 --- a/command/acl/bindingrule/formatter.go +++ b/command/acl/bindingrule/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrule diff --git a/command/acl/bindingrule/list/bindingrule_list.go b/command/acl/bindingrule/list/bindingrule_list.go index 15f395afdf2f6..2f6529af5d08d 100644 --- a/command/acl/bindingrule/list/bindingrule_list.go +++ b/command/acl/bindingrule/list/bindingrule_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrulelist diff --git a/command/acl/bindingrule/list/bindingrule_list_test.go b/command/acl/bindingrule/list/bindingrule_list_test.go index 22035341e4248..bbb1188f8a0f4 100644 --- a/command/acl/bindingrule/list/bindingrule_list_test.go +++ b/command/acl/bindingrule/list/bindingrule_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingrulelist diff --git a/command/acl/bindingrule/read/bindingrule_read.go b/command/acl/bindingrule/read/bindingrule_read.go index 0ff55bd4ac2b8..25858d64851f1 100644 --- a/command/acl/bindingrule/read/bindingrule_read.go +++ b/command/acl/bindingrule/read/bindingrule_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruleread diff --git a/command/acl/bindingrule/read/bindingrule_read_test.go b/command/acl/bindingrule/read/bindingrule_read_test.go index 4a324edf23174..9e1615e003b95 100644 --- a/command/acl/bindingrule/read/bindingrule_read_test.go +++ b/command/acl/bindingrule/read/bindingrule_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruleread diff --git a/command/acl/bindingrule/update/bindingrule_update.go b/command/acl/bindingrule/update/bindingrule_update.go index 071e2bdc01b2d..59998059f476d 100644 --- a/command/acl/bindingrule/update/bindingrule_update.go +++ b/command/acl/bindingrule/update/bindingrule_update.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruleupdate diff --git a/command/acl/bindingrule/update/bindingrule_update_test.go b/command/acl/bindingrule/update/bindingrule_update_test.go index 6124e9df2dc86..2f7437edcd333 100644 --- a/command/acl/bindingrule/update/bindingrule_update_test.go +++ b/command/acl/bindingrule/update/bindingrule_update_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bindingruleupdate diff --git a/command/acl/bootstrap/bootstrap.go b/command/acl/bootstrap/bootstrap.go index 2a2bfd3716d32..2f608bbdab347 100644 --- a/command/acl/bootstrap/bootstrap.go +++ b/command/acl/bootstrap/bootstrap.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bootstrap diff --git a/command/acl/bootstrap/bootstrap_test.go b/command/acl/bootstrap/bootstrap_test.go index e9a0e8cebee2a..ef5fcf41dc7aa 100644 --- a/command/acl/bootstrap/bootstrap_test.go +++ b/command/acl/bootstrap/bootstrap_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package bootstrap diff --git a/command/acl/policy/create/policy_create.go b/command/acl/policy/create/policy_create.go index 03d836ee4ad81..131d096b1cf25 100644 --- a/command/acl/policy/create/policy_create.go +++ b/command/acl/policy/create/policy_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policycreate diff --git a/command/acl/policy/create/policy_create_test.go b/command/acl/policy/create/policy_create_test.go index 953dd978ed964..94ef7ac95f53d 100644 --- a/command/acl/policy/create/policy_create_test.go +++ b/command/acl/policy/create/policy_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policycreate diff --git a/command/acl/policy/delete/policy_delete.go b/command/acl/policy/delete/policy_delete.go index 63c02a47ddd2b..eb1fbfc83bccf 100644 --- a/command/acl/policy/delete/policy_delete.go +++ b/command/acl/policy/delete/policy_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policydelete diff --git a/command/acl/policy/delete/policy_delete_test.go b/command/acl/policy/delete/policy_delete_test.go index 33f121db981fa..4e0b8ffbf6278 100644 --- a/command/acl/policy/delete/policy_delete_test.go +++ b/command/acl/policy/delete/policy_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policydelete diff --git a/command/acl/policy/formatter.go b/command/acl/policy/formatter.go index dce79c3907160..1e78976412079 100644 --- a/command/acl/policy/formatter.go +++ b/command/acl/policy/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policy diff --git a/command/acl/policy/list/policy_list.go b/command/acl/policy/list/policy_list.go index 44be10d6843d9..d88f57595030f 100644 --- a/command/acl/policy/list/policy_list.go +++ b/command/acl/policy/list/policy_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policylist diff --git a/command/acl/policy/list/policy_list_test.go b/command/acl/policy/list/policy_list_test.go index b0cc05b2a5cf7..d9df5cc879a54 100644 --- a/command/acl/policy/list/policy_list_test.go +++ b/command/acl/policy/list/policy_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policylist diff --git a/command/acl/policy/policy.go b/command/acl/policy/policy.go index 565c672706468..7a7b80cba8ffc 100644 --- a/command/acl/policy/policy.go +++ b/command/acl/policy/policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policy diff --git a/command/acl/policy/read/policy_read.go b/command/acl/policy/read/policy_read.go index 36f1e65340794..e1b6b923df094 100644 --- a/command/acl/policy/read/policy_read.go +++ b/command/acl/policy/read/policy_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policyread diff --git a/command/acl/policy/read/policy_read_test.go b/command/acl/policy/read/policy_read_test.go index 70036457cebb9..08fe5d1ce96ce 100644 --- a/command/acl/policy/read/policy_read_test.go +++ b/command/acl/policy/read/policy_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policyread diff --git a/command/acl/policy/update/policy_update.go b/command/acl/policy/update/policy_update.go index 60b6340736137..ec0577ebb9a22 100644 --- a/command/acl/policy/update/policy_update.go +++ b/command/acl/policy/update/policy_update.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policyupdate diff --git a/command/acl/policy/update/policy_update_test.go b/command/acl/policy/update/policy_update_test.go index 4d77191d64332..22fa8b4c89aa4 100644 --- a/command/acl/policy/update/policy_update_test.go +++ b/command/acl/policy/update/policy_update_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package policyupdate diff --git a/command/acl/role/create/role_create.go b/command/acl/role/create/role_create.go index b951367b2c5ad..588b3a0cb6590 100644 --- a/command/acl/role/create/role_create.go +++ b/command/acl/role/create/role_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rolecreate diff --git a/command/acl/role/create/role_create_test.go b/command/acl/role/create/role_create_test.go index 7094a76e6cc7c..40f15433a7bf5 100644 --- a/command/acl/role/create/role_create_test.go +++ b/command/acl/role/create/role_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rolecreate diff --git a/command/acl/role/delete/role_delete.go b/command/acl/role/delete/role_delete.go index aaac306f01b2b..21dc7c0d1b45f 100644 --- a/command/acl/role/delete/role_delete.go +++ b/command/acl/role/delete/role_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roledelete diff --git a/command/acl/role/delete/role_delete_test.go b/command/acl/role/delete/role_delete_test.go index 61897ca245575..8a38cf2cfc3bc 100644 --- a/command/acl/role/delete/role_delete_test.go +++ b/command/acl/role/delete/role_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roledelete diff --git a/command/acl/role/formatter.go b/command/acl/role/formatter.go index 0dba147fab0a7..5df6085e46ac6 100644 --- a/command/acl/role/formatter.go +++ b/command/acl/role/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package role diff --git a/command/acl/role/formatter_test.go b/command/acl/role/formatter_test.go index ac6be59b42e7e..cd1ba90fe9a1f 100644 --- a/command/acl/role/formatter_test.go +++ b/command/acl/role/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package role diff --git a/command/acl/role/list/role_list.go b/command/acl/role/list/role_list.go index 558419e07067a..3582f9da63c20 100644 --- a/command/acl/role/list/role_list.go +++ b/command/acl/role/list/role_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rolelist diff --git a/command/acl/role/list/role_list_test.go b/command/acl/role/list/role_list_test.go index 0a94d11a109da..651ab120278c9 100644 --- a/command/acl/role/list/role_list_test.go +++ b/command/acl/role/list/role_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rolelist diff --git a/command/acl/role/read/role_read.go b/command/acl/role/read/role_read.go index 027aaa80019f9..d6d06997ad13f 100644 --- a/command/acl/role/read/role_read.go +++ b/command/acl/role/read/role_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roleread diff --git a/command/acl/role/read/role_read_test.go b/command/acl/role/read/role_read_test.go index bef1fab260164..c7be4cb4c0375 100644 --- a/command/acl/role/read/role_read_test.go +++ b/command/acl/role/read/role_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roleread diff --git a/command/acl/role/role.go b/command/acl/role/role.go index c1da51d86401e..2ea085f763311 100644 --- a/command/acl/role/role.go +++ b/command/acl/role/role.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package role diff --git a/command/acl/role/update/role_update.go b/command/acl/role/update/role_update.go index 731bfb1726d89..c42ab7ce9e616 100644 --- a/command/acl/role/update/role_update.go +++ b/command/acl/role/update/role_update.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roleupdate diff --git a/command/acl/role/update/role_update_test.go b/command/acl/role/update/role_update_test.go index 07c4cb2d2da43..18d6110996884 100644 --- a/command/acl/role/update/role_update_test.go +++ b/command/acl/role/update/role_update_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package roleupdate diff --git a/command/acl/token/clone/token_clone.go b/command/acl/token/clone/token_clone.go index 127fca78762cd..0f4ed2473a976 100644 --- a/command/acl/token/clone/token_clone.go +++ b/command/acl/token/clone/token_clone.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenclone diff --git a/command/acl/token/clone/token_clone_test.go b/command/acl/token/clone/token_clone_test.go index 7181ac0caec71..0142db7437957 100644 --- a/command/acl/token/clone/token_clone_test.go +++ b/command/acl/token/clone/token_clone_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenclone diff --git a/command/acl/token/create/token_create.go b/command/acl/token/create/token_create.go index 25c00df60588a..4f33562908e8f 100644 --- a/command/acl/token/create/token_create.go +++ b/command/acl/token/create/token_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokencreate diff --git a/command/acl/token/create/token_create_test.go b/command/acl/token/create/token_create_test.go index b92c64b0d154a..747d9415171d9 100644 --- a/command/acl/token/create/token_create_test.go +++ b/command/acl/token/create/token_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokencreate diff --git a/command/acl/token/delete/token_delete.go b/command/acl/token/delete/token_delete.go index aa9f79903bb72..378c399115367 100644 --- a/command/acl/token/delete/token_delete.go +++ b/command/acl/token/delete/token_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokendelete diff --git a/command/acl/token/delete/token_delete_test.go b/command/acl/token/delete/token_delete_test.go index 29c1fe292d605..988e4afe24dc2 100644 --- a/command/acl/token/delete/token_delete_test.go +++ b/command/acl/token/delete/token_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokendelete diff --git a/command/acl/token/formatter.go b/command/acl/token/formatter.go index 6dec483aad611..dbe1a939fcec1 100644 --- a/command/acl/token/formatter.go +++ b/command/acl/token/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/command/acl/token/formatter_ce_test.go b/command/acl/token/formatter_ce_test.go index 128b05b58a1b1..9faa6f4b736be 100644 --- a/command/acl/token/formatter_ce_test.go +++ b/command/acl/token/formatter_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/acl/token/formatter_test.go b/command/acl/token/formatter_test.go index ba4c04981d781..2a5e5414d754d 100644 --- a/command/acl/token/formatter_test.go +++ b/command/acl/token/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/command/acl/token/list/token_list.go b/command/acl/token/list/token_list.go index 7f500426f3369..4d7177dddf645 100644 --- a/command/acl/token/list/token_list.go +++ b/command/acl/token/list/token_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenlist diff --git a/command/acl/token/list/token_list_test.go b/command/acl/token/list/token_list_test.go index c8586bde6b80b..0a4441c47a562 100644 --- a/command/acl/token/list/token_list_test.go +++ b/command/acl/token/list/token_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenlist diff --git a/command/acl/token/read/token_read.go b/command/acl/token/read/token_read.go index 23496135bf725..c5798a8b9b31a 100644 --- a/command/acl/token/read/token_read.go +++ b/command/acl/token/read/token_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenread diff --git a/command/acl/token/read/token_read_test.go b/command/acl/token/read/token_read_test.go index 69df72e72917b..ea2317b79fd63 100644 --- a/command/acl/token/read/token_read_test.go +++ b/command/acl/token/read/token_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenread diff --git a/command/acl/token/token.go b/command/acl/token/token.go index db3771926ccc0..e8bb0cd420b61 100644 --- a/command/acl/token/token.go +++ b/command/acl/token/token.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package token diff --git a/command/acl/token/update/token_update.go b/command/acl/token/update/token_update.go index 9d636ba215df9..915c358d48ad1 100644 --- a/command/acl/token/update/token_update.go +++ b/command/acl/token/update/token_update.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenupdate diff --git a/command/acl/token/update/token_update_test.go b/command/acl/token/update/token_update_test.go index 019b8554a5920..b96d95d466e8f 100644 --- a/command/acl/token/update/token_update_test.go +++ b/command/acl/token/update/token_update_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tokenupdate diff --git a/command/agent/agent.go b/command/agent/agent.go index 84515f2c94bd5..c241fa2b7bc8a 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/command/agent/agent_test.go b/command/agent/agent_test.go index 3fa5d1e1a31a5..a197c6ed44798 100644 --- a/command/agent/agent_test.go +++ b/command/agent/agent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/command/agent/startup_logger.go b/command/agent/startup_logger.go index f324ac6c55c85..baa016a2a7b09 100644 --- a/command/agent/startup_logger.go +++ b/command/agent/startup_logger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package agent diff --git a/command/catalog/catalog.go b/command/catalog/catalog.go index f685512060076..dbc229eb35224 100644 --- a/command/catalog/catalog.go +++ b/command/catalog/catalog.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog diff --git a/command/catalog/catalog_test.go b/command/catalog/catalog_test.go index 308da9452edfe..5ff5ac40e2e3c 100644 --- a/command/catalog/catalog_test.go +++ b/command/catalog/catalog_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog diff --git a/command/catalog/helpers.go b/command/catalog/helpers.go index f457d8f792ab5..1d9ad1964d3d1 100644 --- a/command/catalog/helpers.go +++ b/command/catalog/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog diff --git a/command/catalog/helpers_ce.go b/command/catalog/helpers_ce.go index 51e04218872f2..5f60fd9b13122 100644 --- a/command/catalog/helpers_ce.go +++ b/command/catalog/helpers_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/catalog/list/dc/catalog_list_datacenters.go b/command/catalog/list/dc/catalog_list_datacenters.go index c7531c9164342..7df18e7a8b70d 100644 --- a/command/catalog/list/dc/catalog_list_datacenters.go +++ b/command/catalog/list/dc/catalog_list_datacenters.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dc diff --git a/command/catalog/list/dc/catalog_list_datacenters_test.go b/command/catalog/list/dc/catalog_list_datacenters_test.go index 68a8a8bc50552..6052db994117e 100644 --- a/command/catalog/list/dc/catalog_list_datacenters_test.go +++ b/command/catalog/list/dc/catalog_list_datacenters_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package dc diff --git a/command/catalog/list/nodes/catalog_list_nodes.go b/command/catalog/list/nodes/catalog_list_nodes.go index 1d1f3912f2255..44760182cd1be 100644 --- a/command/catalog/list/nodes/catalog_list_nodes.go +++ b/command/catalog/list/nodes/catalog_list_nodes.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package nodes diff --git a/command/catalog/list/nodes/catalog_list_nodes_test.go b/command/catalog/list/nodes/catalog_list_nodes_test.go index 59db1c666bb67..0bef492b7b779 100644 --- a/command/catalog/list/nodes/catalog_list_nodes_test.go +++ b/command/catalog/list/nodes/catalog_list_nodes_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package nodes diff --git a/command/catalog/list/services/catalog_list_services.go b/command/catalog/list/services/catalog_list_services.go index 4bbcce6532957..029c8bae94f44 100644 --- a/command/catalog/list/services/catalog_list_services.go +++ b/command/catalog/list/services/catalog_list_services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/catalog/list/services/catalog_list_services_test.go b/command/catalog/list/services/catalog_list_services_test.go index 905729410d95e..28c7c0652e894 100644 --- a/command/catalog/list/services/catalog_list_services_test.go +++ b/command/catalog/list/services/catalog_list_services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/cli/cli.go b/command/cli/cli.go index a0bb5d78ddf7b..4afaeb279f665 100644 --- a/command/cli/cli.go +++ b/command/cli/cli.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cli diff --git a/command/cli/formatting.go b/command/cli/formatting.go index fec86797b057c..11ca247e900b6 100644 --- a/command/cli/formatting.go +++ b/command/cli/formatting.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cli diff --git a/command/config/config.go b/command/config/config.go index ed54954cbeb96..e5fbe803a8dc6 100644 --- a/command/config/config.go +++ b/command/config/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package config diff --git a/command/config/delete/config_delete.go b/command/config/delete/config_delete.go index baec168b172aa..e9a9f97c7d83f 100644 --- a/command/config/delete/config_delete.go +++ b/command/config/delete/config_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/config/delete/config_delete_test.go b/command/config/delete/config_delete_test.go index d7d6d9226054c..66b5a47a71a22 100644 --- a/command/config/delete/config_delete_test.go +++ b/command/config/delete/config_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/config/list/config_list.go b/command/config/list/config_list.go index 4dd469590cffd..978804a191991 100644 --- a/command/config/list/config_list.go +++ b/command/config/list/config_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/config/list/config_list_test.go b/command/config/list/config_list_test.go index 3e528a062fbb3..bf188f51bd963 100644 --- a/command/config/list/config_list_test.go +++ b/command/config/list/config_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/config/read/config_read.go b/command/config/read/config_read.go index d3e3828817b52..348d893738853 100644 --- a/command/config/read/config_read.go +++ b/command/config/read/config_read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package read diff --git a/command/config/read/config_read_test.go b/command/config/read/config_read_test.go index 5fbf37885d0b6..074c0ee30d3b8 100644 --- a/command/config/read/config_read_test.go +++ b/command/config/read/config_read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package read diff --git a/command/config/write/config_write.go b/command/config/write/config_write.go index 4edfbed3bf0ce..d6a0c188b8fa1 100644 --- a/command/config/write/config_write.go +++ b/command/config/write/config_write.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package write @@ -7,12 +7,17 @@ import ( "flag" "fmt" "io" + "time" + "github.com/hashicorp/go-multierror" "github.com/mitchellh/cli" + "github.com/mitchellh/mapstructure" + "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/command/config" "github.com/hashicorp/consul/command/flags" "github.com/hashicorp/consul/command/helpers" + "github.com/hashicorp/consul/lib/decode" ) func New(ui cli.Ui) *cmd { @@ -104,6 +109,67 @@ func (c *cmd) Run(args []string) int { return 0 } +// There is a 'structs' variation of this in +// agent/structs/config_entry.go:DecodeConfigEntry +func newDecodeConfigEntry(raw map[string]interface{}) (api.ConfigEntry, error) { + var entry api.ConfigEntry + + kindVal, ok := raw["Kind"] + if !ok { + kindVal, ok = raw["kind"] + } + if !ok { + return nil, fmt.Errorf("Payload does not contain a kind/Kind key at the top level") + } + + if kindStr, ok := kindVal.(string); ok { + newEntry, err := api.MakeConfigEntry(kindStr, "") + if err != nil { + return nil, err + } + entry = newEntry + } else { + return nil, fmt.Errorf("Kind value in payload is not a string") + } + + var md mapstructure.Metadata + decodeConf := &mapstructure.DecoderConfig{ + DecodeHook: mapstructure.ComposeDecodeHookFunc( + decode.HookWeakDecodeFromSlice, + decode.HookTranslateKeys, + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToTimeHookFunc(time.RFC3339), + ), + Metadata: &md, + Result: &entry, + WeaklyTypedInput: true, + } + + decoder, err := mapstructure.NewDecoder(decodeConf) + if err != nil { + return nil, err + } + + if err := decoder.Decode(raw); err != nil { + return nil, err + } + + for _, k := range md.Unused { + switch k { + case "kind", "Kind": + // The kind field is used to determine the target, but doesn't need + // to exist on the target. + continue + } + err = multierror.Append(err, fmt.Errorf("invalid config key %q", k)) + } + if err != nil { + return nil, err + } + + return entry, nil +} + func (c *cmd) Synopsis() string { return synopsis } diff --git a/command/config/write/config_write_test.go b/command/config/write/config_write_test.go index 15e7a47465323..3319084f4f210 100644 --- a/command/config/write/config_write_test.go +++ b/command/config/write/config_write_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package write diff --git a/command/connect/ca/ca.go b/command/connect/ca/ca.go index a5edd43dbc2e9..f85ae17d6b8af 100644 --- a/command/connect/ca/ca.go +++ b/command/connect/ca/ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/command/connect/ca/ca_test.go b/command/connect/ca/ca_test.go index 84ebe2873dd37..eb20f57c220db 100644 --- a/command/connect/ca/ca_test.go +++ b/command/connect/ca/ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/command/connect/ca/get/connect_ca_get.go b/command/connect/ca/get/connect_ca_get.go index 40b9b556a4bbf..a2a7c6cb8b48b 100644 --- a/command/connect/ca/get/connect_ca_get.go +++ b/command/connect/ca/get/connect_ca_get.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/connect/ca/get/connect_ca_get_test.go b/command/connect/ca/get/connect_ca_get_test.go index 0e5545152c34b..7d628fb2940db 100644 --- a/command/connect/ca/get/connect_ca_get_test.go +++ b/command/connect/ca/get/connect_ca_get_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/connect/ca/set/connect_ca_set.go b/command/connect/ca/set/connect_ca_set.go index 2c9af4ec6ea9c..ca17f3e2129a7 100644 --- a/command/connect/ca/set/connect_ca_set.go +++ b/command/connect/ca/set/connect_ca_set.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package set diff --git a/command/connect/ca/set/connect_ca_set_test.go b/command/connect/ca/set/connect_ca_set_test.go index 4193d718f0dd9..1928a7dbd43f0 100644 --- a/command/connect/ca/set/connect_ca_set_test.go +++ b/command/connect/ca/set/connect_ca_set_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package set diff --git a/command/connect/connect.go b/command/connect/connect.go index c92481a723ab0..675017291692b 100644 --- a/command/connect/connect.go +++ b/command/connect/connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/command/connect/connect_test.go b/command/connect/connect_test.go index 3098962dc4ef8..452207a96b656 100644 --- a/command/connect/connect_test.go +++ b/command/connect/connect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index 452d3679d6f2f..2a0e21c4d25dd 100644 --- a/command/connect/envoy/bootstrap_config.go +++ b/command/connect/envoy/bootstrap_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index ef05786347142..86566ed80cae2 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/bootstrap_tpl.go b/command/connect/envoy/bootstrap_tpl.go index 4b4bbc8db77f4..26b8e2118b1ef 100644 --- a/command/connect/envoy/bootstrap_tpl.go +++ b/command/connect/envoy/bootstrap_tpl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy @@ -8,7 +8,7 @@ package envoy type BootstrapTplArgs struct { GRPC - // ProxyCluster is the cluster name for the Envoy `node` specification and + // ProxyCluster is the cluster name for the the Envoy `node` specification and // is typically the same as the ProxyID. ProxyCluster string diff --git a/command/connect/envoy/envoy.go b/command/connect/envoy/envoy.go index 3489f1017a658..256f6fc33c1a8 100644 --- a/command/connect/envoy/envoy.go +++ b/command/connect/envoy/envoy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy @@ -38,7 +38,7 @@ func New(ui cli.Ui) *cmd { return c } -const DefaultAdminAccessLogPath = os.DevNull +const DefaultAdminAccessLogPath = "/dev/null" type cmd struct { UI cli.Ui diff --git a/command/connect/envoy/envoy_ce_test.go b/command/connect/envoy/envoy_ce_test.go index 9e97516cf5d2f..89e3fd303efe9 100644 --- a/command/connect/envoy/envoy_ce_test.go +++ b/command/connect/envoy/envoy_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/connect/envoy/envoy_test.go b/command/connect/envoy/envoy_test.go index 0e61eea1865ab..517108e0330c8 100644 --- a/command/connect/envoy/envoy_test.go +++ b/command/connect/envoy/envoy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/exec.go b/command/connect/envoy/exec.go index 71f903c106437..ffece038f71b8 100644 --- a/command/connect/envoy/exec.go +++ b/command/connect/envoy/exec.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/exec_supported.go b/command/connect/envoy/exec_supported.go deleted file mode 100644 index d61cbc850781d..0000000000000 --- a/command/connect/envoy/exec_supported.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build linux || darwin || windows -// +build linux darwin windows - -package envoy - -import ( - "fmt" - "os" - "strings" -) - -func isHotRestartOption(s string) bool { - restartOpts := []string{ - "--restart-epoch", - "--hot-restart-version", - "--drain-time-s", - "--parent-shutdown-time-s", - } - for _, opt := range restartOpts { - if s == opt { - return true - } - if strings.HasPrefix(s, opt+"=") { - return true - } - } - return false -} - -func hasHotRestartOption(argSets ...[]string) bool { - for _, args := range argSets { - for _, opt := range args { - if isHotRestartOption(opt) { - return true - } - } - } - return false -} - -// execArgs returns the command and args used to execute a binary. By default it -// will return a command of os.Executable with the args unmodified. This is a shim -// for testing, and can be overridden to execute using 'go run' instead. -var execArgs = func(args ...string) (string, []string, error) { - execPath, err := os.Executable() - if err != nil { - return "", nil, err - } - - if strings.HasSuffix(execPath, "/envoy.test") { - return "", nil, fmt.Errorf("set execArgs to use 'go run' instead of doing a self-exec") - } - - return execPath, args, nil -} diff --git a/command/connect/envoy/exec_test.go b/command/connect/envoy/exec_test.go index 0dbab3c6a0357..3ffc89e2f24d8 100644 --- a/command/connect/envoy/exec_test.go +++ b/command/connect/envoy/exec_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build linux || darwin // +build linux darwin diff --git a/command/connect/envoy/exec_unix.go b/command/connect/envoy/exec_unix.go index 49d340483c5a2..d3eb0765a9f9d 100644 --- a/command/connect/envoy/exec_unix.go +++ b/command/connect/envoy/exec_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build linux || darwin // +build linux darwin @@ -12,12 +12,63 @@ import ( "os" "os/exec" "path/filepath" + "strings" "syscall" "time" "golang.org/x/sys/unix" ) +// testSelfExecOverride is a way for the tests to no fork-bomb themselves by +// self-executing the whole test suite for each case recursively. It's gross but +// the least gross option I could think of. +var testSelfExecOverride string + +func isHotRestartOption(s string) bool { + restartOpts := []string{ + "--restart-epoch", + "--hot-restart-version", + "--drain-time-s", + "--parent-shutdown-time-s", + } + for _, opt := range restartOpts { + if s == opt { + return true + } + if strings.HasPrefix(s, opt+"=") { + return true + } + } + return false +} + +func hasHotRestartOption(argSets ...[]string) bool { + for _, args := range argSets { + for _, opt := range args { + if isHotRestartOption(opt) { + return true + } + } + } + return false +} + +// execArgs returns the command and args used to execute a binary. By default it +// will return a command of os.Executable with the args unmodified. This is a shim +// for testing, and can be overridden to execute using 'go run' instead. +var execArgs = func(args ...string) (string, []string, error) { + execPath, err := os.Executable() + if err != nil { + return "", nil, err + } + + if strings.HasSuffix(execPath, "/envoy.test") { + return "", nil, fmt.Errorf("set execArgs to use 'go run' instead of doing a self-exec") + } + + return execPath, args, nil +} + func makeBootstrapPipe(bootstrapJSON []byte) (string, error) { pipeFile := filepath.Join(os.TempDir(), fmt.Sprintf("envoy-%x-bootstrap.json", time.Now().UnixNano()+int64(os.Getpid()))) diff --git a/command/connect/envoy/exec_unsupported.go b/command/connect/envoy/exec_unsupported.go index 87f45ec7afb8c..c9686098983e9 100644 --- a/command/connect/envoy/exec_unsupported.go +++ b/command/connect/envoy/exec_unsupported.go @@ -1,8 +1,8 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 -//go:build !linux && !darwin && !windows -// +build !linux,!darwin,!windows +//go:build !linux && !darwin +// +build !linux,!darwin package envoy diff --git a/command/connect/envoy/exec_windows.go b/command/connect/envoy/exec_windows.go deleted file mode 100644 index 1ae4f0cddb7bb..0000000000000 --- a/command/connect/envoy/exec_windows.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build windows -// +build windows - -package envoy - -import ( - "errors" - "fmt" - "github.com/natefinch/npipe" - "os" - "os/exec" - "path/filepath" - "time" -) - -func makeBootstrapPipe(bootstrapJSON []byte) (string, error) { - pipeFile := filepath.Join(os.TempDir(), - fmt.Sprintf("envoy-%x-bootstrap.json", time.Now().UnixNano()+int64(os.Getpid()))) - - binary, args, err := execArgs("connect", "envoy", "pipe-bootstrap", pipeFile) - if err != nil { - return pipeFile, err - } - - // Dial the named pipe - pipeConn, err := npipe.Dial(pipeFile) - if err != nil { - return pipeFile, err - } - defer pipeConn.Close() - - // Start the command to connect to the named pipe - cmd := exec.Command(binary, args...) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - cmd.Stdin = pipeConn - - // Start the command - err = cmd.Start() - if err != nil { - return pipeFile, err - } - - // Write the config - n, err := pipeConn.Write(bootstrapJSON) - if err != nil { - return pipeFile, err - } - - if n < len(bootstrapJSON) { - return pipeFile, fmt.Errorf("failed writing boostrap to child STDIN: %s", err) - } - - // We can't wait for the process since we need to exec into Envoy before it - // will be able to complete so it will be remain as a zombie until Envoy is - // killed then will be reaped by the init process (pid 0). This is all a bit - // gross but the cleanest workaround I can think of for Envoy 1.10 not - // supporting /dev/fd/ config paths any more. So we are done and leaving - // the child to run it's course without reaping it. - return pipeFile, nil -} - -func startProc(binary string, args []string) (p *os.Process, err error) { - if binary, err = exec.LookPath(binary); err == nil { - var procAttr os.ProcAttr - procAttr.Files = []*os.File{os.Stdin, - os.Stdout, os.Stderr} - p, err := os.StartProcess(binary, args, &procAttr) - if err == nil { - return p, nil - } - } - return nil, err -} - -func execEnvoy(binary string, prefixArgs, suffixArgs []string, bootstrapJSON []byte) error { - tempFile, err := makeBootstrapPipe(bootstrapJSON) - if err != nil { - os.RemoveAll(tempFile) - return err - } - // We don't defer a cleanup since we are about to Exec into Envoy which means - // defer will never fire. The child process cleans up for us in the happy - // path. - - // We default to disabling hot restart because it makes it easier to run - // multiple envoys locally for testing without them trying to share memory and - // unix sockets and complain about being different IDs. But if user is - // actually configuring hot-restart explicitly with the --restart-epoch option - // then don't disable it! - disableHotRestart := !hasHotRestartOption(prefixArgs, suffixArgs) - - // First argument needs to be the executable name. - envoyArgs := []string{} - envoyArgs = append(envoyArgs, prefixArgs...) - if disableHotRestart { - envoyArgs = append(envoyArgs, "--disable-hot-restart") - } - envoyArgs = append(envoyArgs, suffixArgs...) - envoyArgs = append(envoyArgs, "--config-path", tempFile) - - // Exec - if proc, err := startProc(binary, envoyArgs); err == nil { - proc.Wait() - } else if err != nil { - return errors.New("Failed to exec envoy: " + err.Error()) - } - - return nil -} diff --git a/command/connect/envoy/flags.go b/command/connect/envoy/flags.go index 4d7994ccd45da..eed9698c72fa0 100644 --- a/command/connect/envoy/flags.go +++ b/command/connect/envoy/flags.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/flags_test.go b/command/connect/envoy/flags_test.go index 596c0fa1a22fb..617f852691254 100644 --- a/command/connect/envoy/flags_test.go +++ b/command/connect/envoy/flags_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoy diff --git a/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap.go b/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap.go index e6dbc33db1eb7..48cec90b8145c 100644 --- a/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap.go +++ b/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pipebootstrap diff --git a/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap_test.go b/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap_test.go index 4f271b6e74039..8e8b982f61f85 100644 --- a/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap_test.go +++ b/command/connect/envoy/pipe-bootstrap/connect_envoy_pipe-bootstrap_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pipebootstrap diff --git a/command/connect/expose/expose.go b/command/connect/expose/expose.go index 569ab46bab4a7..0fe3e3de74a67 100644 --- a/command/connect/expose/expose.go +++ b/command/connect/expose/expose.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package expose diff --git a/command/connect/expose/expose_test.go b/command/connect/expose/expose_test.go index 511a495640fb8..9db76a765e822 100644 --- a/command/connect/expose/expose_test.go +++ b/command/connect/expose/expose_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package expose diff --git a/command/connect/proxy/flag_upstreams.go b/command/connect/proxy/flag_upstreams.go index 47bbb730ae86a..21a70c9b3c6bb 100644 --- a/command/connect/proxy/flag_upstreams.go +++ b/command/connect/proxy/flag_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/proxy/flag_upstreams_test.go b/command/connect/proxy/flag_upstreams_test.go index 7e47a9ad7950a..42647c98396d3 100644 --- a/command/connect/proxy/flag_upstreams_test.go +++ b/command/connect/proxy/flag_upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/proxy/proxy.go b/command/connect/proxy/proxy.go index 9b352dab5d0ce..3585d798abeec 100644 --- a/command/connect/proxy/proxy.go +++ b/command/connect/proxy/proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/proxy/proxy_test.go b/command/connect/proxy/proxy_test.go index f17b04f5f8e88..fc55eadcc9b40 100644 --- a/command/connect/proxy/proxy_test.go +++ b/command/connect/proxy/proxy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/proxy/register.go b/command/connect/proxy/register.go index 87d6dbb9a2d32..c3051e0f9dd1c 100644 --- a/command/connect/proxy/register.go +++ b/command/connect/proxy/register.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/proxy/register_test.go b/command/connect/proxy/register_test.go index 823b11d23c1b2..c1845ac6256ed 100644 --- a/command/connect/proxy/register_test.go +++ b/command/connect/proxy/register_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/connect/redirecttraffic/redirect_traffic.go b/command/connect/redirecttraffic/redirect_traffic.go index 8a597696b7f08..5e92193f0b004 100644 --- a/command/connect/redirecttraffic/redirect_traffic.go +++ b/command/connect/redirecttraffic/redirect_traffic.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package redirecttraffic diff --git a/command/connect/redirecttraffic/redirect_traffic_test.go b/command/connect/redirecttraffic/redirect_traffic_test.go index de9b362416c2d..209cfcc35d8a2 100644 --- a/command/connect/redirecttraffic/redirect_traffic_test.go +++ b/command/connect/redirecttraffic/redirect_traffic_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package redirecttraffic diff --git a/command/debug/debug.go b/command/debug/debug.go index 291e0d79e86b8..0c3fcca57a834 100644 --- a/command/debug/debug.go +++ b/command/debug/debug.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package debug diff --git a/command/debug/debug_test.go b/command/debug/debug_test.go index 1340ed057f8d7..e916ee9e7f0de 100644 --- a/command/debug/debug_test.go +++ b/command/debug/debug_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package debug diff --git a/command/event/event.go b/command/event/event.go index 73c19b6c5f776..5882b6005f680 100644 --- a/command/event/event.go +++ b/command/event/event.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package event diff --git a/command/event/event_test.go b/command/event/event_test.go index 349cb0daa8167..b267e8920a754 100644 --- a/command/event/event_test.go +++ b/command/event/event_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package event diff --git a/command/exec/exec.go b/command/exec/exec.go index 53026a6f8c877..140cdea300eb6 100644 --- a/command/exec/exec.go +++ b/command/exec/exec.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package exec diff --git a/command/exec/exec_test.go b/command/exec/exec_test.go index d8335160f28a4..74f446d11ca71 100644 --- a/command/exec/exec_test.go +++ b/command/exec/exec_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package exec diff --git a/command/flags/config.go b/command/flags/config.go index 39c615554d676..162ffea5a22ca 100644 --- a/command/flags/config.go +++ b/command/flags/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/config_test.go b/command/flags/config_test.go index 1a6d69ca4b574..bc718f1dc5b91 100644 --- a/command/flags/config_test.go +++ b/command/flags/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/flag_map_value.go b/command/flags/flag_map_value.go index af5fec436dd57..58afc9f5c365b 100644 --- a/command/flags/flag_map_value.go +++ b/command/flags/flag_map_value.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/flag_map_value_test.go b/command/flags/flag_map_value_test.go index d04342a01b34d..4177f452afac1 100644 --- a/command/flags/flag_map_value_test.go +++ b/command/flags/flag_map_value_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/flag_slice_value.go b/command/flags/flag_slice_value.go index 58428e58ce9cc..b965b76546796 100644 --- a/command/flags/flag_slice_value.go +++ b/command/flags/flag_slice_value.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/flag_slice_value_test.go b/command/flags/flag_slice_value_test.go index 24187f3f41835..84421f0f958af 100644 --- a/command/flags/flag_slice_value_test.go +++ b/command/flags/flag_slice_value_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/http.go b/command/flags/http.go index 16157adc8a1b5..82e59431ae71d 100644 --- a/command/flags/http.go +++ b/command/flags/http.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/http_test.go b/command/flags/http_test.go index f8b48f80cbabc..baf4ac231c8dd 100644 --- a/command/flags/http_test.go +++ b/command/flags/http_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/merge.go b/command/flags/merge.go index 251698e320fcf..c7a475b4b1d5e 100644 --- a/command/flags/merge.go +++ b/command/flags/merge.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/flags/usage.go b/command/flags/usage.go index 3583620bd9f65..245cfd67c0187 100644 --- a/command/flags/usage.go +++ b/command/flags/usage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package flags diff --git a/command/forceleave/forceleave.go b/command/forceleave/forceleave.go index 2c9e2ceb1def8..1b3aac559f171 100644 --- a/command/forceleave/forceleave.go +++ b/command/forceleave/forceleave.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package forceleave diff --git a/command/forceleave/forceleave_test.go b/command/forceleave/forceleave_test.go index 05d490777575c..c29d2996b8124 100644 --- a/command/forceleave/forceleave_test.go +++ b/command/forceleave/forceleave_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package forceleave diff --git a/command/helpers/decode_shim.go b/command/helpers/decode_shim.go index d2a73895a57fb..20ca1faeaaa80 100644 --- a/command/helpers/decode_shim.go +++ b/command/helpers/decode_shim.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package helpers diff --git a/command/helpers/helpers.go b/command/helpers/helpers.go index bc990f76fa020..3720439df3874 100644 --- a/command/helpers/helpers.go +++ b/command/helpers/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package helpers @@ -8,14 +8,12 @@ import ( "fmt" "io" "os" - "strings" "time" - "github.com/mitchellh/mapstructure" - "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/lib/decode" "github.com/hashicorp/go-multierror" + "github.com/mitchellh/mapstructure" ) func loadFromFile(path string) (string, error) { @@ -126,19 +124,13 @@ func newDecodeConfigEntry(raw map[string]interface{}) (api.ConfigEntry, error) { } for _, k := range md.Unused { - switch { - case strings.ToLower(k) == "kind": + switch k { + case "kind", "Kind": // The kind field is used to determine the target, but doesn't need // to exist on the target. continue - - case strings.HasSuffix(strings.ToLower(k), "namespace"): - err = multierror.Append(err, fmt.Errorf("invalid config key %q, namespaces are a consul enterprise feature", k)) - case strings.Contains(strings.ToLower(k), "jwt"): - err = multierror.Append(err, fmt.Errorf("invalid config key %q, api-gateway jwt validation is a consul enterprise feature", k)) - default: - err = multierror.Append(err, fmt.Errorf("invalid config key %q", k)) } + err = multierror.Append(err, fmt.Errorf("invalid config key %q", k)) } if err != nil { return nil, err diff --git a/command/helpers/helpers_test.go b/command/helpers/helpers_test.go index 6479386747bac..8d8b2164f7e7c 100644 --- a/command/helpers/helpers_test.go +++ b/command/helpers/helpers_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package helpers diff --git a/command/info/info.go b/command/info/info.go index 5bbad23eabbed..de17a53dd0d51 100644 --- a/command/info/info.go +++ b/command/info/info.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package info diff --git a/command/info/info_test.go b/command/info/info_test.go index 0faac3acc660e..5e046df8c484e 100644 --- a/command/info/info_test.go +++ b/command/info/info_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package info diff --git a/command/intention/check/check.go b/command/intention/check/check.go index dce63c75bc068..ed8119170f476 100644 --- a/command/intention/check/check.go +++ b/command/intention/check/check.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package check diff --git a/command/intention/check/check_test.go b/command/intention/check/check_test.go index 666d44d80c552..7ecac4a92f537 100644 --- a/command/intention/check/check_test.go +++ b/command/intention/check/check_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package check diff --git a/command/intention/create/create.go b/command/intention/create/create.go index df92dfe302a2e..c1eab7b0f12ca 100644 --- a/command/intention/create/create.go +++ b/command/intention/create/create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/intention/create/create_test.go b/command/intention/create/create_test.go index 90250368ef2b8..e74c87c2bb674 100644 --- a/command/intention/create/create_test.go +++ b/command/intention/create/create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/intention/delete/delete.go b/command/intention/delete/delete.go index a58ee163e6875..b63029d91d866 100644 --- a/command/intention/delete/delete.go +++ b/command/intention/delete/delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/intention/delete/delete_test.go b/command/intention/delete/delete_test.go index 51e59c8b52db1..dedcf8ff2e7d2 100644 --- a/command/intention/delete/delete_test.go +++ b/command/intention/delete/delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/intention/format.go b/command/intention/format.go index bd202cfa5081c..8683063207585 100644 --- a/command/intention/format.go +++ b/command/intention/format.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package intention diff --git a/command/intention/get/get.go b/command/intention/get/get.go index 64dd2c8441c4d..1c2437962627c 100644 --- a/command/intention/get/get.go +++ b/command/intention/get/get.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/intention/get/get_test.go b/command/intention/get/get_test.go index 7559a3611849d..6f6f31ee9e8bc 100644 --- a/command/intention/get/get_test.go +++ b/command/intention/get/get_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/intention/helpers.go b/command/intention/helpers.go index abc7c21e73a14..60774da85c9f1 100644 --- a/command/intention/helpers.go +++ b/command/intention/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package intention diff --git a/command/intention/helpers_test.go b/command/intention/helpers_test.go index cd2db64c69113..11dff93b108b0 100644 --- a/command/intention/helpers_test.go +++ b/command/intention/helpers_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package intention diff --git a/command/intention/intention.go b/command/intention/intention.go index 77ba5e2f5eae8..450ec630a49e1 100644 --- a/command/intention/intention.go +++ b/command/intention/intention.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package intention diff --git a/command/intention/intention_test.go b/command/intention/intention_test.go index 3a728fc028f9d..098fecfa938e6 100644 --- a/command/intention/intention_test.go +++ b/command/intention/intention_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package intention diff --git a/command/intention/list/intention_list.go b/command/intention/list/intention_list.go index 408f9d8dcd09d..f79f454dc79cb 100644 --- a/command/intention/list/intention_list.go +++ b/command/intention/list/intention_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/intention/list/intention_list_test.go b/command/intention/list/intention_list_test.go index ccd6faefe3c10..2227c1c508e35 100644 --- a/command/intention/list/intention_list_test.go +++ b/command/intention/list/intention_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/intention/match/match.go b/command/intention/match/match.go index ee115a7b1ad86..b6f00d1a0e88f 100644 --- a/command/intention/match/match.go +++ b/command/intention/match/match.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package match diff --git a/command/intention/match/match_test.go b/command/intention/match/match_test.go index 6715c7eba8d3a..d2a69ceada58c 100644 --- a/command/intention/match/match_test.go +++ b/command/intention/match/match_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package match diff --git a/command/join/join.go b/command/join/join.go index f5d041ed4b4d9..074813993d6ab 100644 --- a/command/join/join.go +++ b/command/join/join.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package join diff --git a/command/join/join_test.go b/command/join/join_test.go index 828cb46b6e318..e5d43c7cdea9f 100644 --- a/command/join/join_test.go +++ b/command/join/join_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package join diff --git a/command/keygen/keygen.go b/command/keygen/keygen.go index e2907bda0c0d2..c7ab5337c02c4 100644 --- a/command/keygen/keygen.go +++ b/command/keygen/keygen.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package keygen diff --git a/command/keygen/keygen_test.go b/command/keygen/keygen_test.go index 59edb12896bd6..a78a07cfedf74 100644 --- a/command/keygen/keygen_test.go +++ b/command/keygen/keygen_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package keygen diff --git a/command/keyring/keyring.go b/command/keyring/keyring.go index 0e4756f6191f7..2f9d96f0e266f 100644 --- a/command/keyring/keyring.go +++ b/command/keyring/keyring.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package keyring diff --git a/command/keyring/keyring_test.go b/command/keyring/keyring_test.go index 68c5e7f982196..5ee1b1a8752f8 100644 --- a/command/keyring/keyring_test.go +++ b/command/keyring/keyring_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package keyring diff --git a/command/kv/del/kv_delete.go b/command/kv/del/kv_delete.go index e58e4a229661f..89bdde4508c04 100644 --- a/command/kv/del/kv_delete.go +++ b/command/kv/del/kv_delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package del diff --git a/command/kv/del/kv_delete_test.go b/command/kv/del/kv_delete_test.go index 254fb4aa5097e..29d9b7bb98c4b 100644 --- a/command/kv/del/kv_delete_test.go +++ b/command/kv/del/kv_delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package del diff --git a/command/kv/exp/kv_export.go b/command/kv/exp/kv_export.go index 2f2e835bd42d7..c14acd4424d47 100644 --- a/command/kv/exp/kv_export.go +++ b/command/kv/exp/kv_export.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package exp diff --git a/command/kv/exp/kv_export_test.go b/command/kv/exp/kv_export_test.go index 76da13dcd4e6d..96e1d469113f6 100644 --- a/command/kv/exp/kv_export_test.go +++ b/command/kv/exp/kv_export_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package exp diff --git a/command/kv/get/kv_get.go b/command/kv/get/kv_get.go index 4abf0251751e4..b53173c048633 100644 --- a/command/kv/get/kv_get.go +++ b/command/kv/get/kv_get.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/kv/get/kv_get_test.go b/command/kv/get/kv_get_test.go index 56318586de439..92b6675b80a5b 100644 --- a/command/kv/get/kv_get_test.go +++ b/command/kv/get/kv_get_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/kv/imp/kv_import.go b/command/kv/imp/kv_import.go index 1d91d281df846..b1e6841060e60 100644 --- a/command/kv/imp/kv_import.go +++ b/command/kv/imp/kv_import.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package imp diff --git a/command/kv/imp/kv_import_test.go b/command/kv/imp/kv_import_test.go index 6bed5684cebdf..3528c2119abb2 100644 --- a/command/kv/imp/kv_import_test.go +++ b/command/kv/imp/kv_import_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package imp diff --git a/command/kv/impexp/kvimpexp.go b/command/kv/impexp/kvimpexp.go index 0dc4b394e0687..3235439ee5394 100644 --- a/command/kv/impexp/kvimpexp.go +++ b/command/kv/impexp/kvimpexp.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package impexp diff --git a/command/kv/kv.go b/command/kv/kv.go index 86d8c258e058a..3d98b63bdba3a 100644 --- a/command/kv/kv.go +++ b/command/kv/kv.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kv diff --git a/command/kv/kv_test.go b/command/kv/kv_test.go index 85195ee9acbac..56ee94fa7e2da 100644 --- a/command/kv/kv_test.go +++ b/command/kv/kv_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package kv diff --git a/command/kv/put/kv_put.go b/command/kv/put/kv_put.go index 5f0580ce1431c..13e6ee4b9e8e4 100644 --- a/command/kv/put/kv_put.go +++ b/command/kv/put/kv_put.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package put diff --git a/command/kv/put/kv_put_test.go b/command/kv/put/kv_put_test.go index 1f0245c8e0f21..bd07f5aab38f6 100644 --- a/command/kv/put/kv_put_test.go +++ b/command/kv/put/kv_put_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package put diff --git a/command/leave/leave.go b/command/leave/leave.go index 8d997fb83c8dd..d822b5fedc540 100644 --- a/command/leave/leave.go +++ b/command/leave/leave.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package leave diff --git a/command/leave/leave_test.go b/command/leave/leave_test.go index 317a6862b91ec..67f16fefb74a9 100644 --- a/command/leave/leave_test.go +++ b/command/leave/leave_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package leave diff --git a/command/lock/lock.go b/command/lock/lock.go index a662babe041ff..f1acfd4f90937 100644 --- a/command/lock/lock.go +++ b/command/lock/lock.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lock diff --git a/command/lock/lock_test.go b/command/lock/lock_test.go index f32de5bc5e463..d90a7c0826c9e 100644 --- a/command/lock/lock_test.go +++ b/command/lock/lock_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lock diff --git a/command/lock/util_unix.go b/command/lock/util_unix.go index d2c9bf1dd41d0..3c754560b4e12 100644 --- a/command/lock/util_unix.go +++ b/command/lock/util_unix.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !windows // +build !windows diff --git a/command/lock/util_windows.go b/command/lock/util_windows.go index 12f148fa00c1f..9a271af66d1d2 100644 --- a/command/lock/util_windows.go +++ b/command/lock/util_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/command/login/aws.go b/command/login/aws.go index e7fb6af58eeff..99230679c13d5 100644 --- a/command/login/aws.go +++ b/command/login/aws.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package login diff --git a/command/login/login.go b/command/login/login.go index 0ab5237852929..18f2762c99543 100644 --- a/command/login/login.go +++ b/command/login/login.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package login diff --git a/command/login/login_ce.go b/command/login/login_ce.go index 34f935177816a..365d89dfd5dee 100644 --- a/command/login/login_ce.go +++ b/command/login/login_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/login/login_test.go b/command/login/login_test.go index c3bf117676178..918e1fcbff2fd 100644 --- a/command/login/login_test.go +++ b/command/login/login_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package login diff --git a/command/logout/logout.go b/command/logout/logout.go index 35365f4469547..8ff8fb6778926 100644 --- a/command/logout/logout.go +++ b/command/logout/logout.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logout diff --git a/command/logout/logout_test.go b/command/logout/logout_test.go index 7228def746b88..1e3890bb8acb9 100644 --- a/command/logout/logout_test.go +++ b/command/logout/logout_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logout diff --git a/command/maint/maint.go b/command/maint/maint.go index 252aa1de46a73..e9d189157b1f2 100644 --- a/command/maint/maint.go +++ b/command/maint/maint.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package maint diff --git a/command/maint/maint_test.go b/command/maint/maint_test.go index eabd173a623f9..c182ecbdf3ab3 100644 --- a/command/maint/maint_test.go +++ b/command/maint/maint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package maint diff --git a/command/members/members.go b/command/members/members.go index 7b10612643b08..9895837f6484d 100644 --- a/command/members/members.go +++ b/command/members/members.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package members diff --git a/command/members/members_test.go b/command/members/members_test.go index 76e3bbe1260d2..646c51ec6248d 100644 --- a/command/members/members_test.go +++ b/command/members/members_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package members diff --git a/command/monitor/monitor.go b/command/monitor/monitor.go index e1d0e8597d502..0703b34a05120 100644 --- a/command/monitor/monitor.go +++ b/command/monitor/monitor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package monitor diff --git a/command/monitor/monitor_test.go b/command/monitor/monitor_test.go index e9eacdda4caf6..61abfb6c9bf07 100644 --- a/command/monitor/monitor_test.go +++ b/command/monitor/monitor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package monitor diff --git a/command/operator/autopilot/get/operator_autopilot_get.go b/command/operator/autopilot/get/operator_autopilot_get.go index 5cc2dc351e34a..d891672782673 100644 --- a/command/operator/autopilot/get/operator_autopilot_get.go +++ b/command/operator/autopilot/get/operator_autopilot_get.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/operator/autopilot/get/operator_autopilot_get_test.go b/command/operator/autopilot/get/operator_autopilot_get_test.go index 264706ea24452..fc5e0f12e1aeb 100644 --- a/command/operator/autopilot/get/operator_autopilot_get_test.go +++ b/command/operator/autopilot/get/operator_autopilot_get_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package get diff --git a/command/operator/autopilot/operator_autopilot.go b/command/operator/autopilot/operator_autopilot.go index d1de582fbecf9..38d51641eb593 100644 --- a/command/operator/autopilot/operator_autopilot.go +++ b/command/operator/autopilot/operator_autopilot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autopilot diff --git a/command/operator/autopilot/operator_autopilot_test.go b/command/operator/autopilot/operator_autopilot_test.go index 9861749b172a4..9fa91f988b2fc 100644 --- a/command/operator/autopilot/operator_autopilot_test.go +++ b/command/operator/autopilot/operator_autopilot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package autopilot diff --git a/command/operator/autopilot/set/operator_autopilot_set.go b/command/operator/autopilot/set/operator_autopilot_set.go index 6a8dd5fec9ae7..c396dd5d966c4 100644 --- a/command/operator/autopilot/set/operator_autopilot_set.go +++ b/command/operator/autopilot/set/operator_autopilot_set.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package set diff --git a/command/operator/autopilot/set/operator_autopilot_set_test.go b/command/operator/autopilot/set/operator_autopilot_set_test.go index b92e7ef4b4fd8..c8d757bdbbc73 100644 --- a/command/operator/autopilot/set/operator_autopilot_set_test.go +++ b/command/operator/autopilot/set/operator_autopilot_set_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package set diff --git a/command/operator/autopilot/state/formatter.go b/command/operator/autopilot/state/formatter.go index 11cec09c6a160..f4e42a6578ed9 100644 --- a/command/operator/autopilot/state/formatter.go +++ b/command/operator/autopilot/state/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/command/operator/autopilot/state/operator_autopilot_state.go b/command/operator/autopilot/state/operator_autopilot_state.go index be85fdb3ccf18..b5fd6d0718862 100644 --- a/command/operator/autopilot/state/operator_autopilot_state.go +++ b/command/operator/autopilot/state/operator_autopilot_state.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/command/operator/autopilot/state/operator_autopilot_state_test.go b/command/operator/autopilot/state/operator_autopilot_state_test.go index adc4b65933b1f..d81abcde44f7f 100644 --- a/command/operator/autopilot/state/operator_autopilot_state_test.go +++ b/command/operator/autopilot/state/operator_autopilot_state_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package state diff --git a/command/operator/operator.go b/command/operator/operator.go index 06c8c7622e487..b66924d3cb715 100644 --- a/command/operator/operator.go +++ b/command/operator/operator.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package operator diff --git a/command/operator/operator_test.go b/command/operator/operator_test.go index d25f4fc4f8d38..822ffc52347d9 100644 --- a/command/operator/operator_test.go +++ b/command/operator/operator_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package operator diff --git a/command/operator/raft/listpeers/operator_raft_list.go b/command/operator/raft/listpeers/operator_raft_list.go index abe682c103715..29643a87cf33b 100644 --- a/command/operator/raft/listpeers/operator_raft_list.go +++ b/command/operator/raft/listpeers/operator_raft_list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package listpeers diff --git a/command/operator/raft/listpeers/operator_raft_list_test.go b/command/operator/raft/listpeers/operator_raft_list_test.go index c29ed9d418e9c..0694e0dd10465 100644 --- a/command/operator/raft/listpeers/operator_raft_list_test.go +++ b/command/operator/raft/listpeers/operator_raft_list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package listpeers diff --git a/command/operator/raft/operator_raft.go b/command/operator/raft/operator_raft.go index 52bcb446f9b10..42b6175e974db 100644 --- a/command/operator/raft/operator_raft.go +++ b/command/operator/raft/operator_raft.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package raft diff --git a/command/operator/raft/operator_raft_test.go b/command/operator/raft/operator_raft_test.go index cac0545fa511e..275606ab5aeca 100644 --- a/command/operator/raft/operator_raft_test.go +++ b/command/operator/raft/operator_raft_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package raft diff --git a/command/operator/raft/removepeer/operator_raft_remove.go b/command/operator/raft/removepeer/operator_raft_remove.go index 12692d4d5225f..eea10a045d9ad 100644 --- a/command/operator/raft/removepeer/operator_raft_remove.go +++ b/command/operator/raft/removepeer/operator_raft_remove.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package removepeer diff --git a/command/operator/raft/removepeer/operator_raft_remove_test.go b/command/operator/raft/removepeer/operator_raft_remove_test.go index e7647712647d8..e81fc1474a386 100644 --- a/command/operator/raft/removepeer/operator_raft_remove_test.go +++ b/command/operator/raft/removepeer/operator_raft_remove_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package removepeer diff --git a/command/operator/raft/transferleader/transfer_leader.go b/command/operator/raft/transferleader/transfer_leader.go index ebeb77dfc82c6..9e3630c056015 100644 --- a/command/operator/raft/transferleader/transfer_leader.go +++ b/command/operator/raft/transferleader/transfer_leader.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package transferleader diff --git a/command/operator/raft/transferleader/transfer_leader_test.go b/command/operator/raft/transferleader/transfer_leader_test.go index 2b56fe1d784f6..7c0fc4115dbc4 100644 --- a/command/operator/raft/transferleader/transfer_leader_test.go +++ b/command/operator/raft/transferleader/transfer_leader_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package transferleader diff --git a/command/operator/usage/instances/usage_instances.go b/command/operator/usage/instances/usage_instances.go index 83231db0a1d47..1ac90dce8d363 100644 --- a/command/operator/usage/instances/usage_instances.go +++ b/command/operator/usage/instances/usage_instances.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package instances diff --git a/command/operator/usage/instances/usage_instances_ce.go b/command/operator/usage/instances/usage_instances_ce.go index ef614edfac269..dc9511b32ce28 100644 --- a/command/operator/usage/instances/usage_instances_ce.go +++ b/command/operator/usage/instances/usage_instances_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/operator/usage/instances/usage_instances_ce_test.go b/command/operator/usage/instances/usage_instances_ce_test.go index a064828a45f37..478b9f42118b8 100644 --- a/command/operator/usage/instances/usage_instances_ce_test.go +++ b/command/operator/usage/instances/usage_instances_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/operator/usage/instances/usage_instances_test.go b/command/operator/usage/instances/usage_instances_test.go index 7dac04dd3e323..8ad38e1b0c53a 100644 --- a/command/operator/usage/instances/usage_instances_test.go +++ b/command/operator/usage/instances/usage_instances_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package instances diff --git a/command/operator/usage/usage.go b/command/operator/usage/usage.go index 6e7cde57e4bf5..3d733f8f36ffb 100644 --- a/command/operator/usage/usage.go +++ b/command/operator/usage/usage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package usage diff --git a/command/peering/delete/delete.go b/command/peering/delete/delete.go index 039ace5391884..f4399b73ce2f4 100644 --- a/command/peering/delete/delete.go +++ b/command/peering/delete/delete.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/peering/delete/delete_test.go b/command/peering/delete/delete_test.go index 5aa299b78d52a..56d0d495a897c 100644 --- a/command/peering/delete/delete_test.go +++ b/command/peering/delete/delete_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package delete diff --git a/command/peering/establish/establish.go b/command/peering/establish/establish.go index 42178f149040d..ef5178eecf8aa 100644 --- a/command/peering/establish/establish.go +++ b/command/peering/establish/establish.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package establish diff --git a/command/peering/establish/establish_test.go b/command/peering/establish/establish_test.go index 25abae316bc43..515b727f78b69 100644 --- a/command/peering/establish/establish_test.go +++ b/command/peering/establish/establish_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package establish diff --git a/command/peering/generate/generate.go b/command/peering/generate/generate.go index e2122aa7aa095..26410480f517b 100644 --- a/command/peering/generate/generate.go +++ b/command/peering/generate/generate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package generate diff --git a/command/peering/generate/generate_test.go b/command/peering/generate/generate_test.go index 863b266ed15e2..529f46aacdf6e 100644 --- a/command/peering/generate/generate_test.go +++ b/command/peering/generate/generate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package generate diff --git a/command/peering/list/list.go b/command/peering/list/list.go index 10e85d9b582f4..87fb6bade5998 100644 --- a/command/peering/list/list.go +++ b/command/peering/list/list.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/peering/list/list_test.go b/command/peering/list/list_test.go index 43da9684728e0..f923e6d2b7615 100644 --- a/command/peering/list/list_test.go +++ b/command/peering/list/list_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package list diff --git a/command/peering/peering.go b/command/peering/peering.go index 157dd42c63d71..2a4834e514c23 100644 --- a/command/peering/peering.go +++ b/command/peering/peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/command/peering/read/read.go b/command/peering/read/read.go index 8d15210fcfaa9..ddd44cb4fe8b8 100644 --- a/command/peering/read/read.go +++ b/command/peering/read/read.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package read diff --git a/command/peering/read/read_test.go b/command/peering/read/read_test.go index 90a2ac879244e..42b3544661753 100644 --- a/command/peering/read/read_test.go +++ b/command/peering/read/read_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package read diff --git a/command/registry.go b/command/registry.go index f01e3a1080416..b370f14bc872c 100644 --- a/command/registry.go +++ b/command/registry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package command diff --git a/command/registry_ce.go b/command/registry_ce.go index 7ea2f73a12f95..2a7708221022a 100644 --- a/command/registry_ce.go +++ b/command/registry_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/command/reload/reload.go b/command/reload/reload.go index 458b90cbf6a89..b0989817fdc07 100644 --- a/command/reload/reload.go +++ b/command/reload/reload.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package reload diff --git a/command/reload/reload_test.go b/command/reload/reload_test.go index 11313fb138418..d75712c539347 100644 --- a/command/reload/reload_test.go +++ b/command/reload/reload_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package reload diff --git a/command/rtt/rtt.go b/command/rtt/rtt.go index db9e3efd06be2..f7a7414511d60 100644 --- a/command/rtt/rtt.go +++ b/command/rtt/rtt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rtt diff --git a/command/rtt/rtt_test.go b/command/rtt/rtt_test.go index 4b0621cfe33f8..8534fc1a59bc2 100644 --- a/command/rtt/rtt_test.go +++ b/command/rtt/rtt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package rtt diff --git a/command/services/config.go b/command/services/config.go index 1a173078d6f04..f881778956d6b 100644 --- a/command/services/config.go +++ b/command/services/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/services/config_test.go b/command/services/config_test.go index b8a2207fb9e86..e8770337d4d9b 100644 --- a/command/services/config_test.go +++ b/command/services/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/services/deregister/deregister.go b/command/services/deregister/deregister.go index bff2c972704a8..69a4ef9437d74 100644 --- a/command/services/deregister/deregister.go +++ b/command/services/deregister/deregister.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package deregister diff --git a/command/services/deregister/deregister_test.go b/command/services/deregister/deregister_test.go index 2ee9d8de5fab5..15d9ffddb22ba 100644 --- a/command/services/deregister/deregister_test.go +++ b/command/services/deregister/deregister_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package deregister diff --git a/command/services/export/export.go b/command/services/export/export.go index 49a5756602006..637553f93e6c7 100644 --- a/command/services/export/export.go +++ b/command/services/export/export.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package export import ( diff --git a/command/services/export/export_test.go b/command/services/export/export_test.go index aa13aff63c238..6a2dfa9d67b06 100644 --- a/command/services/export/export_test.go +++ b/command/services/export/export_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package export import ( diff --git a/command/services/register/register.go b/command/services/register/register.go index 33599dda01323..6e5f7a0fcfa57 100644 --- a/command/services/register/register.go +++ b/command/services/register/register.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package register diff --git a/command/services/register/register_test.go b/command/services/register/register_test.go index 24d5f4fb87ea1..2004610cf50d0 100644 --- a/command/services/register/register_test.go +++ b/command/services/register/register_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package register diff --git a/command/services/services.go b/command/services/services.go index 521092f063ae5..9c12445def7e1 100644 --- a/command/services/services.go +++ b/command/services/services.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/services/services_test.go b/command/services/services_test.go index a2d4b45262be5..11a31cd16dbe1 100644 --- a/command/services/services_test.go +++ b/command/services/services_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package services diff --git a/command/snapshot/inspect/formatter.go b/command/snapshot/inspect/formatter.go index 53da998b25c8b..2898bf174fb07 100644 --- a/command/snapshot/inspect/formatter.go +++ b/command/snapshot/inspect/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inspect diff --git a/command/snapshot/inspect/formatter_test.go b/command/snapshot/inspect/formatter_test.go index 48b8d1da4d966..b55ea6b972a26 100644 --- a/command/snapshot/inspect/formatter_test.go +++ b/command/snapshot/inspect/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inspect diff --git a/command/snapshot/inspect/snapshot_inspect.go b/command/snapshot/inspect/snapshot_inspect.go index 483e937eb4810..018d3f3dec348 100644 --- a/command/snapshot/inspect/snapshot_inspect.go +++ b/command/snapshot/inspect/snapshot_inspect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inspect diff --git a/command/snapshot/inspect/snapshot_inspect_test.go b/command/snapshot/inspect/snapshot_inspect_test.go index 1f7ff69f1bc35..f6a7990783680 100644 --- a/command/snapshot/inspect/snapshot_inspect_test.go +++ b/command/snapshot/inspect/snapshot_inspect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inspect diff --git a/command/snapshot/restore/snapshot_restore.go b/command/snapshot/restore/snapshot_restore.go index aaa08a162d7a8..170e77685dc2c 100644 --- a/command/snapshot/restore/snapshot_restore.go +++ b/command/snapshot/restore/snapshot_restore.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package restore diff --git a/command/snapshot/restore/snapshot_restore_test.go b/command/snapshot/restore/snapshot_restore_test.go index 61c8b2bed0d67..076df99a6bdd6 100644 --- a/command/snapshot/restore/snapshot_restore_test.go +++ b/command/snapshot/restore/snapshot_restore_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package restore diff --git a/command/snapshot/save/snapshot_save.go b/command/snapshot/save/snapshot_save.go index 2395a4f3a0389..f250202be897f 100644 --- a/command/snapshot/save/snapshot_save.go +++ b/command/snapshot/save/snapshot_save.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package save diff --git a/command/snapshot/save/snapshot_save_test.go b/command/snapshot/save/snapshot_save_test.go index a95b537e94755..915ba5e5f5eee 100644 --- a/command/snapshot/save/snapshot_save_test.go +++ b/command/snapshot/save/snapshot_save_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package save diff --git a/command/snapshot/snapshot_command.go b/command/snapshot/snapshot_command.go index 2e96550e191fd..7378f5449f29d 100644 --- a/command/snapshot/snapshot_command.go +++ b/command/snapshot/snapshot_command.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package snapshot diff --git a/command/snapshot/snapshot_command_test.go b/command/snapshot/snapshot_command_test.go index d38f5cde9271b..99db9533a31d7 100644 --- a/command/snapshot/snapshot_command_test.go +++ b/command/snapshot/snapshot_command_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package snapshot diff --git a/command/tls/ca/create/tls_ca_create.go b/command/tls/ca/create/tls_ca_create.go index 43a9c249f154e..4c25f8aec7a2e 100644 --- a/command/tls/ca/create/tls_ca_create.go +++ b/command/tls/ca/create/tls_ca_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/tls/ca/create/tls_ca_create_test.go b/command/tls/ca/create/tls_ca_create_test.go index aee2b69062cff..d9e837e56d7f4 100644 --- a/command/tls/ca/create/tls_ca_create_test.go +++ b/command/tls/ca/create/tls_ca_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/tls/ca/tls_ca.go b/command/tls/ca/tls_ca.go index ef943a4fbfe0e..65207c0dc8ba0 100644 --- a/command/tls/ca/tls_ca.go +++ b/command/tls/ca/tls_ca.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/command/tls/ca/tls_ca_test.go b/command/tls/ca/tls_ca_test.go index d24c15665f307..74cd8de37da47 100644 --- a/command/tls/ca/tls_ca_test.go +++ b/command/tls/ca/tls_ca_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ca diff --git a/command/tls/cert/create/tls_cert_create.go b/command/tls/cert/create/tls_cert_create.go index 9e0f92173bd15..7af36bc986cd8 100644 --- a/command/tls/cert/create/tls_cert_create.go +++ b/command/tls/cert/create/tls_cert_create.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/tls/cert/create/tls_cert_create_test.go b/command/tls/cert/create/tls_cert_create_test.go index 6e807d4a4fc71..9f9fa1385a21e 100644 --- a/command/tls/cert/create/tls_cert_create_test.go +++ b/command/tls/cert/create/tls_cert_create_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package create diff --git a/command/tls/cert/tls_cert.go b/command/tls/cert/tls_cert.go index 38551ef6c621d..17795507e4319 100644 --- a/command/tls/cert/tls_cert.go +++ b/command/tls/cert/tls_cert.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cert diff --git a/command/tls/cert/tls_cert_test.go b/command/tls/cert/tls_cert_test.go index 912ff3e58e4b2..ab5144813de61 100644 --- a/command/tls/cert/tls_cert_test.go +++ b/command/tls/cert/tls_cert_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cert diff --git a/command/tls/tls.go b/command/tls/tls.go index a25a313ed02ec..fda3c4a12331a 100644 --- a/command/tls/tls.go +++ b/command/tls/tls.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tls diff --git a/command/tls/tls_test.go b/command/tls/tls_test.go index 7bd99fd4c11c4..dd34df10fd282 100644 --- a/command/tls/tls_test.go +++ b/command/tls/tls_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tls diff --git a/command/troubleshoot/proxy/troubleshoot_proxy.go b/command/troubleshoot/proxy/troubleshoot_proxy.go index 1f513043fb17d..08928b9e5453f 100644 --- a/command/troubleshoot/proxy/troubleshoot_proxy.go +++ b/command/troubleshoot/proxy/troubleshoot_proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/command/troubleshoot/troubleshoot.go b/command/troubleshoot/troubleshoot.go index 36c77ff104352..431c671ee732c 100644 --- a/command/troubleshoot/troubleshoot.go +++ b/command/troubleshoot/troubleshoot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/command/troubleshoot/troubleshoot_test.go b/command/troubleshoot/troubleshoot_test.go index a0e3f1c06957f..9ec2f68665a36 100644 --- a/command/troubleshoot/troubleshoot_test.go +++ b/command/troubleshoot/troubleshoot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/command/troubleshoot/upstreams/troubleshoot_upstreams.go b/command/troubleshoot/upstreams/troubleshoot_upstreams.go index 5796dac583764..19737c7353307 100644 --- a/command/troubleshoot/upstreams/troubleshoot_upstreams.go +++ b/command/troubleshoot/upstreams/troubleshoot_upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upstreams diff --git a/command/validate/validate.go b/command/validate/validate.go index 1a9630c65f47e..a44120a89f8be 100644 --- a/command/validate/validate.go +++ b/command/validate/validate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package validate diff --git a/command/validate/validate_test.go b/command/validate/validate_test.go index dc5b519dbe31a..fdd0c7b2f2ff6 100644 --- a/command/validate/validate_test.go +++ b/command/validate/validate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package validate diff --git a/command/version/formatter.go b/command/version/formatter.go index 612c305a7985d..c7c16da4419bf 100644 --- a/command/version/formatter.go +++ b/command/version/formatter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/command/version/formatter_test.go b/command/version/formatter_test.go index 45e4019dfb5c8..b5c0bd2482b98 100644 --- a/command/version/formatter_test.go +++ b/command/version/formatter_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/command/version/version.go b/command/version/version.go index da8978c3e72f7..1c2157a8eae8a 100644 --- a/command/version/version.go +++ b/command/version/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/command/version/version_test.go b/command/version/version_test.go index d0af11506e383..45bd4fc6ac4c2 100644 --- a/command/version/version_test.go +++ b/command/version/version_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package version diff --git a/command/watch/watch.go b/command/watch/watch.go index 205ff3fb083d7..b187fa369ab44 100644 --- a/command/watch/watch.go +++ b/command/watch/watch.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/command/watch/watch_test.go b/command/watch/watch_test.go index ba29c2731a8c0..ed830a2aa7f3c 100644 --- a/command/watch/watch_test.go +++ b/command/watch/watch_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package watch diff --git a/connect/certgen/certgen.go b/connect/certgen/certgen.go index 509e7f8df4f3b..ced3720cd81b0 100644 --- a/connect/certgen/certgen.go +++ b/connect/certgen/certgen.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // certgen: a tool for generating test certificates on disk for use as // test-fixtures and for end-to-end testing and local development. diff --git a/connect/example_test.go b/connect/example_test.go index 51571bf1818cb..666f2f09db6dd 100644 --- a/connect/example_test.go +++ b/connect/example_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/proxy/config.go b/connect/proxy/config.go index 19476d48d49f5..9d5e85bf4deee 100644 --- a/connect/proxy/config.go +++ b/connect/proxy/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/config_test.go b/connect/proxy/config_test.go index a196958316816..55bd64e1b18a2 100644 --- a/connect/proxy/config_test.go +++ b/connect/proxy/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/conn.go b/connect/proxy/conn.go index acc1a49eb4b77..2c9314642ee26 100644 --- a/connect/proxy/conn.go +++ b/connect/proxy/conn.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/conn_test.go b/connect/proxy/conn_test.go index b5be7952d0ee5..95836af0d9e4f 100644 --- a/connect/proxy/conn_test.go +++ b/connect/proxy/conn_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/listener.go b/connect/proxy/listener.go index fc823d2712845..97d607c751f6a 100644 --- a/connect/proxy/listener.go +++ b/connect/proxy/listener.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/listener_test.go b/connect/proxy/listener_test.go index 5554ecf353a6e..9b4e573a4aa1e 100644 --- a/connect/proxy/listener_test.go +++ b/connect/proxy/listener_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/proxy.go b/connect/proxy/proxy.go index c365862ad8ec7..f5e7f913460fd 100644 --- a/connect/proxy/proxy.go +++ b/connect/proxy/proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/proxy_test.go b/connect/proxy/proxy_test.go index 20b4cdd55efef..876a91c81a4d0 100644 --- a/connect/proxy/proxy_test.go +++ b/connect/proxy/proxy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/proxy/testing.go b/connect/proxy/testing.go index 6756f16a2567b..7f8604394af75 100644 --- a/connect/proxy/testing.go +++ b/connect/proxy/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package proxy diff --git a/connect/resolver.go b/connect/resolver.go index fa89bc36d33d8..eb68b1c123358 100644 --- a/connect/resolver.go +++ b/connect/resolver.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/resolver_test.go b/connect/resolver_test.go index 3aece268b5dc3..51bc13ee28d4b 100644 --- a/connect/resolver_test.go +++ b/connect/resolver_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/service.go b/connect/service.go index ea38dd59b2e53..1260b065a068c 100644 --- a/connect/service.go +++ b/connect/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/service_test.go b/connect/service_test.go index 0f6ed51a8b458..87f522214cee2 100644 --- a/connect/service_test.go +++ b/connect/service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/testing.go b/connect/testing.go index 1017ee15f5e7d..4fe1a54f6e098 100644 --- a/connect/testing.go +++ b/connect/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/connect/tls.go b/connect/tls.go index 3d29cf48e1c0a..a0e0286bc1afb 100644 --- a/connect/tls.go +++ b/connect/tls.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect @@ -425,7 +425,7 @@ func (cfg *dynamicTLSConfig) Ready() bool { return cfg.VerifyLeafWithRoots() == nil } -// ReadyWait returns a chan that is closed when the Service becomes ready +// ReadyWait returns a chan that is closed when the the Service becomes ready // for use for the first time. Note that if the Service is ready when it is // called it returns a nil chan. Ready means that it has root and leaf // certificates configured but not that the combination is valid nor that diff --git a/connect/tls_test.go b/connect/tls_test.go index 74609b1740e35..5c96371c9443d 100644 --- a/connect/tls_test.go +++ b/connect/tls_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package connect diff --git a/docs/README.md b/docs/README.md index 0d61b30fa5778..d3483710b33bd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -40,8 +40,6 @@ Also see the [FAQ](./faq.md). 1. [Integration Tests](../test/integration/connect/envoy/README.md) 1. [Upgrade Tests](../test/integration/consul-container/test/upgrade/README.md) -1. [Remote Debugging Integration Tests](../test/integration/consul-container/test/debugging.md) -1. [Peering Common Topology Tests](../test-integ/peering_commontopo/README.md) ## Important Directories @@ -56,7 +54,7 @@ contain other important source related to Consul. * [.changelog] contains markdown files that are used by [hashicorp/go-changelog] to produce the [CHANGELOG.md]. * [build-support] contains bash functions and scripts used to automate. - development tasks. Generally these scripts are called from the [Makefile]. + development tasks. Generally these scripts are called from the [GNUmakefile]. * [grafana] contains the source for a [Grafana dashboard] that can be used to monitor Consul. @@ -67,7 +65,7 @@ contain other important source related to Consul. [hashicorp/go-changelog]: https://github.com/hashicorp/go-changelog [CHANGELOG.md]: https://github.com/hashicorp/consul/blob/main/CHANGELOG.md [build-support]: https://github.com/hashicorp/consul/tree/main/build-support -[Makefile]: https://github.com/hashicorp/consul/tree/main/Makefile +[GNUmakefile]: https://github.com/hashicorp/consul/tree/main/GNUmakefile [Grafana dashboard]: https://grafana.com/grafana/dashboards [grafana]: https://github.com/hashicorp/consul/tree/main/grafana diff --git a/docs/resources/guide.md b/docs/resources/guide.md index c19566577b720..b3f389c006a6a 100644 --- a/docs/resources/guide.md +++ b/docs/resources/guide.md @@ -61,10 +61,8 @@ func RegisterTypes(r resource.Registry) { } ``` -Update the `NewTypeRegistry` method in [`type_registry.go`] to call your -package's type registration method: - -[`type_registry.go`]: ../../agent/consul/type_registry.go +Update the `registerResources` method in [`server.go`] to call your package's +type registration method: ```Go import ( @@ -73,13 +71,15 @@ import ( // … ) -func NewTypeRegistry() resource.Registry { +func (s *Server) registerResources() { // … - foo.RegisterTypes(registry) + foo.RegisterTypes(s.typeRegistry) // … } ``` +[`server.go`]: ../../agent/consul/server.go + That should be all you need to start using your new resource type. Test it out by starting an agent in dev mode: @@ -277,9 +277,7 @@ func (barReconciler) Reconcile(ctx context.Context, rt controller.Runtime, req c Next, register your controller with the controller manager. Another common pattern is to have your package expose a method for registering controllers, -which is called from `registerControllers` in [`server.go`]. - -[`server.go`]: ../../agent/consul/server.go +which is also called from `registerResources` in [`server.go`]. ```Go package foo @@ -292,7 +290,7 @@ func RegisterControllers(mgr *controller.Manager) { ```Go package consul -func (s *Server) registerControllers() { +func (s *Server) registerResources() { // … foo.RegisterControllers(s.controllerManager) // … diff --git a/envoyextensions/extensioncommon/basic_envoy_extender.go b/envoyextensions/extensioncommon/basic_envoy_extender.go index 86cee8f14a4e8..a99d7439fea83 100644 --- a/envoyextensions/extensioncommon/basic_envoy_extender.go +++ b/envoyextensions/extensioncommon/basic_envoy_extender.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/basic_extension_adapter.go b/envoyextensions/extensioncommon/basic_extension_adapter.go index 39e1e8c8363bf..fbf73f34c2983 100644 --- a/envoyextensions/extensioncommon/basic_extension_adapter.go +++ b/envoyextensions/extensioncommon/basic_extension_adapter.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/envoy_extender.go b/envoyextensions/extensioncommon/envoy_extender.go index 269f01acd6de4..0c8f9141c9258 100644 --- a/envoyextensions/extensioncommon/envoy_extender.go +++ b/envoyextensions/extensioncommon/envoy_extender.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon @@ -21,7 +21,7 @@ type EnvoyExtender interface { // Extend updates indexed xDS structures to include patches for // built-in extensions. It is responsible for applying extensions to - // the appropriate xDS resources. If any portion of this function fails, + // the the appropriate xDS resources. If any portion of this function fails, // it will attempt continue and return an error. The caller can then determine // if it is better to use a partially applied extension or error out. Extend(*xdscommon.IndexedResources, *RuntimeConfig) (*xdscommon.IndexedResources, error) diff --git a/envoyextensions/extensioncommon/envoy_extender_test.go b/envoyextensions/extensioncommon/envoy_extender_test.go index 9fe6b49aeb33b..48e338ed896f3 100644 --- a/envoyextensions/extensioncommon/envoy_extender_test.go +++ b/envoyextensions/extensioncommon/envoy_extender_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package extensioncommon import ( diff --git a/envoyextensions/extensioncommon/resources.go b/envoyextensions/extensioncommon/resources.go index 989c35dba7391..22c6c3ffa9ee1 100644 --- a/envoyextensions/extensioncommon/resources.go +++ b/envoyextensions/extensioncommon/resources.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/resources_test.go b/envoyextensions/extensioncommon/resources_test.go index 477e66494ce5f..659da8770ea65 100644 --- a/envoyextensions/extensioncommon/resources_test.go +++ b/envoyextensions/extensioncommon/resources_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/runtime_config.go b/envoyextensions/extensioncommon/runtime_config.go index 2a5e7d60077be..a20e4ed04e646 100644 --- a/envoyextensions/extensioncommon/runtime_config.go +++ b/envoyextensions/extensioncommon/runtime_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/runtime_config_test.go b/envoyextensions/extensioncommon/runtime_config_test.go index 8c4c9bed6eb69..fa2ac8df5f421 100644 --- a/envoyextensions/extensioncommon/runtime_config_test.go +++ b/envoyextensions/extensioncommon/runtime_config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/extensioncommon/upstream_envoy_extender.go b/envoyextensions/extensioncommon/upstream_envoy_extender.go index 35cebe2fa5301..135aca3f82e74 100644 --- a/envoyextensions/extensioncommon/upstream_envoy_extender.go +++ b/envoyextensions/extensioncommon/upstream_envoy_extender.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package extensioncommon diff --git a/envoyextensions/go.mod b/envoyextensions/go.mod index 5d90d18653adb..ff839c348d35d 100644 --- a/envoyextensions/go.mod +++ b/envoyextensions/go.mod @@ -2,10 +2,7 @@ module github.com/hashicorp/consul/envoyextensions go 1.20 -replace ( - github.com/hashicorp/consul/api => ../api - github.com/hashicorp/consul/sdk => ../sdk -) +replace github.com/hashicorp/consul/api => ../api require ( github.com/envoyproxy/go-control-plane v0.11.0 diff --git a/envoyextensions/go.sum b/envoyextensions/go.sum index 77c098c2c2bf5..801e497f9c47d 100644 --- a/envoyextensions/go.sum +++ b/envoyextensions/go.sum @@ -62,6 +62,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/envoyextensions/xdscommon/envoy_versioning.go b/envoyextensions/xdscommon/envoy_versioning.go index c5f9d4798c105..393a96bf9e809 100644 --- a/envoyextensions/xdscommon/envoy_versioning.go +++ b/envoyextensions/xdscommon/envoy_versioning.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscommon diff --git a/envoyextensions/xdscommon/envoy_versioning_test.go b/envoyextensions/xdscommon/envoy_versioning_test.go index bc02e9c4aadc7..74d26aac1bf23 100644 --- a/envoyextensions/xdscommon/envoy_versioning_test.go +++ b/envoyextensions/xdscommon/envoy_versioning_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscommon @@ -151,10 +151,10 @@ func TestDetermineSupportedProxyFeaturesFromString(t *testing.T) { } */ for _, v := range []string{ + "1.23.0", "1.23.1", "1.23.2", "1.23.3", "1.23.4", "1.23.5", "1.23.6", "1.23.7", "1.23.8", "1.23.9", "1.23.10", "1.23.11", "1.23.12", "1.24.0", "1.24.1", "1.24.2", "1.24.3", "1.24.4", "1.24.5", "1.24.6", "1.24.7", "1.24.8", "1.24.9", "1.24.10", "1.25.0", "1.25.1", "1.25.2", "1.25.3", "1.25.4", "1.25.5", "1.25.6", "1.25.7", "1.25.8", "1.25.9", "1.26.0", "1.26.1", "1.26.2", "1.26.3", "1.26.4", - "1.27.0", } { cases[v] = testcase{expect: SupportedProxyFeatures{}} } diff --git a/envoyextensions/xdscommon/proxysupport.go b/envoyextensions/xdscommon/proxysupport.go index 764d967616f6d..6645405571ed2 100644 --- a/envoyextensions/xdscommon/proxysupport.go +++ b/envoyextensions/xdscommon/proxysupport.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscommon @@ -12,10 +12,10 @@ import "strings" // // see: https://www.consul.io/docs/connect/proxies/envoy#supported-versions var EnvoyVersions = []string{ - "1.27.0", "1.26.4", "1.25.9", "1.24.10", + "1.23.12", } // UnsupportedEnvoyVersions lists any unsupported Envoy versions (mainly minor versions) that fall diff --git a/envoyextensions/xdscommon/proxysupport_test.go b/envoyextensions/xdscommon/proxysupport_test.go index cc90b726c9d94..042ab5ad874e9 100644 --- a/envoyextensions/xdscommon/proxysupport_test.go +++ b/envoyextensions/xdscommon/proxysupport_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscommon diff --git a/envoyextensions/xdscommon/xdscommon.go b/envoyextensions/xdscommon/xdscommon.go index efc2c5a87dd57..30c82de9ae561 100644 --- a/envoyextensions/xdscommon/xdscommon.go +++ b/envoyextensions/xdscommon/xdscommon.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package xdscommon diff --git a/envoyextensions/xdscommon/xdscommon_test.go b/envoyextensions/xdscommon/xdscommon_test.go index 2d1aec40b54f7..5cca6e13a6192 100644 --- a/envoyextensions/xdscommon/xdscommon_test.go +++ b/envoyextensions/xdscommon/xdscommon_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package xdscommon import ( diff --git a/fixup_acl_move.sh b/fixup_acl_move.sh index ac57c8c7e9334..2dbc9c6aefe77 100644 --- a/fixup_acl_move.sh +++ b/fixup_acl_move.sh @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 GOIMPORTS=~/go/bin/goimports diff --git a/go.mod b/go.mod index 4e5b45443455d..db5c7052cc8b4 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,6 @@ require ( github.com/hashicorp/go-version v1.2.1 github.com/hashicorp/golang-lru v0.5.4 github.com/hashicorp/hcl v1.0.0 - github.com/hashicorp/hcl/v2 v2.6.0 github.com/hashicorp/hcp-scada-provider v0.2.3 github.com/hashicorp/hcp-sdk-go v0.55.0 github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 @@ -87,7 +86,6 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/mitchellh/pointerstructure v1.2.1 github.com/mitchellh/reflectwalk v1.0.2 - github.com/natefinch/npipe v0.0.0-20160621034901-c1b8fa8bdcce github.com/oklog/ulid/v2 v2.1.0 github.com/olekukonko/tablewriter v0.0.4 github.com/patrickmn/go-cache v2.1.0+incompatible @@ -97,7 +95,6 @@ require ( github.com/ryanuber/columnize v2.1.2+incompatible github.com/shirou/gopsutil/v3 v3.22.8 github.com/stretchr/testify v1.8.3 - github.com/zclconf/go-cty v1.2.0 go.etcd.io/bbolt v1.3.7 go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/metric v1.16.0 @@ -120,7 +117,6 @@ require ( k8s.io/api v0.26.2 k8s.io/apimachinery v0.26.2 k8s.io/client-go v0.26.2 - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 ) require ( @@ -140,9 +136,6 @@ require ( github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/DataDog/datadog-go v4.8.2+incompatible // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/agext/levenshtein v1.2.1 // indirect - github.com/apparentlymart/go-textseg v1.0.0 // indirect - github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/benbjohnson/immutable v0.4.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -212,7 +205,6 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -258,12 +250,12 @@ require ( google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/resty.v1 v1.12.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect + k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 690c27b8af7ce..a2c02795985c6 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,6 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KMJuWmfCkcxl09JwdlqwDZZ6U14= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= -github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -120,11 +118,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/aliyun/alibaba-cloud-sdk-go v1.62.156 h1:K4N91T1+RlSlx+t2dujeDviy4ehSGVjEltluDgmeHS4= github.com/aliyun/alibaba-cloud-sdk-go v1.62.156/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -319,7 +312,6 @@ github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6m github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -375,7 +367,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -561,8 +552,6 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.6.0 h1:3krZOfGY6SziUXa6H9PJU6TyohHn7I+ARYnhbeNBz+o= -github.com/hashicorp/hcl/v2 v2.6.0/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= github.com/hashicorp/hcp-scada-provider v0.2.3 h1:AarYR+/Pcv+cMvPdAlb92uOBmZfEH6ny4+DT+4NY2VQ= github.com/hashicorp/hcp-scada-provider v0.2.3/go.mod h1:ZFTgGwkzNv99PLQjTsulzaCplCzOTBh0IUQsPKzrQFo= github.com/hashicorp/hcp-sdk-go v0.55.0 h1:T4sQtgQfQJOD0uucT4hS+GZI1FmoHAQMADj277W++xw= @@ -664,8 +653,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/linode/linodego v0.7.1/go.mod h1:ga11n3ivecUrPCHN0rANxKmfWBJVkOXfLMZinAbj2sY= github.com/linode/linodego v0.10.0 h1:AMdb82HVgY8o3mjBXJcUv9B+fnJjfDMn2rNRGbX+jvM= @@ -723,8 +710,6 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.0 h1:/x0XQ6h+3U3nAyk1yx+bHPURrKa9sVVvYbuqZ7pIAtI= github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= @@ -754,8 +739,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/natefinch/npipe v0.0.0-20160621034901-c1b8fa8bdcce h1:TqjP/BTDrwN7zP9xyXVuLsMBXYMt6LLYi55PlrIcq8U= -github.com/natefinch/npipe v0.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:ifHPsLndGGzvgzcaXUvzmt6LxKT4pJ+uzEhtnMt+f7A= github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2 h1:BQ1HW7hr4IVovMwWg0E0PYcyW8CzqDcVmaew9cujU4s= github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2/go.mod h1:TLb2Sg7HQcgGdloNxkrmtgDNR9uVYF3lfdFIN4Ro6Sk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -862,7 +845,6 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil/v3 v3.22.8 h1:a4s3hXogo5mE2PfdfJIonDbstO/P+9JszdfhAHSzD9Y= github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -887,7 +869,6 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -929,7 +910,6 @@ github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVK github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmware/govmomi v0.18.0 h1:f7QxSmP7meCtoAmiKZogvVbLInT+CZx6Px6K5rYsJZo= github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -948,8 +928,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zclconf/go-cty v1.2.0 h1:sPHsy7ADcIZQP3vILvTjrh74ZA175TFP5vqiNK1UmlI= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= @@ -994,7 +972,6 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1056,7 +1033,6 @@ golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1159,7 +1135,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1483,8 +1458,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= diff --git a/grafana/README.md b/grafana/README.md index 2e8b2b588b75d..b3dec68183a9d 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -9,7 +9,3 @@ The page for publishing this dashboard is https://grafana.com/grafana/dashboards - Click "share" and export for external publishing - Login to Grafana via the team account (message a manager) - Publish as a new version, including change notes. - -### Grafana dashboard for consul-k8s (control plane) - -A grafana dashboard for monitoring consul-k8s (control plane) can also be found in this directory: `consul-k8s-control-plane-monitoring.json`. This dashboard has not been published to https://grafana.com. diff --git a/grafana/consul-k8s-control-plane-monitoring.json b/grafana/consul-k8s-control-plane-monitoring.json deleted file mode 100644 index e84fe8c6b9637..0000000000000 --- a/grafana/consul-k8s-control-plane-monitoring.json +++ /dev/null @@ -1,3467 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "title": "Cluster Status", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "limit": 1, - "values": true - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "consul_consul_server_0_members_servers{pod=\"consul-server-0\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Number of Consul Servers", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "No data in agentless mode", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 6, - "y": 1 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(kube_pod_container_resource_limits{pod=~\"consul-client-.*\", container=\"consul\", resource=\"memory\"})", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Number of Consul Clients (No data in agentless mode)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Must be 1", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum({__name__=~\".+server_isLeader\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Number of Leader (1: Healthy)", - "type": "timeseries" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 40, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 10 - }, - "id": 22, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "consul_raft_leader_lastContact{quantile=\"0.5\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "consul_raft_leader_lastContact{quantile=\"0.99\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Raft Leader LastContact 99th and 50th (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Use consul.raft.rpc.appendEntries to understand how long it takes a follower node to process newly received Raft logs from the leader. Like consul.raft.commitTime, increases in this metric can indicate higher load on your Consul servers, and come with a risk of stale data. Since this metric is exposed within each follower, you should aggregate it as both an average (to track overall load on your Raft servers) and a percentile (to watch for outlier nodes).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 10 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "consul_raft_rpc_appendEntries{quantile=\"0.99\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "consul_raft_rpc_appendEntries{quantile=\"0.5\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Follower Append Entries Latency 99th and 50th (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 18 - }, - "id": 20, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "consul_raft_commitTime{quantile=\"0.99\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "consul_raft_commitTime{quantile=\"0.5\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Leader Raft Commit Latency 99th and 50th (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "id": 46, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_raft_fsm_apply_sum[5m])\n/\nrate(consul_raft_fsm_apply_count[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Average Raft FSM Apply Latency per 5 minutes (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 47, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum(rate(consul_raft_apply[5m]))", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Raft Apply Rate per 5 minutes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "An approximate measurement of the proportion of time the main Raft goroutine is busy and unavailable to accept new work.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 41, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "consul_raft_thread_main_saturation{pod=~\"consul-server-.*\",quantile=\"0.9\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Raft thread main saturation (percentage)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "An approximate measurement of the proportion of time the FSM Raft goroutine is busy and unavailable to accept new work.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 34 - }, - "id": 42, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "consul_raft_thread_fsm_saturation{pod=~\"consul-server-.*\", quantile=\"0.9\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Raft thread FSM saturation (percentage)", - "type": "timeseries" - } - ], - "title": "Raft", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 43, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Measures the time spent updating the raft store from the serf member information.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "id": 44, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_leader_reconcile_sum{pod=~\"consul-server-.*\"}[5m])\n/ \nrate(consul_leader_reconcile_count{pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Average latency of leader reconcile per 5 minutes (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments whenever a Consul server becomes a leader.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 11 - }, - "id": 45, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum(consul_raft_state_leader{pod=~\"consul-server-.*\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Count of a new leader elected [so far] (increasing only)", - "type": "timeseries" - } - ], - "title": "Leadership Changes", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 14, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 12 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "rate(container_cpu_usage_seconds_total{container=\"consul\", pod=~\"consul-server-.*\"}[5m])", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "kube_pod_container_resource_limits{resource=\"cpu\", container=\"consul\"}", - "hide": true, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "CPU Usage in Seconds (Consul servers)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul servers have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 12 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "exemplar": false, - "expr": "kube_pod_container_resource_limits{resource=\"cpu\", pod=\"consul-server-0\"}", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "CPU Limit in Seconds (Consul Servers)", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 20 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "container_memory_working_set_bytes{container=\"consul\", pod=~\"consul-server-.*\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Memory Usage (Consul servers)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul servers have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-BlYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 20 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "kube_pod_container_resource_limits{resource=\"memory\", pod=\"consul-server-0\"}", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Memory Limit (Consul Servers)", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 28 - }, - "id": 48, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum(rate(container_network_receive_bytes_total{pod=~\"consul-server-.*\"}[5m])) by (pod)", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Received bytes total per 5 minutes (Consul servers)", - "type": "timeseries" - } - ], - "title": "Resource Utilization (Consul Servers)", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 12 - }, - "id": 24, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 13 - }, - "id": 26, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(container_cpu_usage_seconds_total{container=\"consul\", pod=~\"consul-client-.*\"}[5m])", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "kube_pod_container_resource_limits{resource=\"cpu\", container=\"consul\"}", - "hide": true, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "CPU Usage in Seconds (Consul Clients)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul clients have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 13 - }, - "id": 28, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(kube_pod_container_resource_limits{resource=\"cpu\", pod=~\"consul-client-.*\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "CPU Limit in Seconds (Consul Clients)", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 21 - }, - "id": 23, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "container_memory_working_set_bytes{container=\"consul\", pod=~\"consul-client-.*\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Memory Usage (Consul clients)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul servers have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-BlYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 21 - }, - "id": 25, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(kube_pod_container_resource_limits{resource=\"memory\", pod=~\"consul-client-.*\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Memory Limit (Consul Clients)", - "type": "gauge" - } - ], - "title": "Resource Utilization (Consul Clients) - N/A in agentless mode", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 54, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 17 - }, - "id": 55, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(container_cpu_usage_seconds_total{pod=~\".*-connect-injector-.*\",container=\"sidecar-injector\"}[5m])", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "kube_pod_container_resource_limits{resource=\"cpu\", container=\"consul\"}", - "hide": true, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "CPU Usage in Seconds (Connect Injector)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul servers have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 17 - }, - "id": 56, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(kube_pod_container_resource_limits{resource=\"cpu\", container=\"sidecar-injector\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "CPU Limit in Seconds (Connect Injector)", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 15, - "x": 0, - "y": 25 - }, - "id": 59, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "container_memory_working_set_bytes{pod=~\".*-connect-injector-.*\",container=\"sidecar-injector\"}", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Memory Usage (Connect Injector)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "All consul servers have the same limit", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-BlYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 25 - }, - "id": 58, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(kube_pod_container_resource_limits{resource=\"memory\", container=\"sidecar-injector\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Memory Limit (Connect Injector)", - "type": "gauge" - } - ], - "title": "Resource Utilization (Connect Injector)", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 30, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 15 - }, - "id": 31, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum(rate(consul_catalog_register_count{pod=~\"consul-server-.*\"}[5m]))", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Catalog Register Count per 5 minutes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 15 - }, - "id": 34, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_catalog_register_sum{pod=~\"consul-server-.*\"}[5m])\n/\nrate(consul_catalog_register_count{pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Average latency of catalog register per 5 minutes (ms)", - "type": "timeseries" - } - ], - "title": "Feature: Catalog", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 49, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 50, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum(rate(consul_acl_ResolveToken_count{pod=~\"consul-server-.*\"}[5m]))", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "ACL Token Resolve Count per 5 minutes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 51, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_acl_ResolveToken_sum{pod=~\"consul-server-.*\"}[5m])/rate(consul_acl_ResolveToken_count{pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Average latency of resolving ACL token per 5 minutes (ms)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 24 - }, - "id": 52, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_acl_token_cache_hit{pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of ACL token cache hit per 5 minutes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 53, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_acl_token_cache_miss{pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of ACL token cache miss per 5 minutes", - "type": "timeseries" - } - ], - "title": "ACL", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 33, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments whenever a Consul agent in client mode makes an RPC request to a Consul server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 14 - }, - "id": 37, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_client_rpc{namespace=\"consul\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of RPC requests per 5 minutes - client side ", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments when a server accepts an RPC connection.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 14 - }, - "id": 36, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_rpc_accept_conn{namespace=\"consul\",pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "RPC Accept Connection Count Rate per 5 minutes - server side", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 22 - }, - "id": 39, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_client_rpc_failed{namespace=\"consul\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of Failed RPC requests per 5 minutes - client side ", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments when a server receives a Consul-related RPC request.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 22 - }, - "id": 32, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_rpc_request{namespace=\"consul\",pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of RPC requests per 5 minutes - server side", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments whenever a Consul agent in client mode makes an RPC request to a Consul server gets rate limited by that agent's limits configuration.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 30 - }, - "id": 38, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_client_rpc_exceeded{namespace=\"consul\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate of Exceeded RPC requests per 5 minutes - client side ", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Increments when a server returns an error from an RPC request.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 30 - }, - "id": 35, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "rate(consul_rpc_request_error{namespace=\"consul\",pod=~\"consul-server-.*\"}[5m])", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Error rate of RPC requests per 5 minutes - server side", - "type": "timeseries" - } - ], - "title": "RPC", - "type": "row" - } - ], - "refresh": "30s", - "revision": 1, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Consul K8s monitoring (control plane)", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/internal/catalog/catalogtest/run_test.go b/internal/catalog/catalogtest/run_test.go index 7e4d56aa90af1..7c17052d8246d 100644 --- a/internal/catalog/catalogtest/run_test.go +++ b/internal/catalog/catalogtest/run_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package catalogtest import ( @@ -40,8 +37,3 @@ func TestControllers_Integration(t *testing.T) { client := runInMemResourceServiceAndControllers(t, catalog.DefaultControllerDependencies()) RunCatalogV1Alpha1IntegrationTest(t, client) } - -func TestControllers_Lifecycle(t *testing.T) { - client := runInMemResourceServiceAndControllers(t, catalog.DefaultControllerDependencies()) - RunCatalogV1Alpha1LifecycleIntegrationTest(t, client) -} diff --git a/internal/catalog/catalogtest/test_integration_v1alpha1.go b/internal/catalog/catalogtest/test_integration_v1alpha1.go index e034502c4503d..8a7f4cd9a2488 100644 --- a/internal/catalog/catalogtest/test_integration_v1alpha1.go +++ b/internal/catalog/catalogtest/test_integration_v1alpha1.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package catalogtest import ( @@ -701,7 +698,6 @@ func expectedGRPCApiServiceEndpoints(t *testing.T, c *rtest.Client) *pbcatalog.S } func verifyServiceEndpoints(t *testing.T, c *rtest.Client, id *pbresource.ID, expected *pbcatalog.ServiceEndpoints) { - t.Helper() c.WaitForResourceState(t, id, func(t rtest.T, res *pbresource.Resource) { var actual pbcatalog.ServiceEndpoints err := res.Data.UnmarshalTo(&actual) diff --git a/internal/catalog/catalogtest/test_lifecycle_v1alpha1.go b/internal/catalog/catalogtest/test_lifecycle_v1alpha1.go deleted file mode 100644 index 55e9d2bbe28fc..0000000000000 --- a/internal/catalog/catalogtest/test_lifecycle_v1alpha1.go +++ /dev/null @@ -1,709 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package catalogtest - -import ( - "testing" - - "github.com/hashicorp/consul/internal/catalog" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/sdk/testutil" -) - -// RunCatalogV1Alpha1LifecycleIntegrationTest intends to excercise functionality of -// managing catalog resources over their normal lifecycle where they will be modified -// several times, change state etc. -func RunCatalogV1Alpha1LifecycleIntegrationTest(t *testing.T, client pbresource.ResourceServiceClient) { - t.Helper() - - testutil.RunStep(t, "node-lifecycle", func(t *testing.T) { - RunCatalogV1Alpha1NodeLifecycleIntegrationTest(t, client) - }) - - testutil.RunStep(t, "workload-lifecycle", func(t *testing.T) { - RunCatalogV1Alpha1WorkloadLifecycleIntegrationTest(t, client) - }) - - testutil.RunStep(t, "endpoints-lifecycle", func(t *testing.T) { - RunCatalogV1Alpha1EndpointsLifecycleIntegrationTest(t, client) - }) -} - -// RunCatalogV1Alpha1NodeLifecycleIntegrationTest verifies correct functionality of -// the node-health controller. This test will exercise the following behaviors: -// -// * Creating a Node without associated HealthStatuses will mark the node as passing -// * Associating a HealthStatus with a Node will cause recomputation of the Health -// * Changing HealthStatus to a worse health will cause recomputation of the Health -// * Changing HealthStatus to a better health will cause recomputation of the Health -// * Deletion of associated HealthStatuses will recompute the Health (back to passing) -// * Deletion of the node will cause deletion of associated health statuses -func RunCatalogV1Alpha1NodeLifecycleIntegrationTest(t *testing.T, client pbresource.ResourceServiceClient) { - c := rtest.NewClient(client) - - nodeName := "test-lifecycle" - nodeHealthName := "test-lifecycle-node-status" - - // initial node creation - node := rtest.Resource(catalog.NodeV1Alpha1Type, nodeName). - WithData(t, &pbcatalog.Node{ - Addresses: []*pbcatalog.NodeAddress{ - {Host: "172.16.2.3"}, - {Host: "198.18.2.3", External: true}, - }, - }). - Write(t, c) - - // wait for the node health controller to mark the node as healthy - c.WaitForStatusCondition(t, node.Id, - catalog.NodeHealthStatusKey, - catalog.NodeHealthConditions[pbcatalog.Health_HEALTH_PASSING]) - - // Its easy enough to simply repeatedly set the health status and it proves - // that going both from better to worse health and worse to better all - // happen as expected. We leave the health in a warning state to allow for - // the subsequent health status deletion to cause the health to go back - // to passing. - healthChanges := []pbcatalog.Health{ - pbcatalog.Health_HEALTH_PASSING, - pbcatalog.Health_HEALTH_WARNING, - pbcatalog.Health_HEALTH_CRITICAL, - pbcatalog.Health_HEALTH_MAINTENANCE, - pbcatalog.Health_HEALTH_CRITICAL, - pbcatalog.Health_HEALTH_WARNING, - pbcatalog.Health_HEALTH_PASSING, - pbcatalog.Health_HEALTH_WARNING, - } - - // This will be set within the loop and used afterwards to delete the health status - var nodeHealth *pbresource.Resource - - // Iterate through the various desired health statuses, updating - // a HealthStatus resource owned by the node and waiting for - // reconciliation at each point - for _, health := range healthChanges { - // update the health check - nodeHealth = setHealthStatus(t, c, node.Id, nodeHealthName, health) - - // wait for reconciliation to kick in and put the node into the right - // health status. - c.WaitForStatusCondition(t, node.Id, - catalog.NodeHealthStatusKey, - catalog.NodeHealthConditions[health]) - } - - // now delete the health status and ensure things go back to passing - c.MustDelete(t, nodeHealth.Id) - - // wait for the node health controller to mark the node as healthy - c.WaitForStatusCondition(t, node.Id, - catalog.NodeHealthStatusKey, - catalog.NodeHealthConditions[pbcatalog.Health_HEALTH_PASSING]) - - // Add the health status back once more, the actual status doesn't matter. - // It just must be owned by the node so that we can show cascading - // deletions of owned health statuses working. - healthStatus := setHealthStatus(t, c, node.Id, nodeHealthName, pbcatalog.Health_HEALTH_CRITICAL) - - // Delete the node and wait for the health status to be deleted. - c.MustDelete(t, node.Id) - c.WaitForDeletion(t, healthStatus.Id) -} - -// RunCatalogV1Alpha1WorkloadLifecycleIntegrationTest verifies correct functionality of -// the workload-health controller. This test will exercise the following behaviors: -// -// - Associating a workload with a node causes recomputation of the health and takes -// into account the nodes health -// - Modifying the workloads associated node causes health recomputation and takes into -// account the new nodes health -// - Removal of the node association causes recomputation of health and for no node health -// to be taken into account. -// - Creating a workload without associated health statuses or node association will -// be marked passing -// - Creating a workload without associated health statuses but with a node will -// inherit its health from the node. -// - Changing HealthStatus to a worse health will cause recompuation of the Health -// - Changing HealthStatus to a better health will cause recompuation of the Health -// - Overall health is computed as the worst health amongst the nodes health and all -// of the workloads associated HealthStatuses -// - Deletion of the workload will cause deletion of all associated health statuses. -func RunCatalogV1Alpha1WorkloadLifecycleIntegrationTest(t *testing.T, client pbresource.ResourceServiceClient) { - c := rtest.NewClient(client) - testutil.RunStep(t, "nodeless-workload", func(t *testing.T) { - runV1Alpha1NodelessWorkloadLifecycleIntegrationTest(t, c) - }) - - testutil.RunStep(t, "node-associated-workload", func(t *testing.T) { - runV1Alpha1NodeAssociatedWorkloadLifecycleIntegrationTest(t, c) - }) -} - -// runV1Alpha1NodelessWorkloadLifecycleIntegrationTest verifies correct functionality of -// the workload-health controller for workloads without node associations. In particular -// the following behaviors are being tested -// -// - Creating a workload without associated health statuses or node association will -// be marked passing -// - Changing HealthStatus to a worse health will cause recompuation of the Health -// - Changing HealthStatus to a better health will cause recompuation of the Health -// - Deletion of associated HealthStatus for a nodeless workload will be set back to passing -// - Deletion of the workload will cause deletion of all associated health statuses. -func runV1Alpha1NodelessWorkloadLifecycleIntegrationTest(t *testing.T, c *rtest.Client) { - workloadName := "test-lifecycle-workload" - workloadHealthName := "test-lifecycle-workload-status" - - // create a workload without a node association or health statuses yet - workload := rtest.Resource(catalog.WorkloadV1Alpha1Type, workloadName). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "198.18.9.8"}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - Identity: "test-lifecycle", - }). - Write(t, c) - - // wait for the workload health controller to mark the workload as healthy - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadHealthConditions[pbcatalog.Health_HEALTH_PASSING]) - - // We may not need to iterate through all of these states but its easy - // enough and quick enough to do so. The general rationale is that we - // should move through changing the workloads associated health status - // in this progression. We can prove that moving from better to worse - // health or worse to better both function correctly. - healthChanges := []pbcatalog.Health{ - pbcatalog.Health_HEALTH_PASSING, - pbcatalog.Health_HEALTH_WARNING, - pbcatalog.Health_HEALTH_CRITICAL, - pbcatalog.Health_HEALTH_MAINTENANCE, - pbcatalog.Health_HEALTH_CRITICAL, - pbcatalog.Health_HEALTH_WARNING, - pbcatalog.Health_HEALTH_PASSING, - pbcatalog.Health_HEALTH_WARNING, - } - - var workloadHealth *pbresource.Resource - // Iterate through the various desired health statuses, updating - // a HealthStatus resource owned by the workload and waiting for - // reconciliation at each point - for _, health := range healthChanges { - // update the health status - workloadHealth = setHealthStatus(t, c, workload.Id, workloadHealthName, health) - - // wait for reconciliation to kick in and put the workload into - // the right health status. - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadHealthConditions[health]) - } - - // Now delete the health status, things should go back to passing status - c.MustDelete(t, workloadHealth.Id) - - // ensure the workloads health went back to passing - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadHealthConditions[pbcatalog.Health_HEALTH_PASSING]) - - // Reset the workload health. The actual health is irrelevant, we just want it - // to exist to provde that Health Statuses get deleted along with the workload - // when its deleted. - workloadHealth = setHealthStatus(t, c, workload.Id, workloadHealthName, pbcatalog.Health_HEALTH_WARNING) - - // Delete the workload and wait for the HealthStatus to also be deleted - c.MustDelete(t, workload.Id) - c.WaitForDeletion(t, workloadHealth.Id) -} - -// runV1Alpha1NodeAssociatedWorkloadLifecycleIntegrationTest verifies correct functionality of -// the workload-health controller. This test will exercise the following behaviors: -// -// - Associating a workload with a node causes recomputation of the health and takes -// into account the nodes health -// - Modifying the workloads associated node causes health recomputation and takes into -// account the new nodes health -// - Removal of the node association causes recomputation of health and for no node health -// to be taken into account. -// - Creating a workload without associated health statuses but with a node will -// inherit its health from the node. -// - Overall health is computed as the worst health amongst the nodes health and all -// of the workloads associated HealthStatuses -func runV1Alpha1NodeAssociatedWorkloadLifecycleIntegrationTest(t *testing.T, c *rtest.Client) { - workloadName := "test-lifecycle" - workloadHealthName := "test-lifecycle" - nodeName1 := "test-lifecycle-1" - nodeName2 := "test-lifecycle-2" - nodeHealthName1 := "test-lifecycle-node-1" - nodeHealthName2 := "test-lifecycle-node-2" - - // Insert a some nodes to link the workloads to at various points throughout the test - node1 := rtest.Resource(catalog.NodeV1Alpha1Type, nodeName1). - WithData(t, &pbcatalog.Node{ - Addresses: []*pbcatalog.NodeAddress{{Host: "172.17.9.10"}}, - }). - Write(t, c) - node2 := rtest.Resource(catalog.NodeV1Alpha1Type, nodeName2). - WithData(t, &pbcatalog.Node{ - Addresses: []*pbcatalog.NodeAddress{{Host: "172.17.9.11"}}, - }). - Write(t, c) - - // Set some non-passing health statuses for those nodes. Using non-passing will make - // it easy to see that changing a passing workloads node association appropriately - // impacts the overall workload health. - setHealthStatus(t, c, node1.Id, nodeHealthName1, pbcatalog.Health_HEALTH_CRITICAL) - setHealthStatus(t, c, node2.Id, nodeHealthName2, pbcatalog.Health_HEALTH_WARNING) - - // Add the workload but don't immediately associate with any node. - workload := rtest.Resource(catalog.WorkloadV1Alpha1Type, workloadName). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "198.18.9.8"}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - Identity: "test-lifecycle", - }). - Write(t, c) - - // wait for the workload health controller to mark the workload as healthy - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadHealthConditions[pbcatalog.Health_HEALTH_PASSING]) - - // now modify the workload to associate it with node 1 (currently with CRITICAL health) - workload = rtest.ResourceID(workload.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{{Host: "198.18.9.8"}}, - Ports: map[string]*pbcatalog.WorkloadPort{"http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - Identity: "test-lifecycle", - // this is the only difference from the previous write - NodeName: node1.Id.Name, - }). - Write(t, c) - - // wait for the workload health controller to mark the workload as critical (due to node 1 having critical health) - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_PASSING][pbcatalog.Health_HEALTH_CRITICAL]) - - // Now reassociate the workload with node 2. This should cause recalculation of its health into the warning state - workload = rtest.ResourceID(workload.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{{Host: "198.18.9.8"}}, - Ports: map[string]*pbcatalog.WorkloadPort{"http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - Identity: "test-lifecycle", - // this is the only difference from the previous write - NodeName: node2.Id.Name, - }). - Write(t, c) - - // Wait for the workload health controller to mark the workload as warning (due to node 2 having warning health) - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_PASSING][pbcatalog.Health_HEALTH_WARNING]) - - // Delete the node, this should cause the health to be recalculated as critical because the node association - // is broken. - c.MustDelete(t, node2.Id) - - // Wait for the workload health controller to mark the workload as critical due to the missing node - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_PASSING][pbcatalog.Health_HEALTH_CRITICAL]) - - // Now fixup the node association to point at node 1 - workload = rtest.ResourceID(workload.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{{Host: "198.18.9.8"}}, - Ports: map[string]*pbcatalog.WorkloadPort{"http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - Identity: "test-lifecycle", - // this is the only difference from the previous write - NodeName: node1.Id.Name, - }). - Write(t, c) - - // Also set node 1 health down to WARNING - setHealthStatus(t, c, node1.Id, nodeHealthName1, pbcatalog.Health_HEALTH_WARNING) - - // Wait for the workload health controller to mark the workload as warning (due to node 1 having warning health now) - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_PASSING][pbcatalog.Health_HEALTH_WARNING]) - - // Now add a critical workload health check to ensure that both node and workload health are accounted for. - setHealthStatus(t, c, workload.Id, workloadHealthName, pbcatalog.Health_HEALTH_CRITICAL) - - // Wait for the workload health to be recomputed and put into the critical status. - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_CRITICAL][pbcatalog.Health_HEALTH_WARNING]) - - // Reset the workloads health to passing. We expect the overall health to go back to warning - setHealthStatus(t, c, workload.Id, workloadHealthName, pbcatalog.Health_HEALTH_PASSING) - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadAndNodeHealthConditions[pbcatalog.Health_HEALTH_PASSING][pbcatalog.Health_HEALTH_WARNING]) - - // Remove the node association and wait for the health to go back to passing - workload = rtest.ResourceID(workload.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{{Host: "198.18.9.8"}}, - Ports: map[string]*pbcatalog.WorkloadPort{"http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - Identity: "test-lifecycle", - }). - Write(t, c) - c.WaitForStatusCondition(t, workload.Id, - catalog.WorkloadHealthStatusKey, - catalog.WorkloadHealthConditions[pbcatalog.Health_HEALTH_PASSING]) -} - -// RunCatalogV1Alpha1EndpointsLifecycleIntegrationTest verifies the correct functionality of -// the endpoints controller. This test will exercise the following behaviors: -// -// * Services without a selector get marked with status indicating their endpoints are unmanaged -// * Services with a selector get marked with status indicating their endpoints are managed -// * Deleting a service will delete the associated endpoints (regardless of them being managed or not) -// * Moving from managed to unmanaged endpoints will delete the managed endpoints -// * Moving from unmanaged to managed endpoints will overwrite any previous endpoints. -// * A service with a selector that matches no workloads will still have the endpoints object written. -// * Adding ports to a service will recalculate the endpoints -// * Removing ports from a service will recalculate the endpoints -// * Changing the workload will recalculate the endpoints (ports, addresses, or health) -func RunCatalogV1Alpha1EndpointsLifecycleIntegrationTest(t *testing.T, client pbresource.ResourceServiceClient) { - c := rtest.NewClient(client) - serviceName := "test-lifecycle" - - // Create the service without a selector. We should not see endpoints generated but we should see the - // status updated to note endpoints are not being managed. - service := rtest.Resource(catalog.ServiceV1Alpha1Type, serviceName). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{{TargetPort: "http", Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - }). - Write(t, c) - - // Wait to ensure the status is updated accordingly - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionUnmanaged) - - // Verify that no endpoints were created. - endpointsID := rtest.Resource(catalog.ServiceEndpointsV1Alpha1Type, serviceName).ID() - c.RequireResourceNotFound(t, endpointsID) - - // Add some empty endpoints (type validations enforce that they are owned by the service) - rtest.ResourceID(endpointsID). - WithData(t, &pbcatalog.ServiceEndpoints{}). - WithOwner(service.Id). - Write(t, c) - - // Now delete the service and ensure that they are cleaned up. - c.MustDelete(t, service.Id) - c.WaitForDeletion(t, endpointsID) - - // Add some workloads to eventually select by the service - - // api-1 has all ports (http, grpc and mesh). It also has a mixture of Addresses - // that select individual ports and one that selects all ports implicitly - api1 := rtest.Resource(catalog.WorkloadV1Alpha1Type, "api-1"). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1"}, - {Host: "::1", Ports: []string{"grpc"}}, - {Host: "127.0.0.2", Ports: []string{"http"}}, - {Host: "172.17.1.1", Ports: []string{"mesh"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": {Port: 10000, Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - Identity: "api", - }). - Write(t, c) - - // api-2 has only grpc and mesh ports. It also has a mixture of Addresses that - // select individual ports and one that selects all ports implicitly - api2 := rtest.Resource(catalog.WorkloadV1Alpha1Type, "api-2"). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1"}, - {Host: "::1", Ports: []string{"grpc"}}, - {Host: "172.17.1.2", Ports: []string{"mesh"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": {Port: 10000, Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - Identity: "api", - }). - Write(t, c) - - // api-3 has the mesh and HTTP ports. It also has a mixture of Addresses that - // select individual ports and one that selects all ports. - api3 := rtest.Resource(catalog.WorkloadV1Alpha1Type, "api-3"). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1"}, - {Host: "172.17.1.3", Ports: []string{"mesh"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": {Port: 10000, Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - Identity: "api", - }). - Write(t, c) - - // Now create a service with unmanaged endpoints again - service = rtest.Resource(catalog.ServiceV1Alpha1Type, serviceName). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{{TargetPort: "http", Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - }). - Write(t, c) - - // Inject the endpoints resource. We want to prove that transition from unmanaged to - // managed endpoints results in overwriting of the old endpoints - rtest.ResourceID(endpointsID). - WithData(t, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "198.18.1.1", External: true}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "http": {Port: 443, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - }). - WithOwner(service.Id). - Write(t, c) - - // Wait to ensure the status is updated accordingly - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionUnmanaged) - - // Now move the service to having managed endpoints - service = rtest.ResourceID(service.Id). - WithData(t, &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Names: []string{"bar"}}, - Ports: []*pbcatalog.ServicePort{{TargetPort: "http", Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - }). - Write(t, c) - - // Verify that this status is updated to show this service as having managed endpoints - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionManaged) - - // Verify that the service endpoints are created. In this case they will be empty - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{}) - - // Rewrite the service to select the API workloads - just select the singular port for now - service = rtest.ResourceID(service.Id). - WithData(t, &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{{TargetPort: "http", Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}}, - }). - Write(t, c) - - // Wait for the status to be updated. The condition itself will remain unchanged but we are waiting for - // the generations to match to know that the endpoints would have been regenerated - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionManaged) - - // ensure that api-1 and api-3 are selected but api-2 is excluded due to not having the desired port - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - TargetRef: api1.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"http"}}, - {Host: "127.0.0.2", Ports: []string{"http"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - { - TargetRef: api3.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"http"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - }) - - // Rewrite the service to select the API workloads - changing from selecting the HTTP port to the gRPC port - service = rtest.ResourceID(service.Id). - WithData(t, &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{{TargetPort: "grpc", Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}}, - }). - Write(t, c) - - // Wait for the status to be updated. The condition itself will remain unchanged but we are waiting for - // the generations to match to know that the endpoints would have been regenerated - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionManaged) - - // Check that the endpoints were generated as expected - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - TargetRef: api1.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"grpc"}}, - {Host: "::1", Ports: []string{"grpc"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - { - TargetRef: api2.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"grpc"}}, - {Host: "::1", Ports: []string{"grpc"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - }) - - // Update the service to change the ports used. This should result in the workload being removed - // from the endpoints - rtest.ResourceID(api2.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1"}, - {Host: "::1", Ports: []string{"http"}}, - {Host: "172.17.1.2", Ports: []string{"mesh"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": {Port: 10000, Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, - "http": {Port: 8080, Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, - }, - Identity: "api", - }). - Write(t, c) - - // Verify that api-2 was removed from the service endpoints as it no longer has a grpc port - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - TargetRef: api1.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"grpc"}}, - {Host: "::1", Ports: []string{"grpc"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - }) - - // Remove the ::1 address from workload api1 which should result in recomputing endpoints - rtest.ResourceID(api1.Id). - WithData(t, &pbcatalog.Workload{ - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1"}, - {Host: "172.17.1.1", Ports: []string{"mesh"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": {Port: 10000, Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - Identity: "api", - }). - Write(t, c) - - // Verify that api-1 had its addresses modified appropriately - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - TargetRef: api1.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"grpc"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - }) - - // Add a failing health status to the api1 workload to force recomputation of endpoints - setHealthStatus(t, c, api1.Id, "api-failed", pbcatalog.Health_HEALTH_CRITICAL) - - // Verify that api-1 within the endpoints has the expected health - verifyServiceEndpoints(t, c, endpointsID, &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - TargetRef: api1.Id, - Addresses: []*pbcatalog.WorkloadAddress{ - {Host: "127.0.0.1", Ports: []string{"grpc"}}, - }, - Ports: map[string]*pbcatalog.WorkloadPort{ - "grpc": {Port: 9090, Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}, - }, - HealthStatus: pbcatalog.Health_HEALTH_CRITICAL, - }, - }, - }) - - // Move the service to being unmanaged. We should see the ServiceEndpoints being removed. - service = rtest.ResourceID(service.Id). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{{TargetPort: "grpc", Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}}, - }). - Write(t, c) - - // Wait for the endpoints controller to inform us that the endpoints are not being managed - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionUnmanaged) - // Ensure that the managed endpoints were deleted - c.WaitForDeletion(t, endpointsID) - - // Put the service back into managed mode. - service = rtest.ResourceID(service.Id). - WithData(t, &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{{TargetPort: "grpc", Protocol: pbcatalog.Protocol_PROTOCOL_GRPC}}, - }). - Write(t, c) - - // Wait for the service endpoints to be regenerated - c.WaitForStatusCondition(t, service.Id, catalog.EndpointsStatusKey, catalog.EndpointsStatusConditionManaged) - c.RequireResourceExists(t, endpointsID) - - // Now delete the service and ensure that the endpoints eventually are deleted as well - c.MustDelete(t, service.Id) - c.WaitForDeletion(t, endpointsID) - -} - -func setHealthStatus(t *testing.T, client *rtest.Client, owner *pbresource.ID, name string, health pbcatalog.Health) *pbresource.Resource { - return rtest.Resource(catalog.HealthStatusV1Alpha1Type, name). - WithData(t, &pbcatalog.HealthStatus{ - Type: "synthetic", - Status: health, - }). - WithOwner(owner). - Write(t, client) -} diff --git a/internal/catalog/exports.go b/internal/catalog/exports.go index 566c2e2b6edf1..61247091be1cf 100644 --- a/internal/catalog/exports.go +++ b/internal/catalog/exports.go @@ -1,22 +1,15 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package catalog import ( "github.com/hashicorp/consul/internal/catalog/internal/controllers" - "github.com/hashicorp/consul/internal/catalog/internal/controllers/endpoints" - "github.com/hashicorp/consul/internal/catalog/internal/controllers/failover" - "github.com/hashicorp/consul/internal/catalog/internal/controllers/nodehealth" - "github.com/hashicorp/consul/internal/catalog/internal/controllers/workloadhealth" - "github.com/hashicorp/consul/internal/catalog/internal/mappers/failovermapper" "github.com/hashicorp/consul/internal/catalog/internal/mappers/nodemapper" "github.com/hashicorp/consul/internal/catalog/internal/mappers/selectiontracker" "github.com/hashicorp/consul/internal/catalog/internal/types" "github.com/hashicorp/consul/internal/controller" "github.com/hashicorp/consul/internal/resource" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" ) var ( @@ -36,7 +29,6 @@ var ( HealthStatusKind = types.HealthStatusKind HealthChecksKind = types.HealthChecksKind DNSPolicyKind = types.DNSPolicyKind - FailoverPolicyKind = types.FailoverPolicyKind // Resource Types for the v1alpha1 version. @@ -48,43 +40,6 @@ var ( HealthStatusV1Alpha1Type = types.HealthStatusV1Alpha1Type HealthChecksV1Alpha1Type = types.HealthChecksV1Alpha1Type DNSPolicyV1Alpha1Type = types.DNSPolicyV1Alpha1Type - FailoverPolicyV1Alpha1Type = types.FailoverPolicyV1Alpha1Type - - // Resource Types for the latest version. - - WorkloadType = types.WorkloadType - ServiceType = types.ServiceType - ServiceEndpointsType = types.ServiceEndpointsType - VirtualIPsType = types.VirtualIPsType - NodeType = types.NodeType - HealthStatusType = types.HealthStatusType - HealthChecksType = types.HealthChecksType - DNSPolicyType = types.DNSPolicyType - FailoverPolicyType = types.FailoverPolicyType - - // Controller Statuses - NodeHealthStatusKey = nodehealth.StatusKey - NodeHealthStatusConditionHealthy = nodehealth.StatusConditionHealthy - NodeHealthConditions = nodehealth.Conditions - - WorkloadHealthStatusKey = workloadhealth.StatusKey - WorkloadHealthStatusConditionHealthy = workloadhealth.StatusConditionHealthy - WorkloadHealthConditions = workloadhealth.WorkloadConditions - WorkloadAndNodeHealthConditions = workloadhealth.NodeAndWorkloadConditions - - EndpointsStatusKey = endpoints.StatusKey - EndpointsStatusConditionEndpointsManaged = endpoints.StatusConditionEndpointsManaged - EndpointsStatusConditionManaged = endpoints.ConditionManaged - EndpointsStatusConditionUnmanaged = endpoints.ConditionUnmanaged - - FailoverStatusKey = failover.StatusKey - FailoverStatusConditionAccepted = failover.StatusConditionAccepted - FailoverStatusConditionAcceptedOKReason = failover.OKReason - FailoverStatusConditionAcceptedMissingServiceReason = failover.MissingServiceReason - FailoverStatusConditionAcceptedUnknownPortReason = failover.UnknownPortReason - FailoverStatusConditionAcceptedMissingDestinationServiceReason = failover.MissingDestinationServiceReason - FailoverStatusConditionAcceptedUnknownDestinationPortReason = failover.UnknownDestinationPortReason - FailoverStatusConditionAcceptedUsingMeshDestinationPortReason = failover.UsingMeshDestinationPortReason ) // RegisterTypes adds all resource types within the "catalog" API group @@ -99,7 +54,6 @@ func DefaultControllerDependencies() ControllerDependencies { return ControllerDependencies{ WorkloadHealthNodeMapper: nodemapper.New(), EndpointsWorkloadMapper: selectiontracker.New(), - FailoverMapper: failovermapper.New(), } } @@ -108,21 +62,3 @@ func DefaultControllerDependencies() ControllerDependencies { func RegisterControllers(mgr *controller.Manager, deps ControllerDependencies) { controllers.Register(mgr, deps) } - -// SimplifyFailoverPolicy fully populates the PortConfigs map and clears the -// Configs map using the provided Service. -func SimplifyFailoverPolicy(svc *pbcatalog.Service, failover *pbcatalog.FailoverPolicy) *pbcatalog.FailoverPolicy { - return types.SimplifyFailoverPolicy(svc, failover) -} - -// FailoverPolicyMapper maintains the bidirectional tracking relationship of a -// FailoverPolicy to the Services related to it. -type FailoverPolicyMapper interface { - TrackFailover(failover *resource.DecodedResource[*pbcatalog.FailoverPolicy]) - UntrackFailover(failoverID *pbresource.ID) - FailoverIDsByService(svcID *pbresource.ID) []*pbresource.ID -} - -func NewFailoverPolicyMapper() FailoverPolicyMapper { - return failovermapper.New() -} diff --git a/internal/catalog/internal/controllers/endpoints/controller.go b/internal/catalog/internal/controllers/endpoints/controller.go index af10d40d3baa9..1be2a3fd2fadc 100644 --- a/internal/catalog/internal/controllers/endpoints/controller.go +++ b/internal/catalog/internal/controllers/endpoints/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package endpoints diff --git a/internal/catalog/internal/controllers/endpoints/controller_test.go b/internal/catalog/internal/controllers/endpoints/controller_test.go index 646bb288d3533..ff53509057a2c 100644 --- a/internal/catalog/internal/controllers/endpoints/controller_test.go +++ b/internal/catalog/internal/controllers/endpoints/controller_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package endpoints import ( diff --git a/internal/catalog/internal/controllers/endpoints/reconciliation_data.go b/internal/catalog/internal/controllers/endpoints/reconciliation_data.go index 0194d471b0c24..f00ac1595a217 100644 --- a/internal/catalog/internal/controllers/endpoints/reconciliation_data.go +++ b/internal/catalog/internal/controllers/endpoints/reconciliation_data.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package endpoints import ( diff --git a/internal/catalog/internal/controllers/endpoints/reconciliation_data_test.go b/internal/catalog/internal/controllers/endpoints/reconciliation_data_test.go index b16223827069d..c0c83deda98d6 100644 --- a/internal/catalog/internal/controllers/endpoints/reconciliation_data_test.go +++ b/internal/catalog/internal/controllers/endpoints/reconciliation_data_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package endpoints import ( diff --git a/internal/catalog/internal/controllers/endpoints/status.go b/internal/catalog/internal/controllers/endpoints/status.go index 75066978361ca..5388a0fda9126 100644 --- a/internal/catalog/internal/controllers/endpoints/status.go +++ b/internal/catalog/internal/controllers/endpoints/status.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package endpoints diff --git a/internal/catalog/internal/controllers/failover/controller.go b/internal/catalog/internal/controllers/failover/controller.go deleted file mode 100644 index 9accb62aa4478..0000000000000 --- a/internal/catalog/internal/controllers/failover/controller.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package failover - -import ( - "context" - - "github.com/hashicorp/consul/internal/catalog/internal/types" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// FailoverMapper tracks the relationship between a FailoverPolicy an a Service -// it references whether due to name-alignment or from a reference in a -// FailoverDestination leg. -type FailoverMapper interface { - // TrackFailover extracts all Service references from the provided - // FailoverPolicy and indexes them so that MapService can turn Service - // events into FailoverPolicy events properly. - TrackFailover(failover *resource.DecodedResource[*pbcatalog.FailoverPolicy]) - - // UntrackFailover forgets the links inserted by TrackFailover for the - // provided FailoverPolicyID. - UntrackFailover(failoverID *pbresource.ID) - - // MapService will take a Service resource and return controller requests - // for all FailoverPolicies associated with the Service. - MapService(ctx context.Context, rt controller.Runtime, res *pbresource.Resource) ([]controller.Request, error) -} - -func FailoverPolicyController(mapper FailoverMapper) controller.Controller { - if mapper == nil { - panic("No FailoverMapper was provided to the FailoverPolicyController constructor") - } - return controller.ForType(types.FailoverPolicyType). - WithWatch(types.ServiceType, mapper.MapService). - WithReconciler(newFailoverPolicyReconciler(mapper)) -} - -type failoverPolicyReconciler struct { - mapper FailoverMapper -} - -func newFailoverPolicyReconciler(mapper FailoverMapper) *failoverPolicyReconciler { - return &failoverPolicyReconciler{ - mapper: mapper, - } -} - -func (r *failoverPolicyReconciler) Reconcile(ctx context.Context, rt controller.Runtime, req controller.Request) error { - // The runtime is passed by value so replacing it here for the remainder of this - // reconciliation request processing will not affect future invocations. - rt.Logger = rt.Logger.With("resource-id", req.ID, "controller", StatusKey) - - rt.Logger.Trace("reconciling failover policy") - - failoverPolicyID := req.ID - - failoverPolicy, err := getFailoverPolicy(ctx, rt, failoverPolicyID) - if err != nil { - rt.Logger.Error("error retrieving failover policy", "error", err) - return err - } - if failoverPolicy == nil { - r.mapper.UntrackFailover(failoverPolicyID) - - // Either the failover policy was deleted, or it doesn't exist but an - // update to a Service came through and we can ignore it. - return nil - } - - r.mapper.TrackFailover(failoverPolicy) - - // FailoverPolicy is name-aligned with the Service it controls. - serviceID := &pbresource.ID{ - Type: types.ServiceType, - Tenancy: failoverPolicyID.Tenancy, - Name: failoverPolicyID.Name, - } - - service, err := getService(ctx, rt, serviceID) - if err != nil { - rt.Logger.Error("error retrieving corresponding service", "error", err) - return err - } - destServices := make(map[resource.ReferenceKey]*resource.DecodedResource[*pbcatalog.Service]) - if service != nil { - destServices[resource.NewReferenceKey(serviceID)] = service - } - - // Denorm the ports and stuff. After this we have no empty ports. - if service != nil { - failoverPolicy.Data = types.SimplifyFailoverPolicy( - service.Data, - failoverPolicy.Data, - ) - } - - // Fetch services. - for _, dest := range failoverPolicy.Data.GetUnderlyingDestinations() { - if dest.Ref == nil || !isServiceType(dest.Ref.Type) || dest.Ref.Section != "" { - continue // invalid, not possible due to validation hook - } - - key := resource.NewReferenceKey(dest.Ref) - - if _, ok := destServices[key]; ok { - continue - } - - destID := resource.IDFromReference(dest.Ref) - - destService, err := getService(ctx, rt, destID) - if err != nil { - rt.Logger.Error("error retrieving destination service", "service", key, "error", err) - return err - } - - if destService != nil { - destServices[key] = destService - } - } - - newStatus := computeNewStatus(failoverPolicy, service, destServices) - - if resource.EqualStatus(failoverPolicy.Resource.Status[StatusKey], newStatus, false) { - rt.Logger.Trace("resource's failover policy status is unchanged", - "conditions", newStatus.Conditions) - return nil - } - - _, err = rt.Client.WriteStatus(ctx, &pbresource.WriteStatusRequest{ - Id: failoverPolicy.Resource.Id, - Key: StatusKey, - Status: newStatus, - }) - - if err != nil { - rt.Logger.Error("error encountered when attempting to update the resource's failover policy status", "error", err) - return err - } - - rt.Logger.Trace("resource's failover policy status was updated", - "conditions", newStatus.Conditions) - return nil -} - -func getFailoverPolicy(ctx context.Context, rt controller.Runtime, id *pbresource.ID) (*resource.DecodedResource[*pbcatalog.FailoverPolicy], error) { - return resource.GetDecodedResource[*pbcatalog.FailoverPolicy](ctx, rt.Client, id) -} - -func getService(ctx context.Context, rt controller.Runtime, id *pbresource.ID) (*resource.DecodedResource[*pbcatalog.Service], error) { - return resource.GetDecodedResource[*pbcatalog.Service](ctx, rt.Client, id) -} - -func computeNewStatus( - failoverPolicy *resource.DecodedResource[*pbcatalog.FailoverPolicy], - service *resource.DecodedResource[*pbcatalog.Service], - destServices map[resource.ReferenceKey]*resource.DecodedResource[*pbcatalog.Service], -) *pbresource.Status { - if service == nil { - return &pbresource.Status{ - ObservedGeneration: failoverPolicy.Resource.Generation, - Conditions: []*pbresource.Condition{ - ConditionMissingService, - }, - } - } - - allowedPortProtocols := make(map[string]pbcatalog.Protocol) - for _, port := range service.Data.Ports { - if port.Protocol == pbcatalog.Protocol_PROTOCOL_MESH { - continue // skip - } - allowedPortProtocols[port.TargetPort] = port.Protocol - } - - var conditions []*pbresource.Condition - - if failoverPolicy.Data.Config != nil { - for _, dest := range failoverPolicy.Data.Config.Destinations { - // We know from validation that a Ref must be set, and the type it - // points to is a Service. - // - // Rather than do additional validation, just do a quick - // belt-and-suspenders check-and-skip if something looks weird. - if dest.Ref == nil || !isServiceType(dest.Ref.Type) { - continue - } - - if cond := serviceHasPort(dest, destServices); cond != nil { - conditions = append(conditions, cond) - } - } - // TODO: validate that referenced sameness groups exist - } - - for port, pc := range failoverPolicy.Data.PortConfigs { - if _, ok := allowedPortProtocols[port]; !ok { - conditions = append(conditions, ConditionUnknownPort(port)) - } - - for _, dest := range pc.Destinations { - // We know from validation that a Ref must be set, and the type it - // points to is a Service. - // - // Rather than do additional validation, just do a quick - // belt-and-suspenders check-and-skip if something looks weird. - if dest.Ref == nil || !isServiceType(dest.Ref.Type) { - continue - } - - if cond := serviceHasPort(dest, destServices); cond != nil { - conditions = append(conditions, cond) - } - } - - // TODO: validate that referenced sameness groups exist - } - - if len(conditions) > 0 { - return &pbresource.Status{ - ObservedGeneration: failoverPolicy.Resource.Generation, - Conditions: conditions, - } - } - - return &pbresource.Status{ - ObservedGeneration: failoverPolicy.Resource.Generation, - Conditions: []*pbresource.Condition{ - ConditionOK, - }, - } -} - -func serviceHasPort( - dest *pbcatalog.FailoverDestination, - destServices map[resource.ReferenceKey]*resource.DecodedResource[*pbcatalog.Service], -) *pbresource.Condition { - key := resource.NewReferenceKey(dest.Ref) - destService, ok := destServices[key] - if !ok { - return ConditionMissingDestinationService(dest.Ref) - } - - found := false - mesh := false - for _, port := range destService.Data.Ports { - if port.TargetPort == dest.Port { - found = true - if port.Protocol == pbcatalog.Protocol_PROTOCOL_MESH { - mesh = true - } - break - } - } - - if !found { - return ConditionUnknownDestinationPort(dest.Ref, dest.Port) - } else if mesh { - return ConditionUsingMeshDestinationPort(dest.Ref, dest.Port) - } - - return nil -} - -func isServiceType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, types.ServiceType): - return true - } - return false -} diff --git a/internal/catalog/internal/controllers/failover/controller_test.go b/internal/catalog/internal/controllers/failover/controller_test.go deleted file mode 100644 index de42844ae6b2d..0000000000000 --- a/internal/catalog/internal/controllers/failover/controller_test.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package failover - -import ( - "context" - "testing" - - "github.com/stretchr/testify/suite" - - svctest "github.com/hashicorp/consul/agent/grpc-external/services/resource/testing" - "github.com/hashicorp/consul/internal/catalog/internal/mappers/failovermapper" - "github.com/hashicorp/consul/internal/catalog/internal/types" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/sdk/testutil" -) - -type controllerSuite struct { - suite.Suite - - ctx context.Context - client *rtest.Client - rt controller.Runtime - - failoverMapper FailoverMapper - - ctl failoverPolicyReconciler -} - -func (suite *controllerSuite) SetupTest() { - suite.ctx = testutil.TestContext(suite.T()) - client := svctest.RunResourceService(suite.T(), types.Register) - suite.rt = controller.Runtime{ - Client: client, - Logger: testutil.Logger(suite.T()), - } - suite.client = rtest.NewClient(client) - - suite.failoverMapper = failovermapper.New() -} - -func (suite *controllerSuite) TestController() { - // This test's purpose is to exercise the controller in a halfway realistic - // way, verifying the event triggers work in the live code. - - // Run the controller manager - mgr := controller.NewManager(suite.client, suite.rt.Logger) - mgr.Register(FailoverPolicyController(suite.failoverMapper)) - mgr.SetRaftLeader(true) - go mgr.Run(suite.ctx) - - // Create an advance pointer to some services. - apiServiceRef := resource.Reference(rtest.Resource(types.ServiceType, "api").ID(), "") - otherServiceRef := resource.Reference(rtest.Resource(types.ServiceType, "other").ID(), "") - - // create a failover without any services - failoverData := &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: apiServiceRef, - }}, - }, - } - failover := rtest.Resource(types.FailoverPolicyType, "api"). - WithData(suite.T(), failoverData). - Write(suite.T(), suite.client) - - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionMissingService) - - // Provide the service. - apiServiceData := &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{{ - TargetPort: "http", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }}, - } - _ = rtest.Resource(types.ServiceType, "api"). - WithData(suite.T(), apiServiceData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionOK) - - // Update the failover to reference an unknown port - failoverData = &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: apiServiceRef, - Port: "http", - }}, - }, - "admin": { - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: apiServiceRef, - Port: "admin", - }}, - }, - }, - } - _ = rtest.Resource(types.FailoverPolicyType, "api"). - WithData(suite.T(), failoverData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionUnknownPort("admin")) - - // update the service to fix the stray reference, but point to a mesh port - apiServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "http", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - { - TargetPort: "admin", - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "api"). - WithData(suite.T(), apiServiceData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionUsingMeshDestinationPort(apiServiceRef, "admin")) - - // update the service to fix the stray reference to not be a mesh port - apiServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "http", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - { - TargetPort: "admin", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "api"). - WithData(suite.T(), apiServiceData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionOK) - - // change failover leg to point to missing service - failoverData = &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: apiServiceRef, - Port: "http", - }}, - }, - "admin": { - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: otherServiceRef, - Port: "admin", - }}, - }, - }, - } - _ = rtest.Resource(types.FailoverPolicyType, "api"). - WithData(suite.T(), failoverData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionMissingDestinationService(otherServiceRef)) - - // Create the missing service, but forget the port. - otherServiceData := &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"other-"}}, - Ports: []*pbcatalog.ServicePort{{ - TargetPort: "http", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }}, - } - _ = rtest.Resource(types.ServiceType, "other"). - WithData(suite.T(), otherServiceData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionUnknownDestinationPort(otherServiceRef, "admin")) - - // fix the destination leg's port - otherServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"other-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "http", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - { - TargetPort: "admin", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "other"). - WithData(suite.T(), otherServiceData). - Write(suite.T(), suite.client) - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionOK) - - // Update the two services to use differnet port names so the easy path doesn't work - apiServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "foo", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - { - TargetPort: "bar", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "api"). - WithData(suite.T(), apiServiceData). - Write(suite.T(), suite.client) - - otherServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"other-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "foo", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - { - TargetPort: "baz", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "other"). - WithData(suite.T(), otherServiceData). - Write(suite.T(), suite.client) - - failoverData = &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{{ - Ref: otherServiceRef, - }}, - }, - } - failover = rtest.Resource(types.FailoverPolicyType, "api"). - WithData(suite.T(), failoverData). - Write(suite.T(), suite.client) - - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionUnknownDestinationPort(otherServiceRef, "bar")) - - // and fix it the silly way by removing it from api+failover - apiServiceData = &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{Prefixes: []string{"api-"}}, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "foo", - Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, - }, - }, - } - _ = rtest.Resource(types.ServiceType, "api"). - WithData(suite.T(), apiServiceData). - Write(suite.T(), suite.client) - - suite.client.WaitForStatusCondition(suite.T(), failover.Id, StatusKey, ConditionOK) -} - -func TestFailoverController(t *testing.T) { - suite.Run(t, new(controllerSuite)) -} diff --git a/internal/catalog/internal/controllers/failover/status.go b/internal/catalog/internal/controllers/failover/status.go deleted file mode 100644 index b2801c41ed93e..0000000000000 --- a/internal/catalog/internal/controllers/failover/status.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package failover - -import ( - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - StatusKey = "consul.io/failover-policy" - StatusConditionAccepted = "accepted" - - OKReason = "Ok" - OKMessage = "failover policy was accepted" - - MissingServiceReason = "MissingService" - MissingServiceMessage = "service for failover policy does not exist" - - UnknownPortReason = "UnknownPort" - UnknownPortMessagePrefix = "port is not defined on service: " - - MissingDestinationServiceReason = "MissingDestinationService" - MissingDestinationServiceMessagePrefix = "destination service for failover policy does not exist: " - - UnknownDestinationPortReason = "UnknownDestinationPort" - UnknownDestinationPortMessagePrefix = "port is not defined on destination service: " - - UsingMeshDestinationPortReason = "UsingMeshDestinationPort" - UsingMeshDestinationPortMessagePrefix = "port is a special unroutable mesh port on destination service: " -) - -var ( - ConditionOK = &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_TRUE, - Reason: OKReason, - Message: OKMessage, - } - - ConditionMissingService = &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: MissingServiceReason, - Message: MissingServiceMessage, - } -) - -func ConditionUnknownPort(port string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: UnknownPortReason, - Message: UnknownPortMessagePrefix + port, - } -} - -func ConditionMissingDestinationService(ref *pbresource.Reference) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: MissingDestinationServiceReason, - Message: MissingDestinationServiceMessagePrefix + resource.ReferenceToString(ref), - } -} - -func ConditionUnknownDestinationPort(ref *pbresource.Reference, port string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: UnknownDestinationPortReason, - Message: UnknownDestinationPortMessagePrefix + port + " on " + resource.ReferenceToString(ref), - } -} - -func ConditionUsingMeshDestinationPort(ref *pbresource.Reference, port string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: UnknownDestinationPortReason, - Message: UnknownDestinationPortMessagePrefix + port + " on " + resource.ReferenceToString(ref), - } -} diff --git a/internal/catalog/internal/controllers/nodehealth/controller.go b/internal/catalog/internal/controllers/nodehealth/controller.go index 362ac1578c813..4e3aff9993ba1 100644 --- a/internal/catalog/internal/controllers/nodehealth/controller.go +++ b/internal/catalog/internal/controllers/nodehealth/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package nodehealth diff --git a/internal/catalog/internal/controllers/nodehealth/controller_test.go b/internal/catalog/internal/controllers/nodehealth/controller_test.go index 9723dabf93206..8150fe0bdda3a 100644 --- a/internal/catalog/internal/controllers/nodehealth/controller_test.go +++ b/internal/catalog/internal/controllers/nodehealth/controller_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package nodehealth diff --git a/internal/catalog/internal/controllers/nodehealth/status.go b/internal/catalog/internal/controllers/nodehealth/status.go index d3cf0d8a8dc1e..14a3151484b59 100644 --- a/internal/catalog/internal/controllers/nodehealth/status.go +++ b/internal/catalog/internal/controllers/nodehealth/status.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package nodehealth diff --git a/internal/catalog/internal/controllers/register.go b/internal/catalog/internal/controllers/register.go index df1f7c88c7b2e..5f7fc631a543b 100644 --- a/internal/catalog/internal/controllers/register.go +++ b/internal/catalog/internal/controllers/register.go @@ -1,11 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controllers import ( "github.com/hashicorp/consul/internal/catalog/internal/controllers/endpoints" - "github.com/hashicorp/consul/internal/catalog/internal/controllers/failover" "github.com/hashicorp/consul/internal/catalog/internal/controllers/nodehealth" "github.com/hashicorp/consul/internal/catalog/internal/controllers/workloadhealth" "github.com/hashicorp/consul/internal/controller" @@ -14,12 +13,10 @@ import ( type Dependencies struct { WorkloadHealthNodeMapper workloadhealth.NodeMapper EndpointsWorkloadMapper endpoints.WorkloadMapper - FailoverMapper failover.FailoverMapper } func Register(mgr *controller.Manager, deps Dependencies) { mgr.Register(nodehealth.NodeHealthController()) mgr.Register(workloadhealth.WorkloadHealthController(deps.WorkloadHealthNodeMapper)) mgr.Register(endpoints.ServiceEndpointsController(deps.EndpointsWorkloadMapper)) - mgr.Register(failover.FailoverPolicyController(deps.FailoverMapper)) } diff --git a/internal/catalog/internal/controllers/workloadhealth/controller.go b/internal/catalog/internal/controllers/workloadhealth/controller.go index d8a33c9222360..77009697bcd7e 100644 --- a/internal/catalog/internal/controllers/workloadhealth/controller.go +++ b/internal/catalog/internal/controllers/workloadhealth/controller.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package workloadhealth import ( diff --git a/internal/catalog/internal/controllers/workloadhealth/controller_test.go b/internal/catalog/internal/controllers/workloadhealth/controller_test.go index 1afb06243a6e2..29d93f088d453 100644 --- a/internal/catalog/internal/controllers/workloadhealth/controller_test.go +++ b/internal/catalog/internal/controllers/workloadhealth/controller_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package workloadhealth diff --git a/internal/catalog/internal/controllers/workloadhealth/status.go b/internal/catalog/internal/controllers/workloadhealth/status.go index f7bf000da2735..05cc989ddd934 100644 --- a/internal/catalog/internal/controllers/workloadhealth/status.go +++ b/internal/catalog/internal/controllers/workloadhealth/status.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package workloadhealth import ( diff --git a/internal/catalog/internal/mappers/failovermapper/failover_mapper.go b/internal/catalog/internal/mappers/failovermapper/failover_mapper.go deleted file mode 100644 index 4ae6776cb66ce..0000000000000 --- a/internal/catalog/internal/mappers/failovermapper/failover_mapper.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package failovermapper - -import ( - "context" - - "github.com/hashicorp/consul/internal/catalog/internal/types" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/mappers/bimapper" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// Mapper tracks the relationship between a FailoverPolicy an a Service it -// references whether due to name-alignment or from a reference in a -// FailoverDestination leg. -type Mapper struct { - b *bimapper.Mapper -} - -// New creates a new Mapper. -func New() *Mapper { - return &Mapper{ - b: bimapper.New(types.FailoverPolicyType, types.ServiceType), - } -} - -// TrackFailover extracts all Service references from the provided -// FailoverPolicy and indexes them so that MapService can turn Service events -// into FailoverPolicy events properly. -func (m *Mapper) TrackFailover(failover *resource.DecodedResource[*pbcatalog.FailoverPolicy]) { - destRefs := failover.Data.GetUnderlyingDestinationRefs() - destRefs = append(destRefs, &pbresource.Reference{ - Type: types.ServiceType, - Tenancy: failover.Resource.Id.Tenancy, - Name: failover.Resource.Id.Name, - }) - m.trackFailover(failover.Resource.Id, destRefs) -} - -func (m *Mapper) trackFailover(failover *pbresource.ID, services []*pbresource.Reference) { - var servicesAsIDsOrRefs []resource.ReferenceOrID - for _, s := range services { - servicesAsIDsOrRefs = append(servicesAsIDsOrRefs, s) - } - m.b.TrackItem(failover, servicesAsIDsOrRefs) -} - -// UntrackFailover forgets the links inserted by TrackFailover for the provided -// FailoverPolicyID. -func (m *Mapper) UntrackFailover(failoverID *pbresource.ID) { - m.b.UntrackItem(failoverID) -} - -func (m *Mapper) MapService(ctx context.Context, rt controller.Runtime, res *pbresource.Resource) ([]controller.Request, error) { - return m.b.MapLink(ctx, rt, res) -} - -func (m *Mapper) FailoverIDsByService(svcID *pbresource.ID) []*pbresource.ID { - return m.b.ItemsForLink(svcID) -} diff --git a/internal/catalog/internal/mappers/failovermapper/failover_mapper_test.go b/internal/catalog/internal/mappers/failovermapper/failover_mapper_test.go deleted file mode 100644 index 048f444eca61d..0000000000000 --- a/internal/catalog/internal/mappers/failovermapper/failover_mapper_test.go +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package failovermapper - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/catalog/internal/types" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" -) - -func TestMapper_Tracking(t *testing.T) { - registry := resource.NewRegistry() - types.Register(registry) - - // Create an advance pointer to some services. - randoSvc := rtest.Resource(types.ServiceType, "rando"). - WithData(t, &pbcatalog.Service{}). - Build() - rtest.ValidateAndNormalize(t, registry, randoSvc) - - apiSvc := rtest.Resource(types.ServiceType, "api"). - WithData(t, &pbcatalog.Service{}). - Build() - rtest.ValidateAndNormalize(t, registry, apiSvc) - - fooSvc := rtest.Resource(types.ServiceType, "foo"). - WithData(t, &pbcatalog.Service{}). - Build() - rtest.ValidateAndNormalize(t, registry, fooSvc) - - barSvc := rtest.Resource(types.ServiceType, "bar"). - WithData(t, &pbcatalog.Service{}). - Build() - rtest.ValidateAndNormalize(t, registry, barSvc) - - wwwSvc := rtest.Resource(types.ServiceType, "www"). - WithData(t, &pbcatalog.Service{}). - Build() - rtest.ValidateAndNormalize(t, registry, wwwSvc) - - fail1 := rtest.Resource(types.FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(types.ServiceType, "foo")}, - {Ref: newRef(types.ServiceType, "bar")}, - }, - }, - }). - Build() - rtest.ValidateAndNormalize(t, registry, fail1) - failDec1 := rtest.MustDecode[*pbcatalog.FailoverPolicy](t, fail1) - - fail2 := rtest.Resource(types.FailoverPolicyType, "www"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(types.ServiceType, "www"), Datacenter: "dc2"}, - {Ref: newRef(types.ServiceType, "foo")}, - }, - }, - }). - Build() - rtest.ValidateAndNormalize(t, registry, fail2) - failDec2 := rtest.MustDecode[*pbcatalog.FailoverPolicy](t, fail2) - - fail1_updated := rtest.Resource(types.FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(types.ServiceType, "bar")}, - }, - }, - }). - Build() - rtest.ValidateAndNormalize(t, registry, fail1_updated) - failDec1_updated := rtest.MustDecode[*pbcatalog.FailoverPolicy](t, fail1_updated) - - m := New() - - // Nothing tracked yet so we assume nothing. - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) - - // no-ops - m.UntrackFailover(fail1.Id) - - // still nothing - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) - - // Actually insert some data. - m.TrackFailover(failDec1) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc) - - // track it again, no change - m.TrackFailover(failDec1) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc) - - // track new one that overlaps slightly - m.TrackFailover(failDec2) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id, fail2.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // update the original to change it - m.TrackFailover(failDec1_updated) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail2.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // delete the original - m.UntrackFailover(fail1.Id) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc, fail2.Id) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // delete the other one - m.UntrackFailover(fail2.Id) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) -} - -func requireServicesTracked(t *testing.T, mapper *Mapper, svc *pbresource.Resource, failovers ...*pbresource.ID) { - t.Helper() - - reqs, err := mapper.MapService( - context.Background(), - controller.Runtime{}, - svc, - ) - require.NoError(t, err) - - require.Len(t, reqs, len(failovers)) - - for _, failover := range failovers { - prototest.AssertContainsElement(t, reqs, controller.Request{ID: failover}) - } -} - -func newRef(typ *pbresource.Type, name string) *pbresource.Reference { - return rtest.Resource(typ, name).Reference("") -} - -func defaultTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - Partition: "default", - Namespace: "default", - PeerName: "local", - } -} diff --git a/internal/catalog/internal/mappers/nodemapper/node_mapper.go b/internal/catalog/internal/mappers/nodemapper/node_mapper.go index 11e575f307521..8eea26dd08ca1 100644 --- a/internal/catalog/internal/mappers/nodemapper/node_mapper.go +++ b/internal/catalog/internal/mappers/nodemapper/node_mapper.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package nodemapper import ( diff --git a/internal/catalog/internal/mappers/nodemapper/node_mapper_test.go b/internal/catalog/internal/mappers/nodemapper/node_mapper_test.go index 763e192ebf165..acfe67cf6b106 100644 --- a/internal/catalog/internal/mappers/nodemapper/node_mapper_test.go +++ b/internal/catalog/internal/mappers/nodemapper/node_mapper_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package nodemapper import ( diff --git a/internal/catalog/internal/mappers/selectiontracker/selection_tracker.go b/internal/catalog/internal/mappers/selectiontracker/selection_tracker.go index 3cfe0489dd3f6..3bf229bff65eb 100644 --- a/internal/catalog/internal/mappers/selectiontracker/selection_tracker.go +++ b/internal/catalog/internal/mappers/selectiontracker/selection_tracker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package selectiontracker diff --git a/internal/catalog/internal/mappers/selectiontracker/selection_tracker_test.go b/internal/catalog/internal/mappers/selectiontracker/selection_tracker_test.go index be4f7121d3217..75fa0967c94b3 100644 --- a/internal/catalog/internal/mappers/selectiontracker/selection_tracker_test.go +++ b/internal/catalog/internal/mappers/selectiontracker/selection_tracker_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package selectiontracker import ( diff --git a/internal/catalog/internal/types/dns_policy.go b/internal/catalog/internal/types/dns_policy.go index d2b6001b5dbc2..4c3456027667c 100644 --- a/internal/catalog/internal/types/dns_policy.go +++ b/internal/catalog/internal/types/dns_policy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/dns_policy_test.go b/internal/catalog/internal/types/dns_policy_test.go index 93ee628041974..b4c2da3c78aad 100644 --- a/internal/catalog/internal/types/dns_policy_test.go +++ b/internal/catalog/internal/types/dns_policy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/errors.go b/internal/catalog/internal/types/errors.go index 3b331a9a6302c..6f0b44c1b3787 100644 --- a/internal/catalog/internal/types/errors.go +++ b/internal/catalog/internal/types/errors.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/errors_test.go b/internal/catalog/internal/types/errors_test.go index 08f227166aa22..7a8157727350c 100644 --- a/internal/catalog/internal/types/errors_test.go +++ b/internal/catalog/internal/types/errors_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/failover_policy.go b/internal/catalog/internal/types/failover_policy.go deleted file mode 100644 index 03993d707c9d0..0000000000000 --- a/internal/catalog/internal/types/failover_policy.go +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "errors" - "fmt" - - "github.com/hashicorp/go-multierror" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/internal/resource" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - FailoverPolicyKind = "FailoverPolicy" -) - -var ( - FailoverPolicyV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: FailoverPolicyKind, - } - - FailoverPolicyType = FailoverPolicyV1Alpha1Type -) - -func RegisterFailoverPolicy(r resource.Registry) { - r.Register(resource.Registration{ - Type: FailoverPolicyV1Alpha1Type, - Proto: &pbcatalog.FailoverPolicy{}, - Mutate: MutateFailoverPolicy, - Validate: ValidateFailoverPolicy, - }) -} - -func MutateFailoverPolicy(res *pbresource.Resource) error { - var failover pbcatalog.FailoverPolicy - - if err := res.Data.UnmarshalTo(&failover); err != nil { - return resource.NewErrDataParse(&failover, err) - } - - changed := false - - // Handle eliding empty configs. - if failover.Config != nil && failover.Config.IsEmpty() { - failover.Config = nil - changed = true - } - for port, pc := range failover.PortConfigs { - if pc.IsEmpty() { - delete(failover.PortConfigs, port) - changed = true - } - } - if len(failover.PortConfigs) == 0 { - failover.PortConfigs = nil - changed = true - } - - // TODO(rb): normalize dest ref tenancies - - if !changed { - return nil - } - - return res.Data.MarshalFrom(&failover) -} - -func ValidateFailoverPolicy(res *pbresource.Resource) error { - var failover pbcatalog.FailoverPolicy - - if err := res.Data.UnmarshalTo(&failover); err != nil { - return resource.NewErrDataParse(&failover, err) - } - - var merr error - - if failover.Config == nil && len(failover.PortConfigs) == 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "config", - Wrapped: fmt.Errorf("at least one of config or port_configs must be set"), - }) - } - - if failover.Config != nil { - for _, err := range validateFailoverConfig(failover.Config, false) { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "config", - Wrapped: err, - }) - } - } - - for portName, pc := range failover.PortConfigs { - if portNameErr := validatePortName(portName); portNameErr != nil { - merr = multierror.Append(merr, resource.ErrInvalidMapKey{ - Map: "port_configs", - Key: portName, - Wrapped: portNameErr, - }) - } - - for _, err := range validateFailoverConfig(pc, true) { - merr = multierror.Append(merr, resource.ErrInvalidMapValue{ - Map: "port_configs", - Key: portName, - Wrapped: err, - }) - } - - // TODO: should sameness group be a ref once that's a resource? - } - - return merr -} - -func validateFailoverConfig(config *pbcatalog.FailoverConfig, ported bool) []error { - var errs []error - - if (len(config.Destinations) > 0) == (config.SamenessGroup != "") { - errs = append(errs, resource.ErrInvalidField{ - Name: "destinations", - Wrapped: fmt.Errorf("exactly one of destinations or sameness_group should be set"), - }) - } - for i, dest := range config.Destinations { - for _, err := range validateFailoverPolicyDestination(dest, ported) { - errs = append(errs, resource.ErrInvalidListElement{ - Name: "destinations", - Index: i, - Wrapped: err, - }) - } - } - - switch config.Mode { - case pbcatalog.FailoverMode_FAILOVER_MODE_UNSPECIFIED: - // means pbcatalog.FailoverMode_FAILOVER_MODE_SEQUENTIAL - case pbcatalog.FailoverMode_FAILOVER_MODE_SEQUENTIAL: - case pbcatalog.FailoverMode_FAILOVER_MODE_ORDER_BY_LOCALITY: - default: - errs = append(errs, resource.ErrInvalidField{ - Name: "mode", - Wrapped: fmt.Errorf("not a supported enum value: %v", config.Mode), - }) - } - - // TODO: validate sameness group requirements - - return errs -} - -func validateFailoverPolicyDestination(dest *pbcatalog.FailoverDestination, ported bool) []error { - var errs []error - if dest.Ref == nil { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrMissing, - }) - } else if !resource.EqualType(dest.Ref.Type, ServiceType) { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidReferenceType{ - AllowedType: ServiceType, - }, - }) - } else if dest.Ref.Section != "" { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidField{ - Name: "section", - Wrapped: errors.New("section not supported for failover policy dest refs"), - }, - }) - } - - // NOTE: Destinations here cannot define ports. Port equality is - // assumed and will be reconciled. - if dest.Port != "" { - if ported { - if portNameErr := validatePortName(dest.Port); portNameErr != nil { - errs = append(errs, resource.ErrInvalidField{ - Name: "port", - Wrapped: portNameErr, - }) - } - } else { - errs = append(errs, resource.ErrInvalidField{ - Name: "port", - Wrapped: fmt.Errorf("ports cannot be specified explicitly for the general failover section since it relies upon port alignment"), - }) - } - } - - hasPeer := false - if dest.Ref != nil { - hasPeer = dest.Ref.Tenancy.PeerName != "local" - } - - if hasPeer && dest.Datacenter != "" { - errs = append(errs, resource.ErrInvalidField{ - Name: "datacenter", - Wrapped: fmt.Errorf("ref.tenancy.peer_name and datacenter are mutually exclusive fields"), - }) - } - - return errs -} - -// SimplifyFailoverPolicy fully populates the PortConfigs map and clears the -// Configs map using the provided Service. -func SimplifyFailoverPolicy(svc *pbcatalog.Service, failover *pbcatalog.FailoverPolicy) *pbcatalog.FailoverPolicy { - if failover == nil { - panic("failover is required") - } - if svc == nil { - panic("service is required") - } - - // Copy so we can edit it. - dup := proto.Clone(failover) - failover = dup.(*pbcatalog.FailoverPolicy) - - if failover.PortConfigs == nil { - failover.PortConfigs = make(map[string]*pbcatalog.FailoverConfig) - } - - for _, port := range svc.Ports { - if port.Protocol == pbcatalog.Protocol_PROTOCOL_MESH { - continue // skip - } - - if pc, ok := failover.PortConfigs[port.TargetPort]; ok { - for i, dest := range pc.Destinations { - // Assume port alignment. - if dest.Port == "" { - dest.Port = port.TargetPort - pc.Destinations[i] = dest - } - } - continue - } - - if failover.Config != nil { - // Duplicate because each port will get this uniquely. - pc2 := proto.Clone(failover.Config).(*pbcatalog.FailoverConfig) - for _, dest := range pc2.Destinations { - dest.Port = port.TargetPort - } - failover.PortConfigs[port.TargetPort] = pc2 - } - } - - if failover.Config != nil { - failover.Config = nil - } - - return failover -} diff --git a/internal/catalog/internal/types/failover_policy_test.go b/internal/catalog/internal/types/failover_policy_test.go deleted file mode 100644 index d80e9b2f880e7..0000000000000 --- a/internal/catalog/internal/types/failover_policy_test.go +++ /dev/null @@ -1,599 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestMutateFailoverPolicy(t *testing.T) { - type testcase struct { - failover *pbcatalog.FailoverPolicy - expect *pbcatalog.FailoverPolicy - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, tc.failover). - Build() - - err := MutateFailoverPolicy(res) - - got := resourcetest.MustDecode[*pbcatalog.FailoverPolicy](t, res) - - if tc.expectErr == "" { - require.NoError(t, err) - prototest.AssertDeepEqual(t, tc.expect, got.Data) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{ - "empty-1": { - failover: &pbcatalog.FailoverPolicy{}, - expect: &pbcatalog.FailoverPolicy{}, - }, - "empty-config-1": { - failover: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{}, - }, - expect: &pbcatalog.FailoverPolicy{}, - }, - "empty-config-2": { - failover: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: make([]*pbcatalog.FailoverDestination, 0), - }, - }, - expect: &pbcatalog.FailoverPolicy{}, - }, - "empty-map-1": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: make(map[string]*pbcatalog.FailoverConfig), - }, - expect: &pbcatalog.FailoverPolicy{}, - }, - "empty-map-config-1": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": {}, - }, - }, - expect: &pbcatalog.FailoverPolicy{}, - }, - "empty-map-config-2": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: make([]*pbcatalog.FailoverDestination, 0), - }, - }, - }, - expect: &pbcatalog.FailoverPolicy{}, - }, - "normal": { - failover: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Mode: pbcatalog.FailoverMode_FAILOVER_MODE_SEQUENTIAL, - Regions: []string{"foo", "bar"}, - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "a")}, - {Ref: newRef(ServiceType, "b")}, - }, - }, - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "foo")}, - {Ref: newRef(ServiceType, "bar")}, - }, - }, - "admin": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "y")}, - {Ref: newRef(ServiceType, "z")}, - }, - }, - }, - }, - expect: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Mode: pbcatalog.FailoverMode_FAILOVER_MODE_SEQUENTIAL, - Regions: []string{"foo", "bar"}, - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "a")}, - {Ref: newRef(ServiceType, "b")}, - }, - }, - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "foo")}, - {Ref: newRef(ServiceType, "bar")}, - }, - }, - "admin": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "y")}, - {Ref: newRef(ServiceType, "z")}, - }, - }, - }, - }, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func TestValidateFailoverPolicy(t *testing.T) { - type configTestcase struct { - config *pbcatalog.FailoverConfig - expectErr string - } - - type testcase struct { - failover *pbcatalog.FailoverPolicy - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, tc.failover). - Build() - - require.NoError(t, MutateFailoverPolicy(res)) - - // Verify that mutate didn't actually change the object. - got := resourcetest.MustDecode[*pbcatalog.FailoverPolicy](t, res) - prototest.AssertDeepEqual(t, tc.failover, got.Data) - - err := ValidateFailoverPolicy(res) - - // Verify that validate didn't actually change the object. - got = resourcetest.MustDecode[*pbcatalog.FailoverPolicy](t, res) - prototest.AssertDeepEqual(t, tc.failover, got.Data) - - if tc.expectErr == "" { - require.NoError(t, err) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - configCases := map[string]configTestcase{ - "dest with sameness": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup")}, - }, - SamenessGroup: "blah", - }, - expectErr: `invalid "destinations" field: exactly one of destinations or sameness_group should be set`, - }, - "dest without sameness": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup")}, - }, - }, - }, - "sameness without dest": { - config: &pbcatalog.FailoverConfig{ - SamenessGroup: "blah", - }, - }, - "mode: invalid": { - config: &pbcatalog.FailoverConfig{ - Mode: 99, - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup")}, - }, - }, - expectErr: `invalid "mode" field: not a supported enum value: 99`, - }, - "dest: no ref": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {}, - }, - }, - expectErr: `invalid element at index 0 of list "destinations": invalid "ref" field: missing required field`, - }, - "dest: non-service ref": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(WorkloadType, "api-backup")}, - }, - }, - expectErr: `invalid element at index 0 of list "destinations": invalid "ref" field: reference must have type catalog.v1alpha1.Service`, - }, - "dest: ref with section": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: resourcetest.Resource(ServiceType, "api").Reference("blah")}, - }, - }, - expectErr: `invalid element at index 0 of list "destinations": invalid "ref" field: invalid "section" field: section not supported for failover policy dest refs`, - }, - "dest: ref peer and datacenter": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRefWithPeer(ServiceType, "api", "peer1"), Datacenter: "dc2"}, - }, - }, - expectErr: `invalid element at index 0 of list "destinations": invalid "datacenter" field: ref.tenancy.peer_name and datacenter are mutually exclusive fields`, - }, - "dest: ref peer without datacenter": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRefWithPeer(ServiceType, "api", "peer1")}, - }, - }, - }, - "dest: ref datacenter without peer": { - config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api"), Datacenter: "dc2"}, - }, - }, - }, - } - - cases := map[string]testcase{ - // emptiness - "empty": { - failover: &pbcatalog.FailoverPolicy{}, - expectErr: `invalid "config" field: at least one of config or port_configs must be set`, - }, - "non-empty: one port config but no plain config": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup")}, - }, - }, - }, - }, - }, - "non-empty: some plain config but no port configs": { - failover: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup")}, - }, - }, - }, - }, - // plain config - "plain config: bad dest: any port name": { - failover: &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup"), Port: "web"}, - }, - }, - }, - expectErr: `invalid "config" field: invalid element at index 0 of list "destinations": invalid "port" field: ports cannot be specified explicitly for the general failover section since it relies upon port alignment`, - }, - // ported config - "ported config: bad dest: invalid port name": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup"), Port: "$bad$"}, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid element at index 0 of list "destinations": invalid "port" field: value must match regex: ^[a-z0-9]([a-z0-9\-_]*[a-z0-9])?$`, - }, - "ported config: bad ported in map": { - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "$bad$": { - Destinations: []*pbcatalog.FailoverDestination{ - {Ref: newRef(ServiceType, "api-backup"), Port: "http"}, - }, - }, - }, - }, - expectErr: `map port_configs contains an invalid key - "$bad$": value must match regex: ^[a-z0-9]([a-z0-9\-_]*[a-z0-9])?$`, - }, - } - - maybeWrap := func(wrapPrefix, base string) string { - if base != "" { - return wrapPrefix + base - } - return "" - } - - for name, tc := range configCases { - cases["plain config: "+name] = testcase{ - failover: &pbcatalog.FailoverPolicy{ - Config: proto.Clone(tc.config).(*pbcatalog.FailoverConfig), - }, - expectErr: maybeWrap(`invalid "config" field: `, tc.expectErr), - } - - cases["ported config: "+name] = testcase{ - failover: &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": proto.Clone(tc.config).(*pbcatalog.FailoverConfig), - }, - }, - expectErr: maybeWrap(`invalid value of key "http" within port_configs: `, tc.expectErr), - } - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func TestSimplifyFailoverPolicy(t *testing.T) { - registry := resource.NewRegistry() - Register(registry) - - type testcase struct { - svc *pbresource.Resource - failover *pbresource.Resource - expect *pbresource.Resource - } - run := func(t *testing.T, tc testcase) { - // Ensure we only use valid inputs. - resourcetest.ValidateAndNormalize(t, registry, tc.svc) - resourcetest.ValidateAndNormalize(t, registry, tc.failover) - resourcetest.ValidateAndNormalize(t, registry, tc.expect) - - svc := resourcetest.MustDecode[*pbcatalog.Service](t, tc.svc) - failover := resourcetest.MustDecode[*pbcatalog.FailoverPolicy](t, tc.failover) - expect := resourcetest.MustDecode[*pbcatalog.FailoverPolicy](t, tc.expect) - - inputFailoverCopy := proto.Clone(failover.Data).(*pbcatalog.FailoverPolicy) - - got := SimplifyFailoverPolicy(svc.Data, failover.Data) - prototest.AssertDeepEqual(t, expect.Data, got) - - // verify input was not altered - prototest.AssertDeepEqual(t, inputFailoverCopy, failover.Data) - } - - newPort := func(name string, virtualPort uint32, protocol pbcatalog.Protocol) *pbcatalog.ServicePort { - return &pbcatalog.ServicePort{ - VirtualPort: virtualPort, - TargetPort: name, - Protocol: protocol, - } - } - - cases := map[string]testcase{ - "implicit with mesh port skipping": { - svc: resourcetest.Resource(ServiceType, "api"). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{ - newPort("mesh", 21001, pbcatalog.Protocol_PROTOCOL_MESH), - newPort("http", 8080, pbcatalog.Protocol_PROTOCOL_HTTP), - }, - }). - Build(), - failover: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - }, - }, - }, - }). - Build(), - expect: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "http", // port defaulted - }, - }, - }, - }, - }). - Build(), - }, - "explicit with port aligned defaulting": { - svc: resourcetest.Resource(ServiceType, "api"). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{ - newPort("mesh", 9999, pbcatalog.Protocol_PROTOCOL_MESH), - newPort("http", 8080, pbcatalog.Protocol_PROTOCOL_HTTP), - newPort("rest", 8282, pbcatalog.Protocol_PROTOCOL_HTTP2), - }, - }). - Build(), - failover: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "www", - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - }, - }, - }, - }, - }). - Build(), - expect: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "www", - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - Port: "http", // port defaulted - }, - }, - }, - }, - }). - Build(), - }, - "implicit port explosion": { - svc: resourcetest.Resource(ServiceType, "api"). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{ - newPort("http", 8080, pbcatalog.Protocol_PROTOCOL_HTTP), - newPort("rest", 8282, pbcatalog.Protocol_PROTOCOL_HTTP2), - }, - }). - Build(), - failover: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - }, - }, - }, - }). - Build(), - expect: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "http", - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - Port: "http", - }, - }, - }, - "rest": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "rest", - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - Port: "rest", - }, - }, - }, - }, - }). - Build(), - }, - "mixed port explosion with skip": { - svc: resourcetest.Resource(ServiceType, "api"). - WithData(t, &pbcatalog.Service{ - Ports: []*pbcatalog.ServicePort{ - newPort("http", 8080, pbcatalog.Protocol_PROTOCOL_HTTP), - newPort("rest", 8282, pbcatalog.Protocol_PROTOCOL_HTTP2), - }, - }). - Build(), - failover: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - Config: &pbcatalog.FailoverConfig{ - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - }, - }, - }, - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "rest": { - Mode: pbcatalog.FailoverMode_FAILOVER_MODE_ORDER_BY_LOCALITY, - Regions: []string{"us", "eu"}, - SamenessGroup: "sameweb", - }, - }, - }). - Build(), - expect: resourcetest.Resource(FailoverPolicyType, "api"). - WithData(t, &pbcatalog.FailoverPolicy{ - PortConfigs: map[string]*pbcatalog.FailoverConfig{ - "http": { - Destinations: []*pbcatalog.FailoverDestination{ - { - Ref: newRef(ServiceType, "api-backup"), - Port: "http", - }, - { - Ref: newRef(ServiceType, "api-double-backup"), - Port: "http", - }, - }, - }, - "rest": { - Mode: pbcatalog.FailoverMode_FAILOVER_MODE_ORDER_BY_LOCALITY, - Regions: []string{"us", "eu"}, - SamenessGroup: "sameweb", - }, - }, - }). - Build(), - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func newRef(typ *pbresource.Type, name string) *pbresource.Reference { - return resourcetest.Resource(typ, name).Reference("") -} - -func newRefWithPeer(typ *pbresource.Type, name string, peer string) *pbresource.Reference { - ref := newRef(typ, name) - ref.Tenancy.PeerName = peer - return ref -} diff --git a/internal/catalog/internal/types/health_checks.go b/internal/catalog/internal/types/health_checks.go index f22f9bea97f8a..7df200ec28eb3 100644 --- a/internal/catalog/internal/types/health_checks.go +++ b/internal/catalog/internal/types/health_checks.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/health_checks_test.go b/internal/catalog/internal/types/health_checks_test.go index 8ae722959e60c..12c13d3c1a228 100644 --- a/internal/catalog/internal/types/health_checks_test.go +++ b/internal/catalog/internal/types/health_checks_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/health_status.go b/internal/catalog/internal/types/health_status.go index 29c4094f9a0a4..5e5a659475d8c 100644 --- a/internal/catalog/internal/types/health_status.go +++ b/internal/catalog/internal/types/health_status.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/health_status_test.go b/internal/catalog/internal/types/health_status_test.go index d504b64b76a24..be9d30d501151 100644 --- a/internal/catalog/internal/types/health_status_test.go +++ b/internal/catalog/internal/types/health_status_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/node.go b/internal/catalog/internal/types/node.go index 2d9bc6e821d15..0d2c795abaa5c 100644 --- a/internal/catalog/internal/types/node.go +++ b/internal/catalog/internal/types/node.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/node_test.go b/internal/catalog/internal/types/node_test.go index 4f3ca2c0a5986..93e5ecea329a2 100644 --- a/internal/catalog/internal/types/node_test.go +++ b/internal/catalog/internal/types/node_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/service.go b/internal/catalog/internal/types/service.go index 91c0c732e2e8e..27e13530e5f3f 100644 --- a/internal/catalog/internal/types/service.go +++ b/internal/catalog/internal/types/service.go @@ -1,16 +1,15 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( "math" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/go-multierror" ) const ( @@ -88,17 +87,6 @@ func ValidateService(res *pbresource.Resource) error { }) } - if protoErr := validateProtocol(port.Protocol); protoErr != nil { - err = multierror.Append(err, resource.ErrInvalidListElement{ - Name: "ports", - Index: idx, - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: protoErr, - }, - }) - } - // validate the virtual port is within the allowed range - 0 is allowed // to signify that no virtual port should be used and the port will not // be available for transparent proxying within the mesh. diff --git a/internal/catalog/internal/types/service_endpoints.go b/internal/catalog/internal/types/service_endpoints.go index a8a591ef26e27..8c3d1cf109561 100644 --- a/internal/catalog/internal/types/service_endpoints.go +++ b/internal/catalog/internal/types/service_endpoints.go @@ -1,16 +1,15 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( "math" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/go-multierror" ) const ( @@ -45,16 +44,6 @@ func MutateServiceEndpoints(res *pbresource.Resource) error { } } - return nil -} - -func ValidateServiceEndpoints(res *pbresource.Resource) error { - var svcEndpoints pbcatalog.ServiceEndpoints - - if err := res.Data.UnmarshalTo(&svcEndpoints); err != nil { - return resource.NewErrDataParse(&svcEndpoints, err) - } - var err error if !resource.EqualType(res.Owner.Type, ServiceV1Alpha1Type) { err = multierror.Append(err, resource.ErrOwnerTypeInvalid{ @@ -65,7 +54,6 @@ func ValidateServiceEndpoints(res *pbresource.Resource) error { if !resource.EqualTenancy(res.Owner.Tenancy, res.Id.Tenancy) { err = multierror.Append(err, resource.ErrOwnerTenantInvalid{ - ResourceType: ServiceEndpointsV1Alpha1Type, ResourceTenancy: res.Id.Tenancy, OwnerTenancy: res.Owner.Tenancy, }) @@ -81,6 +69,17 @@ func ValidateServiceEndpoints(res *pbresource.Resource) error { }) } + return err +} + +func ValidateServiceEndpoints(res *pbresource.Resource) error { + var svcEndpoints pbcatalog.ServiceEndpoints + + if err := res.Data.UnmarshalTo(&svcEndpoints); err != nil { + return resource.NewErrDataParse(&svcEndpoints, err) + } + + var err error for idx, endpoint := range svcEndpoints.Endpoints { if endpointErr := validateEndpoint(endpoint, res); endpointErr != nil { err = multierror.Append(err, resource.ErrInvalidListElement{ @@ -129,13 +128,6 @@ func validateEndpoint(endpoint *pbcatalog.Endpoint, res *pbresource.Resource) er }) } - if healthErr := validateHealth(endpoint.HealthStatus); healthErr != nil { - err = multierror.Append(err, resource.ErrInvalidField{ - Name: "health_status", - Wrapped: healthErr, - }) - } - // Validate the endpoints ports for portName, port := range endpoint.Ports { // Port names must be DNS labels @@ -147,17 +139,6 @@ func validateEndpoint(endpoint *pbcatalog.Endpoint, res *pbresource.Resource) er }) } - if protoErr := validateProtocol(port.Protocol); protoErr != nil { - err = multierror.Append(err, resource.ErrInvalidMapValue{ - Map: "ports", - Key: portName, - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: protoErr, - }, - }) - } - // As the physical port is the real port the endpoint will be bound to // it must be in the standard 1-65535 range. if port.Port < 1 || port.Port > math.MaxUint16 { @@ -165,7 +146,7 @@ func validateEndpoint(endpoint *pbcatalog.Endpoint, res *pbresource.Resource) er Map: "ports", Key: portName, Wrapped: resource.ErrInvalidField{ - Name: "physical_port", + Name: "phsical_port", Wrapped: errInvalidPhysicalPort, }, }) diff --git a/internal/catalog/internal/types/service_endpoints_test.go b/internal/catalog/internal/types/service_endpoints_test.go index 9b45d7d2ca639..bd902d6246838 100644 --- a/internal/catalog/internal/types/service_endpoints_test.go +++ b/internal/catalog/internal/types/service_endpoints_test.go @@ -1,17 +1,17 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( "testing" - "github.com/stretchr/testify/require" - "github.com/hashicorp/consul/internal/resource" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/anypb" ) var ( @@ -20,13 +20,22 @@ var ( Namespace: "default", PeerName: "local", } +) - badEndpointTenancy = &pbresource.Tenancy{ - Partition: "default", - Namespace: "bad", - PeerName: "local", +func createServiceEndpointsResource(t *testing.T, data protoreflect.ProtoMessage) *pbresource.Resource { + res := &pbresource.Resource{ + Id: &pbresource.ID{ + Type: ServiceEndpointsType, + Tenancy: defaultEndpointTenancy, + Name: "test-service", + }, } -) + + var err error + res.Data, err = anypb.New(data) + require.NoError(t, err) + return res +} func TestValidateServiceEndpoints_Ok(t *testing.T) { data := &pbcatalog.ServiceEndpoints{ @@ -53,14 +62,8 @@ func TestValidateServiceEndpoints_Ok(t *testing.T) { }, } - res := rtest.Resource(ServiceEndpointsType, "test-service"). - WithData(t, data). - Build() + res := createServiceEndpointsResource(t, data) - // fill in owner automatically - require.NoError(t, MutateServiceEndpoints(res)) - - // Now validate that everything is good. err := ValidateServiceEndpoints(res) require.NoError(t, err) } @@ -70,7 +73,7 @@ func TestValidateServiceEndpoints_ParseError(t *testing.T) { // to cause the error we are expecting data := &pbcatalog.IP{Address: "198.18.0.1"} - res := rtest.Resource(ServiceEndpointsType, "test-service").WithData(t, data).Build() + res := createServiceEndpointsResource(t, data) err := ValidateServiceEndpoints(res) require.Error(t, err) @@ -101,7 +104,6 @@ func TestValidateServiceEndpoints_EndpointInvalid(t *testing.T) { } type testCase struct { - owner *pbresource.ID modify func(*pbcatalog.Endpoint) validateErr func(t *testing.T, err error) } @@ -131,20 +133,6 @@ func TestValidateServiceEndpoints_EndpointInvalid(t *testing.T) { require.ErrorIs(t, err, resource.ErrEmpty) }, }, - "invalid-health-status": { - modify: func(endpoint *pbcatalog.Endpoint) { - endpoint.Ports["foo"] = &pbcatalog.WorkloadPort{ - Port: 42, - } - endpoint.HealthStatus = 99 - }, - validateErr: func(t *testing.T, err error) { - rtest.RequireError(t, err, resource.ErrInvalidField{ - Name: "health_status", - Wrapped: resource.NewConstError("not a supported enum value: 99"), - }) - }, - }, "invalid-port-name": { modify: func(endpoint *pbcatalog.Endpoint) { endpoint.Ports[""] = &pbcatalog.WorkloadPort{ @@ -152,29 +140,11 @@ func TestValidateServiceEndpoints_EndpointInvalid(t *testing.T) { } }, validateErr: func(t *testing.T, err error) { - rtest.RequireError(t, err, resource.ErrInvalidMapKey{ - Map: "ports", - Key: "", - Wrapped: resource.ErrEmpty, - }) - }, - }, - "invalid-port-protocol": { - modify: func(endpoint *pbcatalog.Endpoint) { - endpoint.Ports["foo"] = &pbcatalog.WorkloadPort{ - Port: 42, - Protocol: 99, - } - }, - validateErr: func(t *testing.T, err error) { - rtest.RequireError(t, err, resource.ErrInvalidMapValue{ - Map: "ports", - Key: "foo", - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: resource.NewConstError("not a supported enum value: 99"), - }, - }) + var mapErr resource.ErrInvalidMapKey + require.ErrorAs(t, err, &mapErr) + require.Equal(t, "ports", mapErr.Map) + require.Equal(t, "", mapErr.Key) + require.Equal(t, resource.ErrEmpty, mapErr.Wrapped) }, }, "port-0": { @@ -193,50 +163,18 @@ func TestValidateServiceEndpoints_EndpointInvalid(t *testing.T) { require.ErrorIs(t, err, errInvalidPhysicalPort) }, }, - "invalid-owner": { - owner: &pbresource.ID{ - Type: DNSPolicyType, - Tenancy: badEndpointTenancy, - Name: "wrong", - }, - validateErr: func(t *testing.T, err error) { - rtest.RequireError(t, err, resource.ErrOwnerTypeInvalid{ - ResourceType: ServiceEndpointsType, - OwnerType: DNSPolicyType}) - rtest.RequireError(t, err, resource.ErrOwnerTenantInvalid{ - ResourceType: ServiceEndpointsType, - ResourceTenancy: defaultEndpointTenancy, - OwnerTenancy: badEndpointTenancy, - }) - rtest.RequireError(t, err, resource.ErrInvalidField{ - Name: "name", - Wrapped: errInvalidEndpointsOwnerName{ - Name: "test-service", - OwnerName: "wrong"}, - }) - }, - }, } for name, tcase := range cases { t.Run(name, func(t *testing.T) { - endpoint := genData() - if tcase.modify != nil { - tcase.modify(endpoint) - } + data := genData() + tcase.modify(data) - data := &pbcatalog.ServiceEndpoints{ + res := createServiceEndpointsResource(t, &pbcatalog.ServiceEndpoints{ Endpoints: []*pbcatalog.Endpoint{ - endpoint, + data, }, - } - res := rtest.Resource(ServiceEndpointsType, "test-service"). - WithOwner(tcase.owner). - WithData(t, data). - Build() - - // Run the mututation to setup defaults - require.NoError(t, MutateServiceEndpoints(res)) + }) err := ValidateServiceEndpoints(res) require.Error(t, err) @@ -244,13 +182,3 @@ func TestValidateServiceEndpoints_EndpointInvalid(t *testing.T) { }) } } - -func TestMutateServiceEndpoints_PopulateOwner(t *testing.T) { - res := rtest.Resource(ServiceEndpointsType, "test-service").Build() - - require.NoError(t, MutateServiceEndpoints(res)) - require.NotNil(t, res.Owner) - require.True(t, resource.EqualType(res.Owner.Type, ServiceType)) - require.True(t, resource.EqualTenancy(res.Owner.Tenancy, defaultEndpointTenancy)) - require.Equal(t, res.Owner.Name, res.Id.Name) -} diff --git a/internal/catalog/internal/types/service_test.go b/internal/catalog/internal/types/service_test.go index 4f53a5c0a62bb..1a0a035d91613 100644 --- a/internal/catalog/internal/types/service_test.go +++ b/internal/catalog/internal/types/service_test.go @@ -1,18 +1,17 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( "testing" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/known/anypb" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/anypb" ) func createServiceResource(t *testing.T, data protoreflect.ProtoMessage) *pbresource.Resource { @@ -172,37 +171,6 @@ func TestValidateService_VirtualPortReused(t *testing.T) { require.EqualValues(t, 42, actual.Value) } -func TestValidateService_InvalidPortProtocol(t *testing.T) { - data := &pbcatalog.Service{ - Workloads: &pbcatalog.WorkloadSelector{ - Prefixes: []string{""}, - }, - Ports: []*pbcatalog.ServicePort{ - { - TargetPort: "foo", - Protocol: 99, - }, - }, - } - - res := createServiceResource(t, data) - - err := ValidateService(res) - - expected := resource.ErrInvalidListElement{ - Name: "ports", - Index: 0, - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: resource.NewConstError("not a supported enum value: 99"), - }, - } - - var actual resource.ErrInvalidListElement - require.ErrorAs(t, err, &actual) - require.Equal(t, expected, actual) -} - func TestValidateService_VirtualPortInvalid(t *testing.T) { data := &pbcatalog.Service{ Workloads: &pbcatalog.WorkloadSelector{ diff --git a/internal/catalog/internal/types/types.go b/internal/catalog/internal/types/types.go index 4d64f2137cc8f..6ab3730bb2936 100644 --- a/internal/catalog/internal/types/types.go +++ b/internal/catalog/internal/types/types.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -22,5 +22,4 @@ func Register(r resource.Registry) { RegisterHealthChecks(r) RegisterDNSPolicy(r) RegisterVirtualIPs(r) - RegisterFailoverPolicy(r) } diff --git a/internal/catalog/internal/types/types_test.go b/internal/catalog/internal/types/types_test.go index e63fd044eae6c..d40fc42dd07ca 100644 --- a/internal/catalog/internal/types/types_test.go +++ b/internal/catalog/internal/types/types_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/validators.go b/internal/catalog/internal/types/validators.go index 94691107f9347..e9fc08562784b 100644 --- a/internal/catalog/internal/types/validators.go +++ b/internal/catalog/internal/types/validators.go @@ -1,20 +1,18 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( - "fmt" "net" "regexp" "strings" - "github.com/hashicorp/go-multierror" - "google.golang.org/protobuf/proto" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/go-multierror" + "google.golang.org/protobuf/proto" ) const ( @@ -137,19 +135,6 @@ func validatePortName(name string) error { return nil } -func validateProtocol(protocol pbcatalog.Protocol) error { - switch protocol { - case pbcatalog.Protocol_PROTOCOL_TCP, - pbcatalog.Protocol_PROTOCOL_HTTP, - pbcatalog.Protocol_PROTOCOL_HTTP2, - pbcatalog.Protocol_PROTOCOL_GRPC, - pbcatalog.Protocol_PROTOCOL_MESH: - return nil - default: - return resource.NewConstError(fmt.Sprintf("not a supported enum value: %v", protocol)) - } -} - // validateWorkloadAddress will validate the WorkloadAddress type. This involves validating // the Host within the workload address and the ports references. For ports references we // ensure that values in the addresses ports array are present in the set of map keys. @@ -222,16 +207,3 @@ func validateReference(allowedType *pbresource.Type, allowedTenancy *pbresource. return err } - -func validateHealth(health pbcatalog.Health) error { - switch health { - case pbcatalog.Health_HEALTH_ANY, - pbcatalog.Health_HEALTH_PASSING, - pbcatalog.Health_HEALTH_WARNING, - pbcatalog.Health_HEALTH_CRITICAL, - pbcatalog.Health_HEALTH_MAINTENANCE: - return nil - default: - return resource.NewConstError(fmt.Sprintf("not a supported enum value: %v", health)) - } -} diff --git a/internal/catalog/internal/types/validators_test.go b/internal/catalog/internal/types/validators_test.go index a3790e9f9e051..cd3a12c5c0740 100644 --- a/internal/catalog/internal/types/validators_test.go +++ b/internal/catalog/internal/types/validators_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -8,12 +8,11 @@ import ( "strings" "testing" - "github.com/hashicorp/go-multierror" - "github.com/stretchr/testify/require" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/go-multierror" + "github.com/stretchr/testify/require" ) func TestIsValidDNSLabel(t *testing.T) { diff --git a/internal/catalog/internal/types/virtual_ips.go b/internal/catalog/internal/types/virtual_ips.go index 73cb4855d42c2..a27f08df0a77e 100644 --- a/internal/catalog/internal/types/virtual_ips.go +++ b/internal/catalog/internal/types/virtual_ips.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/virtual_ips_test.go b/internal/catalog/internal/types/virtual_ips_test.go index 16edac73ce32c..76d55e7ecd745 100644 --- a/internal/catalog/internal/types/virtual_ips_test.go +++ b/internal/catalog/internal/types/virtual_ips_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/catalog/internal/types/workload.go b/internal/catalog/internal/types/workload.go index b26506d175e4f..a0dc7142d1e09 100644 --- a/internal/catalog/internal/types/workload.go +++ b/internal/catalog/internal/types/workload.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -7,11 +7,10 @@ import ( "math" "sort" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/go-multierror" ) const ( @@ -77,17 +76,6 @@ func ValidateWorkload(res *pbresource.Resource) error { }) } - if protoErr := validateProtocol(port.Protocol); protoErr != nil { - err = multierror.Append(err, resource.ErrInvalidMapValue{ - Map: "ports", - Key: portName, - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: protoErr, - }, - }) - } - // Collect the list of mesh ports if port.Protocol == pbcatalog.Protocol_PROTOCOL_MESH { meshPorts = append(meshPorts, portName) diff --git a/internal/catalog/internal/types/workload_test.go b/internal/catalog/internal/types/workload_test.go index 6763fba54c976..03662472f2254 100644 --- a/internal/catalog/internal/types/workload_test.go +++ b/internal/catalog/internal/types/workload_test.go @@ -1,18 +1,17 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types import ( "testing" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/known/anypb" - "github.com/hashicorp/consul/internal/resource" pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/anypb" ) func createWorkloadResource(t *testing.T, data protoreflect.ProtoMessage) *pbresource.Resource { @@ -228,30 +227,6 @@ func TestValidateWorkload_InvalidPortName(t *testing.T) { require.Equal(t, expected, actual) } -func TestValidateWorkload_InvalidPortProtocol(t *testing.T) { - data := validWorkload() - data.Ports["foo"] = &pbcatalog.WorkloadPort{ - Port: 42, - Protocol: 99, - } - - res := createWorkloadResource(t, data) - - err := ValidateWorkload(res) - require.Error(t, err) - expected := resource.ErrInvalidMapValue{ - Map: "ports", - Key: "foo", - Wrapped: resource.ErrInvalidField{ - Name: "protocol", - Wrapped: resource.NewConstError("not a supported enum value: 99"), - }, - } - var actual resource.ErrInvalidMapValue - require.ErrorAs(t, err, &actual) - require.Equal(t, expected, actual) -} - func TestValidateWorkload_Port0(t *testing.T) { data := validWorkload() data.Ports["bar"] = &pbcatalog.WorkloadPort{Port: 0} diff --git a/internal/controller/api.go b/internal/controller/api.go index 5c2fc2e782717..8f5d873368b5d 100644 --- a/internal/controller/api.go +++ b/internal/controller/api.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller @@ -11,7 +11,6 @@ import ( "github.com/hashicorp/go-hclog" - "github.com/hashicorp/consul/agent/consul/controller/queue" "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/proto-public/pbresource" ) @@ -47,21 +46,6 @@ func (c Controller) WithWatch(watchedType *pbresource.Type, mapper DependencyMap return c } -// WithCustomWatch adds a custom watch on the given dependency to the controller. Custom mapper -// will be called to map events produced by source to the controller's watched type. -func (c Controller) WithCustomWatch(source *Source, mapper CustomDependencyMapper) Controller { - if source == nil { - panic("source must not be nil") - } - - if mapper == nil { - panic("mapper must not be nil") - } - - c.customWatches = append(c.customWatches, customWatch{source, mapper}) - return c -} - // WithLogger changes the controller's logger. func (c Controller) WithLogger(logger hclog.Logger) Controller { if logger == nil { @@ -123,14 +107,13 @@ func (c Controller) backoff() (time.Duration, time.Duration) { // Use the builder methods in this package (starting with ForType) to construct // a controller, and then pass it to a Manager to be executed. type Controller struct { - managedType *pbresource.Type - reconciler Reconciler - logger hclog.Logger - watches []watch - customWatches []customWatch - baseBackoff time.Duration - maxBackoff time.Duration - placement Placement + managedType *pbresource.Type + reconciler Reconciler + logger hclog.Logger + watches []watch + baseBackoff time.Duration + maxBackoff time.Duration + placement Placement } type watch struct { @@ -138,45 +121,6 @@ type watch struct { mapper DependencyMapper } -// Watch is responsible for watching for custom events from source and adding them to -// the event queue. -func (s *Source) Watch(ctx context.Context, add func(e Event)) error { - for { - select { - case <-ctx.Done(): - return nil - case evt, ok := <-s.Source: - if !ok { - return nil - } - add(evt) - } - } -} - -// Source is used as a generic source of events. This can be used when events aren't coming from resources -// stored by the resource API. -type Source struct { - Source <-chan Event -} - -// Event captures an event in the system which the API can choose to respond to. -type Event struct { - Obj queue.ItemType -} - -// Key returns a string that will be used to de-duplicate items in the queue. -func (e Event) Key() string { - return e.Obj.Key() -} - -// customWatch represent a Watch on a custom Event source and a Mapper to map said -// Events into Requests that the controller can respond to. -type customWatch struct { - source *Source - mapper CustomDependencyMapper -} - // Request represents a request to reconcile the resource with the given ID. type Request struct { // ID of the resource that needs to be reconciled. diff --git a/internal/controller/api_test.go b/internal/controller/api_test.go index 40d3ec99bebdb..e80a2d7d7133e 100644 --- a/internal/controller/api_test.go +++ b/internal/controller/api_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller_test @@ -25,20 +25,9 @@ func TestController_API(t *testing.T) { rec := newTestReconciler() client := svctest.RunResourceService(t, demo.RegisterTypes) - concertsChan := make(chan controller.Event) - defer close(concertsChan) - concertSource := &controller.Source{Source: concertsChan} - concertMapper := func(ctx context.Context, rt controller.Runtime, event controller.Event) ([]controller.Request, error) { - artistID := event.Obj.(*Concert).artistID - var requests []controller.Request - requests = append(requests, controller.Request{ID: artistID}) - return requests, nil - } - ctrl := controller. ForType(demo.TypeV2Artist). WithWatch(demo.TypeV2Album, controller.MapOwner). - WithCustomWatch(concertSource, concertMapper). WithBackoff(10*time.Millisecond, 100*time.Millisecond). WithReconciler(rec) @@ -80,32 +69,6 @@ func TestController_API(t *testing.T) { prototest.AssertDeepEqual(t, rsp.Resource.Id, req.ID) }) - t.Run("custom watched resource type", func(t *testing.T) { - res, err := demo.GenerateV2Artist() - require.NoError(t, err) - - rsp, err := client.Write(testContext(t), &pbresource.WriteRequest{Resource: res}) - require.NoError(t, err) - - req := rec.wait(t) - prototest.AssertDeepEqual(t, rsp.Resource.Id, req.ID) - - rec.expectNoRequest(t, 500*time.Millisecond) - - concertsChan <- controller.Event{Obj: &Concert{name: "test-concert", artistID: rsp.Resource.Id}} - - watchedReq := rec.wait(t) - prototest.AssertDeepEqual(t, req.ID, watchedReq.ID) - - otherArtist, err := demo.GenerateV2Artist() - require.NoError(t, err) - - concertsChan <- controller.Event{Obj: &Concert{name: "test-concert", artistID: otherArtist.Id}} - - watchedReq = rec.wait(t) - prototest.AssertDeepEqual(t, otherArtist.Id, watchedReq.ID) - }) - t.Run("error retries", func(t *testing.T) { rec.failNext(errors.New("KABOOM")) @@ -303,12 +266,3 @@ func testContext(t *testing.T) context.Context { return ctx } - -type Concert struct { - name string - artistID *pbresource.ID -} - -func (c Concert) Key() string { - return c.name -} diff --git a/internal/controller/controller.go b/internal/controller/controller.go index ac901d355b6e3..54d5c57386a32 100644 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package controller @@ -40,39 +40,20 @@ func (c *controllerRunner) run(ctx context.Context) error { }) }) - for _, w := range c.ctrl.watches { + for _, watch := range c.ctrl.watches { + watch := watch mapQueue := runQueue[mapperRequest](groupCtx, c.ctrl) - watcher := w + // Watched Type Events → Mapper Queue group.Go(func() error { - return c.watch(groupCtx, watcher.watchedType, func(res *pbresource.Resource) { + return c.watch(groupCtx, watch.watchedType, func(res *pbresource.Resource) { mapQueue.Add(mapperRequest{res: res}) }) }) // Mapper Queue → Mapper → Reconciliation Queue group.Go(func() error { - return c.runMapper(groupCtx, watcher, mapQueue, recQueue, func(ctx context.Context, runtime Runtime, itemType queue.ItemType) ([]Request, error) { - return watcher.mapper(ctx, runtime, itemType.(mapperRequest).res) - }) - }) - } - - for _, cw := range c.ctrl.customWatches { - customMapQueue := runQueue[Event](groupCtx, c.ctrl) - watcher := cw - // Custom Events → Mapper Queue - group.Go(func() error { - return watcher.source.Watch(groupCtx, func(e Event) { - customMapQueue.Add(e) - }) - }) - - // Mapper Queue → Mapper → Reconciliation Queue - group.Go(func() error { - return c.runCustomMapper(groupCtx, watcher, customMapQueue, recQueue, func(ctx context.Context, runtime Runtime, itemType queue.ItemType) ([]Request, error) { - return watcher.mapper(ctx, runtime, itemType.(Event)) - }) + return c.runMapper(groupCtx, watch, mapQueue, recQueue) }) } @@ -90,7 +71,7 @@ func runQueue[T queue.ItemType](ctx context.Context, ctrl Controller) queue.Work } func (c *controllerRunner) watch(ctx context.Context, typ *pbresource.Type, add func(*pbresource.Resource)) error { - wl, err := c.client.WatchList(ctx, &pbresource.WatchListRequest{ + watch, err := c.client.WatchList(ctx, &pbresource.WatchListRequest{ Type: typ, Tenancy: &pbresource.Tenancy{ Partition: storage.Wildcard, @@ -104,7 +85,7 @@ func (c *controllerRunner) watch(ctx context.Context, typ *pbresource.Type, add } for { - event, err := wl.Recv() + event, err := watch.Recv() if err != nil { c.logger.Warn("error received from watch", "error", err) return err @@ -118,7 +99,6 @@ func (c *controllerRunner) runMapper( w watch, from queue.WorkQueue[mapperRequest], to queue.WorkQueue[Request], - mapper func(ctx context.Context, runtime Runtime, itemType queue.ItemType) ([]Request, error), ) error { logger := c.logger.With("watched_resource_type", resource.ToGVK(w.watchedType)) @@ -128,36 +108,27 @@ func (c *controllerRunner) runMapper( return nil } - if err := c.doMap(ctx, mapper, to, item, logger); err != nil { + var reqs []Request + err := c.handlePanic(func() error { + var err error + reqs, err = w.mapper(ctx, c.runtime(), item.res) + return err + }) + if err != nil { from.AddRateLimited(item) from.Done(item) continue } - from.Forget(item) - from.Done(item) - } -} - -func (c *controllerRunner) runCustomMapper( - ctx context.Context, - cw customWatch, - from queue.WorkQueue[Event], - to queue.WorkQueue[Request], - mapper func(ctx context.Context, runtime Runtime, itemType queue.ItemType) ([]Request, error), -) error { - logger := c.logger.With("watched_event", cw.source) - - for { - item, shutdown := from.Get() - if shutdown { - return nil - } - - if err := c.doMap(ctx, mapper, to, item, logger); err != nil { - from.AddRateLimited(item) - from.Done(item) - continue + for _, r := range reqs { + if !resource.EqualType(r.ID.Type, c.ctrl.managedType) { + logger.Error("dependency mapper returned request for a resource of the wrong type", + "type_expected", resource.ToGVK(c.ctrl.managedType), + "type_got", resource.ToGVK(r.ID.Type), + ) + continue + } + to.Add(r) } from.Forget(item) @@ -165,29 +136,6 @@ func (c *controllerRunner) runCustomMapper( } } -func (c *controllerRunner) doMap(ctx context.Context, mapper func(ctx context.Context, runtime Runtime, itemType queue.ItemType) ([]Request, error), to queue.WorkQueue[Request], item queue.ItemType, logger hclog.Logger) error { - var reqs []Request - if err := c.handlePanic(func() error { - var err error - reqs, err = mapper(ctx, c.runtime(), item) - return err - }); err != nil { - return err - } - - for _, r := range reqs { - if !resource.EqualType(r.ID.Type, c.ctrl.managedType) { - logger.Error("dependency mapper returned request for a resource of the wrong type", - "type_expected", resource.ToGVK(c.ctrl.managedType), - "type_got", resource.ToGVK(r.ID.Type), - ) - continue - } - to.Add(r) - } - return nil -} - func (c *controllerRunner) runReconciler(ctx context.Context, queue queue.WorkQueue[Request]) error { for { req, shutdown := queue.Get() diff --git a/internal/controller/dependency_mappers.go b/internal/controller/dependency_mappers.go index 1ac331ffafdd4..c054c4369e94a 100644 --- a/internal/controller/dependency_mappers.go +++ b/internal/controller/dependency_mappers.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller import ( @@ -18,14 +15,6 @@ type DependencyMapper func( res *pbresource.Resource, ) ([]Request, error) -// CustomDependencyMapper is called when an Event occurs to determine which of the -// controller's managed resources need to be reconciled. -type CustomDependencyMapper func( - ctx context.Context, - rt Runtime, - event Event, -) ([]Request, error) - // MapOwner implements a DependencyMapper that returns the updated resource's owner. func MapOwner(_ context.Context, _ Runtime, res *pbresource.Resource) ([]Request, error) { var reqs []Request diff --git a/internal/controller/dependency_mappers_test.go b/internal/controller/dependency_mappers_test.go index b9956cdb71f48..b5300bfb9ac98 100644 --- a/internal/controller/dependency_mappers_test.go +++ b/internal/controller/dependency_mappers_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller import ( diff --git a/internal/controller/doc.go b/internal/controller/doc.go index db7d944e932e8..28953791525c1 100644 --- a/internal/controller/doc.go +++ b/internal/controller/doc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package controller provides an API for implementing control loops on top of // Consul resources. It is heavily inspired by [Kubebuilder] and the Kubernetes diff --git a/internal/controller/lease.go b/internal/controller/lease.go index 596bd2546bce7..2cb00d133019c 100644 --- a/internal/controller/lease.go +++ b/internal/controller/lease.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller // Lease is used to ensure controllers are run as singletons (i.e. one leader- diff --git a/internal/controller/manager.go b/internal/controller/manager.go index 1e7e910210616..92c5829c581ec 100644 --- a/internal/controller/manager.go +++ b/internal/controller/manager.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller import ( diff --git a/internal/controller/supervisor.go b/internal/controller/supervisor.go index 4abb841f60e0f..5983ff4c4b7b0 100644 --- a/internal/controller/supervisor.go +++ b/internal/controller/supervisor.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller import ( diff --git a/internal/controller/supervisor_test.go b/internal/controller/supervisor_test.go index e455565d88b76..1792b8b95c21d 100644 --- a/internal/controller/supervisor_test.go +++ b/internal/controller/supervisor_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package controller import ( diff --git a/internal/go-sso/oidcauth/auth.go b/internal/go-sso/oidcauth/auth.go index a2f35763a3d0e..c50940780e77d 100644 --- a/internal/go-sso/oidcauth/auth.go +++ b/internal/go-sso/oidcauth/auth.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // package oidcauth bundles up an opinionated approach to authentication using // both the OIDC authorization code workflow and simple JWT decoding (via diff --git a/internal/go-sso/oidcauth/config.go b/internal/go-sso/oidcauth/config.go index 84bbac9e0cbe5..3d51aff19f9be 100644 --- a/internal/go-sso/oidcauth/config.go +++ b/internal/go-sso/oidcauth/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/config_test.go b/internal/go-sso/oidcauth/config_test.go index c72a69e0845f0..0ef4abcd69e53 100644 --- a/internal/go-sso/oidcauth/config_test.go +++ b/internal/go-sso/oidcauth/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/internal/strutil/util.go b/internal/go-sso/oidcauth/internal/strutil/util.go index 9cdc0b1acb1c1..50cd24c324913 100644 --- a/internal/go-sso/oidcauth/internal/strutil/util.go +++ b/internal/go-sso/oidcauth/internal/strutil/util.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package strutil diff --git a/internal/go-sso/oidcauth/internal/strutil/util_test.go b/internal/go-sso/oidcauth/internal/strutil/util_test.go index 06d76a6c69d51..2e3fd1919acac 100644 --- a/internal/go-sso/oidcauth/internal/strutil/util_test.go +++ b/internal/go-sso/oidcauth/internal/strutil/util_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package strutil diff --git a/internal/go-sso/oidcauth/jwt.go b/internal/go-sso/oidcauth/jwt.go index fbb6a31669c8e..0695a60c5527f 100644 --- a/internal/go-sso/oidcauth/jwt.go +++ b/internal/go-sso/oidcauth/jwt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/jwt_test.go b/internal/go-sso/oidcauth/jwt_test.go index 621fb6660b537..9a8d9cf07ed19 100644 --- a/internal/go-sso/oidcauth/jwt_test.go +++ b/internal/go-sso/oidcauth/jwt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/oidc.go b/internal/go-sso/oidcauth/oidc.go index df00dfcc25f60..dbbf22582abf1 100644 --- a/internal/go-sso/oidcauth/oidc.go +++ b/internal/go-sso/oidcauth/oidc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/oidc_test.go b/internal/go-sso/oidcauth/oidc_test.go index 48de99b641812..288c704d08386 100644 --- a/internal/go-sso/oidcauth/oidc_test.go +++ b/internal/go-sso/oidcauth/oidc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/oidcauthtest/testing.go b/internal/go-sso/oidcauth/oidcauthtest/testing.go index 0956673c05156..432bcae333e45 100644 --- a/internal/go-sso/oidcauth/oidcauthtest/testing.go +++ b/internal/go-sso/oidcauth/oidcauthtest/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // package oidcauthtest exposes tools to assist in writing unit tests of OIDC // and JWT authentication workflows. diff --git a/internal/go-sso/oidcauth/oidcjwt.go b/internal/go-sso/oidcauth/oidcjwt.go index 14a6b4def2ad4..fec78dae232ee 100644 --- a/internal/go-sso/oidcauth/oidcjwt.go +++ b/internal/go-sso/oidcauth/oidcjwt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/oidcjwt_test.go b/internal/go-sso/oidcauth/oidcjwt_test.go index 49574856332a5..e1bd0cd919b2e 100644 --- a/internal/go-sso/oidcauth/oidcjwt_test.go +++ b/internal/go-sso/oidcauth/oidcjwt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/util.go b/internal/go-sso/oidcauth/util.go index 709798dee6353..06cc9054b89c9 100644 --- a/internal/go-sso/oidcauth/util.go +++ b/internal/go-sso/oidcauth/util.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/go-sso/oidcauth/util_test.go b/internal/go-sso/oidcauth/util_test.go index 6cf8bae1b3bd4..1bef6d51c6ae4 100644 --- a/internal/go-sso/oidcauth/util_test.go +++ b/internal/go-sso/oidcauth/util_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package oidcauth diff --git a/internal/mesh/exports.go b/internal/mesh/exports.go index 6a6f97221f303..753c10a7ba935 100644 --- a/internal/mesh/exports.go +++ b/internal/mesh/exports.go @@ -1,11 +1,9 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package mesh import ( - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh/internal/controllers" "github.com/hashicorp/consul/internal/mesh/internal/types" "github.com/hashicorp/consul/internal/resource" ) @@ -19,39 +17,13 @@ var ( // Resource Kind Names. - ProxyConfigurationKind = types.ProxyConfigurationKind - UpstreamsKind = types.UpstreamsKind - UpstreamsConfigurationKind = types.UpstreamsConfigurationKind - ProxyStateKind = types.ProxyStateTemplateKind - HTTPRouteKind = types.HTTPRouteKind - GRPCRouteKind = types.GRPCRouteKind - TCPRouteKind = types.TCPRouteKind - DestinationPolicyKind = types.DestinationPolicyKind - ComputedRoutesKind = types.ComputedRoutesKind + ProxyConfigurationKind = types.ProxyConfigurationKind + UpstreamsKind = types.UpstreamsKind // Resource Types for the v1alpha1 version. - ProxyConfigurationV1Alpha1Type = types.ProxyConfigurationV1Alpha1Type - UpstreamsV1Alpha1Type = types.UpstreamsV1Alpha1Type - UpstreamsConfigurationV1Alpha1Type = types.UpstreamsConfigurationV1Alpha1Type - ProxyStateTemplateConfigurationV1Alpha1Type = types.ProxyStateTemplateV1Alpha1Type - HTTPRouteV1Alpha1Type = types.HTTPRouteV1Alpha1Type - GRPCRouteV1Alpha1Type = types.GRPCRouteV1Alpha1Type - TCPRouteV1Alpha1Type = types.TCPRouteV1Alpha1Type - DestinationPolicyV1Alpha1Type = types.DestinationPolicyV1Alpha1Type - ComputedRoutesV1Alpha1Type = types.ComputedRoutesV1Alpha1Type - - // Resource Types for the latest version. - - ProxyConfigurationType = types.ProxyConfigurationType - UpstreamsType = types.UpstreamsType - UpstreamsConfigurationType = types.UpstreamsConfigurationType - ProxyStateTemplateConfigurationType = types.ProxyStateTemplateType - HTTPRouteType = types.HTTPRouteType - GRPCRouteType = types.GRPCRouteType - TCPRouteType = types.TCPRouteType - DestinationPolicyType = types.DestinationPolicyType - ComputedRoutesType = types.ComputedRoutesType + ProxyConfigurationV1Alpha1Type = types.ProxyConfigurationV1Alpha1Type + UpstreamsV1Alpha1Type = types.UpstreamsV1Alpha1Type ) // RegisterTypes adds all resource types within the "catalog" API group @@ -59,11 +31,3 @@ var ( func RegisterTypes(r resource.Registry) { types.Register(r) } - -// RegisterControllers registers controllers for the mesh types with -// the given controller Manager. -func RegisterControllers(mgr *controller.Manager, deps ControllerDependencies) { - controllers.Register(mgr, deps) -} - -type ControllerDependencies = controllers.Dependencies diff --git a/internal/mesh/internal/controllers/register.go b/internal/mesh/internal/controllers/register.go deleted file mode 100644 index e48540609cf1c..0000000000000 --- a/internal/mesh/internal/controllers/register.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package controllers - -import ( - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh/internal/controllers/xds" - "github.com/hashicorp/consul/internal/mesh/internal/types" - "github.com/hashicorp/consul/internal/resource/mappers/bimapper" -) - -type Dependencies struct { - TrustBundleFetcher xds.TrustBundleFetcher -} - -func Register(mgr *controller.Manager, deps Dependencies) { - mapper := bimapper.New(types.ProxyStateTemplateType, catalog.ServiceEndpointsType) - // TODO: Pass in a "real" updater once proxy tracker work has completed. - mgr.Register(xds.Controller(mapper, nil, deps.TrustBundleFetcher)) -} diff --git a/internal/mesh/internal/controllers/xds/controller.go b/internal/mesh/internal/controllers/xds/controller.go deleted file mode 100644 index 1135f27f7518c..0000000000000 --- a/internal/mesh/internal/controllers/xds/controller.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "context" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh/internal/controllers/xds/status" - "github.com/hashicorp/consul/internal/mesh/internal/types" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/mappers/bimapper" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ControllerName = "consul.io/xds-controller" - -func Controller(mapper *bimapper.Mapper, updater ProxyUpdater, fetcher TrustBundleFetcher) controller.Controller { - //if mapper == nil || updater == nil || fetcher == nil { - if mapper == nil || fetcher == nil { - panic("mapper, updater and fetcher are required") - } - - return controller.ForType(types.ProxyStateTemplateType). - WithWatch(catalog.ServiceEndpointsType, mapper.MapLink). - WithPlacement(controller.PlacementEachServer). - WithReconciler(&xdsReconciler{bimapper: mapper, updater: updater, fetchTrustBundle: fetcher}) -} - -type xdsReconciler struct { - bimapper *bimapper.Mapper - updater ProxyUpdater - fetchTrustBundle TrustBundleFetcher -} - -type TrustBundleFetcher func() (*pbproxystate.TrustBundle, error) - -// ProxyUpdater is an interface that defines the ability to push proxy updates to the updater -// and also check its connectivity to the server. -type ProxyUpdater interface { - // PushChange allows pushing a computed ProxyState to xds for xds resource generation to send to a proxy. - PushChange(id *pbresource.ID, snapshot *pbmesh.ProxyState) error - - // ProxyConnectedToServer returns whether this id is connected to this server. - ProxyConnectedToServer(id *pbresource.ID) bool -} - -func (r *xdsReconciler) Reconcile(ctx context.Context, rt controller.Runtime, req controller.Request) error { - rt.Logger = rt.Logger.With("resource-id", req.ID, "controller", ControllerName) - - rt.Logger.Trace("reconciling proxy state template", "id", req.ID) - - // Get the ProxyStateTemplate. - proxyStateTemplate, err := getProxyStateTemplate(ctx, rt, req.ID) - if err != nil { - rt.Logger.Error("error reading proxy state template", "error", err) - return err - } - - if proxyStateTemplate == nil || proxyStateTemplate.Template == nil || !r.updater.ProxyConnectedToServer(req.ID) { - rt.Logger.Trace("proxy state template has been deleted or this controller is not responsible for this proxy state template", "id", req.ID) - - // If the proxy state was deleted, we should remove references to it in the mapper. - r.bimapper.UntrackItem(req.ID) - - return nil - } - - var ( - statusCondition *pbresource.Condition - pstResource *pbresource.Resource - ) - pstResource = proxyStateTemplate.Resource - - // Initialize the ProxyState endpoints map. - if proxyStateTemplate.Template.ProxyState == nil { - rt.Logger.Error("proxy state was missing from proxy state template") - // Set the status. - statusCondition = status.ConditionRejectedNilProxyState(status.KeyFromID(req.ID)) - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - - return err - } - - // TODO: Fetch trust bundles for all peers when peering is supported. - trustBundle, err := r.fetchTrustBundle() - if err != nil { - rt.Logger.Error("error fetching root trust bundle", "error", err) - // Set the status. - statusCondition = status.ConditionRejectedTrustBundleFetchFailed(status.KeyFromID(req.ID)) - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - return err - } - - if proxyStateTemplate.Template.ProxyState.TrustBundles == nil { - proxyStateTemplate.Template.ProxyState.TrustBundles = make(map[string]*pbproxystate.TrustBundle) - } - // TODO: Figure out the correct key for the default trust bundle. - proxyStateTemplate.Template.ProxyState.TrustBundles["local"] = trustBundle - - if proxyStateTemplate.Template.ProxyState.Endpoints == nil { - proxyStateTemplate.Template.ProxyState.Endpoints = make(map[string]*pbproxystate.Endpoints) - } - - // Iterate through the endpoint references. - // For endpoints, the controller should: - // 1. Resolve ServiceEndpoint references - // 2. Translate them into pbproxystate.Endpoints - // 3. Add the pbproxystate.Endpoints to the ProxyState endpoints map. - // 4. Track relationships between ProxyState and ServiceEndpoints, such that we can look up ServiceEndpoints and - // figure out which ProxyStates are associated with it (for mapping watches) and vice versa (for looking up - // references). The bimapper package is useful for tracking these relationships. - endpointReferencesMap := proxyStateTemplate.Template.RequiredEndpoints - var endpointsInProxyStateTemplate []resource.ReferenceOrID - for xdsClusterName, endpointRef := range endpointReferencesMap { - - // Step 1: Resolve the reference by looking up the ServiceEndpoints. - // serviceEndpoints will not be nil unless there is an error. - serviceEndpoints, err := getServiceEndpoints(ctx, rt, endpointRef.Id) - if err != nil { - rt.Logger.Error("error reading service endpoint", "id", endpointRef.Id, "error", err) - // Set the status. - statusCondition = status.ConditionRejectedErrorReadingEndpoints(status.KeyFromID(endpointRef.Id), err.Error()) - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - - return err - } - - // Step 2: Translate it into pbproxystate.Endpoints. - psEndpoints, err := generateProxyStateEndpoints(serviceEndpoints, endpointRef.Port) - if err != nil { - rt.Logger.Error("error translating service endpoints to proxy state endpoints", "endpoint", endpointRef.Id, "error", err) - - // Set the status. - statusCondition = status.ConditionRejectedCreatingProxyStateEndpoints(status.KeyFromID(endpointRef.Id), err.Error()) - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - - return err - } - - // Step 3: Add the endpoints to ProxyState. - proxyStateTemplate.Template.ProxyState.Endpoints[xdsClusterName] = psEndpoints - - // Track all the endpoints that are used by this ProxyStateTemplate, so we can use this for step 4. - endpointResourceRef := resource.Reference(endpointRef.Id, "") - endpointsInProxyStateTemplate = append(endpointsInProxyStateTemplate, endpointResourceRef) - - } - - // Step 4: Track relationships between ProxyStateTemplates and ServiceEndpoints. - r.bimapper.TrackItem(req.ID, endpointsInProxyStateTemplate) - - computedProxyState := proxyStateTemplate.Template.ProxyState - - err = r.updater.PushChange(req.ID, computedProxyState) - if err != nil { - // Set the status. - statusCondition = status.ConditionRejectedPushChangeFailed(status.KeyFromID(req.ID)) - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - return err - } - - // Set the status. - statusCondition = status.ConditionAccepted() - status.WriteStatusIfChanged(ctx, rt, pstResource, statusCondition) - return nil -} - -func resourceIdToReference(id *pbresource.ID) *pbresource.Reference { - ref := &pbresource.Reference{ - Name: id.GetName(), - Type: id.GetType(), - Tenancy: id.GetTenancy(), - } - return ref -} diff --git a/internal/mesh/internal/controllers/xds/controller_test.go b/internal/mesh/internal/controllers/xds/controller_test.go deleted file mode 100644 index 2363c0cb8460b..0000000000000 --- a/internal/mesh/internal/controllers/xds/controller_test.go +++ /dev/null @@ -1,704 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - - svctest "github.com/hashicorp/consul/agent/grpc-external/services/resource/testing" - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/mesh/internal/controllers/xds/status" - "github.com/hashicorp/consul/internal/mesh/internal/types" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/mappers/bimapper" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/consul/sdk/testutil/retry" -) - -type xdsControllerTestSuite struct { - suite.Suite - - ctx context.Context - client *resourcetest.Client - runtime controller.Runtime - - ctl *xdsReconciler - mapper *bimapper.Mapper - updater *mockUpdater - fetcher TrustBundleFetcher - - fooProxyStateTemplate *pbresource.Resource - barProxyStateTemplate *pbresource.Resource - barEndpointRefs map[string]*pbproxystate.EndpointRef - fooEndpointRefs map[string]*pbproxystate.EndpointRef - fooEndpoints *pbresource.Resource - fooService *pbresource.Resource - fooBarEndpoints *pbresource.Resource - fooBarService *pbresource.Resource - expectedFooProxyStateEndpoints map[string]*pbproxystate.Endpoints - expectedBarProxyStateEndpoints map[string]*pbproxystate.Endpoints - expectedTrustBundle map[string]*pbproxystate.TrustBundle -} - -func (suite *xdsControllerTestSuite) SetupTest() { - suite.ctx = testutil.TestContext(suite.T()) - resourceClient := svctest.RunResourceService(suite.T(), types.Register, catalog.RegisterTypes) - suite.runtime = controller.Runtime{Client: resourceClient, Logger: testutil.Logger(suite.T())} - suite.client = resourcetest.NewClient(resourceClient) - suite.fetcher = mockFetcher - - suite.mapper = bimapper.New(types.ProxyStateTemplateType, catalog.ServiceEndpointsType) - suite.updater = NewMockUpdater() - - suite.ctl = &xdsReconciler{ - bimapper: suite.mapper, - updater: suite.updater, - fetchTrustBundle: suite.fetcher, - } -} - -func mockFetcher() (*pbproxystate.TrustBundle, error) { - var bundle pbproxystate.TrustBundle - bundle = pbproxystate.TrustBundle{ - TrustDomain: "some-trust-domain", - Roots: []string{"some-root", "some-other-root"}, - } - return &bundle, nil -} - -// This test ensures when a ProxyState is deleted, it is no longer tracked in the mapper. -func (suite *xdsControllerTestSuite) TestReconcile_NoProxyStateTemplate() { - // Track the id of a non-existent ProxyStateTemplate. - proxyStateTemplateId := resourcetest.Resource(types.ProxyStateTemplateType, "not-found").ID() - suite.mapper.TrackItem(proxyStateTemplateId, []resource.ReferenceOrID{}) - - // Run the reconcile, and since no ProxyStateTemplate is stored, this simulates a deletion. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: proxyStateTemplateId, - }) - require.NoError(suite.T(), err) - - // Assert that nothing is tracked in the mapper. - require.True(suite.T(), suite.mapper.IsEmpty()) -} - -// This test ensures if the controller was previously tracking a ProxyStateTemplate, and now that proxy has -// disconnected from this server, it's ignored and removed from the mapper. -func (suite *xdsControllerTestSuite) TestReconcile_RemoveTrackingProxiesNotConnectedToServer() { - // Store the initial ProxyStateTemplate and track it in the mapper. - proxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "test"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{}). - Write(suite.T(), suite.client) - - suite.mapper.TrackItem(proxyStateTemplate.Id, []resource.ReferenceOrID{}) - - // Simulate the proxy disconnecting from this server. The resource still exists, but this proxy might be connected - // to a different server now, so we no longer need to track it. - suite.updater.notConnected = true - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: proxyStateTemplate.Id, - }) - require.NoError(suite.T(), err) - - // Assert that nothing is tracked in the mapper. - require.True(suite.T(), suite.mapper.IsEmpty()) -} - -// This test sets up the updater to return an error when calling PushChange, and ensures the status is set -// correctly. -func (suite *xdsControllerTestSuite) TestReconcile_PushChangeError() { - // Have the mock simulate an error from the PushChange call. - suite.updater.pushChangeError = true - - // Setup a happy path scenario. - suite.setupFooProxyStateTemplateAndEndpoints() - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: suite.fooProxyStateTemplate.Id, - }) - require.Error(suite.T(), err) - - // Assert on the status reflecting endpoint not found. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionRejectedPushChangeFailed(status.KeyFromID(suite.fooProxyStateTemplate.Id))) -} - -// This test sets up a ProxyStateTemplate that references a ServiceEndpoints that doesn't exist, and ensures the -// status is correct. -func (suite *xdsControllerTestSuite) TestReconcile_MissingEndpoint() { - // Set fooProxyStateTemplate with a reference to fooEndpoints, without storing fooEndpoints so the controller should - // notice it's missing. - fooEndpointsId := resourcetest.Resource(catalog.ServiceEndpointsType, "foo-service").ID() - fooRequiredEndpoints := make(map[string]*pbproxystate.EndpointRef) - fooRequiredEndpoints["test-cluster-1"] = &pbproxystate.EndpointRef{ - Id: fooEndpointsId, - Port: "mesh", - } - - fooProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "foo-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - RequiredEndpoints: fooRequiredEndpoints, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireResourceExists(r, fooProxyStateTemplate.Id) - }) - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: fooProxyStateTemplate.Id, - }) - require.Error(suite.T(), err) - - // Assert on the status reflecting endpoint not found. - suite.client.RequireStatusCondition(suite.T(), fooProxyStateTemplate.Id, ControllerName, status.ConditionRejectedErrorReadingEndpoints(status.KeyFromID(fooEndpointsId), "rpc error: code = NotFound desc = resource not found")) -} - -// This test sets up a ProxyStateTemplate that references a ServiceEndpoints that can't be read correctly, and -// checks the status is correct. -func (suite *xdsControllerTestSuite) TestReconcile_ReadEndpointError() { - badID := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "not", - Kind: "found", - GroupVersion: "vfake", - }, - Tenancy: &pbresource.Tenancy{Namespace: "default", Partition: "default", PeerName: "local"}, - } - fooRequiredEndpoints := make(map[string]*pbproxystate.EndpointRef) - fooRequiredEndpoints["test-cluster-1"] = &pbproxystate.EndpointRef{ - Id: badID, - Port: "mesh", - } - - fooProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "foo-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - RequiredEndpoints: fooRequiredEndpoints, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireResourceExists(r, fooProxyStateTemplate.Id) - }) - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: fooProxyStateTemplate.Id, - }) - require.Error(suite.T(), err) - - // Assert on the status reflecting endpoint couldn't be read. - suite.client.RequireStatusCondition(suite.T(), fooProxyStateTemplate.Id, ControllerName, status.ConditionRejectedErrorReadingEndpoints(status.KeyFromID(badID), "rpc error: code = InvalidArgument desc = id.name is required")) -} - -// This test is a happy path creation test to make sure pbproxystate.Endpoints are created in the computed -// pbmesh.ProxyState from the RequiredEndpoints references. More specific translations between endpoint references -// and pbproxystate.Endpoints are unit tested in endpoint_builder.go. -func (suite *xdsControllerTestSuite) TestReconcile_ProxyStateTemplateComputesEndpoints() { - // Set up fooEndpoints and fooProxyStateTemplate with a reference to fooEndpoints and store them in the state store. - // This setup saves expected values in the suite so it can be asserted against later. - suite.setupFooProxyStateTemplateAndEndpoints() - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: suite.fooProxyStateTemplate.Id, - }) - require.NoError(suite.T(), err) - - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - - // Assert that the endpoints computed in the controller matches the expected endpoints. - actualEndpoints := suite.updater.GetEndpoints(suite.fooProxyStateTemplate.Id.Name) - prototest.AssertDeepEqual(suite.T(), suite.expectedFooProxyStateEndpoints, actualEndpoints) -} - -func (suite *xdsControllerTestSuite) TestReconcile_ProxyStateTemplateSetsTrustBundles() { - // This test is a happy path creation test to make sure pbproxystate.Template.TrustBundles are created in the computed - // pbmesh.ProxyState from the TrustBundleFetcher. - suite.setupFooProxyStateTemplateAndEndpoints() - - // Run the reconcile. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: suite.fooProxyStateTemplate.Id, - }) - require.NoError(suite.T(), err) - - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - - // Assert that the endpoints computed in the controller matches the expected endpoints. - actualTrustBundle := suite.updater.GetTrustBundle(suite.fooProxyStateTemplate.Id.Name) - prototest.AssertDeepEqual(suite.T(), suite.expectedTrustBundle, actualTrustBundle) -} - -// This test is a happy path creation test that calls reconcile multiple times with a more complex setup. This -// scenario is trickier to test in the controller test because the end computation of the xds controller is not -// stored in the state store. So this test ensures that between multiple reconciles the correct ProxyStates are -// computed for each ProxyStateTemplate. -func (suite *xdsControllerTestSuite) TestReconcile_MultipleProxyStateTemplatesComputesMultipleEndpoints() { - // Set up fooProxyStateTemplate and barProxyStateTemplate and their associated resources and store them. Resources - // and expected results are stored in the suite to assert against. - suite.setupFooBarProxyStateTemplateAndEndpoints() - - // Reconcile the fooProxyStateTemplate. - err := suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: suite.fooProxyStateTemplate.Id, - }) - require.NoError(suite.T(), err) - - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - - // Assert that the endpoints computed in the controller matches the expected endpoints. - actualEndpoints := suite.updater.GetEndpoints(suite.fooProxyStateTemplate.Id.Name) - prototest.AssertDeepEqual(suite.T(), suite.expectedFooProxyStateEndpoints, actualEndpoints) - - // Reconcile the barProxyStateTemplate. - err = suite.ctl.Reconcile(context.Background(), suite.runtime, controller.Request{ - ID: suite.barProxyStateTemplate.Id, - }) - require.NoError(suite.T(), err) - - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.barProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - - // Assert that the endpoints computed in the controller matches the expected endpoints. - actualBarEndpoints := suite.updater.GetEndpoints(suite.barProxyStateTemplate.Id.Name) - prototest.AssertDeepEqual(suite.T(), suite.expectedBarProxyStateEndpoints, actualBarEndpoints) -} - -// Sets up a full controller, and tests that reconciles are getting triggered for the events it should. -func (suite *xdsControllerTestSuite) TestController_ComputeAddUpdateEndpoints() { - // Run the controller manager. - mgr := controller.NewManager(suite.client, suite.runtime.Logger) - mgr.Register(Controller(suite.mapper, suite.updater, suite.fetcher)) - mgr.SetRaftLeader(true) - go mgr.Run(suite.ctx) - - // Set up fooEndpoints and fooProxyStateTemplate with a reference to fooEndpoints. These need to be stored - // because the controller reconcile looks them up. - suite.setupFooProxyStateTemplateAndEndpoints() - - // Assert that the expected ProxyState matches the actual ProxyState that PushChange was called with. This needs to - // be in a retry block unlike the Reconcile tests because the controller triggers asynchronously. - retry.Run(suite.T(), func(r *retry.R) { - actualEndpoints := suite.updater.GetEndpoints(suite.fooProxyStateTemplate.Id.Name) - // Assert on the status. - suite.client.RequireStatusCondition(r, suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - // Assert that the endpoints computed in the controller matches the expected endpoints. - prototest.AssertDeepEqual(r, suite.expectedFooProxyStateEndpoints, actualEndpoints) - }) - - // Now, update the endpoint to be unhealthy. This will ensure the controller is getting triggered on changes to this - // endpoint that it should be tracking, even when the ProxyStateTemplate does not change. - resourcetest.Resource(catalog.ServiceEndpointsType, "foo-service"). - WithData(suite.T(), &pbcatalog.ServiceEndpoints{Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.1.1.1", - Ports: []string{"mesh"}, - }, - { - Host: "10.2.2.2", - Ports: []string{"mesh"}, - }, - }, - HealthStatus: pbcatalog.Health_HEALTH_CRITICAL, - }, - }}). - WithOwner(suite.fooService.Id). - Write(suite.T(), suite.client) - - // Wait for the endpoint to be written. - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireVersionChanged(suite.T(), suite.fooEndpoints.Id, suite.fooEndpoints.Version) - }) - - // Update the expected endpoints to also have unhealthy status. - suite.expectedFooProxyStateEndpoints["test-cluster-1"].Endpoints[0].HealthStatus = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - suite.expectedFooProxyStateEndpoints["test-cluster-1"].Endpoints[1].HealthStatus = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - - retry.Run(suite.T(), func(r *retry.R) { - actualEndpoints := suite.updater.GetEndpoints(suite.fooProxyStateTemplate.Id.Name) - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - // Assert that the endpoints computed in the controller matches the expected endpoints. - prototest.AssertDeepEqual(r, suite.expectedFooProxyStateEndpoints, actualEndpoints) - }) - - // Now add a new endpoint reference and endpoint to the fooProxyStateTemplate. This will ensure that the controller - // now tracks the newly added endpoint. - secondService := resourcetest.Resource(catalog.ServiceType, "second-service"). - WithData(suite.T(), &pbcatalog.Service{}). - Write(suite.T(), suite.client) - - secondEndpoints := resourcetest.Resource(catalog.ServiceEndpointsType, "second-service"). - WithData(suite.T(), &pbcatalog.ServiceEndpoints{Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.5.5.5", - Ports: []string{"mesh"}, - }, - { - Host: "10.6.6.6", - Ports: []string{"mesh"}, - }, - }, - }, - }}). - WithOwner(secondService.Id). - Write(suite.T(), suite.client) - - // Update the endpoint references on the fooProxyStateTemplate. - suite.fooEndpointRefs["test-cluster-2"] = &pbproxystate.EndpointRef{ - Id: secondEndpoints.Id, - Port: "mesh", - } - oldVersion := suite.fooProxyStateTemplate.Version - fooProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "foo-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - RequiredEndpoints: suite.fooEndpointRefs, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireVersionChanged(r, fooProxyStateTemplate.Id, oldVersion) - }) - - // Update the expected endpoints with this new endpoints. - suite.expectedFooProxyStateEndpoints["test-cluster-2"] = &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.5.5.5", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.6.6.6", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }, - } - - retry.Run(suite.T(), func(r *retry.R) { - actualEndpoints := suite.updater.GetEndpoints(suite.fooProxyStateTemplate.Id.Name) - // Assert on the status. - suite.client.RequireStatusCondition(suite.T(), suite.fooProxyStateTemplate.Id, ControllerName, status.ConditionAccepted()) - // Assert that the endpoints computed in the controller matches the expected endpoints. - prototest.AssertDeepEqual(r, suite.expectedFooProxyStateEndpoints, actualEndpoints) - }) - -} - -// Setup: fooProxyStateTemplate with an EndpointsRef to fooEndpoints -// Saves all related resources to the suite so they can be modified if needed. -func (suite *xdsControllerTestSuite) setupFooProxyStateTemplateAndEndpoints() { - fooService := resourcetest.Resource(catalog.ServiceType, "foo-service"). - WithData(suite.T(), &pbcatalog.Service{}). - Write(suite.T(), suite.client) - - fooEndpoints := resourcetest.Resource(catalog.ServiceEndpointsType, "foo-service"). - WithData(suite.T(), &pbcatalog.ServiceEndpoints{Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.1.1.1", - Ports: []string{"mesh"}, - }, - { - Host: "10.2.2.2", - Ports: []string{"mesh"}, - }, - }, - }, - }}). - WithOwner(fooService.Id). - Write(suite.T(), suite.client) - - fooRequiredEndpoints := make(map[string]*pbproxystate.EndpointRef) - fooRequiredEndpoints["test-cluster-1"] = &pbproxystate.EndpointRef{ - Id: fooEndpoints.Id, - Port: "mesh", - } - - fooProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "foo-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - RequiredEndpoints: fooRequiredEndpoints, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireResourceExists(r, fooProxyStateTemplate.Id) - }) - - expectedFooProxyStateEndpoints := map[string]*pbproxystate.Endpoints{ - "test-cluster-1": {Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.1.1.1", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.2.2.2", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }}, - } - - expectedTrustBundle := map[string]*pbproxystate.TrustBundle{ - "local": { - TrustDomain: "some-trust-domain", - Roots: []string{"some-root", "some-other-root"}, - }, - } - - suite.fooService = fooService - suite.fooEndpoints = fooEndpoints - suite.fooEndpointRefs = fooRequiredEndpoints - suite.fooProxyStateTemplate = fooProxyStateTemplate - suite.expectedFooProxyStateEndpoints = expectedFooProxyStateEndpoints - suite.expectedTrustBundle = expectedTrustBundle -} - -// Setup: -// - fooProxyStateTemplate with an EndpointsRef to fooEndpoints and fooBarEndpoints. -// - barProxyStateTemplate with an EndpointsRef to fooBarEndpoints. -// -// Saves all related resources to the suite so they can be modified if needed. -func (suite *xdsControllerTestSuite) setupFooBarProxyStateTemplateAndEndpoints() { - fooService := resourcetest.Resource(catalog.ServiceType, "foo-service"). - WithData(suite.T(), &pbcatalog.Service{}). - Write(suite.T(), suite.client) - - fooEndpoints := resourcetest.Resource(catalog.ServiceEndpointsType, "foo-service"). - WithData(suite.T(), &pbcatalog.ServiceEndpoints{Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.1.1.1", - Ports: []string{"mesh"}, - }, - { - Host: "10.2.2.2", - Ports: []string{"mesh"}, - }, - }, - }, - }}). - WithOwner(fooService.Id). - Write(suite.T(), suite.client) - - fooBarService := resourcetest.Resource(catalog.ServiceType, "foo-bar-service"). - WithData(suite.T(), &pbcatalog.Service{}). - Write(suite.T(), suite.client) - - fooBarEndpoints := resourcetest.Resource(catalog.ServiceEndpointsType, "foo-bar-service"). - WithData(suite.T(), &pbcatalog.ServiceEndpoints{Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.3.3.3", - Ports: []string{"mesh"}, - }, - { - Host: "10.4.4.4", - Ports: []string{"mesh"}, - }, - }, - }, - }}). - WithOwner(fooBarService.Id). - Write(suite.T(), suite.client) - - fooRequiredEndpoints := make(map[string]*pbproxystate.EndpointRef) - fooRequiredEndpoints["test-cluster-1"] = &pbproxystate.EndpointRef{ - Id: fooEndpoints.Id, - Port: "mesh", - } - fooRequiredEndpoints["test-cluster-2"] = &pbproxystate.EndpointRef{ - Id: fooBarEndpoints.Id, - Port: "mesh", - } - - barRequiredEndpoints := make(map[string]*pbproxystate.EndpointRef) - barRequiredEndpoints["test-cluster-1"] = &pbproxystate.EndpointRef{ - Id: fooBarEndpoints.Id, - // Sidecar proxy controller will usually set mesh port here. - Port: "mesh", - } - - fooProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "foo-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - // Contains the foo and foobar endpoints. - RequiredEndpoints: fooRequiredEndpoints, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireResourceExists(r, fooProxyStateTemplate.Id) - }) - - barProxyStateTemplate := resourcetest.Resource(types.ProxyStateTemplateType, "bar-pst"). - WithData(suite.T(), &pbmesh.ProxyStateTemplate{ - // Contains the foobar endpoint. - RequiredEndpoints: barRequiredEndpoints, - ProxyState: &pbmesh.ProxyState{}, - }). - Write(suite.T(), suite.client) - - retry.Run(suite.T(), func(r *retry.R) { - suite.client.RequireResourceExists(r, barProxyStateTemplate.Id) - }) - - expectedFooProxyStateEndpoints := map[string]*pbproxystate.Endpoints{ - "test-cluster-1": {Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.1.1.1", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.2.2.2", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }}, - "test-cluster-2": {Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.3.3.3", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.4.4.4", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }}, - } - - expectedBarProxyStateEndpoints := map[string]*pbproxystate.Endpoints{ - "test-cluster-1": {Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.3.3.3", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.4.4.4", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }}, - } - - suite.fooProxyStateTemplate = fooProxyStateTemplate - suite.barProxyStateTemplate = barProxyStateTemplate - suite.barEndpointRefs = barRequiredEndpoints - suite.fooEndpointRefs = fooRequiredEndpoints - suite.fooEndpoints = fooEndpoints - suite.fooService = fooService - suite.fooBarEndpoints = fooBarEndpoints - suite.fooBarService = fooBarService - suite.expectedFooProxyStateEndpoints = expectedFooProxyStateEndpoints - suite.expectedBarProxyStateEndpoints = expectedBarProxyStateEndpoints -} - -func TestXdsController(t *testing.T) { - suite.Run(t, new(xdsControllerTestSuite)) -} diff --git a/internal/mesh/internal/controllers/xds/endpoint_builder.go b/internal/mesh/internal/controllers/xds/endpoint_builder.go deleted file mode 100644 index 715dd2544bed6..0000000000000 --- a/internal/mesh/internal/controllers/xds/endpoint_builder.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "fmt" - "net" - - "golang.org/x/exp/slices" - - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" -) - -func generateProxyStateEndpoints(serviceEndpoints *ServiceEndpointsData, portName string) (*pbproxystate.Endpoints, error) { - var psEndpoints []*pbproxystate.Endpoint - - if serviceEndpoints.Endpoints == nil || serviceEndpoints.Resource == nil { - return nil, fmt.Errorf("service endpoints requires both endpoints and resource") - } - eps := serviceEndpoints.Endpoints.GetEndpoints() - - for _, ep := range eps { - for _, addr := range ep.Addresses { - // Check if the address is using the portName name this proxy state endpoints is for. If it does, create the - // endpoint. - if slices.Contains(addr.Ports, portName) { - // Lookup the portName number from the portName name. - wlPort, ok := ep.Ports[portName] - if !ok { - // This should never happen, as it should be validated by the ServiceEndpoints controller. - return nil, fmt.Errorf("could not find portName %q in endpoint %s", portName, serviceEndpoints.Resource.Id) - } - portNum := wlPort.Port - - psEndpoint, err := createProxyStateEndpoint(addr.Host, portNum, ep.HealthStatus) - if err != nil { - return nil, err - } - psEndpoints = append(psEndpoints, psEndpoint) - } - } - } - - return &pbproxystate.Endpoints{Endpoints: psEndpoints}, nil -} - -func createProxyStateEndpoint(host string, port uint32, health pbcatalog.Health) (*pbproxystate.Endpoint, error) { - addr := net.ParseIP(host) - if addr == nil { - return nil, fmt.Errorf("host is not an ip") - } - - psEndpoint := &pbproxystate.Endpoint{ - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: host, - Port: port, - }, - }, - HealthStatus: endpointHealth(health), - // TODO(xds): Weight will be added later. More information is potentially needed in the reference. - } - return psEndpoint, nil -} - -func endpointHealth(catalogHealth pbcatalog.Health) pbproxystate.HealthStatus { - health := pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY - - if catalogHealth == pbcatalog.Health_HEALTH_CRITICAL { - health = pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY - } - return health -} diff --git a/internal/mesh/internal/controllers/xds/endpoint_builder_test.go b/internal/mesh/internal/controllers/xds/endpoint_builder_test.go deleted file mode 100644 index 3340014e0625d..0000000000000 --- a/internal/mesh/internal/controllers/xds/endpoint_builder_test.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - "github.com/hashicorp/consul/proto/private/prototest" -) - -func TestMakeProxyStateEndpointsFromServiceEndpoints(t *testing.T) { - type test struct { - name string - serviceEndpointsData *ServiceEndpointsData - portName string - expErr string - expectedProxyStateEndpoints *pbproxystate.Endpoints - } - cases := []test{ - { - name: "endpoints with passing health", - serviceEndpointsData: serviceEndpointsData("passing"), - portName: "mesh", - expectedProxyStateEndpoints: &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.1.1.1", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.2.2.2", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.3.3.3", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }, - }, - }, - { - name: "endpoints with critical health", - serviceEndpointsData: serviceEndpointsData("critical"), - portName: "mesh", - expectedProxyStateEndpoints: &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.1.1.1", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.2.2.2", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.3.3.3", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_UNHEALTHY, - }, - }, - }, - }, - { - name: "endpoints with any health are considered healthy", - serviceEndpointsData: serviceEndpointsData("any"), - portName: "mesh", - expectedProxyStateEndpoints: &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{ - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.1.1.1", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.2.2.2", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - { - Address: &pbproxystate.Endpoint_HostPort{ - HostPort: &pbproxystate.HostPortAddress{ - Host: "10.3.3.3", - Port: 20000, - }, - }, - HealthStatus: pbproxystate.HealthStatus_HEALTH_STATUS_HEALTHY, - }, - }, - }, - }, - { - name: "endpoints with missing ports returns an error", - serviceEndpointsData: serviceEndpointsData("missing port lookup"), - portName: "mesh", - expErr: "could not find portName", - }, - { - name: "nil endpoints returns an error", - serviceEndpointsData: serviceEndpointsData("nil endpoints"), - portName: "mesh", - expErr: "service endpoints requires both endpoints and resource", - }, - { - name: "nil resource returns an error", - serviceEndpointsData: serviceEndpointsData("nil resource"), - portName: "mesh", - expErr: "service endpoints requires both endpoints and resource", - }, - { - name: "portName doesn't exist in endpoints results in empty endpoints", - serviceEndpointsData: serviceEndpointsData("passing"), - portName: "does-not-exist", - expectedProxyStateEndpoints: &pbproxystate.Endpoints{ - Endpoints: []*pbproxystate.Endpoint{}, - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - actualEndpoints, err := generateProxyStateEndpoints(tc.serviceEndpointsData, tc.portName) - if tc.expErr != "" { - require.ErrorContains(t, err, tc.expErr) - } else { - prototest.AssertDeepEqual(t, tc.expectedProxyStateEndpoints, actualEndpoints) - } - }) - } -} - -func serviceEndpointsData(variation string) *ServiceEndpointsData { - r := resourcetest.Resource(catalog.ServiceEndpointsType, "test").Build() - eps := &pbcatalog.ServiceEndpoints{ - Endpoints: []*pbcatalog.Endpoint{ - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.1.1.1", - Ports: []string{"mesh"}, - }, - { - Host: "10.2.2.2", - Ports: []string{"mesh"}, - }, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - { - Ports: map[string]*pbcatalog.WorkloadPort{ - "mesh": { - Port: 20000, - Protocol: pbcatalog.Protocol_PROTOCOL_MESH, - }, - }, - Addresses: []*pbcatalog.WorkloadAddress{ - { - Host: "10.3.3.3", - Ports: []string{"mesh"}, - }, - }, - HealthStatus: pbcatalog.Health_HEALTH_PASSING, - }, - }, - } - - switch variation { - case "passing": - case "critical": - eps.Endpoints[0].HealthStatus = pbcatalog.Health_HEALTH_CRITICAL - eps.Endpoints[1].HealthStatus = pbcatalog.Health_HEALTH_CRITICAL - case "any": - eps.Endpoints[0].HealthStatus = pbcatalog.Health_HEALTH_ANY - eps.Endpoints[1].HealthStatus = pbcatalog.Health_HEALTH_ANY - case "missing port lookup": - delete(eps.Endpoints[0].Ports, "mesh") - case "nil endpoints": - eps = nil - case "nil resource": - r = nil - } - - return &ServiceEndpointsData{ - Resource: r, - Endpoints: eps, - } -} diff --git a/internal/mesh/internal/controllers/xds/mock_updater.go b/internal/mesh/internal/controllers/xds/mock_updater.go deleted file mode 100644 index 3b8554f491167..0000000000000 --- a/internal/mesh/internal/controllers/xds/mock_updater.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "fmt" - "sync" - - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// mockUpdater mocks the updater functions, and stores ProxyStates from calls to PushChange, so we can assert it was -// computed correctly in the controller. -type mockUpdater struct { - lock sync.Mutex - // latestPs is a map from a ProxyStateTemplate's id.Name in string form to the last computed ProxyState for that - // ProxyStateTemplate. - latestPs map[string]*pbmesh.ProxyState - notConnected bool - pushChangeError bool -} - -func NewMockUpdater() *mockUpdater { - return &mockUpdater{ - latestPs: make(map[string]*pbmesh.ProxyState), - } -} - -func (m *mockUpdater) SetPushChangeErrorTrue() { - m.lock.Lock() - defer m.lock.Unlock() - m.pushChangeError = true -} - -func (m *mockUpdater) SetProxyAsNotConnected() { - m.lock.Lock() - defer m.lock.Unlock() - m.notConnected = true -} - -func (m *mockUpdater) PushChange(id *pbresource.ID, snapshot *pbmesh.ProxyState) error { - m.lock.Lock() - defer m.lock.Unlock() - if m.pushChangeError { - return fmt.Errorf("mock push change error") - } else { - m.setUnsafe(id.Name, snapshot) - } - return nil -} - -func (m *mockUpdater) ProxyConnectedToServer(_ *pbresource.ID) bool { - m.lock.Lock() - defer m.lock.Unlock() - if m.notConnected { - return false - } - return true -} - -func (p *mockUpdater) Get(name string) *pbmesh.ProxyState { - p.lock.Lock() - defer p.lock.Unlock() - ps, ok := p.latestPs[name] - if ok { - return ps - } - return nil -} - -func (p *mockUpdater) GetEndpoints(name string) map[string]*pbproxystate.Endpoints { - p.lock.Lock() - defer p.lock.Unlock() - ps, ok := p.latestPs[name] - if ok { - return ps.Endpoints - } - return nil -} - -func (p *mockUpdater) GetTrustBundle(name string) map[string]*pbproxystate.TrustBundle { - p.lock.Lock() - defer p.lock.Unlock() - ps, ok := p.latestPs[name] - if ok { - return ps.TrustBundles - } - return nil -} - -func (p *mockUpdater) Set(name string, ps *pbmesh.ProxyState) { - p.lock.Lock() - defer p.lock.Unlock() - p.setUnsafe(name, ps) -} - -func (p *mockUpdater) setUnsafe(name string, ps *pbmesh.ProxyState) { - p.latestPs[name] = ps -} diff --git a/internal/mesh/internal/controllers/xds/reconciliation_data.go b/internal/mesh/internal/controllers/xds/reconciliation_data.go deleted file mode 100644 index a4aae8fdc43f0..0000000000000 --- a/internal/mesh/internal/controllers/xds/reconciliation_data.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package xds - -import ( - "context" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -type ServiceEndpointsData struct { - Resource *pbresource.Resource - Endpoints *pbcatalog.ServiceEndpoints -} - -type ProxyStateTemplateData struct { - Resource *pbresource.Resource - Template *pbmesh.ProxyStateTemplate -} - -// getServiceEndpoints will return a non-nil &ServiceEndpointsData unless there is an error. -func getServiceEndpoints(ctx context.Context, rt controller.Runtime, id *pbresource.ID) (*ServiceEndpointsData, error) { - rsp, err := rt.Client.Read(ctx, &pbresource.ReadRequest{Id: id}) - if err != nil { - return nil, err - } - - var se pbcatalog.ServiceEndpoints - err = rsp.Resource.Data.UnmarshalTo(&se) - if err != nil { - return nil, resource.NewErrDataParse(&se, err) - } - - return &ServiceEndpointsData{Resource: rsp.Resource, Endpoints: &se}, nil -} - -func getProxyStateTemplate(ctx context.Context, rt controller.Runtime, id *pbresource.ID) (*ProxyStateTemplateData, error) { - rsp, err := rt.Client.Read(ctx, &pbresource.ReadRequest{Id: id}) - switch { - case status.Code(err) == codes.NotFound: - return nil, nil - case err != nil: - return nil, err - } - - var pst pbmesh.ProxyStateTemplate - err = rsp.Resource.Data.UnmarshalTo(&pst) - if err != nil { - return nil, resource.NewErrDataParse(&pst, err) - } - - return &ProxyStateTemplateData{Resource: rsp.Resource, Template: &pst}, nil -} diff --git a/internal/mesh/internal/controllers/xds/status/status.go b/internal/mesh/internal/controllers/xds/status/status.go deleted file mode 100644 index 0aff944f5495f..0000000000000 --- a/internal/mesh/internal/controllers/xds/status/status.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package status - -import ( - "context" - "fmt" - - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - StatusConditionProxyStateAccepted = "ProxyStateAccepted" - StatusReasonNilProxyState = "ProxyStateNil" - StatusReasonProxyStateReferencesComputed = "ProxyStateReferencesComputed" - StatusReasonEndpointNotRead = "ProxyStateEndpointReferenceReadError" - StatusReasonCreatingProxyStateEndpointsFailed = "ProxyStateEndpointsNotComputed" - StatusReasonPushChangeFailed = "ProxyStatePushChangeFailed" - StatusReasonTrustBundleFetchFailed = "ProxyStateTrustBundleFetchFailed" -) - -func KeyFromID(id *pbresource.ID) string { - return fmt.Sprintf("%s/%s/%s", - resource.ToGVK(id.Type), - resource.TenancyToString(id.Tenancy), - id.Name) -} - -func ConditionAccepted() *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_TRUE, - Reason: StatusReasonProxyStateReferencesComputed, - Message: fmt.Sprintf("proxy state was computed and pushed."), - } -} -func ConditionRejectedNilProxyState(pstRef string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: StatusReasonNilProxyState, - Message: fmt.Sprintf("nil proxy state is not valid %q.", pstRef), - } -} -func ConditionRejectedErrorReadingEndpoints(endpointRef string, err string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: StatusReasonEndpointNotRead, - Message: fmt.Sprintf("error reading referenced service endpoints %q: %s", endpointRef, err), - } -} -func ConditionRejectedCreatingProxyStateEndpoints(endpointRef string, err string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: StatusReasonCreatingProxyStateEndpointsFailed, - Message: fmt.Sprintf("could not create proxy state endpoints from service endpoints %q: %s", endpointRef, err), - } -} -func ConditionRejectedPushChangeFailed(pstRef string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: StatusReasonPushChangeFailed, - Message: fmt.Sprintf("failed to push change for proxy state template %q", pstRef), - } -} -func ConditionRejectedTrustBundleFetchFailed(pstRef string) *pbresource.Condition { - return &pbresource.Condition{ - Type: StatusConditionProxyStateAccepted, - State: pbresource.Condition_STATE_FALSE, - Reason: StatusReasonTrustBundleFetchFailed, - Message: fmt.Sprintf("failed to fetch trust bundle for proxy state template %q", pstRef), - } -} - -// WriteStatusIfChanged updates the ProxyStateTemplate status if it has changed. -func WriteStatusIfChanged(ctx context.Context, rt controller.Runtime, res *pbresource.Resource, condition *pbresource.Condition) { - newStatus := &pbresource.Status{ - ObservedGeneration: res.Generation, - Conditions: []*pbresource.Condition{ - condition, - }, - } - // If the status is unchanged then we should return and avoid the unnecessary write - const controllerName = "consul.io/xds-controller" - if resource.EqualStatus(res.Status[controllerName], newStatus, false) { - return - } else { - _, err := rt.Client.WriteStatus(ctx, &pbresource.WriteStatusRequest{ - Id: res.Id, - Key: controllerName, - Status: newStatus, - }) - - if err != nil { - rt.Logger.Error("error updating the proxy state template status", "error", err, "proxyStateTeamplate", res.Id) - } - } -} diff --git a/internal/mesh/internal/types/computed_routes.go b/internal/mesh/internal/types/computed_routes.go deleted file mode 100644 index c43627c896c45..0000000000000 --- a/internal/mesh/internal/types/computed_routes.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - ComputedRoutesKind = "ComputedRoutes" -) - -var ( - ComputedRoutesV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: ComputedRoutesKind, - } - - ComputedRoutesType = ComputedRoutesV1Alpha1Type -) - -func RegisterComputedRoutes(r resource.Registry) { - r.Register(resource.Registration{ - Type: ComputedRoutesV1Alpha1Type, - Proto: &pbmesh.ComputedRoutes{}, - Validate: ValidateComputedRoutes, - }) -} - -func ValidateComputedRoutes(res *pbresource.Resource) error { - var config pbmesh.ComputedRoutes - - if err := res.Data.UnmarshalTo(&config); err != nil { - return resource.NewErrDataParse(&config, err) - } - - var merr error - - if len(config.PortedConfigs) == 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "ported_configs", - Wrapped: resource.ErrEmpty, - }) - } - - // TODO(rb): do more elaborate validation - - for port, pmc := range config.PortedConfigs { - wrapErr := func(err error) error { - return resource.ErrInvalidMapValue{ - Map: "ported_configs", - Key: port, - Wrapped: err, - } - } - if pmc.Config == nil { - merr = multierror.Append(merr, wrapErr(resource.ErrInvalidField{ - Name: "config", - Wrapped: resource.ErrEmpty, - })) - } - if len(pmc.Targets) == 0 { - merr = multierror.Append(merr, wrapErr(resource.ErrInvalidField{ - Name: "targets", - Wrapped: resource.ErrEmpty, - })) - } - } - - return merr -} diff --git a/internal/mesh/internal/types/computed_routes_test.go b/internal/mesh/internal/types/computed_routes_test.go deleted file mode 100644 index 46b2f890a71e5..0000000000000 --- a/internal/mesh/internal/types/computed_routes_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestValidateComputedRoutes(t *testing.T) { - type testcase struct { - routes *pbmesh.ComputedRoutes - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(ComputedRoutesType, "api"). - WithData(t, tc.routes). - Build() - - err := ValidateComputedRoutes(res) - - // Verify that validate didn't actually change the object. - got := resourcetest.MustDecode[*pbmesh.ComputedRoutes](t, res) - prototest.AssertDeepEqual(t, tc.routes, got.Data) - - if tc.expectErr == "" { - require.NoError(t, err) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{ - "empty": { - routes: &pbmesh.ComputedRoutes{}, - expectErr: `invalid "ported_configs" field: cannot be empty`, - }, - "empty config": { - routes: &pbmesh.ComputedRoutes{ - PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ - "http": { - Config: nil, - Targets: map[string]*pbmesh.BackendTargetDetails{ - "foo": {}, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within ported_configs: invalid "config" field: cannot be empty`, - }, - "empty targets": { - routes: &pbmesh.ComputedRoutes{ - PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ - "http": { - Config: &pbmesh.ComputedPortRoutes_Tcp{ - Tcp: &pbmesh.InterpretedTCPRoute{}, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within ported_configs: invalid "targets" field: cannot be empty`, - }, - "valid": { - routes: &pbmesh.ComputedRoutes{ - PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ - "http": { - Config: &pbmesh.ComputedPortRoutes_Tcp{ - Tcp: &pbmesh.InterpretedTCPRoute{}, - }, - Targets: map[string]*pbmesh.BackendTargetDetails{ - "foo": {}, - }, - }, - }, - }, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} diff --git a/internal/mesh/internal/types/decoded.go b/internal/mesh/internal/types/decoded.go deleted file mode 100644 index 90ce21233327e..0000000000000 --- a/internal/mesh/internal/types/decoded.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/consul/internal/resource" - pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" -) - -type ( - DecodedHTTPRoute = resource.DecodedResource[*pbmesh.HTTPRoute] - DecodedGRPCRoute = resource.DecodedResource[*pbmesh.GRPCRoute] - DecodedTCPRoute = resource.DecodedResource[*pbmesh.TCPRoute] - DecodedDestinationPolicy = resource.DecodedResource[*pbmesh.DestinationPolicy] - DecodedComputedRoutes = resource.DecodedResource[*pbmesh.ComputedRoutes] - DecodedFailoverPolicy = resource.DecodedResource[*pbcatalog.FailoverPolicy] - DecodedService = resource.DecodedResource[*pbcatalog.Service] -) diff --git a/internal/mesh/internal/types/destination_policy.go b/internal/mesh/internal/types/destination_policy.go deleted file mode 100644 index 1c1cbd57d2e13..0000000000000 --- a/internal/mesh/internal/types/destination_policy.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "errors" - "fmt" - - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - DestinationPolicyKind = "DestinationPolicy" -) - -var ( - DestinationPolicyV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: DestinationPolicyKind, - } - - DestinationPolicyType = DestinationPolicyV1Alpha1Type -) - -func RegisterDestinationPolicy(r resource.Registry) { - r.Register(resource.Registration{ - Type: DestinationPolicyV1Alpha1Type, - Proto: &pbmesh.DestinationPolicy{}, - Validate: ValidateDestinationPolicy, - }) -} - -func ValidateDestinationPolicy(res *pbresource.Resource) error { - var policy pbmesh.DestinationPolicy - - if err := res.Data.UnmarshalTo(&policy); err != nil { - return resource.NewErrDataParse(&policy, err) - } - - var merr error - - if len(policy.PortConfigs) == 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "port_configs", - Wrapped: resource.ErrEmpty, - }) - } - - for port, pc := range policy.PortConfigs { - wrapErr := func(err error) error { - return resource.ErrInvalidMapValue{ - Map: "port_configs", - Key: port, - Wrapped: err, - } - } - - if dur := pc.ConnectTimeout.AsDuration(); dur < 0 { - merr = multierror.Append(merr, wrapErr(resource.ErrInvalidField{ - Name: "connect_timeout", - Wrapped: fmt.Errorf("'%v', must be >= 0", dur), - })) - } - if dur := pc.RequestTimeout.AsDuration(); dur < 0 { - merr = multierror.Append(merr, wrapErr(resource.ErrInvalidField{ - Name: "request_timeout", - Wrapped: fmt.Errorf("'%v', must be >= 0", dur), - })) - } - - if pc.LoadBalancer != nil { - lb := pc.LoadBalancer - wrapLBErr := func(err error) error { - return wrapErr(resource.ErrInvalidField{ - Name: "load_balancer", - Wrapped: err, - }) - } - - switch lb.Policy { - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_UNSPECIFIED: - // means just do the default - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RANDOM: - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_ROUND_ROBIN: - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST: - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV: - case pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH: - default: - merr = multierror.Append(merr, wrapLBErr(resource.ErrInvalidField{ - Name: "policy", - Wrapped: fmt.Errorf("not a supported enum value: %v", lb.Policy), - })) - } - - if lb.Policy != pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH && lb.Config != nil { - if _, ok := lb.Config.(*pbmesh.LoadBalancer_RingHashConfig); ok { - merr = multierror.Append(merr, wrapLBErr(resource.ErrInvalidField{ - Name: "config", - Wrapped: fmt.Errorf("ring_hash_config specified for incompatible load balancing policy %q", lb.Policy), - })) - } - } - - if lb.Policy != pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST && lb.Config != nil { - if _, ok := lb.Config.(*pbmesh.LoadBalancer_LeastRequestConfig); ok { - merr = multierror.Append(merr, wrapLBErr(resource.ErrInvalidField{ - Name: "config", - Wrapped: fmt.Errorf("least_request_config specified for incompatible load balancing policy %q", lb.Policy), - })) - } - } - - if !lb.Policy.IsHashBased() && len(lb.HashPolicies) > 0 { - merr = multierror.Append(merr, wrapLBErr(resource.ErrInvalidField{ - Name: "hash_policies", - Wrapped: fmt.Errorf("hash_policies specified for non-hash-based policy %q", lb.Policy), - })) - } - - LOOP: - for i, hp := range lb.HashPolicies { - wrapHPErr := func(err error) error { - return wrapLBErr(resource.ErrInvalidListElement{ - Name: "hash_policies", - Index: i, - Wrapped: err, - }) - } - - var hasField bool - switch hp.Field { - case pbmesh.HashPolicyField_HASH_POLICY_FIELD_UNSPECIFIED: - case pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - pbmesh.HashPolicyField_HASH_POLICY_FIELD_COOKIE, - pbmesh.HashPolicyField_HASH_POLICY_FIELD_QUERY_PARAMETER: - hasField = true - default: - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field", - Wrapped: fmt.Errorf("not a supported enum value: %v", hp.Field), - })) - continue LOOP // no need to keep validating - } - - if hp.SourceIp { - if hasField { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field", - Wrapped: fmt.Errorf("a single hash policy cannot hash both a source address and a %q", hp.Field), - })) - } - if hp.FieldValue != "" { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field_value", - Wrapped: errors.New("cannot be specified when hashing source_ip"), - })) - } - } - - if hasField && hp.FieldValue == "" { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field_value", - Wrapped: fmt.Errorf("field %q was specified without a field_value", hp.Field), - })) - } - if hp.FieldValue != "" && !hasField { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field", - Wrapped: resource.ErrMissing, - })) - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "field_value", - Wrapped: errors.New("requires a field to apply to"), - })) - } - if hp.CookieConfig != nil { - if hp.Field != pbmesh.HashPolicyField_HASH_POLICY_FIELD_COOKIE { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "cookie_config", - Wrapped: fmt.Errorf("incompatible with field %q", hp.Field), - })) - } - if hp.CookieConfig.Session && hp.CookieConfig.Ttl.AsDuration() != 0 { - merr = multierror.Append(merr, wrapHPErr(resource.ErrInvalidField{ - Name: "cookie_config", - Wrapped: resource.ErrInvalidField{ - Name: "ttl", - Wrapped: fmt.Errorf("a session cookie cannot have an associated TTL"), - }, - })) - } - } - } - } - - if pc.LocalityPrioritization != nil { - lp := pc.LocalityPrioritization - wrapLPErr := func(err error) error { - return wrapErr(resource.ErrInvalidField{ - Name: "locality_prioritization", - Wrapped: err, - }) - } - - switch lp.Mode { - case pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED: - // means pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_NONE - case pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_NONE: - case pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_FAILOVER: - default: - merr = multierror.Append(merr, wrapLPErr(resource.ErrInvalidField{ - Name: "mode", - Wrapped: fmt.Errorf("not a supported enum value: %v", lp.Mode), - })) - } - } - } - - return merr -} diff --git a/internal/mesh/internal/types/destination_policy_test.go b/internal/mesh/internal/types/destination_policy_test.go deleted file mode 100644 index 960c42aedea2a..0000000000000 --- a/internal/mesh/internal/types/destination_policy_test.go +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/types/known/durationpb" - - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestValidateDestinationPolicy(t *testing.T) { - type testcase struct { - policy *pbmesh.DestinationPolicy - expectErr string - expectErrs []string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(DestinationPolicyType, "api"). - WithData(t, tc.policy). - Build() - - err := ValidateDestinationPolicy(res) - - // Verify that validate didn't actually change the object. - got := resourcetest.MustDecode[*pbmesh.DestinationPolicy](t, res) - prototest.AssertDeepEqual(t, tc.policy, got.Data) - - if tc.expectErr != "" && len(tc.expectErrs) > 0 { - t.Fatalf("cannot test singular and list errors at the same time") - } - - if tc.expectErr == "" && len(tc.expectErrs) == 0 { - require.NoError(t, err) - } else if tc.expectErr != "" { - testutil.RequireErrorContains(t, err, tc.expectErr) - } else { - for _, expectErr := range tc.expectErrs { - testutil.RequireErrorContains(t, err, expectErr) - } - } - } - - cases := map[string]testcase{ - // emptiness - "empty": { - policy: &pbmesh.DestinationPolicy{}, - expectErr: `invalid "port_configs" field: cannot be empty`, - }, - "good connect timeout": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - }, - }, - }, - }, - "bad connect timeout": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(-55 * time.Second), - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "connect_timeout" field: '-55s', must be >= 0`, - }, - "good request timeout": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - RequestTimeout: durationpb.New(55 * time.Second), - }, - }, - }, - }, - "bad request timeout": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - RequestTimeout: durationpb.New(-55 * time.Second), - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "request_timeout" field: '-55s', must be >= 0`, - }, - // load balancer - "lbpolicy: missing enum": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{}, - }, - }, - }, - }, - "lbpolicy: bad enum": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: 99, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid "policy" field: not a supported enum value: 99`, - }, - "lbpolicy: supported": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RANDOM, - }, - }, - }, - }, - }, - "lbpolicy: bad for least request config": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH, - Config: &pbmesh.LoadBalancer_LeastRequestConfig{ - LeastRequestConfig: &pbmesh.LeastRequestConfig{ - ChoiceCount: 10, - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid "config" field: least_request_config specified for incompatible load balancing policy "LOAD_BALANCER_POLICY_RING_HASH"`, - }, - "lbpolicy: bad for ring hash config": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST, - Config: &pbmesh.LoadBalancer_RingHashConfig{ - RingHashConfig: &pbmesh.RingHashConfig{ - MinimumRingSize: 1024, - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid "config" field: ring_hash_config specified for incompatible load balancing policy "LOAD_BALANCER_POLICY_LEAST_REQUEST"`, - }, - "lbpolicy: good for least request config": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST, - Config: &pbmesh.LoadBalancer_LeastRequestConfig{ - LeastRequestConfig: &pbmesh.LeastRequestConfig{ - ChoiceCount: 10, - }, - }, - }, - }, - }, - }, - }, - "lbpolicy: good for ring hash config": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH, - Config: &pbmesh.LoadBalancer_RingHashConfig{ - RingHashConfig: &pbmesh.RingHashConfig{ - MinimumRingSize: 1024, - }, - }, - }, - }, - }, - }, - }, - "lbpolicy: empty policy with hash policy": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - HashPolicies: []*pbmesh.HashPolicy{ - {SourceIp: true}, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid "hash_policies" field: hash_policies specified for non-hash-based policy "LOAD_BALANCER_POLICY_UNSPECIFIED"`, - }, - "lbconfig: cookie config with header policy": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - FieldValue: "x-user-id", - CookieConfig: &pbmesh.CookieConfig{ - Ttl: durationpb.New(10 * time.Second), - Path: "/root", - }, - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "cookie_config" field: incompatible with field "HASH_POLICY_FIELD_HEADER"`, - }, - "lbconfig: cannot generate session cookie with ttl": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_COOKIE, - FieldValue: "good-cookie", - CookieConfig: &pbmesh.CookieConfig{ - Session: true, - Ttl: durationpb.New(10 * time.Second), - }, - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "cookie_config" field: invalid "ttl" field: a session cookie cannot have an associated TTL`, - }, - "lbconfig: valid cookie policy": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_COOKIE, - FieldValue: "good-cookie", - CookieConfig: &pbmesh.CookieConfig{ - Ttl: durationpb.New(10 * time.Second), - Path: "/oven", - }, - }, - }, - }, - }, - }, - }, - }, - "lbconfig: bad match field": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: 99, - FieldValue: "X-Consul-Token", - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field" field: not a supported enum value: 99`, - }, - "lbconfig: supported match field": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - FieldValue: "X-Consul-Token", - }, - }, - }, - }, - }, - }, - }, - "lbconfig: missing match field": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - FieldValue: "X-Consul-Token", - }, - }, - }, - }, - }, - }, - expectErrs: []string{ - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field" field: missing required field`, - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: requires a field to apply to`, - }, - }, - "lbconfig: cannot match on source address and custom field": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - SourceIp: true, - }, - }, - }, - }, - }, - }, - expectErrs: []string{ - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field" field: a single hash policy cannot hash both a source address and a "HASH_POLICY_FIELD_HEADER"`, - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: field "HASH_POLICY_FIELD_HEADER" was specified without a field_value`, - }, - }, - "lbconfig: matchvalue not compatible with source address": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - FieldValue: "X-Consul-Token", - SourceIp: true, - }, - }, - }, - }, - }, - }, - expectErrs: []string{ - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: cannot be specified when hashing source_ip`, - `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: requires a field to apply to`, - }, - }, - "lbconfig: field without match value": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: field "HASH_POLICY_FIELD_HEADER" was specified without a field_value`, - }, - "lbconfig: matchvalue without field": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - HashPolicies: []*pbmesh.HashPolicy{ - { - FieldValue: "my-cookie", - }, - }, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "load_balancer" field: invalid element at index 0 of list "hash_policies": invalid "field_value" field: requires a field to apply to`, - }, - "lbconfig: ring hash kitchen sink": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH, - Config: &pbmesh.LoadBalancer_RingHashConfig{ - RingHashConfig: &pbmesh.RingHashConfig{ - MaximumRingSize: 10, - MinimumRingSize: 2, - }, - }, - HashPolicies: []*pbmesh.HashPolicy{ - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_COOKIE, - FieldValue: "my-cookie", - }, - { - Field: pbmesh.HashPolicyField_HASH_POLICY_FIELD_HEADER, - FieldValue: "alt-header", - Terminal: true, - }, - }, - }, - }, - }, - }, - }, - "lbconfig: least request kitchen sink": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - ConnectTimeout: durationpb.New(55 * time.Second), - LoadBalancer: &pbmesh.LoadBalancer{ - Policy: pbmesh.LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST, - Config: &pbmesh.LoadBalancer_LeastRequestConfig{ - LeastRequestConfig: &pbmesh.LeastRequestConfig{ - ChoiceCount: 10, - }, - }, - }, - }, - }, - }, - }, - "locality: good mode": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - LocalityPrioritization: &pbmesh.LocalityPrioritization{ - Mode: pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_FAILOVER, - }, - }, - }, - }, - }, - "locality: unset mode": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - LocalityPrioritization: &pbmesh.LocalityPrioritization{ - Mode: pbmesh.LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED, - }, - }, - }, - }, - }, - "locality: bad mode": { - policy: &pbmesh.DestinationPolicy{ - PortConfigs: map[string]*pbmesh.DestinationConfig{ - "http": { - LocalityPrioritization: &pbmesh.LocalityPrioritization{ - Mode: 99, - }, - }, - }, - }, - expectErr: `invalid value of key "http" within port_configs: invalid "locality_prioritization" field: invalid "mode" field: not a supported enum value: 99`, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} diff --git a/internal/mesh/internal/types/grpc_route.go b/internal/mesh/internal/types/grpc_route.go deleted file mode 100644 index 0d6c8df07f4e8..0000000000000 --- a/internal/mesh/internal/types/grpc_route.go +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "errors" - "fmt" - - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - GRPCRouteKind = "GRPCRoute" -) - -var ( - GRPCRouteV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: GRPCRouteKind, - } - - GRPCRouteType = GRPCRouteV1Alpha1Type -) - -func RegisterGRPCRoute(r resource.Registry) { - r.Register(resource.Registration{ - Type: GRPCRouteV1Alpha1Type, - Proto: &pbmesh.GRPCRoute{}, - // TODO(rb): normalize parent/backend ref tenancies in a Mutate hook - Validate: ValidateGRPCRoute, - }) -} - -func ValidateGRPCRoute(res *pbresource.Resource) error { - var route pbmesh.GRPCRoute - - if err := res.Data.UnmarshalTo(&route); err != nil { - return resource.NewErrDataParse(&route, err) - } - - var merr error - if err := validateParentRefs(route.ParentRefs); err != nil { - merr = multierror.Append(merr, err) - } - - if len(route.Hostnames) > 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "hostnames", - Wrapped: errors.New("should not populate hostnames"), - }) - } - - for i, rule := range route.Rules { - wrapRuleErr := func(err error) error { - return resource.ErrInvalidListElement{ - Name: "rules", - Index: i, - Wrapped: err, - } - } - - for j, match := range rule.Matches { - wrapMatchErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "matches", - Index: j, - Wrapped: err, - }) - } - - if match.Method != nil { - switch match.Method.Type { - case pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_UNSPECIFIED: - merr = multierror.Append(merr, wrapMatchErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: resource.ErrMissing, - }, - )) - case pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT: - case pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_REGEX: - default: - merr = multierror.Append(merr, wrapMatchErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: fmt.Errorf("not a supported enum value: %v", match.Method.Type), - }, - )) - } - if match.Method.Service == "" && match.Method.Method == "" { - merr = multierror.Append(merr, wrapMatchErr( - resource.ErrInvalidField{ - Name: "service", - Wrapped: errors.New("at least one of \"service\" or \"method\" must be set"), - }, - )) - } - } - - for k, header := range match.Headers { - wrapMatchHeaderErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "headers", - Index: k, - Wrapped: err, - }) - } - - if err := validateHeaderMatchType(header.Type); err != nil { - merr = multierror.Append(merr, wrapMatchHeaderErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: err, - }), - ) - } - - if header.Name == "" { - merr = multierror.Append(merr, wrapMatchHeaderErr( - resource.ErrInvalidField{ - Name: "name", - Wrapped: resource.ErrMissing, - }), - ) - } - } - } - - for j, filter := range rule.Filters { - wrapFilterErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "filters", - Index: j, - Wrapped: err, - }) - } - set := 0 - if filter.RequestHeaderModifier != nil { - set++ - } - if filter.ResponseHeaderModifier != nil { - set++ - } - if filter.UrlRewrite != nil { - set++ - if filter.UrlRewrite.PathPrefix == "" { - merr = multierror.Append(merr, wrapFilterErr( - resource.ErrInvalidField{ - Name: "url_rewrite", - Wrapped: resource.ErrInvalidField{ - Name: "path_prefix", - Wrapped: errors.New("field should not be empty if enclosing section is set"), - }, - }, - )) - } - } - if set != 1 { - merr = multierror.Append(merr, wrapFilterErr( - errors.New("exactly one of request_header_modifier, response_header_modifier, or url_rewrite is required"), - )) - } - } - - if len(rule.BackendRefs) == 0 { - /* - BackendRefs (optional)¶ - - BackendRefs defines API objects where matching requests should be - sent. If unspecified, the rule performs no forwarding. If - unspecified and no filters are specified that would result in a - response being sent, a 404 error code is returned. - */ - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "backend_refs", - Wrapped: resource.ErrEmpty, - }, - )) - } - for j, hbref := range rule.BackendRefs { - wrapBackendRefErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "backend_refs", - Index: j, - Wrapped: err, - }) - } - for _, err := range validateBackendRef(hbref.BackendRef) { - merr = multierror.Append(merr, wrapBackendRefErr( - resource.ErrInvalidField{ - Name: "backend_ref", - Wrapped: err, - }, - )) - } - - if len(hbref.Filters) > 0 { - merr = multierror.Append(merr, wrapBackendRefErr( - resource.ErrInvalidField{ - Name: "filters", - Wrapped: errors.New("filters are not supported at this level yet"), - }, - )) - } - } - - if rule.Timeouts != nil { - for _, err := range validateHTTPTimeouts(rule.Timeouts) { - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "timeouts", - Wrapped: err, - }, - )) - } - } - if rule.Retries != nil { - for _, err := range validateHTTPRetries(rule.Retries) { - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "retries", - Wrapped: err, - }, - )) - } - } - } - - return merr -} diff --git a/internal/mesh/internal/types/grpc_route_test.go b/internal/mesh/internal/types/grpc_route_test.go deleted file mode 100644 index e9abc118c6546..0000000000000 --- a/internal/mesh/internal/types/grpc_route_test.go +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestValidateGRPCRoute(t *testing.T) { - type testcase struct { - route *pbmesh.GRPCRoute - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(GRPCRouteType, "api"). - WithData(t, tc.route). - Build() - - err := ValidateGRPCRoute(res) - - // Verify that validate didn't actually change the object. - got := resourcetest.MustDecode[*pbmesh.GRPCRoute](t, res) - prototest.AssertDeepEqual(t, tc.route, got.Data) - - if tc.expectErr == "" { - require.NoError(t, err) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{ - "hostnames not supported for services": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Hostnames: []string{"foo.local"}, - }, - expectErr: `invalid "hostnames" field: should not populate hostnames`, - }, - "no rules": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - }, - }, - "rules with no matches": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "rules with matches that are empty": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - // none - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "method match with no type is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Service: "foo", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "type" field: missing required field`, - }, - "method match with unknown type is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Type: 99, - Service: "foo", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "type" field: not a supported enum value: 99`, - }, - "method match with no service nor method is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Type: pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT, - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "service" field: at least one of "service" or "method" must be set`, - }, - "method match is good (1)": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Type: pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT, - Service: "foo", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "method match is good (2)": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Type: pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT, - Method: "bar", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "method match is good (3)": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Method: &pbmesh.GRPCMethodMatch{ - Type: pbmesh.GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT, - Service: "foo", - Method: "bar", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "header match with no type is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Headers: []*pbmesh.GRPCHeaderMatch{{ - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "headers": invalid "type" field: missing required field`, - }, - "header match with unknown type is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Headers: []*pbmesh.GRPCHeaderMatch{{ - Type: 99, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "headers": invalid "type" field: not a supported enum value: 99`, - }, - "header match with no name is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Headers: []*pbmesh.GRPCHeaderMatch{{ - Type: pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_EXACT, - }}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "headers": invalid "name" field: missing required field`, - }, - "header match is good": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Matches: []*pbmesh.GRPCRouteMatch{{ - Headers: []*pbmesh.GRPCHeaderMatch{{ - Type: pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_EXACT, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter empty is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - // none - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req header mod is ok": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter resp header mod is ok": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter rewrite header mod missing path prefix": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": invalid "url_rewrite" field: invalid "path_prefix" field: field should not be empty if enclosing section is set`, - }, - "filter rewrite header mod is ok": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter req+resp header mod is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req+rewrite header mod is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter resp+rewrite header mod is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req+resp+rewrite header mod is bad": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Filters: []*pbmesh.GRPCRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "backend ref with filters is unsupported": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - Filters: []*pbmesh.GRPCRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "backend_refs": invalid "filters" field: filters are not supported at this level yet`, - }, - "nil backend ref": { - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - BackendRefs: []*pbmesh.GRPCBackendRef{nil}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "backend_refs": invalid "backend_ref" field: missing required field`, - }, - } - - // Add common timeouts test cases. - for name, timeoutsTC := range getXRouteTimeoutsTestCases() { - cases["timeouts: "+name] = testcase{ - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Timeouts: timeoutsTC.timeouts, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: timeoutsTC.expectErr, - } - } - - // Add common retries test cases. - for name, retriesTC := range getXRouteRetriesTestCases() { - cases["retries: "+name] = testcase{ - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{{ - Retries: retriesTC.retries, - BackendRefs: []*pbmesh.GRPCBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: retriesTC.expectErr, - } - } - - // Add common parent refs test cases. - for name, parentTC := range getXRouteParentRefTestCases() { - cases["parent-ref: "+name] = testcase{ - route: &pbmesh.GRPCRoute{ - ParentRefs: parentTC.refs, - }, - expectErr: parentTC.expectErr, - } - } - // add common backend ref test cases. - for name, backendTC := range getXRouteBackendRefTestCases() { - var refs []*pbmesh.GRPCBackendRef - for _, br := range backendTC.refs { - refs = append(refs, &pbmesh.GRPCBackendRef{ - BackendRef: br, - }) - } - cases["backend-ref: "+name] = testcase{ - route: &pbmesh.GRPCRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.GRPCRouteRule{ - {BackendRefs: refs}, - }, - }, - expectErr: backendTC.expectErr, - } - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} diff --git a/internal/mesh/internal/types/http_route.go b/internal/mesh/internal/types/http_route.go deleted file mode 100644 index d348091a7e92f..0000000000000 --- a/internal/mesh/internal/types/http_route.go +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "errors" - "fmt" - "net/http" - "strings" - - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - HTTPRouteKind = "HTTPRoute" -) - -var ( - HTTPRouteV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: HTTPRouteKind, - } - - HTTPRouteType = HTTPRouteV1Alpha1Type -) - -func RegisterHTTPRoute(r resource.Registry) { - r.Register(resource.Registration{ - Type: HTTPRouteV1Alpha1Type, - Proto: &pbmesh.HTTPRoute{}, - Mutate: MutateHTTPRoute, - Validate: ValidateHTTPRoute, - }) -} - -func MutateHTTPRoute(res *pbresource.Resource) error { - var route pbmesh.HTTPRoute - - if err := res.Data.UnmarshalTo(&route); err != nil { - return resource.NewErrDataParse(&route, err) - } - - changed := false - - for _, rule := range route.Rules { - for _, match := range rule.Matches { - if match.Method != "" { - norm := strings.ToUpper(match.Method) - if match.Method != norm { - match.Method = norm - changed = true - } - } - } - } - - // TODO(rb): normalize parent/backend ref tenancies - - if !changed { - return nil - } - - return res.Data.MarshalFrom(&route) -} - -func ValidateHTTPRoute(res *pbresource.Resource) error { - var route pbmesh.HTTPRoute - - if err := res.Data.UnmarshalTo(&route); err != nil { - return resource.NewErrDataParse(&route, err) - } - - var merr error - if err := validateParentRefs(route.ParentRefs); err != nil { - merr = multierror.Append(merr, err) - } - - if len(route.Hostnames) > 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "hostnames", - Wrapped: errors.New("should not populate hostnames"), - }) - } - - for i, rule := range route.Rules { - wrapRuleErr := func(err error) error { - return resource.ErrInvalidListElement{ - Name: "rules", - Index: i, - Wrapped: err, - } - } - - for j, match := range rule.Matches { - wrapMatchErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "matches", - Index: j, - Wrapped: err, - }) - } - - if match.Path != nil { - wrapMatchPathErr := func(err error) error { - return wrapMatchErr(resource.ErrInvalidField{ - Name: "path", - Wrapped: err, - }) - } - switch match.Path.Type { - case pbmesh.PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED: - merr = multierror.Append(merr, wrapMatchPathErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: resource.ErrMissing, - }, - )) - case pbmesh.PathMatchType_PATH_MATCH_TYPE_EXACT: - if !strings.HasPrefix(match.Path.Value, "/") { - merr = multierror.Append(merr, wrapMatchPathErr( - resource.ErrInvalidField{ - Name: "value", - Wrapped: fmt.Errorf("exact patch value does not start with '/': %q", match.Path.Value), - }, - )) - } - case pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX: - if !strings.HasPrefix(match.Path.Value, "/") { - merr = multierror.Append(merr, wrapMatchPathErr( - resource.ErrInvalidField{ - Name: "value", - Wrapped: fmt.Errorf("prefix patch value does not start with '/': %q", match.Path.Value), - }, - )) - } - default: - merr = multierror.Append(merr, wrapMatchPathErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: fmt.Errorf("not a supported enum value: %v", match.Path.Type), - }, - )) - } - } - - for k, hdr := range match.Headers { - wrapMatchHeaderErr := func(err error) error { - return wrapMatchErr(resource.ErrInvalidListElement{ - Name: "headers", - Index: k, - Wrapped: err, - }) - } - - if err := validateHeaderMatchType(hdr.Type); err != nil { - merr = multierror.Append(merr, wrapMatchHeaderErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: err, - }), - ) - } - - if hdr.Name == "" { - merr = multierror.Append(merr, wrapMatchHeaderErr( - resource.ErrInvalidField{ - Name: "name", - Wrapped: resource.ErrMissing, - }), - ) - } - } - - for k, qm := range match.QueryParams { - wrapMatchParamErr := func(err error) error { - return wrapMatchErr(resource.ErrInvalidListElement{ - Name: "query_params", - Index: k, - Wrapped: err, - }) - } - - switch qm.Type { - case pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_UNSPECIFIED: - merr = multierror.Append(merr, wrapMatchParamErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: resource.ErrMissing, - }), - ) - case pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_EXACT: - case pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_REGEX: - case pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_PRESENT: - default: - merr = multierror.Append(merr, wrapMatchParamErr( - resource.ErrInvalidField{ - Name: "type", - Wrapped: fmt.Errorf("not a supported enum value: %v", qm.Type), - }, - )) - } - - if qm.Name == "" { - merr = multierror.Append(merr, wrapMatchParamErr( - resource.ErrInvalidField{ - Name: "name", - Wrapped: resource.ErrMissing, - }), - ) - } - } - - if match.Method != "" && !isValidHTTPMethod(match.Method) { - merr = multierror.Append(merr, wrapMatchErr( - resource.ErrInvalidField{ - Name: "method", - Wrapped: fmt.Errorf("not a valid http method: %q", match.Method), - }, - )) - } - } - - for j, filter := range rule.Filters { - wrapFilterErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "filters", - Index: j, - Wrapped: err, - }) - } - set := 0 - if filter.RequestHeaderModifier != nil { - set++ - } - if filter.ResponseHeaderModifier != nil { - set++ - } - if filter.UrlRewrite != nil { - set++ - if filter.UrlRewrite.PathPrefix == "" { - merr = multierror.Append(merr, wrapFilterErr( - resource.ErrInvalidField{ - Name: "url_rewrite", - Wrapped: resource.ErrInvalidField{ - Name: "path_prefix", - Wrapped: errors.New("field should not be empty if enclosing section is set"), - }, - }, - )) - } - } - if set != 1 { - merr = multierror.Append(merr, wrapFilterErr( - errors.New("exactly one of request_header_modifier, response_header_modifier, or url_rewrite is required"), - )) - } - } - - if len(rule.BackendRefs) == 0 { - /* - BackendRefs (optional)¶ - - BackendRefs defines API objects where matching requests should be - sent. If unspecified, the rule performs no forwarding. If - unspecified and no filters are specified that would result in a - response being sent, a 404 error code is returned. - */ - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "backend_refs", - Wrapped: resource.ErrEmpty, - }, - )) - } - for j, hbref := range rule.BackendRefs { - wrapBackendRefErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "backend_refs", - Index: j, - Wrapped: err, - }) - } - - for _, err := range validateBackendRef(hbref.BackendRef) { - merr = multierror.Append(merr, wrapBackendRefErr( - resource.ErrInvalidField{ - Name: "backend_ref", - Wrapped: err, - }, - )) - } - - if len(hbref.Filters) > 0 { - merr = multierror.Append(merr, wrapBackendRefErr( - resource.ErrInvalidField{ - Name: "filters", - Wrapped: errors.New("filters are not supported at this level yet"), - }, - )) - } - } - - if rule.Timeouts != nil { - for _, err := range validateHTTPTimeouts(rule.Timeouts) { - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "timeouts", - Wrapped: err, - }, - )) - } - } - if rule.Retries != nil { - for _, err := range validateHTTPRetries(rule.Retries) { - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "retries", - Wrapped: err, - }, - )) - } - } - } - - return merr -} - -func isValidHTTPMethod(method string) bool { - switch method { - case http.MethodGet, - http.MethodHead, - http.MethodPost, - http.MethodPut, - http.MethodPatch, - http.MethodDelete, - http.MethodConnect, - http.MethodOptions, - http.MethodTrace: - return true - default: - return false - } -} diff --git a/internal/mesh/internal/types/http_route_test.go b/internal/mesh/internal/types/http_route_test.go deleted file mode 100644 index 0f4626aa7094a..0000000000000 --- a/internal/mesh/internal/types/http_route_test.go +++ /dev/null @@ -1,980 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/durationpb" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestMutateHTTPRoute(t *testing.T) { - type testcase struct { - route *pbmesh.HTTPRoute - expect *pbmesh.HTTPRoute - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(HTTPRouteType, "api"). - WithData(t, tc.route). - Build() - - err := MutateHTTPRoute(res) - - got := resourcetest.MustDecode[*pbmesh.HTTPRoute](t, res) - - if tc.expectErr == "" { - require.NoError(t, err) - - if tc.expect == nil { - tc.expect = proto.Clone(tc.route).(*pbmesh.HTTPRoute) - } - - prototest.AssertDeepEqual(t, tc.expect, got.Data) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{ - "no-rules": { - route: &pbmesh.HTTPRoute{}, - }, - "rules-with-no-matches": { - route: &pbmesh.HTTPRoute{ - Rules: []*pbmesh.HTTPRouteRule{{ - // none - }}, - }, - }, - "rules-with-matches-no-methods": { - route: &pbmesh.HTTPRoute{ - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/foo", - }, - }}, - }}, - }, - }, - "rules-with-matches-methods-uppercase": { - route: &pbmesh.HTTPRoute{ - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{ - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/foo", - }, - Method: "GET", - }, - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/bar", - }, - Method: "POST", - }, - }, - }}, - }, - }, - "rules-with-matches-methods-lowercase": { - route: &pbmesh.HTTPRoute{ - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{ - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/foo", - }, - Method: "get", - }, - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/bar", - }, - Method: "post", - }, - }, - }}, - }, - expect: &pbmesh.HTTPRoute{ - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{ - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/foo", - }, - Method: "GET", - }, - { - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/bar", - }, - Method: "POST", - }, - }, - }}, - }, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func TestValidateHTTPRoute(t *testing.T) { - type testcase struct { - route *pbmesh.HTTPRoute - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(HTTPRouteType, "api"). - WithData(t, tc.route). - Build() - - err := MutateHTTPRoute(res) - require.NoError(t, err) - - err = ValidateHTTPRoute(res) - - // Verify that validate didn't actually change the object. - got := resourcetest.MustDecode[*pbmesh.HTTPRoute](t, res) - prototest.AssertDeepEqual(t, tc.route, got.Data) - - if tc.expectErr == "" { - require.NoError(t, err) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{ - "hostnames not supported for services": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Hostnames: []string{"foo.local"}, - }, - expectErr: `invalid "hostnames" field: should not populate hostnames`, - }, - "no rules": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - }, - }, - "rules with no matches": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "rules with matches that are empty": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - // none - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "path match with no type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Value: "/foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "path" field: invalid "type" field: missing required field`, - }, - "path match with unknown type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: 99, - Value: "/foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "path" field: invalid "type" field: not a supported enum value: 99`, - }, - "exact path match with no leading slash is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_EXACT, - Value: "foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "path" field: invalid "value" field: exact patch value does not start with '/': "foo"`, - }, - "prefix path match with no leading slash is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "path" field: invalid "value" field: prefix patch value does not start with '/': "foo"`, - }, - "exact path match with leading slash is good": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_EXACT, - Value: "/foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "prefix path match with leading slash is good": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Path: &pbmesh.HTTPPathMatch{ - Type: pbmesh.PathMatchType_PATH_MATCH_TYPE_PREFIX, - Value: "/foo", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "header match with no type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Headers: []*pbmesh.HTTPHeaderMatch{{ - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "headers": invalid "type" field: missing required field`, - }, - "header match with unknown type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Headers: []*pbmesh.HTTPHeaderMatch{{ - Type: 99, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "headers": invalid "type" field: not a supported enum value: 99`, - }, - "header match with no name is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Headers: []*pbmesh.HTTPHeaderMatch{{ - Type: pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_EXACT, - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "headers": invalid "name" field: missing required field`, - }, - "header match is good": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Headers: []*pbmesh.HTTPHeaderMatch{{ - Type: pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_EXACT, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "queryparam match with no type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - QueryParams: []*pbmesh.HTTPQueryParamMatch{{ - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "query_params": invalid "type" field: missing required field`, - }, - "queryparam match with unknown type is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - QueryParams: []*pbmesh.HTTPQueryParamMatch{{ - Type: 99, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "query_params": invalid "type" field: not a supported enum value: 99`, - }, - "queryparam match with no name is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - QueryParams: []*pbmesh.HTTPQueryParamMatch{{ - Type: pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_EXACT, - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid element at index 0 of list "query_params": invalid "name" field: missing required field`, - }, - "queryparam match is good": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - QueryParams: []*pbmesh.HTTPQueryParamMatch{{ - Type: pbmesh.QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_EXACT, - Name: "x-foo", - }}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "method match is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Method: "BOB", - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "matches": invalid "method" field: not a valid http method: "BOB"`, - }, - "method match is good": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Matches: []*pbmesh.HTTPRouteMatch{{ - Method: "DELETE", - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter empty is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - // none - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req header mod is ok": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter resp header mod is ok": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter rewrite header mod missing path prefix": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": invalid "url_rewrite" field: invalid "path_prefix" field: field should not be empty if enclosing section is set`, - }, - "filter rewrite header mod is ok": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - }, - "filter req+resp header mod is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req+rewrite header mod is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter resp+rewrite header mod is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "filter req+resp+rewrite header mod is bad": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Filters: []*pbmesh.HTTPRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - ResponseHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - UrlRewrite: &pbmesh.HTTPURLRewriteFilter{ - PathPrefix: "/blah", - }, - }}, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "filters": exactly one of request_header_modifier, response_header_modifier, or url_rewrite`, - }, - "backend ref with filters is unsupported": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - Filters: []*pbmesh.HTTPRouteFilter{{ - RequestHeaderModifier: &pbmesh.HTTPHeaderFilter{}, - }}, - }}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "backend_refs": invalid "filters" field: filters are not supported at this level yet`, - }, - "nil backend ref": { - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - BackendRefs: []*pbmesh.HTTPBackendRef{nil}, - }}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 0 of list "backend_refs": invalid "backend_ref" field: missing required field`, - }, - } - - // Add common timeouts test cases. - for name, timeoutsTC := range getXRouteTimeoutsTestCases() { - cases["timeouts: "+name] = testcase{ - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Timeouts: timeoutsTC.timeouts, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: timeoutsTC.expectErr, - } - } - - // Add common retries test cases. - for name, retriesTC := range getXRouteRetriesTestCases() { - cases["retries: "+name] = testcase{ - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{{ - Retries: retriesTC.retries, - BackendRefs: []*pbmesh.HTTPBackendRef{{ - BackendRef: newBackendRef(catalog.ServiceType, "api", ""), - }}, - }}, - }, - expectErr: retriesTC.expectErr, - } - } - - // Add common parent refs test cases. - for name, parentTC := range getXRouteParentRefTestCases() { - cases["parent-ref: "+name] = testcase{ - route: &pbmesh.HTTPRoute{ - ParentRefs: parentTC.refs, - }, - expectErr: parentTC.expectErr, - } - } - // add common backend ref test cases. - for name, backendTC := range getXRouteBackendRefTestCases() { - var refs []*pbmesh.HTTPBackendRef - for _, br := range backendTC.refs { - refs = append(refs, &pbmesh.HTTPBackendRef{ - BackendRef: br, - }) - } - cases["backend-ref: "+name] = testcase{ - route: &pbmesh.HTTPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.HTTPRouteRule{ - {BackendRefs: refs}, - }, - }, - expectErr: backendTC.expectErr, - } - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -type xRouteParentRefTestcase struct { - refs []*pbmesh.ParentReference - expectErr string -} - -func getXRouteParentRefTestCases() map[string]xRouteParentRefTestcase { - return map[string]xRouteParentRefTestcase{ - "no parent refs": { - expectErr: `invalid "parent_refs" field: cannot be empty`, - }, - "parent ref with nil ref": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", ""), - { - Ref: nil, - Port: "http", - }, - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: missing required field`, - }, - "parent ref with bad type ref": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", ""), - newParentRef(catalog.WorkloadType, "api", ""), - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: reference must have type catalog.v1alpha1.Service`, - }, - "parent ref with section": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", ""), - { - Ref: resourcetest.Resource(catalog.ServiceType, "web").Reference("section2"), - Port: "http", - }, - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: invalid "section" field: section not supported for service parent refs`, - }, - "duplicate exact parents": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", "http"), - newParentRef(catalog.ServiceType, "api", "http"), - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: parent ref "catalog.v1alpha1.Service/default.local.default/api" for port "http" exists twice`, - }, - "duplicate wild parents": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", ""), - newParentRef(catalog.ServiceType, "api", ""), - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: parent ref "catalog.v1alpha1.Service/default.local.default/api" for wildcard port exists twice`, - }, - "duplicate parents via exact+wild overlap": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", "http"), - newParentRef(catalog.ServiceType, "api", ""), - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: parent ref "catalog.v1alpha1.Service/default.local.default/api" for ports [http] covered by wildcard port already`, - }, - "duplicate parents via exact+wild overlap (reversed)": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", ""), - newParentRef(catalog.ServiceType, "api", "http"), - }, - expectErr: `invalid element at index 1 of list "parent_refs": invalid "ref" field: parent ref "catalog.v1alpha1.Service/default.local.default/api" for port "http" covered by wildcard port already`, - }, - "good single parent ref": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", "http"), - }, - }, - "good muliple parent refs": { - refs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "api", "http"), - newParentRef(catalog.ServiceType, "web", ""), - }, - }, - } -} - -type xRouteBackendRefTestcase struct { - refs []*pbmesh.BackendReference - expectErr string -} - -func getXRouteBackendRefTestCases() map[string]xRouteBackendRefTestcase { - return map[string]xRouteBackendRefTestcase{ - "no backend refs": { - expectErr: `invalid "backend_refs" field: cannot be empty`, - }, - "backend ref with nil ref": { - refs: []*pbmesh.BackendReference{ - newBackendRef(catalog.ServiceType, "api", ""), - { - Ref: nil, - Port: "http", - }, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 1 of list "backend_refs": invalid "backend_ref" field: invalid "ref" field: missing required field`, - }, - "backend ref with bad type ref": { - refs: []*pbmesh.BackendReference{ - newBackendRef(catalog.ServiceType, "api", ""), - newBackendRef(catalog.WorkloadType, "api", ""), - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 1 of list "backend_refs": invalid "backend_ref" field: invalid "ref" field: reference must have type catalog.v1alpha1.Service`, - }, - "backend ref with section": { - refs: []*pbmesh.BackendReference{ - newBackendRef(catalog.ServiceType, "api", ""), - { - Ref: resourcetest.Resource(catalog.ServiceType, "web").Reference("section2"), - Port: "http", - }, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 1 of list "backend_refs": invalid "backend_ref" field: invalid "ref" field: invalid "section" field: section not supported for service backend refs`, - }, - "backend ref with datacenter": { - refs: []*pbmesh.BackendReference{ - newBackendRef(catalog.ServiceType, "api", ""), - { - Ref: newRef(catalog.ServiceType, "db"), - Port: "http", - Datacenter: "dc2", - }, - }, - expectErr: `invalid element at index 0 of list "rules": invalid element at index 1 of list "backend_refs": invalid "backend_ref" field: invalid "datacenter" field: datacenter is not yet supported on backend refs`, - }, - "good backend ref": { - refs: []*pbmesh.BackendReference{ - newBackendRef(catalog.ServiceType, "api", ""), - { - Ref: newRef(catalog.ServiceType, "db"), - Port: "http", - }, - }, - }, - } -} - -type xRouteTimeoutsTestcase struct { - timeouts *pbmesh.HTTPRouteTimeouts - expectErr string -} - -func getXRouteTimeoutsTestCases() map[string]xRouteTimeoutsTestcase { - return map[string]xRouteTimeoutsTestcase{ - "bad request": { - timeouts: &pbmesh.HTTPRouteTimeouts{ - Request: durationpb.New(-1 * time.Second), - }, - expectErr: `invalid element at index 0 of list "rules": invalid "timeouts" field: invalid "request" field: timeout cannot be negative: -1s`, - }, - "bad backend request": { - timeouts: &pbmesh.HTTPRouteTimeouts{ - BackendRequest: durationpb.New(-1 * time.Second), - }, - expectErr: `invalid element at index 0 of list "rules": invalid "timeouts" field: invalid "backend_request" field: timeout cannot be negative: -1s`, - }, - "bad idle": { - timeouts: &pbmesh.HTTPRouteTimeouts{ - Idle: durationpb.New(-1 * time.Second), - }, - expectErr: `invalid element at index 0 of list "rules": invalid "timeouts" field: invalid "idle" field: timeout cannot be negative: -1s`, - }, - "good all": { - timeouts: &pbmesh.HTTPRouteTimeouts{ - Request: durationpb.New(1 * time.Second), - BackendRequest: durationpb.New(2 * time.Second), - Idle: durationpb.New(3 * time.Second), - }, - }, - } -} - -type xRouteRetriesTestcase struct { - retries *pbmesh.HTTPRouteRetries - expectErr string -} - -func getXRouteRetriesTestCases() map[string]xRouteRetriesTestcase { - return map[string]xRouteRetriesTestcase{ - "bad number": { - retries: &pbmesh.HTTPRouteRetries{ - Number: -5, - }, - expectErr: `invalid element at index 0 of list "rules": invalid "retries" field: invalid "number" field: cannot be negative: -5`, - }, - "bad conditions": { - retries: &pbmesh.HTTPRouteRetries{ - OnConditions: []string{"garbage"}, - }, - expectErr: `invalid element at index 0 of list "rules": invalid "retries" field: invalid element at index 0 of list "on_conditions": not a valid retry condition: "garbage"`, - }, - "good all": { - retries: &pbmesh.HTTPRouteRetries{ - Number: 5, - OnConditions: []string{"internal"}, - }, - }, - } -} - -func newRef(typ *pbresource.Type, name string) *pbresource.Reference { - return resourcetest.Resource(typ, name).Reference("") -} - -func newBackendRef(typ *pbresource.Type, name, port string) *pbmesh.BackendReference { - return &pbmesh.BackendReference{ - Ref: newRef(typ, name), - Port: port, - } -} - -func newParentRef(typ *pbresource.Type, name, port string) *pbmesh.ParentReference { - return &pbmesh.ParentReference{ - Ref: newRef(typ, name), - Port: port, - } -} diff --git a/internal/mesh/internal/types/proxy_configuration.go b/internal/mesh/internal/types/proxy_configuration.go index e85a00494f0f9..9205dc81b132a 100644 --- a/internal/mesh/internal/types/proxy_configuration.go +++ b/internal/mesh/internal/types/proxy_configuration.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -16,7 +16,7 @@ const ( var ( ProxyConfigurationV1Alpha1Type = &pbresource.Type{ Group: GroupName, - GroupVersion: VersionV1Alpha1, + GroupVersion: CurrentVersion, Kind: ProxyConfigurationKind, } @@ -25,9 +25,8 @@ var ( func RegisterProxyConfiguration(r resource.Registry) { r.Register(resource.Registration{ - Type: ProxyConfigurationV1Alpha1Type, - Proto: &pbmesh.ProxyConfiguration{}, - // TODO(rb): add validation for proxy configuration + Type: ProxyConfigurationV1Alpha1Type, + Proto: &pbmesh.ProxyConfiguration{}, Validate: nil, }) } diff --git a/internal/mesh/internal/types/proxy_state_template.go b/internal/mesh/internal/types/proxy_state_template.go deleted file mode 100644 index 526e0e48cb5af..0000000000000 --- a/internal/mesh/internal/types/proxy_state_template.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - ProxyStateTemplateKind = "ProxyStateTemplate" -) - -var ( - ProxyStateTemplateV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: ProxyStateTemplateKind, - } - - ProxyStateTemplateType = ProxyStateTemplateV1Alpha1Type -) - -func RegisterProxyStateTemplate(r resource.Registry) { - r.Register(resource.Registration{ - Type: ProxyStateTemplateV1Alpha1Type, - Proto: &pbmesh.ProxyStateTemplate{}, - Validate: nil, - ACLs: &resource.ACLHooks{ - Read: func(authorizer acl.Authorizer, authzContext *acl.AuthorizerContext, id *pbresource.ID) error { - // Check service:read and operator:read permissions. - // If service:read is not allowed, check operator:read. We want to allow both as this - // resource is mostly useful for debuggability and we want to cover - // the most cases that serve that purpose. - serviceReadErr := authorizer.ToAllowAuthorizer().ServiceReadAllowed(id.Name, authzContext) - operatorReadErr := authorizer.ToAllowAuthorizer().OperatorReadAllowed(authzContext) - - switch { - case serviceReadErr != nil: - return serviceReadErr - case operatorReadErr != nil: - return operatorReadErr - } - - return nil - }, - Write: func(authorizer acl.Authorizer, authzContext *acl.AuthorizerContext, p *pbresource.Resource) error { - // Require operator:write only for "break-glass" scenarios as this resource should be mostly - // managed by a controller. - return authorizer.ToAllowAuthorizer().OperatorWriteAllowed(authzContext) - }, - List: func(authorizer acl.Authorizer, authzContext *acl.AuthorizerContext) error { - // No-op List permission as we want to default to filtering resources - // from the list using the Read enforcement. - return nil - }, - }, - }) -} diff --git a/internal/mesh/internal/types/tcp_route.go b/internal/mesh/internal/types/tcp_route.go deleted file mode 100644 index c7a6ccf874303..0000000000000 --- a/internal/mesh/internal/types/tcp_route.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - TCPRouteKind = "TCPRoute" -) - -var ( - TCPRouteV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: TCPRouteKind, - } - - TCPRouteType = TCPRouteV1Alpha1Type -) - -func RegisterTCPRoute(r resource.Registry) { - r.Register(resource.Registration{ - Type: TCPRouteV1Alpha1Type, - Proto: &pbmesh.TCPRoute{}, - // TODO(rb): normalize parent/backend ref tenancies in a Mutate hook - Validate: ValidateTCPRoute, - }) -} - -func ValidateTCPRoute(res *pbresource.Resource) error { - var route pbmesh.TCPRoute - - if err := res.Data.UnmarshalTo(&route); err != nil { - return resource.NewErrDataParse(&route, err) - } - - var merr error - - if err := validateParentRefs(route.ParentRefs); err != nil { - merr = multierror.Append(merr, err) - } - - for i, rule := range route.Rules { - wrapRuleErr := func(err error) error { - return resource.ErrInvalidListElement{ - Name: "rules", - Index: i, - Wrapped: err, - } - } - - if len(rule.BackendRefs) == 0 { - /* - BackendRefs (optional)¶ - - BackendRefs defines API objects where matching requests should be - sent. If unspecified, the rule performs no forwarding. If - unspecified and no filters are specified that would result in a - response being sent, a 404 error code is returned. - */ - merr = multierror.Append(merr, wrapRuleErr( - resource.ErrInvalidField{ - Name: "backend_refs", - Wrapped: resource.ErrEmpty, - }, - )) - } - for j, hbref := range rule.BackendRefs { - wrapBackendRefErr := func(err error) error { - return wrapRuleErr(resource.ErrInvalidListElement{ - Name: "backend_refs", - Index: j, - Wrapped: err, - }) - } - for _, err := range validateBackendRef(hbref.BackendRef) { - merr = multierror.Append(merr, wrapBackendRefErr( - resource.ErrInvalidField{ - Name: "backend_ref", - Wrapped: err, - }, - )) - } - } - } - - return merr -} diff --git a/internal/mesh/internal/types/tcp_route_test.go b/internal/mesh/internal/types/tcp_route_test.go deleted file mode 100644 index 2619a06a3ac28..0000000000000 --- a/internal/mesh/internal/types/tcp_route_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource/resourcetest" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestValidateTCPRoute(t *testing.T) { - type testcase struct { - route *pbmesh.TCPRoute - expectErr string - } - - run := func(t *testing.T, tc testcase) { - res := resourcetest.Resource(TCPRouteType, "api"). - WithData(t, tc.route). - Build() - - err := ValidateTCPRoute(res) - - // Verify that validate didn't actually change the object. - got := resourcetest.MustDecode[*pbmesh.TCPRoute](t, res) - prototest.AssertDeepEqual(t, tc.route, got.Data) - - if tc.expectErr == "" { - require.NoError(t, err) - } else { - testutil.RequireErrorContains(t, err, tc.expectErr) - } - } - - cases := map[string]testcase{} - - // Add common parent refs test cases. - for name, parentTC := range getXRouteParentRefTestCases() { - cases["parent-ref: "+name] = testcase{ - route: &pbmesh.TCPRoute{ - ParentRefs: parentTC.refs, - }, - expectErr: parentTC.expectErr, - } - } - // add common backend ref test cases. - for name, backendTC := range getXRouteBackendRefTestCases() { - var refs []*pbmesh.TCPBackendRef - for _, br := range backendTC.refs { - refs = append(refs, &pbmesh.TCPBackendRef{ - BackendRef: br, - }) - } - cases["backend-ref: "+name] = testcase{ - route: &pbmesh.TCPRoute{ - ParentRefs: []*pbmesh.ParentReference{ - newParentRef(catalog.ServiceType, "web", ""), - }, - Rules: []*pbmesh.TCPRouteRule{ - {BackendRefs: refs}, - }, - }, - expectErr: backendTC.expectErr, - } - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} diff --git a/internal/mesh/internal/types/types.go b/internal/mesh/internal/types/types.go index 3b800f36d7dc1..3eeb69bd101c2 100644 --- a/internal/mesh/internal/types/types.go +++ b/internal/mesh/internal/types/types.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -16,11 +16,4 @@ const ( func Register(r resource.Registry) { RegisterProxyConfiguration(r) RegisterUpstreams(r) - RegisterUpstreamsConfiguration(r) - RegisterProxyStateTemplate(r) - RegisterHTTPRoute(r) - RegisterTCPRoute(r) - RegisterGRPCRoute(r) - RegisterDestinationPolicy(r) - RegisterComputedRoutes(r) } diff --git a/internal/mesh/internal/types/types_test.go b/internal/mesh/internal/types/types_test.go index b481a75d0ad55..4324e87078301 100644 --- a/internal/mesh/internal/types/types_test.go +++ b/internal/mesh/internal/types/types_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/internal/mesh/internal/types/upstreams.go b/internal/mesh/internal/types/upstreams.go index f96e40d1ff41b..54fd14b098d55 100644 --- a/internal/mesh/internal/types/upstreams.go +++ b/internal/mesh/internal/types/upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types @@ -16,7 +16,7 @@ const ( var ( UpstreamsV1Alpha1Type = &pbresource.Type{ Group: GroupName, - GroupVersion: VersionV1Alpha1, + GroupVersion: CurrentVersion, Kind: UpstreamsKind, } diff --git a/internal/mesh/internal/types/upstreams_configuration.go b/internal/mesh/internal/types/upstreams_configuration.go deleted file mode 100644 index ae7ba0d5b0736..0000000000000 --- a/internal/mesh/internal/types/upstreams_configuration.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - UpstreamsConfigurationKind = "UpstreamsConfiguration" -) - -var ( - UpstreamsConfigurationV1Alpha1Type = &pbresource.Type{ - Group: GroupName, - GroupVersion: VersionV1Alpha1, - Kind: UpstreamsConfigurationKind, - } - - UpstreamsConfigurationType = UpstreamsConfigurationV1Alpha1Type -) - -func RegisterUpstreamsConfiguration(r resource.Registry) { - r.Register(resource.Registration{ - Type: UpstreamsConfigurationV1Alpha1Type, - Proto: &pbmesh.UpstreamsConfiguration{}, - Validate: nil, - }) -} diff --git a/internal/mesh/internal/types/util.go b/internal/mesh/internal/types/util.go deleted file mode 100644 index 5a0e45d0201e7..0000000000000 --- a/internal/mesh/internal/types/util.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -func IsRouteType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, HTTPRouteType), - resource.EqualType(typ, GRPCRouteType), - resource.EqualType(typ, TCPRouteType): - return true - } - return false -} - -func IsFailoverPolicyType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, catalog.FailoverPolicyType): - return true - } - return false -} - -func IsDestinationPolicyType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, DestinationPolicyType): - return true - } - return false -} - -func IsServiceType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, catalog.ServiceType): - return true - } - return false -} - -func IsComputedRoutesType(typ *pbresource.Type) bool { - switch { - case resource.EqualType(typ, ComputedRoutesType): - return true - } - return false -} diff --git a/internal/mesh/internal/types/xroute.go b/internal/mesh/internal/types/xroute.go deleted file mode 100644 index 572e7f53138b6..0000000000000 --- a/internal/mesh/internal/types/xroute.go +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package types - -import ( - "errors" - "fmt" - - "github.com/hashicorp/go-multierror" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/internal/catalog" - "github.com/hashicorp/consul/internal/resource" - pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" -) - -type XRouteData interface { - proto.Message - XRouteWithRefs -} - -type XRouteWithRefs interface { - GetParentRefs() []*pbmesh.ParentReference - GetUnderlyingBackendRefs() []*pbmesh.BackendReference -} - -type portedRefKey struct { - Key resource.ReferenceKey - Port string -} - -func validateParentRefs(parentRefs []*pbmesh.ParentReference) error { - var merr error - if len(parentRefs) == 0 { - merr = multierror.Append(merr, resource.ErrInvalidField{ - Name: "parent_refs", - Wrapped: resource.ErrEmpty, - }) - } - - var ( - seen = make(map[portedRefKey]struct{}) - seenAny = make(map[resource.ReferenceKey][]string) - ) - for i, parent := range parentRefs { - wrapErr := func(err error) error { - return resource.ErrInvalidListElement{ - Name: "parent_refs", - Index: i, - Wrapped: err, - } - } - if parent.Ref == nil { - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrMissing, - }, - )) - } else { - if !IsServiceType(parent.Ref.Type) { - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidReferenceType{ - AllowedType: catalog.ServiceType, - }, - }, - )) - } - if parent.Ref.Section != "" { - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidField{ - Name: "section", - Wrapped: errors.New("section not supported for service parent refs"), - }, - }, - )) - } - - prk := portedRefKey{ - Key: resource.NewReferenceKey(parent.Ref), - Port: parent.Port, - } - - _, portExist := seen[prk] - - if parent.Port == "" { - coveredPorts, exactExists := seenAny[prk.Key] - - if portExist { // check for duplicate wild - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: fmt.Errorf( - "parent ref %q for wildcard port exists twice", - resource.ReferenceToString(parent.Ref), - ), - }, - )) - } else if exactExists { // check for existing exact - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: fmt.Errorf( - "parent ref %q for ports %v covered by wildcard port already", - resource.ReferenceToString(parent.Ref), - coveredPorts, - ), - }, - )) - } else { - seen[prk] = struct{}{} - } - - } else { - prkWild := prk - prkWild.Port = "" - _, wildExist := seen[prkWild] - - if portExist { // check for duplicate exact - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: fmt.Errorf( - "parent ref %q for port %q exists twice", - resource.ReferenceToString(parent.Ref), - parent.Port, - ), - }, - )) - } else if wildExist { // check for existing wild - merr = multierror.Append(merr, wrapErr( - resource.ErrInvalidField{ - Name: "ref", - Wrapped: fmt.Errorf( - "parent ref %q for port %q covered by wildcard port already", - resource.ReferenceToString(parent.Ref), - parent.Port, - ), - }, - )) - } else { - seen[prk] = struct{}{} - seenAny[prk.Key] = append(seenAny[prk.Key], parent.Port) - } - } - } - } - - return merr -} - -func validateBackendRef(backendRef *pbmesh.BackendReference) []error { - var errs []error - if backendRef == nil { - errs = append(errs, resource.ErrMissing) - - } else if backendRef.Ref == nil { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrMissing, - }) - - } else { - if !IsServiceType(backendRef.Ref.Type) { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidReferenceType{ - AllowedType: catalog.ServiceType, - }, - }) - } - - if backendRef.Ref.Section != "" { - errs = append(errs, resource.ErrInvalidField{ - Name: "ref", - Wrapped: resource.ErrInvalidField{ - Name: "section", - Wrapped: errors.New("section not supported for service backend refs"), - }, - }) - } - - if backendRef.Datacenter != "" { - errs = append(errs, resource.ErrInvalidField{ - Name: "datacenter", - Wrapped: errors.New("datacenter is not yet supported on backend refs"), - }) - } - } - return errs -} - -func validateHeaderMatchType(typ pbmesh.HeaderMatchType) error { - switch typ { - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED: - return resource.ErrMissing - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_EXACT: - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_REGEX: - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_PRESENT: - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_PREFIX: - case pbmesh.HeaderMatchType_HEADER_MATCH_TYPE_SUFFIX: - default: - return fmt.Errorf("not a supported enum value: %v", typ) - } - return nil -} - -func validateHTTPTimeouts(timeouts *pbmesh.HTTPRouteTimeouts) []error { - if timeouts == nil { - return nil - } - - var errs []error - - if timeouts.Request != nil { - val := timeouts.Request.AsDuration() - if val < 0 { - errs = append(errs, resource.ErrInvalidField{ - Name: "request", - Wrapped: fmt.Errorf("timeout cannot be negative: %v", val), - }) - } - } - if timeouts.BackendRequest != nil { - val := timeouts.BackendRequest.AsDuration() - if val < 0 { - errs = append(errs, resource.ErrInvalidField{ - Name: "backend_request", - Wrapped: fmt.Errorf("timeout cannot be negative: %v", val), - }) - } - } - if timeouts.Idle != nil { - val := timeouts.Idle.AsDuration() - if val < 0 { - errs = append(errs, resource.ErrInvalidField{ - Name: "idle", - Wrapped: fmt.Errorf("timeout cannot be negative: %v", val), - }) - } - } - - return errs -} - -func validateHTTPRetries(retries *pbmesh.HTTPRouteRetries) []error { - if retries == nil { - return nil - } - - var errs []error - - if retries.Number < 0 { - errs = append(errs, resource.ErrInvalidField{ - Name: "number", - Wrapped: fmt.Errorf("cannot be negative: %v", retries.Number), - }) - } - - for i, condition := range retries.OnConditions { - if !isValidRetryCondition(condition) { - errs = append(errs, resource.ErrInvalidListElement{ - Name: "on_conditions", - Index: i, - Wrapped: fmt.Errorf("not a valid retry condition: %q", condition), - }) - } - } - - return errs -} - -func isValidRetryCondition(retryOn string) bool { - switch retryOn { - case "5xx", - "gateway-error", - "reset", - "connect-failure", - "envoy-ratelimited", - "retriable-4xx", - "refused-stream", - "cancelled", - "deadline-exceeded", - "internal", - "resource-exhausted", - "unavailable": - return true - default: - return false - } -} diff --git a/internal/protohcl/any.go b/internal/protohcl/any.go deleted file mode 100644 index 87b4549bfd079..0000000000000 --- a/internal/protohcl/any.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - "strings" - - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/types/known/anypb" -) - -const wellKnownTypeAny = "google.protobuf.Any" - -type AnyTypeProvider interface { - AnyType(*UnmarshalContext, MessageDecoder) (protoreflect.FullName, MessageDecoder, error) -} - -type AnyTypeURLProvider struct { - TypeURLFieldName string -} - -func (p *AnyTypeURLProvider) AnyType(ctx *UnmarshalContext, decoder MessageDecoder) (protoreflect.FullName, MessageDecoder, error) { - typeURLFieldName := "type_url" - if p != nil { - typeURLFieldName = p.TypeURLFieldName - } - - var typeURL *IterField - err := decoder.EachField(FieldIterator{ - Desc: (&anypb.Any{}).ProtoReflect().Descriptor(), - Func: func(field *IterField) error { - if field.Name == typeURLFieldName { - typeURL = field - } - return nil - }, - IgnoreUnknown: true, - }) - if err != nil { - return "", nil, err - } - - if typeURL == nil || typeURL.Val == nil { - return "", nil, fmt.Errorf("%s field is required to decode Any", typeURLFieldName) - } - - url, err := stringFromCty(*typeURL.Val) - if err != nil { - return "", nil, err - } - - slashIdx := strings.LastIndex(url, "/") - typeName := url - // strip all "hostname" parts of the URL path - if slashIdx > 1 && slashIdx+1 < len(url) { - typeName = url[slashIdx+1:] - } - - return protoreflect.FullName(typeName), decoder.SkipFields(typeURLFieldName), nil -} - -func (u UnmarshalOptions) decodeAny(ctx *UnmarshalContext, decoder MessageDecoder, msg protoreflect.Message) error { - var typeProvider AnyTypeProvider = &AnyTypeURLProvider{TypeURLFieldName: "type_url"} - if u.AnyTypeProvider != nil { - typeProvider = u.AnyTypeProvider - } - - var ( - typeName protoreflect.FullName - err error - ) - typeName, decoder, err = typeProvider.AnyType(ctx, decoder) - if err != nil { - return fmt.Errorf("error getting type for Any field: %w", err) - } - - // the type.googleapis.come/ should be optional - mt, err := protoregistry.GlobalTypes.FindMessageByName(typeName) - if err != nil { - return fmt.Errorf("error looking up type information for %s: %w", typeName, err) - } - - newMsg := mt.New() - - err = u.decodeMessage(&UnmarshalContext{ - Parent: ctx.Parent, - Name: ctx.Name, - Message: newMsg, - }, decoder, newMsg) - if err != nil { - return err - } - - enc, err := proto.Marshal(newMsg.Interface()) - if err != nil { - return fmt.Errorf("error marshalling Any data as protobuf value: %w", err) - } - - anyValue := msg.Interface().(*anypb.Any) - - // This will look like . and not quite like a full URL with a path - anyValue.TypeUrl = string(newMsg.Descriptor().FullName()) - anyValue.Value = enc - - return nil -} - -func isAnyField(desc protoreflect.FieldDescriptor) bool { - if desc.Kind() != protoreflect.MessageKind { - return false - } - return desc.Message().FullName() == wellKnownTypeAny -} diff --git a/internal/protohcl/attributes.go b/internal/protohcl/attributes.go deleted file mode 100644 index 90501722b1fe3..0000000000000 --- a/internal/protohcl/attributes.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - - "github.com/pkg/errors" - "github.com/zclconf/go-cty/cty" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (u UnmarshalOptions) decodeAttribute(ctx *UnmarshalContext, newMessage newMessageFn, f protoreflect.FieldDescriptor, val cty.Value, listAllowed bool) (protoreflect.Value, error) { - if f.IsMap() { - return u.decodeAttributeToMap(ctx, newMessage, f, val) - } - - if f.IsList() && listAllowed { - return u.decodeAttributeToList(ctx, newMessage, f, val) - } - - ok, value, err := decodeAttributeToWellKnownType(f, val) - if ok { - return value, errors.Wrapf(err, "%s: Failed to unmarshal argument %s", ctx.ErrorRange(), ctx.Name) - } - - ok, value, err = u.decodeAttributeToMessage(ctx, newMessage, f, val) - if ok { - return value, err - } - - value, err = decodeAttributeToPrimitive(f, val) - if err != nil { - return value, errors.Wrapf(err, "%s: Failed to unmarshal argument %s", ctx.ErrorRange(), ctx.Name) - } - return value, nil -} - -func (u UnmarshalOptions) decodeAttributeToMessage(ctx *UnmarshalContext, newMessage newMessageFn, desc protoreflect.FieldDescriptor, val cty.Value) (bool, protoreflect.Value, error) { - if desc.Kind() != protoreflect.MessageKind { - return false, protoreflect.Value{}, nil - } - - msg := newMessage().Message() - - ctx = &UnmarshalContext{ - Parent: ctx.Parent, - Name: ctx.Name, - Message: msg, - Range: ctx.Range, - } - - // We have limited support for HCL functions, essentially just those that - // return a protobuf message (like the resource `gvk` function) in which - // case, the message will be wrapped in a cty capsule. - if val.Type().IsCapsuleType() { - msg, ok := val.EncapsulatedValue().(proto.Message) - if ok { - return true, protoreflect.ValueOf(msg.ProtoReflect()), nil - } else { - return true, protoreflect.Value{}, fmt.Errorf("expected encapsulated value to be a message, actual type: %T", val.EncapsulatedValue()) - } - } - - if !val.Type().IsObjectType() { - return false, protoreflect.Value{}, nil - } - - decoder := newObjectDecoder(val, u.FieldNamer, ctx.ErrorRange()) - - if err := u.decodeMessage(ctx, decoder, msg); err != nil { - return true, protoreflect.Value{}, err - } - return true, protoreflect.ValueOf(msg), nil -} - -func (u UnmarshalOptions) decodeAttributeToList(ctx *UnmarshalContext, newMessage newMessageFn, desc protoreflect.FieldDescriptor, value cty.Value) (protoreflect.Value, error) { - if value.IsNull() { - return protoreflect.Value{}, nil - } - - valueType := value.Type() - if !valueType.IsListType() && !valueType.IsTupleType() { - return protoreflect.Value{}, fmt.Errorf("expected list/tuple type after HCL decode but the actual type was %s", valueType.FriendlyName()) - } - - if value.LengthInt() < 1 { - return protoreflect.Value{}, nil - } - - protoList := newMessage().List() - - var err error - var idx int - value.ForEachElement(func(_ cty.Value, val cty.Value) bool { - var protoVal protoreflect.Value - protoVal, err = u.decodeAttribute(&UnmarshalContext{ - Parent: ctx, - Name: fmt.Sprintf("%s[%d]", u.FieldNamer.NameField(desc), idx), - }, protoList.NewElement, desc, val, false) - if err != nil { - return true - } - - idx++ - protoList.Append(protoVal) - return false - }) - if err != nil { - return protoreflect.Value{}, err - } - - return protoreflect.ValueOfList(protoList), nil -} - -func (u UnmarshalOptions) decodeAttributeToMap(ctx *UnmarshalContext, newMessage newMessageFn, desc protoreflect.FieldDescriptor, value cty.Value) (protoreflect.Value, error) { - if value.IsNull() { - return protoreflect.Value{}, nil - } - - valueType := value.Type() - if !valueType.IsMapType() && !valueType.IsObjectType() { - return protoreflect.Value{}, fmt.Errorf("expected map/object type after HCL decode but the actual type was %s", valueType.FriendlyName()) - } - - if value.LengthInt() < 1 { - return protoreflect.Value{}, nil - } - - protoMap := newMessage().Map() - protoValueDesc := desc.MapValue() - var err error - - value.ForEachElement(func(key cty.Value, val cty.Value) (stop bool) { - var protoVal protoreflect.Value - protoVal, err = u.decodeAttribute(&UnmarshalContext{ - Parent: ctx, - Name: fmt.Sprintf("%s[%q]", u.FieldNamer.NameField(desc), key.AsString()), - Message: nil, // TODO: what should this really be? - }, protoMap.NewValue, protoValueDesc, val, false) - if err != nil { - return true - } - if protoVal.IsValid() { - // HCL doesn't support non-string keyed maps so we blindly use string keys - protoMap.Set(protoreflect.ValueOfString(key.AsString()).MapKey(), protoVal) - } - return false - }) - if err != nil { - return protoreflect.Value{}, err - } - - return protoreflect.ValueOfMap(protoMap), nil -} diff --git a/internal/protohcl/blocks.go b/internal/protohcl/blocks.go deleted file mode 100644 index cafffa99367da..0000000000000 --- a/internal/protohcl/blocks.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - - "github.com/hashicorp/hcl/v2" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (u UnmarshalOptions) decodeBlocks(ctx *UnmarshalContext, blocks hcl.Blocks, msg protoreflect.Message, f protoreflect.FieldDescriptor) (protoreflect.Value, error) { - if f.Kind() != protoreflect.MessageKind { - return protoreflect.Value{}, fmt.Errorf("only protobuf message kinds can use HCL block syntax") - } - - if f.IsMap() { - return u.decodeBlocksToMap(ctx, blocks, msg, f) - } - - if f.IsList() { - return u.decodeBlocksToList(ctx, blocks, msg, f) - } - - return u.decodeBlocksToMessage(ctx, blocks, msg, f) -} - -func (u UnmarshalOptions) decodeBlocksToMap(ctx *UnmarshalContext, blocks hcl.Blocks, msg protoreflect.Message, f protoreflect.FieldDescriptor) (protoreflect.Value, error) { - val := msg.NewField(f) - mapVal := val.Map() - - for _, block := range blocks { - if len(block.Labels) != 1 { - return protoreflect.Value{}, fmt.Errorf("protobuf map fields must have 1 HCL block label") - } - - key := protoreflect.ValueOfString(block.Labels[0]) - value := mapVal.NewValue() - msgVal := value.Message() - - err := u.decodeMessage( - &UnmarshalContext{ - Parent: ctx, - Name: fmt.Sprintf("%s[%q]", u.FieldNamer.NameField(f), block.Labels[0]), - Message: msgVal, - Range: block.DefRange, - }, - u.bodyDecoder(block.Body), - msgVal, - ) - if err != nil { - return protoreflect.Value{}, err - } - - mapVal.Set(key.MapKey(), value) - } - return val, nil -} - -func (u UnmarshalOptions) decodeBlocksToList(ctx *UnmarshalContext, blocks hcl.Blocks, msg protoreflect.Message, f protoreflect.FieldDescriptor) (protoreflect.Value, error) { - val := msg.NewField(f) - listVal := val.List() - - var err error - for idx, block := range blocks { - if len(block.Labels) > 0 { - return protoreflect.Value{}, fmt.Errorf("repeated protobuf fields must not have HCL block labels") - } - elem := listVal.NewElement() - elemMsg := elem.Message() - - err = u.decodeMessage( - &UnmarshalContext{ - Parent: ctx, - Name: fmt.Sprintf("%s[%d]", u.FieldNamer.NameField(f), idx), - Message: elemMsg, - Range: block.DefRange, - }, - u.bodyDecoder(block.Body), - elemMsg, - ) - if err != nil { - return protoreflect.Value{}, err - } - listVal.Append(elem) - } - - return val, nil -} - -func (u UnmarshalOptions) decodeBlocksToMessage(ctx *UnmarshalContext, blocks hcl.Blocks, msg protoreflect.Message, f protoreflect.FieldDescriptor) (protoreflect.Value, error) { - if len(blocks) > 1 { - return protoreflect.Value{}, fmt.Errorf("only one HCL block may be specified for a non-repeated protobuf Message") - } - - val := msg.NewField(f) - valMsg := val.Message() - - err := u.decodeMessage( - &UnmarshalContext{ - Parent: ctx, - Name: blocks[0].Type, - Message: valMsg, - Range: blocks[0].DefRange, - }, - u.bodyDecoder(blocks[0].Body), - valMsg, - ) - if err != nil { - return protoreflect.Value{}, err - } - - return val, nil -} diff --git a/internal/protohcl/cty.go b/internal/protohcl/cty.go deleted file mode 100644 index e7ed37ed16996..0000000000000 --- a/internal/protohcl/cty.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "encoding/base64" - "fmt" - - "github.com/zclconf/go-cty/cty" - "github.com/zclconf/go-cty/cty/gocty" -) - -func boolFromCty(val cty.Value) (bool, error) { - if val.Type() != cty.Bool { - return false, fmt.Errorf("expected value of type %s but actual type is %s", cty.Bool.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return false, nil - } - - return val.True(), nil -} - -func int32FromCty(val cty.Value) (int32, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal int32 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to int32: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func uint32FromCty(val cty.Value) (uint32, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal uint32 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to uint32: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func int64FromCty(val cty.Value) (int64, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal int64 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to int64: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func uint64FromCty(val cty.Value) (uint64, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal uint64 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to uint64: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func floatFromCty(val cty.Value) (float32, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal float32 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to float32: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func doubleFromCty(val cty.Value) (float64, error) { - if val.Type() != cty.Number { - return 0, fmt.Errorf("expected value of type %s but actual type is %s", cty.Number.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return 0, nil - } - - var goVal float64 - if err := gocty.FromCtyValue(val, &goVal); err != nil { - return 0, fmt.Errorf("error converting cty value of type %s to float64: %w", val.Type().FriendlyName(), err) - } - return goVal, nil -} - -func stringFromCty(val cty.Value) (string, error) { - if val.Type() != cty.String { - return "", fmt.Errorf("expected value of type %s but actual type is %s", cty.String.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return "", nil - } - return val.AsString(), nil -} - -func bytesFromCty(val cty.Value) ([]byte, error) { - if val.Type() != cty.String { - return nil, fmt.Errorf("expected value of type %s but actual type is %s", cty.String.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - return nil, nil - } - - encoded := val.AsString() - decoded, err := base64.StdEncoding.DecodeString(encoded) - if err != nil { - return nil, fmt.Errorf("error base64 decoding byte string: %w", err) - } - - return decoded, nil -} diff --git a/internal/protohcl/decoder.go b/internal/protohcl/decoder.go deleted file mode 100644 index 67ee074ec1c00..0000000000000 --- a/internal/protohcl/decoder.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - "sort" - - "github.com/hashicorp/hcl/v2" - "github.com/zclconf/go-cty/cty" - "github.com/zclconf/go-cty/cty/function" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// MessageDecoder provides an abstract way to decode protobuf messages from HCL -// blocks or objects. -type MessageDecoder interface { - // EachField calls the given iterator for each field provided in the HCL source. - EachField(iter FieldIterator) error - - // SkipFields returns a MessageDecoder that skips over the given fields. It is - // primarily used for doing two-pass decoding of protobuf `Any` fields. - SkipFields(fields ...string) MessageDecoder -} - -// IterField represents a field discovered by the MessageDecoder. -type IterField struct { - // Name is the HCL name of the field. - Name string - - // Desc is the protobuf field descriptor. - Desc protoreflect.FieldDescriptor - - // Val is the field value, only if it was given using HCL attribute syntax. - Val *cty.Value - - // Blocks contains the HCL blocks that were given for this field. - Blocks []*hcl.Block - - // Range determines where in the HCL source the field was given, it is useful - // for error messages. - Range hcl.Range -} - -// FieldIterator is given to MessageDecoder.EachField to iterate over all of the -// fields in a given HCL block or object. -type FieldIterator struct { - // IgnoreUnknown instructs the MessageDecoder to skip over any fields not - // included in Desc. - IgnoreUnknown bool - - // Desc is the protobuf descriptor for the message the caller is decoding into. - // It is used to determine which fields are valid. - Desc protoreflect.MessageDescriptor - - // Func is called for each field in the given HCL block or object. - Func func(field *IterField) error -} - -func newBodyDecoder( - body hcl.Body, - namer FieldNamer, - functions map[string]function.Function, -) MessageDecoder { - return bodyDecoder{ - body: body, - namer: namer, - functions: functions, - skipFields: make(map[string]struct{}), - } -} - -type bodyDecoder struct { - body hcl.Body - namer FieldNamer - functions map[string]function.Function - skipFields map[string]struct{} -} - -func (bd bodyDecoder) EachField(iter FieldIterator) error { - schema, err := bd.schema(iter.Desc) - if err != nil { - return err - } - - var ( - content *hcl.BodyContent - diags hcl.Diagnostics - ) - if iter.IgnoreUnknown { - content, _, diags = bd.body.PartialContent(schema) - } else { - content, diags = bd.body.Content(schema) - } - if diags.HasErrors() { - return diags - } - - fields := make([]*IterField, 0) - - for _, attr := range content.Attributes { - if _, ok := bd.skipFields[attr.Name]; ok { - continue - } - - desc := bd.namer.GetField(iter.Desc.Fields(), attr.Name) - - val, err := attr.Expr.Value(&hcl.EvalContext{Functions: bd.functions}) - if err != nil { - return err - } - - fields = append(fields, &IterField{ - Name: attr.Name, - Desc: desc, - Val: &val, - Range: attr.Expr.Range(), - }) - } - - for blockType, blocks := range content.Blocks.ByType() { - if _, ok := bd.skipFields[blockType]; ok { - continue - } - - desc := bd.namer.GetField(iter.Desc.Fields(), blockType) - - fields = append(fields, &IterField{ - Name: blockType, - Desc: desc, - Blocks: blocks, - }) - } - - // Always handle Any fields last, as decoding them may require type information - // gathered from other fields (e.g. as in the case of Resource GVKs). - sort.Slice(fields, func(a, b int) bool { - if isAnyField(fields[b].Desc) && !isAnyField(fields[a].Desc) { - return true - } - return a < b - }) - - for _, field := range fields { - if err := iter.Func(field); err != nil { - return err - } - } - - return nil -} - -func (bd bodyDecoder) SkipFields(fields ...string) MessageDecoder { - skip := make(map[string]struct{}, len(fields)+len(bd.skipFields)) - for k, v := range bd.skipFields { - skip[k] = v - } - for _, field := range fields { - skip[field] = struct{}{} - } - - // Note: we rely on the fact bd isn't a pointer to copy the struct here. - bd.skipFields = skip - return bd -} - -func (bd bodyDecoder) schema(desc protoreflect.MessageDescriptor) (*hcl.BodySchema, error) { - var schema hcl.BodySchema - - fields := desc.Fields() - for i := 0; i < fields.Len(); i++ { - f := fields.Get(i) - - kind := f.Kind() - // maps are special and whether they use block or attribute syntax depends - // on the value type - if f.IsMap() { - valueDesc := f.MapValue() - valueKind := valueDesc.Kind() - - wktHint := wellKnownTypeSchemaHint(valueDesc) - - // Message types should generally be encoded as blocks unless its a special Well Known Type - // that should use attribute encoding - if valueKind == protoreflect.MessageKind && wktHint != wellKnownAttribute { - schema.Blocks = append(schema.Blocks, hcl.BlockHeaderSchema{ - Type: bd.namer.NameField(f), - LabelNames: []string{"key"}, - }) - continue - } - - // non-message types or Well Known Message types that need attribute encoding - // get decoded as attributes - schema.Attributes = append(schema.Attributes, hcl.AttributeSchema{ - Name: bd.namer.NameField(f), - }) - continue - } - - wktHint := wellKnownTypeSchemaHint(f) - - // message types generally will use block syntax unless its a well known - // message type that requires attribute syntax specifically. - if kind == protoreflect.MessageKind && wktHint != wellKnownAttribute { - schema.Blocks = append(schema.Blocks, hcl.BlockHeaderSchema{ - Type: bd.namer.NameField(f), - }) - } - - // by default use attribute encoding - // - primitives - // - repeated primitives - // - Well Known Types requiring attribute syntax - // - repeated Well Known Types requiring attribute syntax - schema.Attributes = append(schema.Attributes, hcl.AttributeSchema{ - Name: bd.namer.NameField(f), - }) - continue - } - - // Add skipped fields to the schema so HCL doesn't throw an error when it finds them. - for field := range bd.skipFields { - schema.Attributes = append(schema.Attributes, hcl.AttributeSchema{Name: field}) - schema.Blocks = append(schema.Blocks, hcl.BlockHeaderSchema{Type: field}) - } - - return &schema, nil -} - -func newObjectDecoder(object cty.Value, namer FieldNamer, rng hcl.Range) MessageDecoder { - return objectDecoder{ - object: object, - namer: namer, - rng: rng, - skipFields: make(map[string]struct{}), - } -} - -type objectDecoder struct { - object cty.Value - namer FieldNamer - rng hcl.Range - skipFields map[string]struct{} -} - -func (od objectDecoder) EachField(iter FieldIterator) error { - for attr := range od.object.Type().AttributeTypes() { - if _, ok := od.skipFields[attr]; ok { - continue - } - - desc := od.namer.GetField(iter.Desc.Fields(), attr) - if desc == nil { - if iter.IgnoreUnknown { - continue - } else { - return fmt.Errorf("%s: Unsupported argument; An argument named %q is not expected here.", od.rng, attr) - } - } - - val := od.object.GetAttr(attr) - if err := iter.Func(&IterField{ - Name: attr, - Desc: desc, - Val: &val, - }); err != nil { - return err - } - } - return nil -} - -func (od objectDecoder) SkipFields(fields ...string) MessageDecoder { - skip := make(map[string]struct{}, len(fields)+len(od.skipFields)) - for k, v := range od.skipFields { - skip[k] = v - } - for _, field := range fields { - skip[field] = struct{}{} - } - - // Note: we rely on the fact od isn't a pointer to copy the struct here. - od.skipFields = skip - return od -} diff --git a/internal/protohcl/doc.go b/internal/protohcl/doc.go deleted file mode 100644 index e3270f7cdcf19..0000000000000 --- a/internal/protohcl/doc.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -// The protohcl package aims to define a canonical way to translate between -// protobuf and HCL encodings of data. -// -// Similar to google.golang.org/protobuf/encoding/protojson it intends to be -// opinionated about what the canonical HCL representation of a protobuf type -// should be. -// -// As HCL is a user centric data format as opposed to JSON/Protobuf which -// are intended to be used more by machines, efficiency is not a primary goal -// of this package as it is expected that users are either doing the encoding to and -// decoding from HCL at the edge (such as within the Consul CLI) or that even -// when done on servers, the rate that servers perform these translations should -// be low enough to have any inefficiency produce a tangible performance impact. -// -// HCL has two different syntaxes that could be used to represent data: attribute and block -// -// This implementation chooses to represent primitive values, enums and the well known wrapper types and -// collections of these values (maps and repeated fields) with attribute syntax. Other messages and collections -// with message value types will be represented with block syntax for example -// -// message Foo { -// map map_of_ints = 1; -// map map_of_messages = 2; -// } -// -// would have HCL like: -// -// map_of_ints = { -// "foo": 1, -// "bar": 2, -// } -// map_of_messages "foo" { -// ...other fields -// } -// map_of_messages "bar" { -// ...other fields -// } -// -// Similar goes for list of primitives vs list of messages (except the block syntax uses no labels). The differences -// between primitive fields outside of a collection and a message field really just amounts to not having to specify -// the "=" between the field name and the "{" character. -// -// Field Mapping -// | proto3 | HCL Type | example | notes | -// |------------------------+---------------+---------+---------------------------------------------------------------------------------+ -// | message | Object | | Represented as a block | -// | enum | String | | | -// | map | Map | | All keys are converted to/from strings. | -// | repeated V | List | | | -// | bool | Bool | | | -// | string | String | | | -// | bytes | base64 String | | | -// | int32, fixed32, uint32 | Number | | | -// | int64, fixed64, uint64 | Number | | | -// | float, double | Number | | | -// -// ----- Well Known Types ----- -// -// | Any | Object | | | -// | Timestamp | String | | RFC 3339 compliant | -// | Duration | String | | String form is what would be accepted by time.ParseDuration | -// | Struct | Map | | | -// | Empty | Object | | An object with no fields | -// | BoolValue | Bool | | Mostly the same as a regular bool except null values in the HCL are preserved | -// | BytesValue | Bytes | | Mostly the same as a regular bytes except null values in the HCL are preserved | -// | StringValue | String | | Mostly the same as a regular string except null values in the HCL are preserved | -// | FloatValue | Number | | Mostly the same as a regular float except null values in the HCL are preserved | -// | DoubleValue | Number | | Mostly the same as a regular double except null values in the HCL are preserved | -// | Int32Value | Number | | Mostly the same as a regular int32 except null values in the HCL are preserved | -// | UInt32Value | Number | | Mostly the same as a regular uint32 except null values in the HCL are preserved | -// | Int64Value | Number | | Mostly the same as a regular int64 except null values in the HCL are preserved | -// | UInt64Value | Number | | Mostly the same as a regular uint64 except null values in the HCL are preserved | -// | FieldMask | String | | Each string of the FieldMask will be joined with a '.' | -// - -package protohcl diff --git a/internal/protohcl/naming.go b/internal/protohcl/naming.go deleted file mode 100644 index d8eef2275fd7d..0000000000000 --- a/internal/protohcl/naming.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import "google.golang.org/protobuf/reflect/protoreflect" - -type FieldNamer interface { - NameField(protoreflect.FieldDescriptor) string - GetField(protoreflect.FieldDescriptors, string) protoreflect.FieldDescriptor -} - -type textFieldNamer struct{} - -func (textFieldNamer) NameField(fd protoreflect.FieldDescriptor) string { - return fd.TextName() -} - -func (textFieldNamer) GetField(fds protoreflect.FieldDescriptors, name string) protoreflect.FieldDescriptor { - return fds.ByTextName(name) -} diff --git a/internal/protohcl/oneof.go b/internal/protohcl/oneof.go deleted file mode 100644 index 0c95326614bda..0000000000000 --- a/internal/protohcl/oneof.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - "strings" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type oneOfTracker struct { - namer FieldNamer - set map[protoreflect.FullName]string -} - -func newOneOfTracker(namer FieldNamer) *oneOfTracker { - return &oneOfTracker{ - namer: namer, - set: make(map[protoreflect.FullName]string), - } -} - -func (o *oneOfTracker) markFieldAsSet(desc protoreflect.FieldDescriptor) error { - oneof := desc.ContainingOneof() - if oneof == nil { - return nil - } - - oneOfName := oneof.FullName() - - if otherFieldName, ok := o.set[oneOfName]; ok { - oneOfFields := oneof.Fields() - var builder strings.Builder - - for i := 0; i < oneOfFields.Len(); i++ { - name := o.namer.NameField(oneOfFields.Get(i)) - - if i == oneOfFields.Len()-1 { - builder.WriteString(fmt.Sprintf("%q", name)) - } else if i == oneOfFields.Len()-2 { - builder.WriteString(fmt.Sprintf("%q and ", name)) - } else { - builder.WriteString(fmt.Sprintf("%q, ", name)) - } - } - - return fmt.Errorf("Cannot set %q because %q was previously set. Only one of %s may be set.", o.namer.NameField(desc), otherFieldName, builder.String()) - } - - o.set[oneOfName] = o.namer.NameField(desc) - return nil -} diff --git a/internal/protohcl/primitives.go b/internal/protohcl/primitives.go deleted file mode 100644 index 4d1f220330269..0000000000000 --- a/internal/protohcl/primitives.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - - "github.com/zclconf/go-cty/cty" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func decodeAttributeToPrimitive(desc protoreflect.FieldDescriptor, val cty.Value) (protoreflect.Value, error) { - switch kind := desc.Kind(); kind { - case protoreflect.BoolKind: - return protoBoolFromCty(val) - case protoreflect.EnumKind: - return protoEnumFromCty(desc, val) - case protoreflect.Int32Kind: - return protoInt32FromCty(val) - case protoreflect.Sint32Kind: - return protoInt32FromCty(val) - case protoreflect.Uint32Kind: - return protoUint32FromCty(val) - case protoreflect.Int64Kind: - return protoInt64FromCty(val) - case protoreflect.Sint64Kind: - return protoInt64FromCty(val) - case protoreflect.Uint64Kind: - return protoUint64FromCty(val) - case protoreflect.Sfixed32Kind: - return protoInt32FromCty(val) - case protoreflect.Fixed32Kind: - return protoUint32FromCty(val) - case protoreflect.FloatKind: - return protoFloatFromCty(val) - case protoreflect.Sfixed64Kind: - return protoInt64FromCty(val) - case protoreflect.Fixed64Kind: - return protoUint64FromCty(val) - case protoreflect.DoubleKind: - return protoDoubleFromCty(val) - case protoreflect.StringKind: - return protoStringFromCty(val) - case protoreflect.BytesKind: - return protoBytesFromCty(val) - default: - return protoreflect.Value{}, fmt.Errorf("unknown primitive protobuf kind: %q", kind.String()) - } -} - -func protoBoolFromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := boolFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfBool(goVal), nil -} - -func protoEnumFromCty(desc protoreflect.FieldDescriptor, val cty.Value) (protoreflect.Value, error) { - if val.Type() != cty.String { - return protoreflect.Value{}, fmt.Errorf("expected value of type %s but actual type is %s", cty.String.FriendlyName(), val.Type().FriendlyName()) - } - - if val.IsNull() { - defaultValDesc := desc.DefaultEnumValue() - return protoreflect.ValueOfEnum(defaultValDesc.Number()), nil - } - - valDesc := desc.Enum().Values().ByName(protoreflect.Name(val.AsString())) - if valDesc == nil { - defaultValDesc := desc.DefaultEnumValue() - return protoreflect.ValueOfEnum(defaultValDesc.Number()), nil - } - - return protoreflect.ValueOfEnum(valDesc.Number()), nil -} - -func protoInt32FromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := int32FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfInt32(goVal), nil -} - -func protoUint32FromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := uint32FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfUint32(goVal), nil -} - -func protoInt64FromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := int64FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfInt64(goVal), nil -} - -func protoUint64FromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := uint64FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfUint64(goVal), nil -} - -func protoFloatFromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := floatFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfFloat32(goVal), nil -} - -func protoDoubleFromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := doubleFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfFloat64(goVal), nil -} - -func protoStringFromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := stringFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfString(goVal), nil -} - -func protoBytesFromCty(val cty.Value) (protoreflect.Value, error) { - goVal, err := bytesFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoreflect.ValueOfBytes(goVal), nil -} diff --git a/internal/protohcl/testproto/buf.gen.yaml b/internal/protohcl/testproto/buf.gen.yaml deleted file mode 100644 index fecee5cf24962..0000000000000 --- a/internal/protohcl/testproto/buf.gen.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -version: v1 -managed: - enabled: true - go_package_prefix: - default: github.com/hashicorp/consul/internal/protohcl/testproto -plugins: - - name: go - out: . - opt: paths=source_relative diff --git a/internal/protohcl/testproto/example.pb.go b/internal/protohcl/testproto/example.pb.go deleted file mode 100644 index 304eac53d6d90..0000000000000 --- a/internal/protohcl/testproto/example.pb.go +++ /dev/null @@ -1,997 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: example.proto - -package testproto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - structpb "google.golang.org/protobuf/types/known/structpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Protocol int32 - -const ( - Protocol_PROTOCOL_UNSPECIFIED Protocol = 0 - Protocol_PROTOCOL_TCP Protocol = 1 - Protocol_PROTOCOL_UDP Protocol = 2 -) - -// Enum value maps for Protocol. -var ( - Protocol_name = map[int32]string{ - 0: "PROTOCOL_UNSPECIFIED", - 1: "PROTOCOL_TCP", - 2: "PROTOCOL_UDP", - } - Protocol_value = map[string]int32{ - "PROTOCOL_UNSPECIFIED": 0, - "PROTOCOL_TCP": 1, - "PROTOCOL_UDP": 2, - } -) - -func (x Protocol) Enum() *Protocol { - p := new(Protocol) - *p = x - return p -} - -func (x Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_example_proto_enumTypes[0].Descriptor() -} - -func (Protocol) Type() protoreflect.EnumType { - return &file_example_proto_enumTypes[0] -} - -func (x Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Protocol.Descriptor instead. -func (Protocol) EnumDescriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{0} -} - -type Primitives struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DoubleVal float64 `protobuf:"fixed64,1,opt,name=double_val,json=doubleVal,proto3" json:"double_val,omitempty"` - FloatVal float32 `protobuf:"fixed32,2,opt,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"` - Int32Val int32 `protobuf:"varint,3,opt,name=int32_val,json=int32Val,proto3" json:"int32_val,omitempty"` - Int64Val int64 `protobuf:"varint,4,opt,name=int64_val,json=int64Val,proto3" json:"int64_val,omitempty"` - Uint32Val uint32 `protobuf:"varint,5,opt,name=uint32_val,json=uint32Val,proto3" json:"uint32_val,omitempty"` - Uint64Val uint64 `protobuf:"varint,6,opt,name=uint64_val,json=uint64Val,proto3" json:"uint64_val,omitempty"` - Sint32Val int32 `protobuf:"zigzag32,7,opt,name=sint32_val,json=sint32Val,proto3" json:"sint32_val,omitempty"` - Sint64Val int64 `protobuf:"zigzag64,8,opt,name=sint64_val,json=sint64Val,proto3" json:"sint64_val,omitempty"` - Fixed32Val uint32 `protobuf:"fixed32,9,opt,name=fixed32_val,json=fixed32Val,proto3" json:"fixed32_val,omitempty"` - Fixed64Val uint64 `protobuf:"fixed64,10,opt,name=fixed64_val,json=fixed64Val,proto3" json:"fixed64_val,omitempty"` - Sfixed32Val int32 `protobuf:"fixed32,11,opt,name=sfixed32_val,json=sfixed32Val,proto3" json:"sfixed32_val,omitempty"` - Sfixed64Val int64 `protobuf:"fixed64,12,opt,name=sfixed64_val,json=sfixed64Val,proto3" json:"sfixed64_val,omitempty"` - BoolVal bool `protobuf:"varint,13,opt,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"` - StringVal string `protobuf:"bytes,14,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"` - ByteVal []byte `protobuf:"bytes,15,opt,name=byte_val,json=byteVal,proto3" json:"byte_val,omitempty"` -} - -func (x *Primitives) Reset() { - *x = Primitives{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Primitives) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Primitives) ProtoMessage() {} - -func (x *Primitives) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Primitives.ProtoReflect.Descriptor instead. -func (*Primitives) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{0} -} - -func (x *Primitives) GetDoubleVal() float64 { - if x != nil { - return x.DoubleVal - } - return 0 -} - -func (x *Primitives) GetFloatVal() float32 { - if x != nil { - return x.FloatVal - } - return 0 -} - -func (x *Primitives) GetInt32Val() int32 { - if x != nil { - return x.Int32Val - } - return 0 -} - -func (x *Primitives) GetInt64Val() int64 { - if x != nil { - return x.Int64Val - } - return 0 -} - -func (x *Primitives) GetUint32Val() uint32 { - if x != nil { - return x.Uint32Val - } - return 0 -} - -func (x *Primitives) GetUint64Val() uint64 { - if x != nil { - return x.Uint64Val - } - return 0 -} - -func (x *Primitives) GetSint32Val() int32 { - if x != nil { - return x.Sint32Val - } - return 0 -} - -func (x *Primitives) GetSint64Val() int64 { - if x != nil { - return x.Sint64Val - } - return 0 -} - -func (x *Primitives) GetFixed32Val() uint32 { - if x != nil { - return x.Fixed32Val - } - return 0 -} - -func (x *Primitives) GetFixed64Val() uint64 { - if x != nil { - return x.Fixed64Val - } - return 0 -} - -func (x *Primitives) GetSfixed32Val() int32 { - if x != nil { - return x.Sfixed32Val - } - return 0 -} - -func (x *Primitives) GetSfixed64Val() int64 { - if x != nil { - return x.Sfixed64Val - } - return 0 -} - -func (x *Primitives) GetBoolVal() bool { - if x != nil { - return x.BoolVal - } - return false -} - -func (x *Primitives) GetStringVal() string { - if x != nil { - return x.StringVal - } - return "" -} - -func (x *Primitives) GetByteVal() []byte { - if x != nil { - return x.ByteVal - } - return nil -} - -type NestedAndCollections struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Primitives *Primitives `protobuf:"bytes,1,opt,name=primitives,proto3" json:"primitives,omitempty"` - PrimitivesList []*Primitives `protobuf:"bytes,2,rep,name=primitives_list,json=primitivesList,proto3" json:"primitives_list,omitempty"` - PrimitivesMap map[string]*Primitives `protobuf:"bytes,3,rep,name=primitives_map,json=primitivesMap,proto3" json:"primitives_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ProtocolMap map[string]Protocol `protobuf:"bytes,4,rep,name=protocol_map,json=protocolMap,proto3" json:"protocol_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=hashicorp.consul.internal.protohcl.testproto.Protocol"` - IntList []int32 `protobuf:"varint,5,rep,packed,name=int_list,json=intList,proto3" json:"int_list,omitempty"` -} - -func (x *NestedAndCollections) Reset() { - *x = NestedAndCollections{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NestedAndCollections) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NestedAndCollections) ProtoMessage() {} - -func (x *NestedAndCollections) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NestedAndCollections.ProtoReflect.Descriptor instead. -func (*NestedAndCollections) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{1} -} - -func (x *NestedAndCollections) GetPrimitives() *Primitives { - if x != nil { - return x.Primitives - } - return nil -} - -func (x *NestedAndCollections) GetPrimitivesList() []*Primitives { - if x != nil { - return x.PrimitivesList - } - return nil -} - -func (x *NestedAndCollections) GetPrimitivesMap() map[string]*Primitives { - if x != nil { - return x.PrimitivesMap - } - return nil -} - -func (x *NestedAndCollections) GetProtocolMap() map[string]Protocol { - if x != nil { - return x.ProtocolMap - } - return nil -} - -func (x *NestedAndCollections) GetIntList() []int32 { - if x != nil { - return x.IntList - } - return nil -} - -type Wrappers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DoubleVal *wrapperspb.DoubleValue `protobuf:"bytes,1,opt,name=double_val,json=doubleVal,proto3" json:"double_val,omitempty"` - FloatVal *wrapperspb.FloatValue `protobuf:"bytes,2,opt,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"` - Int32Val *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=int32_val,json=int32Val,proto3" json:"int32_val,omitempty"` - Int64Val *wrapperspb.Int64Value `protobuf:"bytes,4,opt,name=int64_val,json=int64Val,proto3" json:"int64_val,omitempty"` - Uint32Val *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=uint32_val,json=uint32Val,proto3" json:"uint32_val,omitempty"` - Uint64Val *wrapperspb.UInt64Value `protobuf:"bytes,6,opt,name=uint64_val,json=uint64Val,proto3" json:"uint64_val,omitempty"` - BoolVal *wrapperspb.BoolValue `protobuf:"bytes,13,opt,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"` - StringVal *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"` - BytesVal *wrapperspb.BytesValue `protobuf:"bytes,15,opt,name=bytes_val,json=bytesVal,proto3" json:"bytes_val,omitempty"` -} - -func (x *Wrappers) Reset() { - *x = Wrappers{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Wrappers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Wrappers) ProtoMessage() {} - -func (x *Wrappers) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Wrappers.ProtoReflect.Descriptor instead. -func (*Wrappers) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{2} -} - -func (x *Wrappers) GetDoubleVal() *wrapperspb.DoubleValue { - if x != nil { - return x.DoubleVal - } - return nil -} - -func (x *Wrappers) GetFloatVal() *wrapperspb.FloatValue { - if x != nil { - return x.FloatVal - } - return nil -} - -func (x *Wrappers) GetInt32Val() *wrapperspb.Int32Value { - if x != nil { - return x.Int32Val - } - return nil -} - -func (x *Wrappers) GetInt64Val() *wrapperspb.Int64Value { - if x != nil { - return x.Int64Val - } - return nil -} - -func (x *Wrappers) GetUint32Val() *wrapperspb.UInt32Value { - if x != nil { - return x.Uint32Val - } - return nil -} - -func (x *Wrappers) GetUint64Val() *wrapperspb.UInt64Value { - if x != nil { - return x.Uint64Val - } - return nil -} - -func (x *Wrappers) GetBoolVal() *wrapperspb.BoolValue { - if x != nil { - return x.BoolVal - } - return nil -} - -func (x *Wrappers) GetStringVal() *wrapperspb.StringValue { - if x != nil { - return x.StringVal - } - return nil -} - -func (x *Wrappers) GetBytesVal() *wrapperspb.BytesValue { - if x != nil { - return x.BytesVal - } - return nil -} - -type OneOf struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Data: - // - // *OneOf_Int32Val - // *OneOf_Primitives - Data isOneOf_Data `protobuf_oneof:"data"` -} - -func (x *OneOf) Reset() { - *x = OneOf{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OneOf) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OneOf) ProtoMessage() {} - -func (x *OneOf) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OneOf.ProtoReflect.Descriptor instead. -func (*OneOf) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{3} -} - -func (m *OneOf) GetData() isOneOf_Data { - if m != nil { - return m.Data - } - return nil -} - -func (x *OneOf) GetInt32Val() int32 { - if x, ok := x.GetData().(*OneOf_Int32Val); ok { - return x.Int32Val - } - return 0 -} - -func (x *OneOf) GetPrimitives() *Primitives { - if x, ok := x.GetData().(*OneOf_Primitives); ok { - return x.Primitives - } - return nil -} - -type isOneOf_Data interface { - isOneOf_Data() -} - -type OneOf_Int32Val struct { - Int32Val int32 `protobuf:"varint,1,opt,name=int32_val,json=int32Val,proto3,oneof"` -} - -type OneOf_Primitives struct { - Primitives *Primitives `protobuf:"bytes,2,opt,name=primitives,proto3,oneof"` // note repeated fields (including maps) are not allowed in oneofs -} - -func (*OneOf_Int32Val) isOneOf_Data() {} - -func (*OneOf_Primitives) isOneOf_Data() {} - -type NonDynamicWellKnown struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EmptyVal *emptypb.Empty `protobuf:"bytes,1,opt,name=empty_val,json=emptyVal,proto3" json:"empty_val,omitempty"` - TimestampVal *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp_val,json=timestampVal,proto3" json:"timestamp_val,omitempty"` - DurationVal *durationpb.Duration `protobuf:"bytes,3,opt,name=duration_val,json=durationVal,proto3" json:"duration_val,omitempty"` -} - -func (x *NonDynamicWellKnown) Reset() { - *x = NonDynamicWellKnown{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NonDynamicWellKnown) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NonDynamicWellKnown) ProtoMessage() {} - -func (x *NonDynamicWellKnown) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NonDynamicWellKnown.ProtoReflect.Descriptor instead. -func (*NonDynamicWellKnown) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{4} -} - -func (x *NonDynamicWellKnown) GetEmptyVal() *emptypb.Empty { - if x != nil { - return x.EmptyVal - } - return nil -} - -func (x *NonDynamicWellKnown) GetTimestampVal() *timestamppb.Timestamp { - if x != nil { - return x.TimestampVal - } - return nil -} - -func (x *NonDynamicWellKnown) GetDurationVal() *durationpb.Duration { - if x != nil { - return x.DurationVal - } - return nil -} - -type DynamicWellKnown struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AnyVal *anypb.Any `protobuf:"bytes,1,opt,name=any_val,json=anyVal,proto3" json:"any_val,omitempty"` - StructVal *structpb.Struct `protobuf:"bytes,2,opt,name=struct_val,json=structVal,proto3" json:"struct_val,omitempty"` - AnyList []*anypb.Any `protobuf:"bytes,3,rep,name=any_list,json=anyList,proto3" json:"any_list,omitempty"` -} - -func (x *DynamicWellKnown) Reset() { - *x = DynamicWellKnown{} - if protoimpl.UnsafeEnabled { - mi := &file_example_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicWellKnown) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicWellKnown) ProtoMessage() {} - -func (x *DynamicWellKnown) ProtoReflect() protoreflect.Message { - mi := &file_example_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicWellKnown.ProtoReflect.Descriptor instead. -func (*DynamicWellKnown) Descriptor() ([]byte, []int) { - return file_example_proto_rawDescGZIP(), []int{5} -} - -func (x *DynamicWellKnown) GetAnyVal() *anypb.Any { - if x != nil { - return x.AnyVal - } - return nil -} - -func (x *DynamicWellKnown) GetStructVal() *structpb.Struct { - if x != nil { - return x.StructVal - } - return nil -} - -func (x *DynamicWellKnown) GetAnyList() []*anypb.Any { - if x != nil { - return x.AnyList - } - return nil -} - -var File_example_proto protoreflect.FileDescriptor - -var file_example_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2c, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x03, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x12, - 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x73, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, - 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0a, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0b, 0x73, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, - 0x52, 0x0b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x19, 0x0a, - 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x79, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x22, 0xd8, 0x05, 0x0a, 0x14, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x64, - 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x0a, 0x70, - 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, - 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x0f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, - 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x7c, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x6d, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x55, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x4d, - 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x76, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, - 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x61, 0x70, 0x12, 0x19, - 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x7a, 0x0a, 0x12, 0x50, 0x72, 0x69, - 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x76, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9d, 0x04, - 0x0a, 0x08, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, - 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, - 0x6c, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x09, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, - 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, - 0x35, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x62, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x22, 0x8a, 0x01, - 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x5a, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc9, 0x01, 0x0a, 0x13, 0x4e, - 0x6f, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, - 0x77, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x08, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x22, 0xaa, 0x01, 0x0a, 0x10, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x2d, 0x0a, 0x07, 0x61, - 0x6e, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x06, 0x61, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x09, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, - 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x08, 0x61, 0x6e, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x61, 0x6e, 0x79, 0x4c, - 0x69, 0x73, 0x74, 0x2a, 0x48, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x02, 0x42, 0xcf, 0x02, - 0x0a, 0x30, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x42, 0x0c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, - 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x05, 0x48, 0x43, - 0x49, 0x50, 0x54, 0xaa, 0x02, 0x2c, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0xca, 0x02, 0x2c, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x5c, 0x54, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0xe2, 0x02, 0x38, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x68, 0x63, 0x6c, 0x5c, 0x54, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x30, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x68, 0x63, 0x6c, 0x3a, 0x3a, 0x54, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_example_proto_rawDescOnce sync.Once - file_example_proto_rawDescData = file_example_proto_rawDesc -) - -func file_example_proto_rawDescGZIP() []byte { - file_example_proto_rawDescOnce.Do(func() { - file_example_proto_rawDescData = protoimpl.X.CompressGZIP(file_example_proto_rawDescData) - }) - return file_example_proto_rawDescData -} - -var file_example_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_example_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_example_proto_goTypes = []interface{}{ - (Protocol)(0), // 0: hashicorp.consul.internal.protohcl.testproto.Protocol - (*Primitives)(nil), // 1: hashicorp.consul.internal.protohcl.testproto.Primitives - (*NestedAndCollections)(nil), // 2: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections - (*Wrappers)(nil), // 3: hashicorp.consul.internal.protohcl.testproto.Wrappers - (*OneOf)(nil), // 4: hashicorp.consul.internal.protohcl.testproto.OneOf - (*NonDynamicWellKnown)(nil), // 5: hashicorp.consul.internal.protohcl.testproto.NonDynamicWellKnown - (*DynamicWellKnown)(nil), // 6: hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown - nil, // 7: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.PrimitivesMapEntry - nil, // 8: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.ProtocolMapEntry - (*wrapperspb.DoubleValue)(nil), // 9: google.protobuf.DoubleValue - (*wrapperspb.FloatValue)(nil), // 10: google.protobuf.FloatValue - (*wrapperspb.Int32Value)(nil), // 11: google.protobuf.Int32Value - (*wrapperspb.Int64Value)(nil), // 12: google.protobuf.Int64Value - (*wrapperspb.UInt32Value)(nil), // 13: google.protobuf.UInt32Value - (*wrapperspb.UInt64Value)(nil), // 14: google.protobuf.UInt64Value - (*wrapperspb.BoolValue)(nil), // 15: google.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 16: google.protobuf.StringValue - (*wrapperspb.BytesValue)(nil), // 17: google.protobuf.BytesValue - (*emptypb.Empty)(nil), // 18: google.protobuf.Empty - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 20: google.protobuf.Duration - (*anypb.Any)(nil), // 21: google.protobuf.Any - (*structpb.Struct)(nil), // 22: google.protobuf.Struct -} -var file_example_proto_depIdxs = []int32{ - 1, // 0: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.primitives:type_name -> hashicorp.consul.internal.protohcl.testproto.Primitives - 1, // 1: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.primitives_list:type_name -> hashicorp.consul.internal.protohcl.testproto.Primitives - 7, // 2: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.primitives_map:type_name -> hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.PrimitivesMapEntry - 8, // 3: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.protocol_map:type_name -> hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.ProtocolMapEntry - 9, // 4: hashicorp.consul.internal.protohcl.testproto.Wrappers.double_val:type_name -> google.protobuf.DoubleValue - 10, // 5: hashicorp.consul.internal.protohcl.testproto.Wrappers.float_val:type_name -> google.protobuf.FloatValue - 11, // 6: hashicorp.consul.internal.protohcl.testproto.Wrappers.int32_val:type_name -> google.protobuf.Int32Value - 12, // 7: hashicorp.consul.internal.protohcl.testproto.Wrappers.int64_val:type_name -> google.protobuf.Int64Value - 13, // 8: hashicorp.consul.internal.protohcl.testproto.Wrappers.uint32_val:type_name -> google.protobuf.UInt32Value - 14, // 9: hashicorp.consul.internal.protohcl.testproto.Wrappers.uint64_val:type_name -> google.protobuf.UInt64Value - 15, // 10: hashicorp.consul.internal.protohcl.testproto.Wrappers.bool_val:type_name -> google.protobuf.BoolValue - 16, // 11: hashicorp.consul.internal.protohcl.testproto.Wrappers.string_val:type_name -> google.protobuf.StringValue - 17, // 12: hashicorp.consul.internal.protohcl.testproto.Wrappers.bytes_val:type_name -> google.protobuf.BytesValue - 1, // 13: hashicorp.consul.internal.protohcl.testproto.OneOf.primitives:type_name -> hashicorp.consul.internal.protohcl.testproto.Primitives - 18, // 14: hashicorp.consul.internal.protohcl.testproto.NonDynamicWellKnown.empty_val:type_name -> google.protobuf.Empty - 19, // 15: hashicorp.consul.internal.protohcl.testproto.NonDynamicWellKnown.timestamp_val:type_name -> google.protobuf.Timestamp - 20, // 16: hashicorp.consul.internal.protohcl.testproto.NonDynamicWellKnown.duration_val:type_name -> google.protobuf.Duration - 21, // 17: hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown.any_val:type_name -> google.protobuf.Any - 22, // 18: hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown.struct_val:type_name -> google.protobuf.Struct - 21, // 19: hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown.any_list:type_name -> google.protobuf.Any - 1, // 20: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.PrimitivesMapEntry.value:type_name -> hashicorp.consul.internal.protohcl.testproto.Primitives - 0, // 21: hashicorp.consul.internal.protohcl.testproto.NestedAndCollections.ProtocolMapEntry.value:type_name -> hashicorp.consul.internal.protohcl.testproto.Protocol - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_example_proto_init() } -func file_example_proto_init() { - if File_example_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_example_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Primitives); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NestedAndCollections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Wrappers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OneOf); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonDynamicWellKnown); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicWellKnown); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_example_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*OneOf_Int32Val)(nil), - (*OneOf_Primitives)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_example_proto_rawDesc, - NumEnums: 1, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_example_proto_goTypes, - DependencyIndexes: file_example_proto_depIdxs, - EnumInfos: file_example_proto_enumTypes, - MessageInfos: file_example_proto_msgTypes, - }.Build() - File_example_proto = out.File - file_example_proto_rawDesc = nil - file_example_proto_goTypes = nil - file_example_proto_depIdxs = nil -} diff --git a/internal/protohcl/testproto/example.proto b/internal/protohcl/testproto/example.proto deleted file mode 100644 index 17bf737fa3aca..0000000000000 --- a/internal/protohcl/testproto/example.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -syntax = "proto3"; - -package hashicorp.consul.internal.protohcl.testproto; - -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -message Primitives { - double double_val = 1; - float float_val = 2; - int32 int32_val = 3; - int64 int64_val = 4; - uint32 uint32_val = 5; - uint64 uint64_val = 6; - sint32 sint32_val = 7; - sint64 sint64_val = 8; - fixed32 fixed32_val = 9; - fixed64 fixed64_val = 10; - sfixed32 sfixed32_val = 11; - sfixed64 sfixed64_val = 12; - bool bool_val = 13; - string string_val = 14; - bytes byte_val = 15; -} - -enum Protocol { - PROTOCOL_UNSPECIFIED = 0; - PROTOCOL_TCP = 1; - PROTOCOL_UDP = 2; -} - -message NestedAndCollections { - Primitives primitives = 1; - repeated Primitives primitives_list = 2; - map primitives_map = 3; - map protocol_map = 4; - repeated int32 int_list = 5; -} - -message Wrappers { - google.protobuf.DoubleValue double_val = 1; - google.protobuf.FloatValue float_val = 2; - google.protobuf.Int32Value int32_val = 3; - google.protobuf.Int64Value int64_val = 4; - google.protobuf.UInt32Value uint32_val = 5; - google.protobuf.UInt64Value uint64_val = 6; - google.protobuf.BoolValue bool_val = 13; - google.protobuf.StringValue string_val = 14; - google.protobuf.BytesValue bytes_val = 15; -} - -message OneOf { - oneof data { - int32 int32_val = 1; - Primitives primitives = 2; - // note repeated fields (including maps) are not allowed in oneofs - } -} - -message NonDynamicWellKnown { - google.protobuf.Empty empty_val = 1; - google.protobuf.Timestamp timestamp_val = 2; - google.protobuf.Duration duration_val = 3; -} - -message DynamicWellKnown { - google.protobuf.Any any_val = 1; - google.protobuf.Struct struct_val = 2; - repeated google.protobuf.Any any_list = 3; -} diff --git a/internal/protohcl/unmarshal.go b/internal/protohcl/unmarshal.go deleted file mode 100644 index 0f3c80a4c26e3..0000000000000 --- a/internal/protohcl/unmarshal.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "github.com/hashicorp/hcl/v2" - "github.com/hashicorp/hcl/v2/hclparse" - "github.com/zclconf/go-cty/cty/function" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// UnmarshalContext provides information about the context in which we are -// unmarshalling HCL. It is primarily used for decoding Any fields based on -// surrounding information (e.g. the resource Type block). -type UnmarshalContext struct { - // Parent context. - Parent *UnmarshalContext - - // Name of the field that we are unmarshalling. - Name string - - // Message is the protobuf message that we are unmarshalling into (may be nil). - Message protoreflect.Message - - // Range of where this field was in the HCL source. - Range hcl.Range -} - -// ErrorRange returns a range that can be used in error messages. -func (ctx *UnmarshalContext) ErrorRange() hcl.Range { - for { - if !ctx.Range.Empty() || ctx.Parent == nil { - return ctx.Range - } - ctx = ctx.Parent - } -} - -func Unmarshal(src []byte, dest protoreflect.ProtoMessage) error { - return UnmarshalOptions{}.Unmarshal(src, dest) -} - -type UnmarshalOptions struct { - AnyTypeProvider AnyTypeProvider - SourceFileName string - FieldNamer FieldNamer - Functions map[string]function.Function -} - -func (u UnmarshalOptions) Unmarshal(src []byte, dest protoreflect.ProtoMessage) error { - rmsg := dest.ProtoReflect() - - file, diags := hclparse.NewParser().ParseHCL(src, u.SourceFileName) - - // error performing basic HCL parsing - if diags.HasErrors() { - return diags - } - - u.clearAll(rmsg) - - if u.FieldNamer == nil { - u.FieldNamer = textFieldNamer{} - } - - return u.decodeMessage( - &UnmarshalContext{Message: rmsg}, - u.bodyDecoder(file.Body), - rmsg, - ) -} - -func (u UnmarshalOptions) bodyDecoder(body hcl.Body) MessageDecoder { - return newBodyDecoder(body, u.FieldNamer, u.Functions) -} - -func (u UnmarshalOptions) decodeMessage(ctx *UnmarshalContext, decoder MessageDecoder, msg protoreflect.Message) error { - desc := msg.Descriptor() - - if desc.FullName() == wellKnownTypeAny { - return u.decodeAny(ctx, decoder, msg) - } - - tracker := newOneOfTracker(u.FieldNamer) - - return decoder.EachField(FieldIterator{ - Desc: desc, - Func: func(field *IterField) error { - if err := tracker.markFieldAsSet(field.Desc); err != nil { - return err - } - - var ( - protoVal protoreflect.Value - err error - ) - switch { - case field.Val != nil: - protoVal, err = u.decodeAttribute( - &UnmarshalContext{ - Parent: ctx, - Name: field.Name, - Range: field.Range, - }, - func() protoreflect.Value { return msg.NewField(field.Desc) }, - field.Desc, - *field.Val, - true, - ) - case len(field.Blocks) != 0: - protoVal, err = u.decodeBlocks(ctx, field.Blocks, msg, field.Desc) - default: - panic("decoder yielded no blocks or attributes") - } - if err != nil { - return err - } - - if protoVal.IsValid() { - msg.Set(field.Desc, protoVal) - } - - return nil - }, - }) -} - -type newMessageFn func() protoreflect.Value - -func (u UnmarshalOptions) clearAll(msg protoreflect.Message) { - fields := msg.Descriptor().Fields() - - for i := 0; i < fields.Len(); i++ { - msg.Clear(fields.Get(i)) - } -} diff --git a/internal/protohcl/unmarshal_test.go b/internal/protohcl/unmarshal_test.go deleted file mode 100644 index ef00de3ffbb63..0000000000000 --- a/internal/protohcl/unmarshal_test.go +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "encoding/json" - "fmt" - "reflect" - "testing" - "time" - - "github.com/stretchr/testify/require" - "github.com/zclconf/go-cty/cty" - "github.com/zclconf/go-cty/cty/function" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" - - "github.com/hashicorp/consul/internal/protohcl/testproto" - "github.com/hashicorp/hcl/v2/hclparse" -) - -func TestPrimitives(t *testing.T) { - hcl := ` - double_val = 1.234 - float_val = 2.345 - int32_val = 536870912 - int64_val = 25769803776 - uint32_val = 2148532224 - uint64_val = 9223372041149743104 - sint32_val = 536870912 - sint64_val = 25769803776 - fixed32_val = 2148532224 - fixed64_val = 9223372041149743104 - sfixed32_val = 536870912 - sfixed64_val = 25769803776 - bool_val = true - string_val = "foo" - // This is base64 encoded "bar" - byte_val = "YmFy" - ` - - var out testproto.Primitives - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - - require.Equal(t, out.DoubleVal, float64(1.234)) - require.Equal(t, out.FloatVal, float32(2.345)) - require.Equal(t, out.Int32Val, int32(536870912)) - require.Equal(t, out.Int64Val, int64(25769803776)) - require.Equal(t, out.Uint32Val, uint32(2148532224)) - require.Equal(t, out.Uint64Val, uint64(9223372041149743104)) - require.Equal(t, out.Sint32Val, int32(536870912)) - require.Equal(t, out.Sint64Val, int64(25769803776)) - require.Equal(t, out.Fixed32Val, uint32(2148532224)) - require.Equal(t, out.Fixed64Val, uint64(9223372041149743104)) - require.Equal(t, out.Sfixed32Val, int32(536870912)) - require.Equal(t, out.Sfixed64Val, int64(25769803776)) - require.Equal(t, out.BoolVal, true) - require.Equal(t, out.StringVal, "foo") - require.Equal(t, out.ByteVal, []byte("bar")) -} - -func TestNestedAndCollections(t *testing.T) { - hcl := ` - primitives { - uint32_val = 42 - } - - primitives_map "foo" { - uint32_val = 42 - } - - protocol_map = { - "foo" = "PROTOCOL_TCP" - } - - primitives_list { - uint32_val = 42 - } - - primitives_list { - uint32_val = 56 - } - - int_list = [ - 1, - 2 - ] - - ` - - var out testproto.NestedAndCollections - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - - require.NotNil(t, out.Primitives) - require.Equal(t, out.Primitives.Uint32Val, uint32(42)) - require.NotNil(t, out.PrimitivesMap) - require.Equal(t, out.PrimitivesMap["foo"].Uint32Val, uint32(42)) - require.NotNil(t, out.ProtocolMap) - require.Equal(t, out.ProtocolMap["foo"], testproto.Protocol_PROTOCOL_TCP) - require.Len(t, out.PrimitivesList, 2) - require.Equal(t, out.PrimitivesList[0].Uint32Val, uint32(42)) - require.Equal(t, out.PrimitivesList[1].Uint32Val, uint32(56)) - require.Len(t, out.IntList, 2) - require.Equal(t, out.IntList[1], int32(2)) -} - -func TestPrimitiveWrappers(t *testing.T) { - hcl := ` - double_val = 1.234 - float_val = 2.345 - int32_val = 536870912 - int64_val = 25769803776 - uint32_val = 2148532224 - uint64_val = 9223372041149743104 - bool_val = true - string_val = "foo" - // This is base64 encoded "bar" - bytes_val = "YmFy" - ` - var out testproto.Wrappers - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.Equal(t, out.DoubleVal.Value, float64(1.234)) - require.Equal(t, out.FloatVal.Value, float32(2.345)) - require.Equal(t, out.Int32Val.Value, int32(536870912)) - require.Equal(t, out.Int64Val.Value, int64(25769803776)) - require.Equal(t, out.Uint32Val.Value, uint32(2148532224)) - require.Equal(t, out.Uint64Val.Value, uint64(9223372041149743104)) - require.Equal(t, out.BoolVal.Value, true) - require.Equal(t, out.StringVal.Value, "foo") - require.Equal(t, out.BytesVal.Value, []byte("bar")) -} - -func TestNonDynamicWellKnown(t *testing.T) { - hcl := ` - empty_val = {} - timestamp_val = "2023-02-27T12:34:56.789Z" - duration_val = "12s" - ` - var out testproto.NonDynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.EmptyVal) - require.NotNil(t, out.TimestampVal) - require.Equal(t, out.TimestampVal.AsTime(), time.Date(2023, 2, 27, 12, 34, 56, 789000000, time.UTC)) - require.NotNil(t, out.DurationVal) - require.Equal(t, out.DurationVal.AsDuration(), time.Second*12) -} - -func TestInvalidTimestamp(t *testing.T) { - if testing.Short() { - t.Skip("too slow for testing.Short") - } - - t.Parallel() - - cases := map[string]struct { - hcl string - expectXDS bool - }{ - "invalid": { - hcl: ` - timestamp_val = "Sat Jun 12 2023 14:59:57 GMT+0200" - `, - }, - "range error": { - hcl: ` - timestamp_val = "2023-02-27T25:34:56.789Z" - `, - }, - } - - for name, tc := range cases { - tc := tc - var out testproto.NonDynamicWellKnown - t.Run(name, func(t *testing.T) { - - err := Unmarshal([]byte(tc.hcl), &out) - require.Error(t, err) - require.Nil(t, out.TimestampVal) - require.ErrorContains(t, err, "error parsing timestamp") - }) - } -} - -func TestInvalidDuration(t *testing.T) { - hcl := ` - duration_val = "abc" - ` - var out testproto.NonDynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.ErrorContains(t, err, "error parsing string duration:") - require.Nil(t, out.DurationVal) -} - -func TestOneOf(t *testing.T) { - hcl1 := ` - int32_val = 3 - ` - - hcl2 := ` - primitives { - int32_val = 3 - } - ` - - hcl3 := ` - int32_val = 3 - primitives { - int32_val = 4 - } - ` - - var out testproto.OneOf - - err := Unmarshal([]byte(hcl1), &out) - require.NoError(t, err) - require.Equal(t, out.GetInt32Val(), int32(3)) - - err = Unmarshal([]byte(hcl2), &out) - require.NoError(t, err) - primitives := out.GetPrimitives() - require.NotNil(t, primitives) - require.Equal(t, primitives.Int32Val, int32(3)) - - err = Unmarshal([]byte(hcl3), &out) - require.Error(t, err) -} - -func TestAny(t *testing.T) { - hcl := ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.Primitives" - uint32_val = 42 - } - - any_list = [ - { - type_url = "hashicorp.consul.internal.protohcl.testproto.Primitives" - uint32_val = 123 - }, - { - type_url = "hashicorp.consul.internal.protohcl.testproto.Wrappers" - uint32_val = 321 - } - ] - ` - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.AnyVal) - require.Equal(t, out.AnyVal.TypeUrl, "hashicorp.consul.internal.protohcl.testproto.Primitives") - - raw, err := anypb.UnmarshalNew(out.AnyVal, proto.UnmarshalOptions{}) - require.NoError(t, err) - require.NotNil(t, raw) - - primitives, ok := raw.(*testproto.Primitives) - require.True(t, ok) - require.Equal(t, primitives.Uint32Val, uint32(42)) -} - -func TestAnyTypeDynamicWellKnown(t *testing.T) { - hcl := ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown" - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.Primitives" - uint32_val = 42 - } - } - ` - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.AnyVal) - require.Equal(t, out.AnyVal.TypeUrl, "hashicorp.consul.internal.protohcl.testproto.DynamicWellKnown") - - raw, err := anypb.UnmarshalNew(out.AnyVal, proto.UnmarshalOptions{}) - require.NoError(t, err) - require.NotNil(t, raw) - - anyVal, ok := raw.(*testproto.DynamicWellKnown) - require.True(t, ok) - - res, err := anypb.UnmarshalNew(anyVal.AnyVal, proto.UnmarshalOptions{}) - require.NoError(t, err) - require.NotNil(t, res) - - primitives, ok := res.(*testproto.Primitives) - require.True(t, ok) - require.Equal(t, primitives.Uint32Val, uint32(42)) -} - -func TestAnyTypeNestedAndCollections(t *testing.T) { - hcl := ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.NestedAndCollections" - primitives { - uint32_val = 42 - } - } - ` - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.AnyVal) - require.Equal(t, out.AnyVal.TypeUrl, "hashicorp.consul.internal.protohcl.testproto.NestedAndCollections") - - raw, err := anypb.UnmarshalNew(out.AnyVal, proto.UnmarshalOptions{}) - require.NoError(t, err) - require.NotNil(t, raw) - - nestedCollections, ok := raw.(*testproto.NestedAndCollections) - require.True(t, ok) - require.NotNil(t, nestedCollections.Primitives) - require.Equal(t, nestedCollections.Primitives.Uint32Val, uint32(42)) -} - -func TestAnyTypeErrors(t *testing.T) { - type testCase struct { - description string - hcl string - error string - } - testCases := []testCase{ - { - description: "type_url is expected", - hcl: ` - any_val { - uint32_val = 42 - } - `, - error: "type_url field is required to decode Any", - }, - { - description: "type_url is unknown", - hcl: ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.Integer" - uint32_val = 42 - } - `, - error: "error looking up type information for hashicorp.consul.internal.protohcl.testproto.Integer", - }, - { - description: "unknown field", - hcl: ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.Primitives" - int_val = 42 - } - `, - error: "Unsupported argument; An argument named \"int_val\" is not expected here", - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.description, func(t *testing.T) { - t.Parallel() - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(tc.hcl), &out) - require.Error(t, err) - require.Contains(t, err.Error(), tc.error) - }) - } -} - -func TestStruct(t *testing.T) { - hcl := ` - struct_val = { - "null"= null - "bool"= true - "foo" = "bar" - "baz" = 1.234 - "nested" = { - "foo" = 12, - "bar" = "something" - } - } - ` - - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.StructVal) - - valMap := out.StructVal.AsMap() - jsonVal, err := json.Marshal(valMap) - require.NoError(t, err) - - expected := `{ - "null": null, - "bool": true, - "foo": "bar", - "baz": 1.234, - "nested": { - "foo": 12, - "bar": "something" - } - } - ` - require.JSONEq(t, expected, string(jsonVal)) -} - -func TestStructList(t *testing.T) { - hcl := ` - struct_val = { - "list_int" = [ - 1, - 2, - 3, - ] - "list_string": [ - "abc", - "def" - ] - "list_bool": [ - true, - false - ] - "list_maps" = [ - { - "arrr" = "matey" - }, - { - "hoist" = "the colors" - } - ] - "list_list" = [ - [ - "hello", - "world", - null - ] - ] - } - ` - - var out testproto.DynamicWellKnown - - err := Unmarshal([]byte(hcl), &out) - require.NoError(t, err) - require.NotNil(t, out.StructVal) - - valMap := out.StructVal.AsMap() - jsonVal, err := json.Marshal(valMap) - require.NoError(t, err) - - expected := `{ - "list_int": [ - 1, - 2, - 3 - ], - "list_string": [ - "abc", - "def" - ], - "list_bool": [ - true, - false - ], - "list_maps": [ - { - "arrr": "matey" - }, - { - "hoist": "the colors" - } - ], - "list_list": [ - [ - "hello", - "world", - null - ] - ] - } - ` - require.JSONEq(t, expected, string(jsonVal)) -} - -func TestFunctionExecution(t *testing.T) { - hcl := ` - primitives = primitive_defaults() - ` - - var out testproto.NestedAndCollections - - var ( - testType = cty.Capsule("type", reflect.TypeOf(testproto.Primitives{})) - - test = function.New(&function.Spec{ - Params: []function.Parameter{}, - Type: function.StaticReturnType(testType), - Impl: func(args []cty.Value, _ cty.Type) (cty.Value, error) { - t := &testproto.Primitives{ - StringVal: "test", - Int32Val: 10, - BoolVal: false, - } - return cty.CapsuleVal(testType, t), nil - }, - }) - ) - - err := UnmarshalOptions{ - Functions: map[string]function.Function{"primitive_defaults": test}, - }.Unmarshal([]byte(hcl), &out) - - require.NoError(t, err) - - require.NotNil(t, out.Primitives) - require.Equal(t, out.Primitives.StringVal, "test") - require.Equal(t, out.Primitives.Int32Val, int32(10)) - require.Equal(t, out.Primitives.BoolVal, false) -} - -func TestSkipFields(t *testing.T) { - - u := UnmarshalOptions{} - - hcl := ` - any_val { - type_url = "hashicorp.consul.internal.protohcl.testproto.Primitives" - uint32_val = 10 - }` - - file, diags := hclparse.NewParser().ParseHCL([]byte(hcl), "") - - require.False(t, diags.HasErrors()) - - decoder := u.bodyDecoder(file.Body) - - decoder = decoder.SkipFields("type_url") - - decoder = decoder.SkipFields("type_url", "uint32_val") - - expected := map[string]struct{}{ - "type_url": {}, - "uint32_val": {}, - } - - require.Contains(t, fmt.Sprintf("%v", decoder), fmt.Sprintf("%v", expected)) -} diff --git a/internal/protohcl/well_known_types.go b/internal/protohcl/well_known_types.go deleted file mode 100644 index 756f908fc413d..0000000000000 --- a/internal/protohcl/well_known_types.go +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package protohcl - -import ( - "fmt" - "time" - - "github.com/zclconf/go-cty/cty" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/emptypb" - "google.golang.org/protobuf/types/known/structpb" - "google.golang.org/protobuf/types/known/timestamppb" - "google.golang.org/protobuf/types/known/wrapperspb" -) - -const ( - // maximum time in seconds that a time.Time which comes from - // an RFC 3339 timestamp can represent - maxTimestampSeconds = 253402300799 - // minimum time in seconds that a time.Time which comes from - // an RFC 3339 timestamp can represent. This is negative - // because RFC 3339 base time is year 0001 whereas time.Time - // starts in 1970 - minTimestampSeconds = -62135596800 -) - -var ( - // minTime is the earliest time representable as both an - // RFC 3339 timestamp and a time.Time value - minTime = time.Unix(minTimestampSeconds, 0) - // maxTime is the latest time respresentable as both an - // RFC 3339 timestamp and a time.Time value - maxTime = time.Unix(maxTimestampSeconds, 999999999) -) - -type wktSchemaHint int - -const ( - notWellKnownType wktSchemaHint = iota - wellKnownBlock - wellKnownAttribute -) - -// wellKnownTypeSchemaHint returns what sort of syntax should be used to represent -// the well known type field. -// -// NotWellKnownType - use attribute block syntax based on other information -// WellKnownAttribute - use attribute syntax -// WellKnownBlock - use block syntax -func wellKnownTypeSchemaHint(desc protoreflect.FieldDescriptor) wktSchemaHint { - if desc.Kind() != protoreflect.MessageKind { - return notWellKnownType - } - - switch desc.Message().FullName() { - case "google.protobuf.DoubleValue": - return wellKnownAttribute - case "google.protobuf.FloatValue": - return wellKnownAttribute - case "google.protobuf.Int32Value": - return wellKnownAttribute - case "google.protobuf.Int64Value": - return wellKnownAttribute - case "google.protobuf.UInt32Value": - return wellKnownAttribute - case "google.protobuf.UInt64Value": - return wellKnownAttribute - case "google.protobuf.BoolValue": - return wellKnownAttribute - case "google.protobuf.StringValue": - return wellKnownAttribute - case "google.protobuf.BytesValue": - return wellKnownAttribute - case "google.protobuf.Empty": - // block syntax is used for Empty to allow transitioning to using - // a different proto message with fields in the future. - return wellKnownBlock - case "google.protobuf.Timestamp": - return wellKnownAttribute - case "google.protobuf.Duration": - return wellKnownAttribute - case "google.protobuf.Struct": - // as the Struct has completely free form fields that we cannot - // know about in advance we cannot use block syntax - return wellKnownAttribute - case "google.protobuf.Any": - return wellKnownBlock - default: - return notWellKnownType - } -} - -func decodeAttributeToWellKnownType(desc protoreflect.FieldDescriptor, val cty.Value) (bool, protoreflect.Value, error) { - if desc.Kind() != protoreflect.MessageKind { - return false, protoreflect.Value{}, nil - } - - switch desc.Message().FullName() { - case "google.protobuf.DoubleValue": - protoVal, err := protoDoubleWrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.FloatValue": - protoVal, err := protoFloatWrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.Int32Value": - protoVal, err := protoInt32WrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.Int64Value": - protoVal, err := protoInt64WrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.UInt32Value": - protoVal, err := protoUint32WrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.UInt64Value": - protoVal, err := protoUint64WrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.BoolValue": - protoVal, err := protoBoolWrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.StringValue": - protoVal, err := protoStringWrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.BytesValue": - protoVal, err := protoBytesWrapperFromCty(val) - return true, protoVal, err - case "google.protobuf.Empty": - protoVal, err := protoEmptyFromCty(val) - return true, protoVal, err - case "google.protobuf.Timestamp": - protoVal, err := protoTimestampFromCty(val) - return true, protoVal, err - case "google.protobuf.Duration": - protoVal, err := protoDurationFromCty(val) - return true, protoVal, err - case "google.protobuf.Struct": - protoVal, err := protoStructFromCty(val) - return true, protoVal, err - default: - return false, protoreflect.Value{}, nil - } -} - -func protoWrapperFromBool(v bool) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Bool(v).ProtoReflect()) -} -func protoWrapperFromInt32(v int32) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Int32(v).ProtoReflect()) -} -func protoWrapperFromInt64(v int64) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Int64(v).ProtoReflect()) -} -func protoWrapperFromUint32(v uint32) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.UInt32(v).ProtoReflect()) -} -func protoWrapperFromUint64(v uint64) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.UInt64(v).ProtoReflect()) -} -func protoWrapperFromFloat(v float32) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Float(v).ProtoReflect()) -} -func protoWrapperFromDouble(v float64) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Double(v).ProtoReflect()) -} -func protoWrapperFromString(v string) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.String(v).ProtoReflect()) -} -func protoWrapperFromBytes(v []byte) protoreflect.Value { - return protoreflect.ValueOfMessage(wrapperspb.Bytes(v).ProtoReflect()) -} - -func protoBoolWrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := boolFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromBool(v), nil -} -func protoInt32WrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := int32FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromInt32(v), nil -} -func protoInt64WrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := int64FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromInt64(v), nil -} -func protoUint32WrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := uint32FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromUint32(v), nil -} -func protoUint64WrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := uint64FromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromUint64(v), nil -} -func protoFloatWrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := floatFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromFloat(v), nil -} -func protoDoubleWrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := doubleFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromDouble(v), nil -} -func protoStringWrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := stringFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromString(v), nil -} -func protoBytesWrapperFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := bytesFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - return protoWrapperFromBytes(v), nil -} - -func protoEmptyFromCty(val cty.Value) (protoreflect.Value, error) { - var e emptypb.Empty - if val.IsNull() { - return protoreflect.Value{}, nil - } - - valType := val.Type() - if (valType.IsObjectType() || valType.IsMapType()) && val.LengthInt() == 0 { - return protoreflect.ValueOfMessage(e.ProtoReflect()), nil - } - - return protoreflect.Value{}, fmt.Errorf("well known empty type can only be represented as an hcl map/object - actual type %q", valType.FriendlyName()) -} - -func protoTimestampFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := stringFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - - t, err := time.Parse(time.RFC3339Nano, v) - if err != nil { - return protoreflect.Value{}, fmt.Errorf("error parsing timestamp: %w", err) - } - - if t.Before(minTime) || t.After(maxTime) { - return protoreflect.Value{}, fmt.Errorf("time is out of range %s to %s - %s", minTime.String(), maxTime.String(), v) - } - - return protoreflect.ValueOfMessage(timestamppb.New(t).ProtoReflect()), nil -} - -func protoDurationFromCty(val cty.Value) (protoreflect.Value, error) { - v, err := stringFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - - d, err := time.ParseDuration(v) - if err != nil { - return protoreflect.Value{}, fmt.Errorf("error parsing string duration: %w", err) - } - - return protoreflect.ValueOfMessage(durationpb.New(d).ProtoReflect()), nil -} - -func protoStructFromCty(val cty.Value) (protoreflect.Value, error) { - s, err := protoStructObjectFromCty(val) - if err != nil { - return protoreflect.Value{}, err - } - - return protoreflect.ValueOfMessage(s.ProtoReflect()), nil -} - -func protoStructObjectFromCty(val cty.Value) (*structpb.Struct, error) { - valType := val.Type() - if !valType.IsObjectType() && !valType.IsMapType() { - return nil, fmt.Errorf("Struct type must be either an object or map type") - } - - structValues := make(map[string]*structpb.Value) - - for k, v := range val.AsValueMap() { - vType := v.Type() - - if v.IsNull() { - structValues[k] = structpb.NewNullValue() - } else if vType.IsListType() || vType.IsSetType() || vType.IsTupleType() { - listVal, err := protoStructListValueFromCty(v) - if err != nil { - return nil, err - } - structValues[k] = structpb.NewListValue(listVal) - } else if vType.IsMapType() || vType.IsObjectType() { - objVal, err := protoStructObjectFromCty(v) - if err != nil { - return nil, err - } - structValues[k] = structpb.NewStructValue(objVal) - } else if vType.IsPrimitiveType() { - switch vType { - case cty.String: - stringVal, err := stringFromCty(v) - if err != nil { - return nil, err - } - - structValues[k] = structpb.NewStringValue(stringVal) - case cty.Bool: - boolVal, err := boolFromCty(v) - if err != nil { - return nil, err - } - - structValues[k] = structpb.NewBoolValue(boolVal) - case cty.Number: - doubleVal, err := doubleFromCty(v) - if err != nil { - return nil, err - } - - structValues[k] = structpb.NewNumberValue(doubleVal) - default: - return nil, fmt.Errorf("unknown cty primitive type: %s", vType.FriendlyName()) - } - } else { - return nil, fmt.Errorf("unsupported cty type: %s", vType.FriendlyName()) - } - } - - return &structpb.Struct{ - Fields: structValues, - }, nil -} - -func protoStructListValueFromCty(val cty.Value) (*structpb.ListValue, error) { - var values []*structpb.Value - - var err error - val.ForEachElement(func(_ cty.Value, value cty.Value) bool { - vType := value.Type() - - if value.IsNull() { - values = append(values, structpb.NewNullValue()) - } else if vType.IsListType() || vType.IsSetType() || vType.IsTupleType() { - var listVal *structpb.ListValue - listVal, err = protoStructListValueFromCty(value) - if err != nil { - return true - } - values = append(values, structpb.NewListValue(listVal)) - } else if vType.IsMapType() || vType.IsObjectType() { - var objVal *structpb.Struct - objVal, err = protoStructObjectFromCty(value) - if err != nil { - return true - } - values = append(values, structpb.NewStructValue(objVal)) - } else if vType.IsPrimitiveType() { - switch vType { - case cty.String: - var stringVal string - stringVal, err = stringFromCty(value) - if err != nil { - return true - } - - values = append(values, structpb.NewStringValue(stringVal)) - case cty.Bool: - var boolVal bool - boolVal, err = boolFromCty(value) - if err != nil { - return true - } - - values = append(values, structpb.NewBoolValue(boolVal)) - case cty.Number: - var doubleVal float64 - doubleVal, err = doubleFromCty(value) - if err != nil { - return true - } - - values = append(values, structpb.NewNumberValue(doubleVal)) - default: - err = fmt.Errorf("unknown cty primitive type: %s", vType.FriendlyName()) - return true - } - } else { - err = fmt.Errorf("unsupported cty type: %s", vType.FriendlyName()) - return true - } - return false - }) - - if err != nil { - return nil, err - } - - return &structpb.ListValue{ - Values: values, - }, nil -} diff --git a/internal/radix/doc.go b/internal/radix/doc.go index f69f68a2d6b07..47e8961d0d0a5 100644 --- a/internal/radix/doc.go +++ b/internal/radix/doc.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - // This packages contents were originally copied from github.com/armon/go-radix. // After the intial copy all the data structures were made to use Go 1.18 generics // instead of relying on the use of interface{} or the any type. diff --git a/internal/radix/radix.go b/internal/radix/radix.go index c2b7ee838935f..0f1d8d772ac7c 100644 --- a/internal/radix/radix.go +++ b/internal/radix/radix.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package radix import ( diff --git a/internal/radix/radix_test.go b/internal/radix/radix_test.go index ea7015dc29c24..9f616b73f438e 100644 --- a/internal/radix/radix_test.go +++ b/internal/radix/radix_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package radix import ( diff --git a/internal/resource/authz_ce.go b/internal/resource/authz_ce.go deleted file mode 100644 index 4d68ccd6b98a0..0000000000000 --- a/internal/resource/authz_ce.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package resource - -import ( - "github.com/hashicorp/consul/acl" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// AuthorizerContext builds an ACL AuthorizerContext for the given tenancy. -func AuthorizerContext(t *pbresource.Tenancy) *acl.AuthorizerContext { - return &acl.AuthorizerContext{Peer: t.PeerName} -} diff --git a/internal/resource/decode.go b/internal/resource/decode.go deleted file mode 100644 index 35ee0886035b2..0000000000000 --- a/internal/resource/decode.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource - -import ( - "context" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// DecodedResource is a generic holder to contain an original Resource and its -// decoded contents. -type DecodedResource[T proto.Message] struct { - Resource *pbresource.Resource - Data T -} - -func (d *DecodedResource[T]) GetResource() *pbresource.Resource { - if d == nil { - return nil - } - - return d.Resource -} - -func (d *DecodedResource[T]) GetData() T { - if d == nil { - var zero T - return zero - } - - return d.Data -} - -// Decode will generically decode the provided resource into a 2-field -// structure that holds onto the original Resource and the decoded contents. -// -// Returns an ErrDataParse on unmarshalling errors. -func Decode[T proto.Message](res *pbresource.Resource) (*DecodedResource[T], error) { - var zero T - data := zero.ProtoReflect().New().Interface().(T) - - if err := res.Data.UnmarshalTo(data); err != nil { - return nil, NewErrDataParse(data, err) - } - return &DecodedResource[T]{ - Resource: res, - Data: data, - }, nil -} - -// GetDecodedResource will generically read the requested resource using the -// client and either return nil on a NotFound or decode the response value. -func GetDecodedResource[T proto.Message](ctx context.Context, client pbresource.ResourceServiceClient, id *pbresource.ID) (*DecodedResource[T], error) { - rsp, err := client.Read(ctx, &pbresource.ReadRequest{Id: id}) - switch { - case status.Code(err) == codes.NotFound: - return nil, nil - case err != nil: - return nil, err - } - - return Decode[T](rsp.Resource) -} diff --git a/internal/resource/decode_test.go b/internal/resource/decode_test.go deleted file mode 100644 index 17c1bd7f1b07e..0000000000000 --- a/internal/resource/decode_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource_test - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/types/known/anypb" - - svctest "github.com/hashicorp/consul/agent/grpc-external/services/resource/testing" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" - "github.com/hashicorp/consul/proto-public/pbresource" - pbdemo "github.com/hashicorp/consul/proto/private/pbdemo/v2" - "github.com/hashicorp/consul/proto/private/prototest" - "github.com/hashicorp/consul/sdk/testutil" -) - -func TestGetDecodedResource(t *testing.T) { - var ( - baseClient = svctest.RunResourceService(t, demo.RegisterTypes) - client = rtest.NewClient(baseClient) - ctx = testutil.TestContext(t) - ) - - babypantsID := &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "babypants", - } - - testutil.RunStep(t, "not found", func(t *testing.T) { - got, err := resource.GetDecodedResource[*pbdemo.Artist](ctx, client, babypantsID) - require.NoError(t, err) - require.Nil(t, got) - }) - - testutil.RunStep(t, "found", func(t *testing.T) { - data := &pbdemo.Artist{ - Name: "caspar babypants", - } - res := rtest.Resource(demo.TypeV2Artist, "babypants"). - WithData(t, data). - Write(t, client) - - got, err := resource.GetDecodedResource[*pbdemo.Artist](ctx, client, babypantsID) - require.NoError(t, err) - require.NotNil(t, got) - - // Clone generated fields over. - res.Id.Uid = got.Resource.Id.Uid - res.Version = got.Resource.Version - res.Generation = got.Resource.Generation - - // Clone defaulted fields over - data.Genre = pbdemo.Genre_GENRE_DISCO - - prototest.AssertDeepEqual(t, res, got.Resource) - prototest.AssertDeepEqual(t, data, got.Data) - }) -} - -func TestDecode(t *testing.T) { - t.Run("good", func(t *testing.T) { - fooData := &pbdemo.Artist{ - Name: "caspar babypants", - } - any, err := anypb.New(fooData) - require.NoError(t, err) - - foo := &pbresource.Resource{ - Id: &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "babypants", - }, - Data: any, - Metadata: map[string]string{ - "generated_at": time.Now().Format(time.RFC3339), - }, - } - - dec, err := resource.Decode[*pbdemo.Artist](foo) - require.NoError(t, err) - - prototest.AssertDeepEqual(t, foo, dec.Resource) - prototest.AssertDeepEqual(t, fooData, dec.Data) - }) - - t.Run("bad", func(t *testing.T) { - foo := &pbresource.Resource{ - Id: &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "babypants", - }, - Data: &anypb.Any{ - TypeUrl: "garbage", - Value: []byte("more garbage"), - }, - Metadata: map[string]string{ - "generated_at": time.Now().Format(time.RFC3339), - }, - } - - _, err := resource.Decode[*pbdemo.Artist](foo) - require.Error(t, err) - }) -} diff --git a/internal/resource/demo/controller.go b/internal/resource/demo/controller.go index 7f1bba902ea51..11afc3bac5e6e 100644 --- a/internal/resource/demo/controller.go +++ b/internal/resource/demo/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package demo diff --git a/internal/resource/demo/controller_test.go b/internal/resource/demo/controller_test.go index a8c2640d615a8..8d4ee79c73e00 100644 --- a/internal/resource/demo/controller_test.go +++ b/internal/resource/demo/controller_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package demo diff --git a/internal/resource/demo/demo.go b/internal/resource/demo/demo.go index c47d7e31e676a..20ad89c962c42 100644 --- a/internal/resource/demo/demo.go +++ b/internal/resource/demo/demo.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package demo includes fake resource types for working on Consul's generic // state storage without having to refer to specific features. @@ -24,17 +24,9 @@ import ( var ( // TenancyDefault contains the default values for all tenancy units. TenancyDefault = &pbresource.Tenancy{ - Partition: resource.DefaultPartitionName, + Partition: "default", PeerName: "local", - Namespace: resource.DefaultNamespaceName, - } - - // TypeV1RecordLabel represents a record label which artists are signed to. - // Used specifically as a resource to test partition only scoped resources. - TypeV1RecordLabel = &pbresource.Type{ - Group: "demo", - GroupVersion: "v1", - Kind: "RecordLabel", + Namespace: "default", } // TypeV1Artist represents a musician or group of musicians. @@ -80,20 +72,20 @@ const ( // TODO(spatel): We're standing-in key ACLs for demo resources until our ACL // system can be more modularly extended (or support generic resource permissions). func RegisterTypes(r resource.Registry) { - readACL := func(authz acl.Authorizer, authzContext *acl.AuthorizerContext, id *pbresource.ID) error { + readACL := func(authz acl.Authorizer, id *pbresource.ID) error { key := fmt.Sprintf("resource/%s/%s", resource.ToGVK(id.Type), id.Name) - return authz.ToAllowAuthorizer().KeyReadAllowed(key, authzContext) + return authz.ToAllowAuthorizer().KeyReadAllowed(key, &acl.AuthorizerContext{}) } - writeACL := func(authz acl.Authorizer, authzContext *acl.AuthorizerContext, res *pbresource.Resource) error { - key := fmt.Sprintf("resource/%s/%s", resource.ToGVK(res.Id.Type), res.Id.Name) - return authz.ToAllowAuthorizer().KeyWriteAllowed(key, authzContext) + writeACL := func(authz acl.Authorizer, id *pbresource.ID) error { + key := fmt.Sprintf("resource/%s/%s", resource.ToGVK(id.Type), id.Name) + return authz.ToAllowAuthorizer().KeyWriteAllowed(key, &acl.AuthorizerContext{}) } - makeListACL := func(typ *pbresource.Type) func(acl.Authorizer, *acl.AuthorizerContext) error { - return func(authz acl.Authorizer, authzContext *acl.AuthorizerContext) error { + makeListACL := func(typ *pbresource.Type) func(acl.Authorizer, *pbresource.Tenancy) error { + return func(authz acl.Authorizer, tenancy *pbresource.Tenancy) error { key := fmt.Sprintf("resource/%s", resource.ToGVK(typ)) - return authz.ToAllowAuthorizer().KeyListAllowed(key, authzContext) + return authz.ToAllowAuthorizer().KeyListAllowed(key, &acl.AuthorizerContext{}) } } @@ -132,17 +124,6 @@ func RegisterTypes(r resource.Registry) { return nil } - r.Register(resource.Registration{ - Type: TypeV1RecordLabel, - Proto: &pbdemov1.RecordLabel{}, - ACLs: &resource.ACLHooks{ - Read: readACL, - Write: writeACL, - List: makeListACL(TypeV1RecordLabel), - }, - Scope: resource.ScopePartition, - }) - r.Register(resource.Registration{ Type: TypeV1Artist, Proto: &pbdemov1.Artist{}, @@ -152,7 +133,6 @@ func RegisterTypes(r resource.Registry) { List: makeListACL(TypeV1Artist), }, Validate: validateV1ArtistFn, - Scope: resource.ScopeNamespace, }) r.Register(resource.Registration{ @@ -163,7 +143,6 @@ func RegisterTypes(r resource.Registry) { Write: writeACL, List: makeListACL(TypeV1Album), }, - Scope: resource.ScopeNamespace, }) r.Register(resource.Registration{ @@ -176,7 +155,6 @@ func RegisterTypes(r resource.Registry) { }, Validate: validateV2ArtistFn, Mutate: mutateV2ArtistFn, - Scope: resource.ScopeNamespace, }) r.Register(resource.Registration{ @@ -187,30 +165,9 @@ func RegisterTypes(r resource.Registry) { Write: writeACL, List: makeListACL(TypeV2Album), }, - Scope: resource.ScopeNamespace, }) } -// GenerateV1RecordLabel generates a named RecordLabel resource. -func GenerateV1RecordLabel(name string) (*pbresource.Resource, error) { - data, err := anypb.New(&pbdemov1.RecordLabel{Name: name}) - if err != nil { - return nil, err - } - - return &pbresource.Resource{ - Id: &pbresource.ID{ - Type: TypeV1RecordLabel, - Tenancy: resource.DefaultPartitionedTenancy(), - Name: name, - }, - Data: data, - Metadata: map[string]string{ - "generated_at": time.Now().Format(time.RFC3339), - }, - }, nil -} - // GenerateV2Artist generates a random Artist resource. func GenerateV2Artist() (*pbresource.Resource, error) { adjective := adjectives[rand.Intn(len(adjectives))] @@ -234,7 +191,7 @@ func GenerateV2Artist() (*pbresource.Resource, error) { return &pbresource.Resource{ Id: &pbresource.ID{ Type: TypeV2Artist, - Tenancy: resource.DefaultNamespacedTenancy(), + Tenancy: TenancyDefault, Name: fmt.Sprintf("%s-%s", strings.ToLower(adjective), strings.ToLower(noun)), }, Data: data, @@ -277,7 +234,7 @@ func generateV2Album(artistID *pbresource.ID, rand *rand.Rand) (*pbresource.Reso return &pbresource.Resource{ Id: &pbresource.ID{ Type: TypeV2Album, - Tenancy: clone(artistID.Tenancy), + Tenancy: artistID.Tenancy, Name: fmt.Sprintf("%s/%s-%s", artistID.Name, strings.ToLower(adjective), strings.ToLower(noun)), }, Owner: artistID, diff --git a/internal/resource/equality.go b/internal/resource/equality.go index 25e098b1a3610..c7c880cddc9eb 100644 --- a/internal/resource/equality.go +++ b/internal/resource/equality.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -20,7 +20,7 @@ func EqualType(a, b *pbresource.Type) bool { a.Kind == b.Kind } -// EqualTenancy compares two resource tenancies for equality without reflection. +// EqualType compares two resource tenancies for equality without reflection. func EqualTenancy(a, b *pbresource.Tenancy) bool { if a == b { return true @@ -35,7 +35,7 @@ func EqualTenancy(a, b *pbresource.Tenancy) bool { a.Namespace == b.Namespace } -// EqualID compares two resource IDs for equality without reflection. +// EqualType compares two resource IDs for equality without reflection. func EqualID(a, b *pbresource.ID) bool { if a == b { return true @@ -120,22 +120,6 @@ func EqualReference(a, b *pbresource.Reference) bool { a.Section == b.Section } -// ReferenceOrIDMatch compares two references or IDs to see if they both refer -// to the same thing. -// -// Note that this only compares fields that are common between them as -// represented by the ReferenceOrID interface and notably ignores the section -// field on references and the uid field on ids. -func ReferenceOrIDMatch(ref1, ref2 ReferenceOrID) bool { - if ref1 == nil || ref2 == nil { - return false - } - - return EqualType(ref1.GetType(), ref2.GetType()) && - EqualTenancy(ref1.GetTenancy(), ref2.GetTenancy()) && - ref1.GetName() == ref2.GetName() -} - // EqualStatusMap compares two status maps for equality without reflection. func EqualStatusMap(a, b map[string]*pbresource.Status) bool { if len(a) != len(b) { diff --git a/internal/resource/equality_test.go b/internal/resource/equality_test.go index 8413905606383..4fb7cb666b3aa 100644 --- a/internal/resource/equality_test.go +++ b/internal/resource/equality_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource_test @@ -283,310 +283,6 @@ func TestEqualID(t *testing.T) { }) } -func TestEqualReference(t *testing.T) { - t.Run("same pointer", func(t *testing.T) { - id := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - require.True(t, resource.EqualReference(id, id)) - }) - - t.Run("equal", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := clone(a) - require.True(t, resource.EqualReference(a, b)) - }) - - t.Run("nil", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - require.False(t, resource.EqualReference(a, nil)) - require.False(t, resource.EqualReference(nil, a)) - }) - - t.Run("different type", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := clone(a) - b.Type.Kind = "album" - require.False(t, resource.EqualReference(a, b)) - }) - - t.Run("different tenancy", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := clone(a) - b.Tenancy.Namespace = "qux" - require.False(t, resource.EqualReference(a, b)) - }) - - t.Run("different name", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := clone(a) - b.Name = "boom" - require.False(t, resource.EqualReference(a, b)) - }) - - t.Run("different section", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := clone(a) - b.Section = "not-blah" - require.False(t, resource.EqualReference(a, b)) - }) -} - -func TestReferenceOrIDMatch(t *testing.T) { - t.Run("equal", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Uid: ulid.Make().String(), - } - require.True(t, resource.ReferenceOrIDMatch(a, b)) - }) - - t.Run("nil", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Uid: ulid.Make().String(), - } - require.False(t, resource.ReferenceOrIDMatch(a, nil)) - require.False(t, resource.ReferenceOrIDMatch(nil, b)) - }) - - t.Run("different type", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Uid: ulid.Make().String(), - } - b.Type.Kind = "album" - require.False(t, resource.ReferenceOrIDMatch(a, b)) - }) - - t.Run("different tenancy", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Uid: ulid.Make().String(), - } - b.Tenancy.Namespace = "qux" - require.False(t, resource.ReferenceOrIDMatch(a, b)) - }) - - t.Run("different name", func(t *testing.T) { - a := &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Section: "blah", - } - b := &pbresource.ID{ - Type: &pbresource.Type{ - Group: "demo", - GroupVersion: "v2", - Kind: "artist", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "foo", - PeerName: "bar", - Namespace: "baz", - }, - Name: "qux", - Uid: ulid.Make().String(), - } - b.Name = "boom" - require.False(t, resource.ReferenceOrIDMatch(a, b)) - }) -} - func TestEqualStatus(t *testing.T) { orig := &pbresource.Status{ ObservedGeneration: ulid.Make().String(), diff --git a/internal/resource/errors.go b/internal/resource/errors.go index dbb624c8d0045..c258f9ad35b13 100644 --- a/internal/resource/errors.go +++ b/internal/resource/errors.go @@ -1,9 +1,10 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource import ( + "errors" "fmt" "github.com/hashicorp/consul/proto-public/pbresource" @@ -11,33 +12,11 @@ import ( ) var ( - ErrMissing = NewConstError("missing required field") - ErrEmpty = NewConstError("cannot be empty") - ErrReferenceTenancyNotEqual = NewConstError("resource tenancy and reference tenancy differ") + ErrMissing = errors.New("missing required field") + ErrEmpty = errors.New("cannot be empty") + ErrReferenceTenancyNotEqual = errors.New("resource tenancy and reference tenancy differ") ) -// ConstError is more or less equivalent to the stdlib errors.errorstring. However, having -// our own exported type allows us to more accurately compare error values in tests. -// -// - go-cmp will not compared unexported fields by default. -// - cmp.AllowUnexported() requires a concrete struct type and due to the stdlib not -// exporting the errorstring type there doesn't seem to be a way to get at the type. -// - cmpopts.EquateErrors has issues with protobuf types within other error structs. -// -// Due to these factors the easiest thing to do is to create a custom comparer for -// the ConstError type and use it where necessary. -type ConstError struct { - message string -} - -func NewConstError(msg string) ConstError { - return ConstError{message: msg} -} - -func (e ConstError) Error() string { - return e.message -} - type ErrDataParse struct { TypeName string Wrapped error diff --git a/internal/resource/errors_test.go b/internal/resource/errors_test.go index e6739bd7fd807..990a91607723b 100644 --- a/internal/resource/errors_test.go +++ b/internal/resource/errors_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource diff --git a/internal/resource/http/http.go b/internal/resource/http/http.go deleted file mode 100644 index 2a5cfce1fb2be..0000000000000 --- a/internal/resource/http/http.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package http - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "path" - "strings" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/types/known/anypb" - - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - HeaderConsulToken = "x-consul-token" - HeaderConsistencyMode = "x-consul-consistency-mode" -) - -func NewHandler( - client pbresource.ResourceServiceClient, - registry resource.Registry, - parseToken func(req *http.Request, token *string), - logger hclog.Logger) http.Handler { - mux := http.NewServeMux() - for _, t := range registry.Types() { - // List Endpoint - base := strings.ToLower(fmt.Sprintf("/%s/%s/%s", t.Type.Group, t.Type.GroupVersion, t.Type.Kind)) - mux.Handle(base, http.StripPrefix(base, &listHandler{t, client, parseToken, logger})) - - // Individual Resource Endpoints - prefix := strings.ToLower(fmt.Sprintf("%s/", base)) - logger.Info("Registered resource endpoint", "endpoint", prefix) - mux.Handle(prefix, http.StripPrefix(prefix, &resourceHandler{t, client, parseToken, logger})) - } - - return mux -} - -type writeRequest struct { - Metadata map[string]string `json:"metadata"` - Data json.RawMessage `json:"data"` - Owner *pbresource.ID `json:"owner"` -} - -type resourceHandler struct { - reg resource.Registration - client pbresource.ResourceServiceClient - parseToken func(req *http.Request, token *string) - logger hclog.Logger -} - -func (h *resourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - var token string - h.parseToken(r, &token) - ctx := metadata.AppendToOutgoingContext(r.Context(), HeaderConsulToken, token) - switch r.Method { - case http.MethodPut: - h.handleWrite(w, r, ctx) - case http.MethodGet: - h.handleRead(w, r, ctx) - case http.MethodDelete: - h.handleDelete(w, r, ctx) - default: - w.WriteHeader(http.StatusMethodNotAllowed) - return - } -} - -func (h *resourceHandler) handleWrite(w http.ResponseWriter, r *http.Request, ctx context.Context) { - var req writeRequest - // convert req body to writeRequest - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("Request body didn't follow schema.")) - } - // convert data struct to proto message - data := h.reg.Proto.ProtoReflect().New().Interface() - if err := protojson.Unmarshal(req.Data, data); err != nil { - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("Request body didn't follow schema.")) - } - // proto message to any - anyProtoMsg, err := anypb.New(data) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - h.logger.Error("Failed to convert proto message to any type", "error", err) - return - } - - tenancyInfo, params := parseParams(r) - - rsp, err := h.client.Write(ctx, &pbresource.WriteRequest{ - Resource: &pbresource.Resource{ - Id: &pbresource.ID{ - Type: h.reg.Type, - Tenancy: tenancyInfo, - Name: params["resourceName"], - }, - Owner: req.Owner, - Version: params["version"], - Metadata: req.Metadata, - Data: anyProtoMsg, - }, - }) - if err != nil { - handleResponseError(err, w, h.logger) - return - } - - output, err := jsonMarshal(rsp.Resource) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - h.logger.Error("Failed to unmarshal GRPC resource response", "error", err) - return - } - w.Write(output) -} - -func (h *resourceHandler) handleRead(w http.ResponseWriter, r *http.Request, ctx context.Context) { - tenancyInfo, params := parseParams(r) - if params["consistent"] != "" { - ctx = metadata.AppendToOutgoingContext(ctx, "x-consul-consistency-mode", "consistent") - } - - rsp, err := h.client.Read(ctx, &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Type: h.reg.Type, - Tenancy: tenancyInfo, - Name: params["resourceName"], - }, - }) - if err != nil { - handleResponseError(err, w, h.logger) - return - } - - output, err := jsonMarshal(rsp.Resource) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - h.logger.Error("Failed to unmarshal GRPC resource response", "error", err) - return - } - w.Write(output) -} - -// Note: The HTTP endpoints do not accept UID since it is quite unlikely that the user will have access to it -func (h *resourceHandler) handleDelete(w http.ResponseWriter, r *http.Request, ctx context.Context) { - tenancyInfo, params := parseParams(r) - _, err := h.client.Delete(ctx, &pbresource.DeleteRequest{ - Id: &pbresource.ID{ - Type: h.reg.Type, - Tenancy: tenancyInfo, - Name: params["resourceName"], - }, - Version: params["version"], - }) - if err != nil { - handleResponseError(err, w, h.logger) - return - } - w.WriteHeader(http.StatusNoContent) - w.Write([]byte("{}")) -} - -func parseParams(r *http.Request) (tenancy *pbresource.Tenancy, params map[string]string) { - query := r.URL.Query() - tenancy = &pbresource.Tenancy{ - Partition: query.Get("partition"), - PeerName: query.Get("peer_name"), - Namespace: query.Get("namespace"), - } - - resourceName := path.Base(r.URL.Path) - if resourceName == "." || resourceName == "/" { - resourceName = "" - } - - params = make(map[string]string) - params["resourceName"] = resourceName - params["version"] = query.Get("version") - params["namePrefix"] = query.Get("name_prefix") - if _, ok := query["consistent"]; ok { - params["consistent"] = "true" - } - - return tenancy, params -} - -func jsonMarshal(res *pbresource.Resource) ([]byte, error) { - output, err := protojson.Marshal(res) - if err != nil { - return nil, err - } - - var stuff map[string]any - if err := json.Unmarshal(output, &stuff); err != nil { - return nil, err - } - - delete(stuff["data"].(map[string]any), "@type") - return json.MarshalIndent(stuff, "", " ") -} - -func handleResponseError(err error, w http.ResponseWriter, logger hclog.Logger) { - if e, ok := status.FromError(err); ok { - switch e.Code() { - case codes.InvalidArgument: - w.WriteHeader(http.StatusBadRequest) - logger.Info("User has mal-formed request", "error", err) - case codes.NotFound: - w.WriteHeader(http.StatusNotFound) - logger.Info("Received error from resource service: Not found", "error", err) - case codes.PermissionDenied: - w.WriteHeader(http.StatusForbidden) - logger.Info("Received error from resource service: User not authenticated", "error", err) - case codes.Aborted: - w.WriteHeader(http.StatusConflict) - logger.Info("Received error from resource service: the request conflict with the current state of the target resource", "error", err) - default: - w.WriteHeader(http.StatusInternalServerError) - logger.Error("Received error from resource service", "error", err) - } - } else { - w.WriteHeader(http.StatusInternalServerError) - logger.Error("Received error from resource service: not able to parse error returned", "error", err) - } - w.Write([]byte(err.Error())) -} - -type listHandler struct { - reg resource.Registration - client pbresource.ResourceServiceClient - parseToken func(req *http.Request, token *string) - logger hclog.Logger -} - -func (h *listHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet { - w.WriteHeader(http.StatusMethodNotAllowed) - return - } - - var token string - h.parseToken(r, &token) - ctx := metadata.AppendToOutgoingContext(r.Context(), HeaderConsulToken, token) - - tenancyInfo, params := parseParams(r) - if params["consistent"] == "true" { - ctx = metadata.AppendToOutgoingContext(ctx, HeaderConsistencyMode, "consistent") - } - - rsp, err := h.client.List(ctx, &pbresource.ListRequest{ - Type: h.reg.Type, - Tenancy: tenancyInfo, - NamePrefix: params["namePrefix"], - }) - if err != nil { - handleResponseError(err, w, h.logger) - return - } - - output := make([]json.RawMessage, len(rsp.Resources)) - for idx, res := range rsp.Resources { - b, err := jsonMarshal(res) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - h.logger.Error("Failed to unmarshal GRPC resource response", "error", err) - return - } - output[idx] = b - } - - b, err := json.MarshalIndent(struct { - Resources []json.RawMessage `json:"resources"` - }{output}, "", " ") - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - h.logger.Error("Failed to correctly format the list response", "error", err) - return - } - w.Write(b) -} diff --git a/internal/resource/http/http_test.go b/internal/resource/http/http_test.go deleted file mode 100644 index 1edef161fb263..0000000000000 --- a/internal/resource/http/http_test.go +++ /dev/null @@ -1,596 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package http - -import ( - "encoding/json" - "fmt" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/hashicorp/go-hclog" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - resourceSvc "github.com/hashicorp/consul/agent/grpc-external/services/resource" - svctest "github.com/hashicorp/consul/agent/grpc-external/services/resource/testing" - pbdemov1 "github.com/hashicorp/consul/proto/private/pbdemo/v1" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" - "github.com/hashicorp/consul/proto-public/pbresource" - pbdemov2 "github.com/hashicorp/consul/proto/private/pbdemo/v2" - "github.com/hashicorp/consul/sdk/testutil" -) - -const testACLTokenArtistReadPolicy = "00000000-0000-0000-0000-000000000001" -const testACLTokenArtistWritePolicy = "00000000-0000-0000-0000-000000000002" -const testACLTokenArtistListPolicy = "00000000-0000-0000-0000-000000000003" -const fakeToken = "fake-token" - -func parseToken(req *http.Request, token *string) { - *token = req.Header.Get("x-consul-token") -} - -func TestResourceHandler_InputValidation(t *testing.T) { - type testCase struct { - description string - request *http.Request - response *httptest.ResponseRecorder - expectedResponseCode int - } - client := svctest.RunResourceService(t, demo.RegisterTypes) - resourceHandler := resourceHandler{ - resource.Registration{ - Type: demo.TypeV2Artist, - Proto: &pbdemov2.Artist{}, - }, - client, - func(req *http.Request, token *string) { return }, - hclog.NewNullLogger(), - } - - testCases := []testCase{ - { - description: "missing resource name", - request: httptest.NewRequest("PUT", "/?partition=default&peer_name=local&namespace=default", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban", - "genre": "GENRE_COUNTRY" - } - } - `)), - response: httptest.NewRecorder(), - expectedResponseCode: http.StatusBadRequest, - }, - { - description: "wrong schema", - request: httptest.NewRequest("PUT", "/keith-urban?partition=default&peer_name=local&namespace=default", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "dada": { - "name": "Keith Urban", - "genre": "GENRE_COUNTRY" - } - } - `)), - response: httptest.NewRecorder(), - expectedResponseCode: http.StatusBadRequest, - }, - { - description: "no id", - request: httptest.NewRequest("DELETE", "/?partition=default&peer_name=local&namespace=default", strings.NewReader("")), - response: httptest.NewRecorder(), - expectedResponseCode: http.StatusBadRequest, - }, - } - - for _, tc := range testCases { - t.Run(tc.description, func(t *testing.T) { - resourceHandler.ServeHTTP(tc.response, tc.request) - - require.Equal(t, tc.expectedResponseCode, tc.response.Result().StatusCode) - }) - } -} - -func TestResourceWriteHandler(t *testing.T) { - aclResolver := &resourceSvc.MockACLResolver{} - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistReadPolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV1ReadPolicy, demo.ArtistV2ReadPolicy), nil) - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistWritePolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV1WritePolicy, demo.ArtistV2WritePolicy), nil) - - client := svctest.RunResourceServiceWithACL(t, aclResolver, demo.RegisterTypes) - - r := resource.NewRegistry() - demo.RegisterTypes(r) - handler := NewHandler(client, r, parseToken, hclog.NewNullLogger()) - - t.Run("should be blocked if the token is not authorized", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban", - "genre": "GENRE_COUNTRY" - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistReadPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusForbidden, rsp.Result().StatusCode) - }) - - t.Run("should write to the resource backend", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban", - "genre": "GENRE_COUNTRY" - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - require.Equal(t, "Keith Urban", result["data"].(map[string]any)["name"]) - require.Equal(t, "keith-urban", result["id"].(map[string]any)["name"]) - - readRsp, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "keith-urban", - }, - }) - require.NoError(t, err) - require.NotNil(t, readRsp.Resource) - - var artist pbdemov2.Artist - require.NoError(t, readRsp.Resource.Data.UnmarshalTo(&artist)) - require.Equal(t, "Keith Urban", artist.Name) - }) - - t.Run("should update the record with version parameter", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default&version=1", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban Two", - "genre": "GENRE_COUNTRY" - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - require.Equal(t, "Keith Urban Two", result["data"].(map[string]any)["name"]) - require.Equal(t, "keith-urban", result["id"].(map[string]any)["name"]) - }) - - t.Run("should fail the update if the resource's version doesn't match the version of the existing resource", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default&version=1", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban", - "genre": "GENRE_COUNTRY" - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusConflict, rsp.Result().StatusCode) - }) - - t.Run("should write to the resource backend with owner", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v1/artist/keith-urban-v1?partition=default&peer_name=local&namespace=default", strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "Keith Urban V1", - "genre": "GENRE_COUNTRY" - }, - "owner": { - "name": "keith-urban", - "type": { - "group": "demo", - "group_version": "v2", - "kind": "Artist" - }, - "tenancy": { - "partition": "default", - "peer_name": "local", - "namespace": "default" - } - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - require.Equal(t, "Keith Urban V1", result["data"].(map[string]any)["name"]) - require.Equal(t, "keith-urban-v1", result["id"].(map[string]any)["name"]) - - readRsp, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Type: demo.TypeV1Artist, - Tenancy: demo.TenancyDefault, - Name: "keith-urban-v1", - }, - }) - require.NoError(t, err) - require.NotNil(t, readRsp.Resource) - require.Equal(t, "keith-urban", readRsp.Resource.Owner.Name) - - var artist pbdemov1.Artist - require.NoError(t, readRsp.Resource.Data.UnmarshalTo(&artist)) - require.Equal(t, "Keith Urban V1", artist.Name) - }) -} - -type ResourceUri struct { - group string - version string - kind string - resourceName string -} - -func createResource(t *testing.T, artistHandler http.Handler, resourceUri *ResourceUri) map[string]any { - rsp := httptest.NewRecorder() - - if resourceUri == nil { - resourceUri = &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "keith-urban"} - } - - req := httptest.NewRequest("PUT", fmt.Sprintf("/%s/%s/%s/%s?partition=default&peer_name=local&namespace=default", resourceUri.group, resourceUri.version, resourceUri.kind, resourceUri.resourceName), strings.NewReader(` - { - "metadata": { - "foo": "bar" - }, - "data": { - "name": "test", - "genre": "GENRE_COUNTRY" - } - } - `)) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - artistHandler.ServeHTTP(rsp, req) - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - return result -} - -func deleteResource(t *testing.T, artistHandler http.Handler, resourceUri *ResourceUri) { - rsp := httptest.NewRecorder() - - if resourceUri == nil { - resourceUri = &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "keith-urban"} - } - - req := httptest.NewRequest("DELETE", fmt.Sprintf("/%s/%s/%s/%s?partition=default&peer_name=local&namespace=default", resourceUri.group, resourceUri.version, resourceUri.kind, resourceUri.resourceName), strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - artistHandler.ServeHTTP(rsp, req) - require.Equal(t, http.StatusNoContent, rsp.Result().StatusCode) -} - -func TestResourceReadHandler(t *testing.T) { - aclResolver := &resourceSvc.MockACLResolver{} - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistReadPolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV1ReadPolicy, demo.ArtistV2ReadPolicy), nil) - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistWritePolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV1WritePolicy, demo.ArtistV2WritePolicy), nil) - aclResolver.On("ResolveTokenAndDefaultMeta", fakeToken, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, ""), nil) - - client := svctest.RunResourceServiceWithACL(t, aclResolver, demo.RegisterTypes) - - r := resource.NewRegistry() - demo.RegisterTypes(r) - handler := NewHandler(client, r, parseToken, hclog.NewNullLogger()) - - createdResource := createResource(t, handler, nil) - - t.Run("Read resource", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default&consistent", nil) - - req.Header.Add("x-consul-token", testACLTokenArtistReadPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - require.Equal(t, result, createdResource) - }) - - t.Run("should not be found if resource not exist", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist/keith-not-exist?partition=default&peer_name=local&namespace=default&consistent", nil) - - req.Header.Add("x-consul-token", testACLTokenArtistReadPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusNotFound, rsp.Result().StatusCode) - }) - - t.Run("should be blocked if the token is not authorized", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default&consistent", nil) - - req.Header.Add("x-consul-token", fakeToken) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusForbidden, rsp.Result().StatusCode) - }) -} - -func TestResourceDeleteHandler(t *testing.T) { - aclResolver := &resourceSvc.MockACLResolver{} - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistReadPolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV2ReadPolicy), nil) - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistWritePolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV2WritePolicy), nil) - - client := svctest.RunResourceServiceWithACL(t, aclResolver, demo.RegisterTypes) - - r := resource.NewRegistry() - demo.RegisterTypes(r) - - handler := NewHandler(client, r, parseToken, hclog.NewNullLogger()) - - t.Run("should surface PermissionDenied error from resource service", func(t *testing.T) { - createResource(t, handler, nil) - - deleteRsp := httptest.NewRecorder() - deletReq := httptest.NewRequest("DELETE", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - deletReq.Header.Add("x-consul-token", testACLTokenArtistReadPolicy) - - handler.ServeHTTP(deleteRsp, deletReq) - - require.Equal(t, http.StatusForbidden, deleteRsp.Result().StatusCode) - }) - - t.Run("should delete a resource without version", func(t *testing.T) { - createResource(t, handler, nil) - - deleteRsp := httptest.NewRecorder() - deletReq := httptest.NewRequest("DELETE", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - deletReq.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(deleteRsp, deletReq) - - require.Equal(t, http.StatusNoContent, deleteRsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(deleteRsp.Body).Decode(&result)) - require.Empty(t, result) - - _, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "keith-urban", - }, - }) - require.ErrorContains(t, err, "resource not found") - }) - - t.Run("should delete a resource with version", func(t *testing.T) { - createResource(t, handler, nil) - - rsp := httptest.NewRecorder() - req := httptest.NewRequest("DELETE", "/demo/v2/artist/keith-urban?partition=default&peer_name=local&namespace=default&version=1", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusNoContent, rsp.Result().StatusCode) - - _, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{ - Id: &pbresource.ID{ - Type: demo.TypeV2Artist, - Tenancy: demo.TenancyDefault, - Name: "keith-urban", - }, - }) - require.ErrorContains(t, err, "resource not found") - }) -} - -func TestResourceListHandler(t *testing.T) { - aclResolver := &resourceSvc.MockACLResolver{} - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistListPolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV2ListPolicy), nil) - aclResolver.On("ResolveTokenAndDefaultMeta", testACLTokenArtistWritePolicy, mock.Anything, mock.Anything). - Return(svctest.AuthorizerFrom(t, demo.ArtistV2WritePolicy), nil) - - client := svctest.RunResourceServiceWithACL(t, aclResolver, demo.RegisterTypes) - - r := resource.NewRegistry() - demo.RegisterTypes(r) - - handler := NewHandler(client, r, parseToken, hclog.NewNullLogger()) - - t.Run("should return MethodNotAllowed", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("PUT", "/demo/v2/artist?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusMethodNotAllowed, rsp.Result().StatusCode) - }) - - t.Run("should be blocked if the token is not authorized", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistWritePolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusForbidden, rsp.Result().StatusCode) - }) - - t.Run("should return list of resources", func(t *testing.T) { - resourceUri1 := &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "steve"} - resource1 := createResource(t, handler, resourceUri1) - resourceUri2 := &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "elvis"} - resource2 := createResource(t, handler, resourceUri2) - - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - - resources, _ := result["resources"].([]any) - require.Len(t, resources, 2) - - expected := []map[string]any{resource1, resource2} - require.Contains(t, expected, resources[0]) - require.Contains(t, expected, resources[1]) - - // clean up - deleteResource(t, handler, resourceUri1) - deleteResource(t, handler, resourceUri2) - }) - - t.Run("should return empty list when no resources are found", func(t *testing.T) { - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist?partition=default&peer_name=local&namespace=default", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - - resources, _ := result["resources"].([]any) - require.Len(t, resources, 0) - }) - - t.Run("should return empty list when name prefix matches don't match", func(t *testing.T) { - createResource(t, handler, nil) - - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist?partition=default&peer_name=local&namespace=default&name_prefix=noname", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - - resources, _ := result["resources"].([]any) - require.Len(t, resources, 0) - - // clean up - deleteResource(t, handler, nil) - }) - - t.Run("should return list of resources matching name prefix", func(t *testing.T) { - resourceUri1 := &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "steve"} - resource1 := createResource(t, handler, resourceUri1) - resourceUri2 := &ResourceUri{group: "demo", version: "v2", kind: "artist", resourceName: "elvis"} - createResource(t, handler, resourceUri2) - - rsp := httptest.NewRecorder() - req := httptest.NewRequest("GET", "/demo/v2/artist?partition=default&peer_name=local&namespace=default&name_prefix=steve", strings.NewReader("")) - - req.Header.Add("x-consul-token", testACLTokenArtistListPolicy) - - handler.ServeHTTP(rsp, req) - - require.Equal(t, http.StatusOK, rsp.Result().StatusCode) - - var result map[string]any - require.NoError(t, json.NewDecoder(rsp.Body).Decode(&result)) - - resources, _ := result["resources"].([]any) - require.Len(t, resources, 1) - - require.Equal(t, resource1, resources[0]) - - // clean up - deleteResource(t, handler, resourceUri1) - deleteResource(t, handler, resourceUri2) - }) -} diff --git a/internal/resource/mappers/bimapper/bimapper.go b/internal/resource/mappers/bimapper/bimapper.go deleted file mode 100644 index b173813067372..0000000000000 --- a/internal/resource/mappers/bimapper/bimapper.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package bimapper - -import ( - "context" - "fmt" - "sync" - - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// Mapper tracks bidirectional lookup for an item that contains references to -// other items. For example: an HTTPRoute has many references to Services. -// -// The primary object is called the "item" and an item has many "links". -// Tracking is done on items. -type Mapper struct { - itemType, linkType *pbresource.Type - - lock sync.Mutex - itemToLink map[resource.ReferenceKey]map[resource.ReferenceKey]struct{} - linkToItem map[resource.ReferenceKey]map[resource.ReferenceKey]struct{} -} - -// New creates a bimapper between the two required provided types. -func New(itemType, linkType *pbresource.Type) *Mapper { - if itemType == nil { - panic("itemType is required") - } - if linkType == nil { - panic("linkType is required") - } - return &Mapper{ - itemType: itemType, - linkType: linkType, - itemToLink: make(map[resource.ReferenceKey]map[resource.ReferenceKey]struct{}), - linkToItem: make(map[resource.ReferenceKey]map[resource.ReferenceKey]struct{}), - } -} - -// Reset clears the internal mappings. -func (m *Mapper) Reset() { - m.lock.Lock() - defer m.lock.Unlock() - m.itemToLink = make(map[resource.ReferenceKey]map[resource.ReferenceKey]struct{}) - m.linkToItem = make(map[resource.ReferenceKey]map[resource.ReferenceKey]struct{}) -} - -// IsEmpty returns true if the internal structures are empty. -func (m *Mapper) IsEmpty() bool { - m.lock.Lock() - defer m.lock.Unlock() - return len(m.itemToLink) == 0 && len(m.linkToItem) == 0 -} - -// UntrackItem removes tracking for the provided item. The item type MUST match -// the type configured for the item. -func (m *Mapper) UntrackItem(item resource.ReferenceOrID) { - if !resource.EqualType(item.GetType(), m.itemType) { - panic(fmt.Sprintf("expected item type %q got %q", - resource.TypeToString(m.itemType), - resource.TypeToString(item.GetType()), - )) - } - m.untrackItem(resource.NewReferenceKey(item)) -} - -// UntrackLink removes tracking for the provided link. The link type MUST match -// the type configured for the link. -func (m *Mapper) UntrackLink(link resource.ReferenceOrID) { - if !resource.EqualType(link.GetType(), m.linkType) { - panic(fmt.Sprintf("expected link type %q got %q", - resource.TypeToString(m.linkType), - resource.TypeToString(link.GetType()), - )) - } - m.untrackLink(resource.NewReferenceKey(link)) -} - -func (m *Mapper) untrackLink(link resource.ReferenceKey) { - m.lock.Lock() - defer m.lock.Unlock() - m.removeLinkLocked(link) -} - -func (m *Mapper) untrackItem(item resource.ReferenceKey) { - m.lock.Lock() - defer m.lock.Unlock() - m.removeItemLocked(item) -} - -// TrackItem adds tracking for the provided item. The item and link types MUST -// match the types configured for the items and links. -func (m *Mapper) TrackItem(item resource.ReferenceOrID, links []resource.ReferenceOrID) { - if !resource.EqualType(item.GetType(), m.itemType) { - panic(fmt.Sprintf("expected item type %q got %q", - resource.TypeToString(m.itemType), - resource.TypeToString(item.GetType()), - )) - } - - linksAsKeys := make([]resource.ReferenceKey, 0, len(links)) - for _, link := range links { - if !resource.EqualType(link.GetType(), m.linkType) { - panic(fmt.Sprintf("expected link type %q got %q", - resource.TypeToString(m.linkType), - resource.TypeToString(link.GetType()), - )) - } - linksAsKeys = append(linksAsKeys, resource.NewReferenceKey(link)) - } - - m.trackItem(resource.NewReferenceKey(item), linksAsKeys) -} - -func (m *Mapper) trackItem(item resource.ReferenceKey, links []resource.ReferenceKey) { - m.lock.Lock() - defer m.lock.Unlock() - - m.removeItemLocked(item) - m.addItemLocked(item, links) -} - -// you must hold the lock before calling this function -func (m *Mapper) removeItemLocked(item resource.ReferenceKey) { - for link := range m.itemToLink[item] { - delete(m.linkToItem[link], item) - if len(m.linkToItem[link]) == 0 { - delete(m.linkToItem, link) - } - } - delete(m.itemToLink, item) -} - -func (m *Mapper) removeLinkLocked(link resource.ReferenceKey) { - for item := range m.linkToItem[link] { - delete(m.itemToLink[item], link) - if len(m.itemToLink[item]) == 0 { - delete(m.itemToLink, item) - } - } - delete(m.linkToItem, link) -} - -// you must hold the lock before calling this function -func (m *Mapper) addItemLocked(item resource.ReferenceKey, links []resource.ReferenceKey) { - if m.itemToLink[item] == nil { - m.itemToLink[item] = make(map[resource.ReferenceKey]struct{}) - } - for _, link := range links { - m.itemToLink[item][link] = struct{}{} - - if m.linkToItem[link] == nil { - m.linkToItem[link] = make(map[resource.ReferenceKey]struct{}) - } - m.linkToItem[link][item] = struct{}{} - } -} - -// LinksForItem returns references to links related to the requested item. -// Deprecated: use LinksRefs -func (m *Mapper) LinksForItem(item *pbresource.ID) []*pbresource.Reference { - return m.LinkRefsForItem(item) -} - -// LinkRefsForItem returns references to links related to the requested item. -func (m *Mapper) LinkRefsForItem(item *pbresource.ID) []*pbresource.Reference { - if !resource.EqualType(item.Type, m.itemType) { - panic(fmt.Sprintf("expected item type %q got %q", - resource.TypeToString(m.itemType), - resource.TypeToString(item.Type), - )) - } - - m.lock.Lock() - defer m.lock.Unlock() - - links, ok := m.itemToLink[resource.NewReferenceKey(item)] - if !ok { - return nil - } - - out := make([]*pbresource.Reference, 0, len(links)) - for link := range links { - out = append(out, link.ToReference()) - } - return out -} - -// LinkIDsForItem returns IDs to links related to the requested item. -func (m *Mapper) LinkIDsForItem(item *pbresource.ID) []*pbresource.ID { - if !resource.EqualType(item.Type, m.itemType) { - panic(fmt.Sprintf("expected item type %q got %q", - resource.TypeToString(m.itemType), - resource.TypeToString(item.Type), - )) - } - - m.lock.Lock() - defer m.lock.Unlock() - - links, ok := m.itemToLink[resource.NewReferenceKey(item)] - if !ok { - return nil - } - - out := make([]*pbresource.ID, 0, len(links)) - for l := range links { - out = append(out, l.ToID()) - } - return out -} - -// ItemsForLink returns item ids for items related to the provided link. -// Deprecated: use ItemIDsForLink -func (m *Mapper) ItemsForLink(link *pbresource.ID) []*pbresource.ID { - return m.ItemIDsForLink(link) -} - -// ItemIDsForLink returns item ids for items related to the provided link. -func (m *Mapper) ItemIDsForLink(link *pbresource.ID) []*pbresource.ID { - if !resource.EqualType(link.Type, m.linkType) { - panic(fmt.Sprintf("expected link type %q got %q", - resource.TypeToString(m.linkType), - resource.TypeToString(link.Type), - )) - } - - return m.itemIDsByLink(resource.NewReferenceKey(link)) -} - -// ItemRefsForLink returns item references for items related to the provided link. -func (m *Mapper) ItemRefsForLink(link *pbresource.ID) []*pbresource.Reference { - if !resource.EqualType(link.Type, m.linkType) { - panic(fmt.Sprintf("expected link type %q got %q", - resource.TypeToString(m.linkType), - resource.TypeToString(link.Type), - )) - } - - return m.itemRefsByLink(resource.NewReferenceKey(link)) -} - -// MapLink is suitable as a DependencyMapper to map the provided link event to its item. -func (m *Mapper) MapLink(_ context.Context, _ controller.Runtime, res *pbresource.Resource) ([]controller.Request, error) { - link := res.Id - - if !resource.EqualType(link.Type, m.linkType) { - return nil, fmt.Errorf("expected type %q got %q", - resource.TypeToString(m.linkType), - resource.TypeToString(link.Type), - ) - } - - itemIDs := m.itemIDsByLink(resource.NewReferenceKey(link)) - - out := make([]controller.Request, 0, len(itemIDs)) - for _, item := range itemIDs { - if !resource.EqualType(item.Type, m.itemType) { - return nil, fmt.Errorf("expected type %q got %q", - resource.TypeToString(m.itemType), - resource.TypeToString(item.Type), - ) - } - out = append(out, controller.Request{ID: item}) - } - return out, nil -} - -func (m *Mapper) itemIDsByLink(link resource.ReferenceKey) []*pbresource.ID { - m.lock.Lock() - defer m.lock.Unlock() - - items, ok := m.linkToItem[link] - if !ok { - return nil - } - - out := make([]*pbresource.ID, 0, len(items)) - for item := range items { - out = append(out, item.ToID()) - } - return out -} - -func (m *Mapper) itemRefsByLink(link resource.ReferenceKey) []*pbresource.Reference { - m.lock.Lock() - defer m.lock.Unlock() - - items, ok := m.linkToItem[link] - if !ok { - return nil - } - - out := make([]*pbresource.Reference, 0, len(items)) - for item := range items { - out = append(out, item.ToReference()) - } - return out -} diff --git a/internal/resource/mappers/bimapper/bimapper_test.go b/internal/resource/mappers/bimapper/bimapper_test.go deleted file mode 100644 index ce355bfc416da..0000000000000 --- a/internal/resource/mappers/bimapper/bimapper_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package bimapper - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/controller" - "github.com/hashicorp/consul/internal/resource" - rtest "github.com/hashicorp/consul/internal/resource/resourcetest" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" -) - -const ( - fakeGroupName = "catalog" - fakeVersion = "v1" -) - -var ( - fakeFooType = &pbresource.Type{ - Group: fakeGroupName, - GroupVersion: fakeVersion, - Kind: "Foo", - } - fakeBarType = &pbresource.Type{ - Group: fakeGroupName, - GroupVersion: fakeVersion, - Kind: "Bar", - } -) - -func TestMapper(t *testing.T) { - // Create an advance pointer to some services. - - randoSvc := rtest.Resource(fakeBarType, "rando").Build() - apiSvc := rtest.Resource(fakeBarType, "api").Build() - fooSvc := rtest.Resource(fakeBarType, "foo").Build() - barSvc := rtest.Resource(fakeBarType, "bar").Build() - wwwSvc := rtest.Resource(fakeBarType, "www").Build() - - apiRef := newRef(fakeBarType, "api") - fooRef := newRef(fakeBarType, "foo") - barRef := newRef(fakeBarType, "bar") - wwwRef := newRef(fakeBarType, "www") - - fail1 := rtest.Resource(fakeFooType, "api").Build() - fail1Refs := []resource.ReferenceOrID{ - apiRef, - fooRef, - barRef, - } - - fail2 := rtest.Resource(fakeFooType, "www").Build() - fail2Refs := []resource.ReferenceOrID{ - wwwRef, - fooRef, - } - - fail1UpdatedRefs := []resource.ReferenceOrID{ - apiRef, - barRef, - } - - m := New(fakeFooType, fakeBarType) - - // Nothing tracked yet so we assume nothing. - requireLinksForItem(t, m, fail1.Id) - requireLinksForItem(t, m, fail2.Id) - requireItemsForLink(t, m, apiRef) - requireItemsForLink(t, m, fooRef) - requireItemsForLink(t, m, barRef) - requireItemsForLink(t, m, wwwRef) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) - - // no-ops - m.UntrackItem(fail1.Id) - - // still nothing - requireLinksForItem(t, m, fail1.Id) - requireLinksForItem(t, m, fail2.Id) - requireItemsForLink(t, m, apiRef) - requireItemsForLink(t, m, fooRef) - requireItemsForLink(t, m, barRef) - requireItemsForLink(t, m, wwwRef) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) - - // Actually insert some data. - m.TrackItem(fail1.Id, fail1Refs) - - // Check links mapping - requireLinksForItem(t, m, fail1.Id, fail1Refs...) - - requireLinksForItem(t, m, fail1.Id, fail1Refs...) - requireItemsForLink(t, m, apiRef, fail1.Id) - requireItemsForLink(t, m, fooRef, fail1.Id) - requireItemsForLink(t, m, barRef, fail1.Id) - requireItemsForLink(t, m, wwwRef) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc) - - // track it again, no change - m.TrackItem(fail1.Id, fail1Refs) - - requireLinksForItem(t, m, fail1.Id, fail1Refs...) - requireItemsForLink(t, m, apiRef, fail1.Id) - requireItemsForLink(t, m, fooRef, fail1.Id) - requireItemsForLink(t, m, barRef, fail1.Id) - requireItemsForLink(t, m, wwwRef) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc) - - // track new one that overlaps slightly - m.TrackItem(fail2.Id, fail2Refs) - - // Check links mapping for the new one - requireLinksForItem(t, m, fail1.Id, fail1Refs...) - requireLinksForItem(t, m, fail2.Id, fail2Refs...) - requireItemsForLink(t, m, apiRef, fail1.Id) - requireItemsForLink(t, m, fooRef, fail1.Id, fail2.Id) - requireItemsForLink(t, m, barRef, fail1.Id) - requireItemsForLink(t, m, wwwRef, fail2.Id) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail1.Id, fail2.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // update the original to change it - m.TrackItem(fail1.Id, fail1UpdatedRefs) - - requireLinksForItem(t, m, fail1.Id, fail1UpdatedRefs...) - requireLinksForItem(t, m, fail2.Id, fail2Refs...) - requireItemsForLink(t, m, apiRef, fail1.Id) - requireItemsForLink(t, m, fooRef, fail2.Id) - requireItemsForLink(t, m, barRef, fail1.Id) - requireItemsForLink(t, m, wwwRef, fail2.Id) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc, fail1.Id) - requireServicesTracked(t, m, fooSvc, fail2.Id) - requireServicesTracked(t, m, barSvc, fail1.Id) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // delete the original - m.UntrackItem(fail1.Id) - - requireLinksForItem(t, m, fail1.Id) - requireLinksForItem(t, m, fail2.Id, fail2Refs...) - requireItemsForLink(t, m, apiRef) - requireItemsForLink(t, m, fooRef, fail2.Id) - requireItemsForLink(t, m, barRef) - requireItemsForLink(t, m, wwwRef, fail2.Id) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc, fail2.Id) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc, fail2.Id) - - // delete the link - m.UntrackLink(newRef(fakeBarType, "www")) - - requireLinksForItem(t, m, fail2.Id, newRef(fakeBarType, "foo")) - - m.UntrackLink(newRef(fakeBarType, "foo")) - - requireLinksForItem(t, m, fail2.Id) - - // delete another item - m.UntrackItem(fail2.Id) - - requireLinksForItem(t, m, fail1.Id) - requireLinksForItem(t, m, fail2.Id) - requireItemsForLink(t, m, apiRef) - requireItemsForLink(t, m, fooRef) - requireItemsForLink(t, m, barRef) - requireItemsForLink(t, m, wwwRef) - - requireServicesTracked(t, m, randoSvc) - requireServicesTracked(t, m, apiSvc) - requireServicesTracked(t, m, fooSvc) - requireServicesTracked(t, m, barSvc) - requireServicesTracked(t, m, wwwSvc) - - // Reset the mapper and check that its internal maps are empty. - m.Reset() - require.True(t, m.IsEmpty()) -} - -func TestPanics(t *testing.T) { - t.Run("new mapper without types", func(t *testing.T) { - require.PanicsWithValue(t, "itemType is required", func() { - New(nil, nil) - }) - - require.PanicsWithValue(t, "itemType is required", func() { - New(nil, fakeBarType) - }) - - require.PanicsWithValue(t, "linkType is required", func() { - New(fakeFooType, nil) - }) - }) - - t.Run("UntrackItem: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected item type \"catalog.v1.Foo\" got \"catalog.v1.Bar\"", func() { - // Calling UntrackItem with link type instead of item type - m.UntrackItem(rtest.Resource(fakeBarType, "test").ID()) - }) - }) - - t.Run("TrackItem: mismatched item type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected item type \"catalog.v1.Foo\" got \"catalog.v1.Bar\"", func() { - // Calling UntrackItem with link type instead of item type - m.TrackItem(rtest.Resource(fakeBarType, "test").ID(), nil) - }) - }) - - t.Run("TrackItem: mismatched link type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected link type \"catalog.v1.Bar\" got \"catalog.v1.Foo\"", func() { - // Calling UntrackItem with link type instead of item type - links := []resource.ReferenceOrID{ - rtest.Resource(fakeFooType, "link").ID(), - } - m.TrackItem(rtest.Resource(fakeFooType, "test").ID(), links) - }) - }) - - t.Run("UntrackLink: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected link type \"catalog.v1.Bar\" got \"catalog.v1.Foo\"", func() { - m.UntrackLink(rtest.Resource(fakeFooType, "test").ID()) - }) - }) - - t.Run("LinkRefsForItem: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected item type \"catalog.v1.Foo\" got \"catalog.v1.Bar\"", func() { - m.LinkRefsForItem(rtest.Resource(fakeBarType, "test").ID()) - }) - }) - - t.Run("LinkRefsForItem: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected item type \"catalog.v1.Foo\" got \"catalog.v1.Bar\"", func() { - m.LinkIDsForItem(rtest.Resource(fakeBarType, "test").ID()) - }) - }) - - t.Run("ItemRefsForLink: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected link type \"catalog.v1.Bar\" got \"catalog.v1.Foo\"", func() { - m.ItemRefsForLink(rtest.Resource(fakeFooType, "test").ID()) - }) - }) - - t.Run("ItemIDsForLink: mismatched type", func(t *testing.T) { - m := New(fakeFooType, fakeBarType) - require.PanicsWithValue(t, "expected link type \"catalog.v1.Bar\" got \"catalog.v1.Foo\"", func() { - m.ItemIDsForLink(rtest.Resource(fakeFooType, "test").ID()) - }) - }) -} - -func requireServicesTracked(t *testing.T, mapper *Mapper, link *pbresource.Resource, items ...*pbresource.ID) { - t.Helper() - - reqs, err := mapper.MapLink( - context.Background(), - controller.Runtime{}, - link, - ) - require.NoError(t, err) - - require.Len(t, reqs, len(items)) - - // Also check items IDs and Refs for link. - ids := mapper.ItemIDsForLink(link.Id) - require.Len(t, ids, len(items)) - - refs := mapper.ItemRefsForLink(link.Id) - require.Len(t, refs, len(items)) - - for _, item := range items { - prototest.AssertContainsElement(t, reqs, controller.Request{ID: item}) - prototest.AssertContainsElement(t, ids, item) - prototest.AssertContainsElement(t, refs, resource.Reference(item, "")) - } -} - -func requireItemsForLink(t *testing.T, mapper *Mapper, link *pbresource.Reference, items ...*pbresource.ID) { - t.Helper() - - got := mapper.ItemIDsForLink(resource.IDFromReference(link)) - - prototest.AssertElementsMatch(t, items, got) -} - -func requireLinksForItem(t *testing.T, mapper *Mapper, item *pbresource.ID, links ...resource.ReferenceOrID) { - t.Helper() - - var expLinkRefs []*pbresource.Reference - var expLinkIDs []*pbresource.ID - - for _, l := range links { - expLinkRefs = append(expLinkRefs, &pbresource.Reference{ - Name: l.GetName(), - Tenancy: l.GetTenancy(), - Type: l.GetType(), - }) - expLinkIDs = append(expLinkIDs, &pbresource.ID{ - Name: l.GetName(), - Tenancy: l.GetTenancy(), - Type: l.GetType(), - }) - } - - refs := mapper.LinkRefsForItem(item) - require.Len(t, refs, len(links)) - prototest.AssertElementsMatch(t, expLinkRefs, refs) - - ids := mapper.LinkIDsForItem(item) - require.Len(t, refs, len(links)) - prototest.AssertElementsMatch(t, expLinkIDs, ids) -} - -func newRef(typ *pbresource.Type, name string) *pbresource.Reference { - return rtest.Resource(typ, name).Reference("") -} diff --git a/internal/resource/reaper/controller.go b/internal/resource/reaper/controller.go index f8de86f92196e..7a7789f986a0d 100644 --- a/internal/resource/reaper/controller.go +++ b/internal/resource/reaper/controller.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package reaper diff --git a/internal/resource/reaper/controller_test.go b/internal/resource/reaper/controller_test.go index c06ccedab582d..9e6f0f3d5a07f 100644 --- a/internal/resource/reaper/controller_test.go +++ b/internal/resource/reaper/controller_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package reaper diff --git a/internal/resource/reference.go b/internal/resource/reference.go index 47c2a0da2dedf..80492c98787a2 100644 --- a/internal/resource/reference.go +++ b/internal/resource/reference.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource @@ -14,26 +14,3 @@ func Reference(id *pbresource.ID, section string) *pbresource.Reference { Section: section, } } - -// IDFromReference returns a Reference converted into an ID. NOTE: the UID -// field is not populated, and the Section field of a reference is dropped. -func IDFromReference(ref *pbresource.Reference) *pbresource.ID { - return &pbresource.ID{ - Type: ref.Type, - Tenancy: ref.Tenancy, - Name: ref.Name, - } -} - -// ReferenceOrID is the common accessors shared by pbresource.Reference and -// pbresource.ID. -type ReferenceOrID interface { - GetType() *pbresource.Type - GetTenancy() *pbresource.Tenancy - GetName() string -} - -var ( - _ ReferenceOrID = (*pbresource.ID)(nil) - _ ReferenceOrID = (*pbresource.Reference)(nil) -) diff --git a/internal/resource/refkey.go b/internal/resource/refkey.go deleted file mode 100644 index 44f0765c206c0..0000000000000 --- a/internal/resource/refkey.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource - -import ( - "fmt" - "strings" - - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// ReferenceKey is the pointer-free representation of a ReferenceOrID -// suitable for a go map key. -type ReferenceKey struct { - GVK string - Partition string // Tenancy.* - Namespace string // Tenancy.* - PeerName string // Tenancy.* - Name string -} - -// String returns a string representation of the ReferenceKey. This should not -// be relied upon nor parsed and is provided just for debugging and logging -// reasons. -// -// This format should be aligned with IDToString and ReferenceToString. -func (r ReferenceKey) String() string { - return fmt.Sprintf("%s/%s.%s.%s/%s", - r.GVK, - orDefault(r.Partition, "default"), - orDefault(r.PeerName, "local"), - orDefault(r.Namespace, "default"), - r.Name, - ) -} - -func (r ReferenceKey) GetTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - Partition: r.Partition, - PeerName: r.PeerName, - Namespace: r.Namespace, - } -} - -// ToReference converts this back into a pbresource.ID. -func (r ReferenceKey) ToID() *pbresource.ID { - return &pbresource.ID{ - Type: GVKToType(r.GVK), - Tenancy: r.GetTenancy(), - Name: r.Name, - } -} - -// ToReference converts this back into a pbresource.Reference. -func (r ReferenceKey) ToReference() *pbresource.Reference { - return &pbresource.Reference{ - Type: GVKToType(r.GVK), - Tenancy: r.GetTenancy(), - Name: r.Name, - } -} - -func (r ReferenceKey) GoString() string { return r.String() } - -func NewReferenceKey(refOrID ReferenceOrID) ReferenceKey { - return ReferenceKey{ - GVK: ToGVK(refOrID.GetType()), - Partition: orDefault(refOrID.GetTenancy().GetPartition(), "default"), - Namespace: orDefault(refOrID.GetTenancy().GetNamespace(), "default"), - PeerName: orDefault(refOrID.GetTenancy().GetPeerName(), "local"), - Name: refOrID.GetName(), - } -} - -func orDefault(v, def string) string { - if v == "" { - return def - } - return v -} - -func GVKToType(gvk string) *pbresource.Type { - parts := strings.Split(gvk, ".") - if len(parts) != 3 { - panic("bad gvk") - } - return &pbresource.Type{ - Group: parts[0], - GroupVersion: parts[1], - Kind: parts[2], - } -} diff --git a/internal/resource/refkey_test.go b/internal/resource/refkey_test.go deleted file mode 100644 index 8c4b5eaf92b2f..0000000000000 --- a/internal/resource/refkey_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" -) - -func TestReferenceKey(t *testing.T) { - tenancy1 := &pbresource.Tenancy{} - tenancy1_actual := defaultTenancy() - tenancy2 := &pbresource.Tenancy{ - Partition: "ap1", - Namespace: "ns-billing", - PeerName: "peer-dc4", - } - tenancy3 := &pbresource.Tenancy{ - Partition: "ap2", - Namespace: "ns-intern", - PeerName: "peer-sea", - } - - res1, err := demo.GenerateV2Artist() - require.NoError(t, err) - res1.Id.Tenancy = tenancy1 - - res2, err := demo.GenerateV2Artist() - require.NoError(t, err) - res2.Id.Tenancy = tenancy2 - - res3, err := demo.GenerateV2Artist() - require.NoError(t, err) - res3.Id.Tenancy = tenancy3 - - id1 := res1.Id - id2 := res2.Id - id3 := res3.Id - - ref1 := resource.Reference(id1, "") - ref2 := resource.Reference(id2, "") - ref3 := resource.Reference(id3, "") - - idRK1 := resource.NewReferenceKey(id1) - idRK2 := resource.NewReferenceKey(id2) - idRK3 := resource.NewReferenceKey(id3) - - refRK1 := resource.NewReferenceKey(ref1) - refRK2 := resource.NewReferenceKey(ref2) - refRK3 := resource.NewReferenceKey(ref3) - - require.Equal(t, idRK1, refRK1) - require.Equal(t, idRK2, refRK2) - require.Equal(t, idRK3, refRK3) - - prototest.AssertDeepEqual(t, tenancy1_actual, idRK1.GetTenancy()) - prototest.AssertDeepEqual(t, tenancy2, idRK2.GetTenancy()) - prototest.AssertDeepEqual(t, tenancy3, idRK3.GetTenancy()) - - // Now that we tested the defaulting, swap out the tenancy in the id so - // that the comparisons work. - id1.Tenancy = tenancy1_actual - ref1.Tenancy = tenancy1_actual - - prototest.AssertDeepEqual(t, id1, idRK1.ToID()) - prototest.AssertDeepEqual(t, id2, idRK2.ToID()) - prototest.AssertDeepEqual(t, id3, idRK3.ToID()) - - prototest.AssertDeepEqual(t, ref1, refRK1.ToReference()) - prototest.AssertDeepEqual(t, ref2, refRK2.ToReference()) - prototest.AssertDeepEqual(t, ref3, refRK3.ToReference()) -} - -func defaultTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - Partition: "default", - Namespace: "default", - PeerName: "local", - } -} diff --git a/internal/resource/registry.go b/internal/resource/registry.go index 575bf6feafdc6..0004acfff4c6a 100644 --- a/internal/resource/registry.go +++ b/internal/resource/registry.go @@ -1,12 +1,11 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource import ( "fmt" "regexp" - "strings" "sync" "google.golang.org/protobuf/proto" @@ -27,8 +26,6 @@ type Registry interface { // Resolve the given resource type and its hooks. Resolve(typ *pbresource.Type) (reg Registration, ok bool) - - Types() []Registration } type Registration struct { @@ -45,12 +42,11 @@ type Registration struct { // check for required fields). Validate func(*pbresource.Resource) error - // Mutate is called to fill out any autogenerated fields (e.g. UUIDs) or - // apply defaults before validation. + // Mutate is called to fill out any autogenerated fields (e.g. UUIDs). Mutate func(*pbresource.Resource) error - // Scope describes the tenancy scope of a resource. - Scope Scope + // In the future, we'll add hooks, the controller etc. here. + // TODO: https://github.com/hashicorp/consul/pull/16622#discussion_r1134515909 } type ACLHooks struct { @@ -58,17 +54,17 @@ type ACLHooks struct { // RPCs. // // If it is omitted, `operator:read` permission is assumed. - Read func(acl.Authorizer, *acl.AuthorizerContext, *pbresource.ID) error + Read func(acl.Authorizer, *pbresource.ID) error // Write is used to authorize Write and Delete RPCs. // // If it is omitted, `operator:write` permission is assumed. - Write func(acl.Authorizer, *acl.AuthorizerContext, *pbresource.Resource) error + Write func(acl.Authorizer, *pbresource.ID) error // List is used to authorize List RPCs. // // If it is omitted, we only filter the results using Read. - List func(acl.Authorizer, *acl.AuthorizerContext) error + List func(acl.Authorizer, *pbresource.Tenancy) error } // Resource type registry @@ -120,17 +116,17 @@ func (r *TypeRegistry) Register(registration Registration) { registration.ACLs = &ACLHooks{} } if registration.ACLs.Read == nil { - registration.ACLs.Read = func(authz acl.Authorizer, authzContext *acl.AuthorizerContext, id *pbresource.ID) error { - return authz.ToAllowAuthorizer().OperatorReadAllowed(authzContext) + registration.ACLs.Read = func(authz acl.Authorizer, id *pbresource.ID) error { + return authz.ToAllowAuthorizer().OperatorReadAllowed(&acl.AuthorizerContext{}) } } if registration.ACLs.Write == nil { - registration.ACLs.Write = func(authz acl.Authorizer, authzContext *acl.AuthorizerContext, id *pbresource.Resource) error { - return authz.ToAllowAuthorizer().OperatorWriteAllowed(authzContext) + registration.ACLs.Write = func(authz acl.Authorizer, id *pbresource.ID) error { + return authz.ToAllowAuthorizer().OperatorWriteAllowed(&acl.AuthorizerContext{}) } } if registration.ACLs.List == nil { - registration.ACLs.List = func(authz acl.Authorizer, authzContext *acl.AuthorizerContext) error { + registration.ACLs.List = func(authz acl.Authorizer, tenancy *pbresource.Tenancy) error { return authz.ToAllowAuthorizer().OperatorReadAllowed(&acl.AuthorizerContext{}) } } @@ -158,29 +154,6 @@ func (r *TypeRegistry) Resolve(typ *pbresource.Type) (reg Registration, ok bool) return Registration{}, false } -func (r *TypeRegistry) Types() []Registration { - r.lock.RLock() - defer r.lock.RUnlock() - - types := make([]Registration, 0, len(r.registrations)) - for _, v := range r.registrations { - types = append(types, v) - } - return types -} - func ToGVK(resourceType *pbresource.Type) string { return fmt.Sprintf("%s.%s.%s", resourceType.Group, resourceType.GroupVersion, resourceType.Kind) } - -func ParseGVK(gvk string) (*pbresource.Type, error) { - parts := strings.Split(gvk, ".") - if len(parts) != 3 { - return nil, fmt.Errorf("GVK string must be in the form .., got: %s", gvk) - } - return &pbresource.Type{ - Group: parts[0], - GroupVersion: parts[1], - Kind: parts[2], - }, nil -} diff --git a/internal/resource/registry_test.go b/internal/resource/registry_test.go index a7d3ec6a11879..c9d1777159f8c 100644 --- a/internal/resource/registry_test.go +++ b/internal/resource/registry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package resource_test @@ -43,16 +43,16 @@ func TestRegister_Defaults(t *testing.T) { require.True(t, ok) // verify default read hook requires operator:read - require.NoError(t, reg.ACLs.Read(testutils.ACLOperatorRead(t), nil, artist.Id)) - require.True(t, acl.IsErrPermissionDenied(reg.ACLs.Read(testutils.ACLNoPermissions(t), nil, artist.Id))) + require.NoError(t, reg.ACLs.Read(testutils.ACLOperatorRead(t), artist.Id)) + require.True(t, acl.IsErrPermissionDenied(reg.ACLs.Read(testutils.ACLNoPermissions(t), artist.Id))) // verify default write hook requires operator:write - require.NoError(t, reg.ACLs.Write(testutils.ACLOperatorWrite(t), nil, artist)) - require.True(t, acl.IsErrPermissionDenied(reg.ACLs.Write(testutils.ACLNoPermissions(t), nil, artist))) + require.NoError(t, reg.ACLs.Write(testutils.ACLOperatorWrite(t), artist.Id)) + require.True(t, acl.IsErrPermissionDenied(reg.ACLs.Write(testutils.ACLNoPermissions(t), artist.Id))) // verify default list hook requires operator:read - require.NoError(t, reg.ACLs.List(testutils.ACLOperatorRead(t), nil)) - require.True(t, acl.IsErrPermissionDenied(reg.ACLs.List(testutils.ACLNoPermissions(t), nil))) + require.NoError(t, reg.ACLs.List(testutils.ACLOperatorRead(t), artist.Id.Tenancy)) + require.True(t, acl.IsErrPermissionDenied(reg.ACLs.List(testutils.ACLNoPermissions(t), artist.Id.Tenancy))) // verify default validate is a no-op require.NoError(t, reg.Validate(nil)) diff --git a/internal/resource/resourcetest/builder.go b/internal/resource/resourcetest/builder.go index 86294ce571056..7355f38824ec1 100644 --- a/internal/resource/resourcetest/builder.go +++ b/internal/resource/resourcetest/builder.go @@ -1,24 +1,14 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resourcetest import ( - "strings" + "context" + "github.com/hashicorp/consul/proto-public/pbresource" "github.com/oklog/ulid/v2" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/known/anypb" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/storage" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/consul/sdk/testutil/retry" ) type resourceBuilder struct { @@ -37,8 +27,8 @@ func Resource(rtype *pbresource.Type, name string) *resourceBuilder { Kind: rtype.Kind, }, Tenancy: &pbresource.Tenancy{ - Partition: resource.DefaultPartitionName, - Namespace: resource.DefaultNamespaceName, + Partition: "default", + Namespace: "default", PeerName: "local", }, Name: name, @@ -47,19 +37,6 @@ func Resource(rtype *pbresource.Type, name string) *resourceBuilder { } } -func ResourceID(id *pbresource.ID) *resourceBuilder { - return &resourceBuilder{ - resource: &pbresource.Resource{ - Id: id, - }, - } -} - -func (b *resourceBuilder) WithTenancy(tenant *pbresource.Tenancy) *resourceBuilder { - b.resource.Id.Tenancy = tenant - return b -} - func (b *resourceBuilder) WithData(t T, data protoreflect.ProtoMessage) *resourceBuilder { t.Helper() @@ -128,47 +105,25 @@ func (b *resourceBuilder) ID() *pbresource.ID { return b.resource.Id } -func (b *resourceBuilder) Reference(section string) *pbresource.Reference { - return resource.Reference(b.ID(), section) -} - func (b *resourceBuilder) Write(t T, client pbresource.ResourceServiceClient) *pbresource.Resource { t.Helper() - ctx := testutil.TestContext(t) - res := b.resource - var rsp *pbresource.WriteResponse - var err error - - // Retry any writes where the error is a UID mismatch and the UID was not specified. This is indicative - // of using a follower to rewrite an object who is not perfectly in-sync with the leader. - retry.Run(t, func(r *retry.R) { - rsp, err = client.Write(ctx, &pbresource.WriteRequest{ - Resource: res, - }) - - if err == nil || res.Id.Uid != "" || status.Code(err) != codes.FailedPrecondition { - if err != nil { - t.Logf("write saw error: %v", err) - } - return - } - - if strings.Contains(err.Error(), storage.ErrWrongUid.Error()) { - r.Fatalf("resource write failed due to uid mismatch - most likely a transient issue when talking to a non-leader") - } else { - // other errors are unexpected and should cause an immediate failure - r.Stop(err) - } + rsp, err := client.Write(context.Background(), &pbresource.WriteRequest{ + Resource: res, }) + require.NoError(t, err) + if !b.dontCleanup { - id := proto.Clone(rsp.Resource.Id).(*pbresource.ID) - id.Uid = "" - t.Cleanup(func() { - NewClient(client).MustDelete(t, id) + cleaner, ok := t.(CleanupT) + require.True(t, ok, "T does not implement a Cleanup method and cannot be used with automatic resource cleanup") + cleaner.Cleanup(func() { + _, err := client.Delete(context.Background(), &pbresource.DeleteRequest{ + Id: rsp.Resource.Id, + }) + require.NoError(t, err) }) } @@ -181,7 +136,7 @@ func (b *resourceBuilder) Write(t T, client pbresource.ResourceServiceClient) *p ObservedGeneration: rsp.Resource.Generation, Conditions: original.Conditions, } - _, err := client.WriteStatus(ctx, &pbresource.WriteStatusRequest{ + _, err := client.WriteStatus(context.Background(), &pbresource.WriteStatusRequest{ Id: rsp.Resource.Id, Key: key, Status: status, @@ -189,7 +144,7 @@ func (b *resourceBuilder) Write(t T, client pbresource.ResourceServiceClient) *p require.NoError(t, err) } - readResp, err := client.Read(ctx, &pbresource.ReadRequest{ + readResp, err := client.Read(context.Background(), &pbresource.ReadRequest{ Id: rsp.Resource.Id, }) diff --git a/internal/resource/resourcetest/client.go b/internal/resource/resourcetest/client.go index f3b3bd799fe2b..dab5b03c3adbe 100644 --- a/internal/resource/resourcetest/client.go +++ b/internal/resource/resourcetest/client.go @@ -1,22 +1,17 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resourcetest import ( - "fmt" + "context" "math/rand" "time" + "github.com/hashicorp/consul/internal/resource" + "github.com/hashicorp/consul/proto-public/pbresource" + "github.com/hashicorp/consul/sdk/testutil/retry" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/consul/sdk/testutil/retry" ) type Client struct { @@ -40,14 +35,11 @@ func (client *Client) SetRetryerConfig(timeout time.Duration, wait time.Duration } func (client *Client) retry(t T, fn func(r *retry.R)) { - t.Helper() retryer := &retry.Timer{Timeout: client.timeout, Wait: client.wait} retry.RunWith(retryer, t, fn) } func (client *Client) PublishResources(t T, resources []*pbresource.Resource) { - ctx := testutil.TestContext(t) - // Randomize the order of insertion. Generally insertion order shouldn't matter as the // controllers should eventually converge on the desired state. The exception to this // is that you cannot insert resources with owner refs before the resource they are @@ -82,17 +74,12 @@ func (client *Client) PublishResources(t T, resources []*pbresource.Resource) { } t.Logf("Writing resource %s with type %s", res.Id.Name, resource.ToGVK(res.Id.Type)) - rsp, err := client.Write(ctx, &pbresource.WriteRequest{ + _, err := client.Write(context.Background(), &pbresource.WriteRequest{ Resource: res, }) require.NoError(t, err) - id := rsp.Resource.Id - t.Cleanup(func() { - client.MustDelete(t, id) - }) - - // track the number of resources published + // track the number o published += 1 written = append(written, res.Id) } @@ -114,7 +101,7 @@ func (client *Client) PublishResources(t T, resources []*pbresource.Resource) { func (client *Client) RequireResourceNotFound(t T, id *pbresource.ID) { t.Helper() - rsp, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{Id: id}) + rsp, err := client.Read(context.Background(), &pbresource.ReadRequest{Id: id}) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) require.Nil(t, rsp) @@ -123,7 +110,7 @@ func (client *Client) RequireResourceNotFound(t T, id *pbresource.ID) { func (client *Client) RequireResourceExists(t T, id *pbresource.ID) *pbresource.Resource { t.Helper() - rsp, err := client.Read(testutil.TestContext(t), &pbresource.ReadRequest{Id: id}) + rsp, err := client.Read(context.Background(), &pbresource.ReadRequest{Id: id}) require.NoError(t, err, "error reading %s with type %s", id.Name, resource.ToGVK(id.Type)) require.NotNil(t, rsp) return rsp.Resource @@ -161,16 +148,6 @@ func (client *Client) RequireStatusConditionForCurrentGen(t T, id *pbresource.ID return res } -func (client *Client) RequireStatusConditionsForCurrentGen(t T, id *pbresource.ID, statusKey string, conditions []*pbresource.Condition) *pbresource.Resource { - t.Helper() - - res := client.RequireResourceExists(t, id) - for _, condition := range conditions { - RequireStatusConditionForCurrentGen(t, res, statusKey, condition) - } - return res -} - func (client *Client) RequireResourceMeta(t T, id *pbresource.ID, key string, value string) *pbresource.Resource { t.Helper() @@ -204,18 +181,7 @@ func (client *Client) WaitForStatusCondition(t T, id *pbresource.ID, statusKey s var res *pbresource.Resource client.retry(t, func(r *retry.R) { - res = client.RequireStatusConditionForCurrentGen(r, id, statusKey, condition) - }) - - return res -} - -func (client *Client) WaitForStatusConditions(t T, id *pbresource.ID, statusKey string, conditions ...*pbresource.Condition) *pbresource.Resource { - t.Helper() - - var res *pbresource.Resource - client.retry(t, func(r *retry.R) { - res = client.RequireStatusConditionsForCurrentGen(r, id, statusKey, conditions) + res = client.RequireStatusConditionForCurrentGen(t, id, statusKey, condition) }) return res @@ -243,14 +209,6 @@ func (client *Client) WaitForResourceState(t T, id *pbresource.ID, verify func(T return res } -func (client *Client) WaitForDeletion(t T, id *pbresource.ID) { - t.Helper() - - client.retry(t, func(r *retry.R) { - client.RequireResourceNotFound(r, id) - }) -} - // ResolveResourceID will read the specified resource and returns its full ID. // This is mainly useful to get the ID with the Uid filled out. func (client *Client) ResolveResourceID(t T, id *pbresource.ID) *pbresource.ID { @@ -258,24 +216,3 @@ func (client *Client) ResolveResourceID(t T, id *pbresource.ID) *pbresource.ID { return client.RequireResourceExists(t, id).Id } - -func (client *Client) MustDelete(t T, id *pbresource.ID) { - t.Helper() - ctx := testutil.TestContext(t) - - client.retry(t, func(r *retry.R) { - _, err := client.Delete(ctx, &pbresource.DeleteRequest{Id: id}) - if status.Code(err) == codes.NotFound { - return - } - - // codes.Aborted indicates a CAS failure and that the delete request should - // be retried. Anything else should be considered an unrecoverable error. - if err != nil && status.Code(err) != codes.Aborted { - r.Stop(fmt.Errorf("failed to delete the resource: %w", err)) - return - } - - require.NoError(r, err) - }) -} diff --git a/internal/resource/resourcetest/decode.go b/internal/resource/resourcetest/decode.go deleted file mode 100644 index d68fff8655172..0000000000000 --- a/internal/resource/resourcetest/decode.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcetest - -import ( - "testing" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -func MustDecode[T proto.Message](t *testing.T, res *pbresource.Resource) *resource.DecodedResource[T] { - dec, err := resource.Decode[T](res) - require.NoError(t, err) - return dec -} diff --git a/internal/resource/resourcetest/fs.go b/internal/resource/resourcetest/fs.go index a31ac0f10c4b7..e7a1417a59083 100644 --- a/internal/resource/resourcetest/fs.go +++ b/internal/resource/resourcetest/fs.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resourcetest import ( diff --git a/internal/resource/resourcetest/require.go b/internal/resource/resourcetest/require.go index b57bab8b2e3a2..fff8cb2aebf2c 100644 --- a/internal/resource/resourcetest/require.go +++ b/internal/resource/resourcetest/require.go @@ -1,42 +1,13 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resourcetest import ( "github.com/google/go-cmp/cmp" - "github.com/hashicorp/consul/internal/resource" "github.com/hashicorp/consul/proto-public/pbresource" "github.com/hashicorp/consul/proto/private/prototest" "github.com/stretchr/testify/require" "google.golang.org/protobuf/testing/protocmp" ) -// CompareErrorString is a helper to generate a custom go-cmp comparer method -// that will perform an equality check on the error message. This is mainly -// useful to get around not being able to see unexported data within errors. -func CompareErrorString[T error]() cmp.Option { - return cmp.Comparer(func(e1, e2 T) bool { - return e1.Error() == e2.Error() - }) -} - -// default comparers for known types that don't play well with go-cmp -var comparers = []cmp.Option{ - CompareErrorString[resource.ConstError](), -} - -// RequireError is useful for asserting that some chained multierror contains a specific error. -func RequireError[E error](t T, err error, expected E, opts ...cmp.Option) { - t.Helper() - - var actual E - require.ErrorAs(t, err, &actual) - - opts = append(opts, comparers...) - prototest.AssertDeepEqual(t, expected, actual, opts...) -} - func RequireVersionUnchanged(t T, res *pbresource.Resource, version string) { t.Helper() require.Equal(t, version, res.Version) diff --git a/internal/resource/resourcetest/testing.go b/internal/resource/resourcetest/testing.go index 1be9947226bd2..d02b70da9d039 100644 --- a/internal/resource/resourcetest/testing.go +++ b/internal/resource/resourcetest/testing.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resourcetest // T represents the subset of testing.T methods that will be used @@ -12,5 +9,9 @@ type T interface { Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) FailNow() +} + +type CleanupT interface { + T Cleanup(func()) } diff --git a/internal/resource/resourcetest/validation.go b/internal/resource/resourcetest/validation.go deleted file mode 100644 index d7588221186f1..0000000000000 --- a/internal/resource/resourcetest/validation.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcetest - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -func ValidateAndNormalize(t *testing.T, registry resource.Registry, res *pbresource.Resource) { - typ := res.Id.Type - - typeInfo, ok := registry.Resolve(typ) - if !ok { - t.Fatalf("unhandled resource type: %q", resource.ToGVK(typ)) - } - - if typeInfo.Mutate != nil { - require.NoError(t, typeInfo.Mutate(res), "failed to apply type mutation to resource") - } - - if typeInfo.Validate != nil { - require.NoError(t, typeInfo.Validate(res), "failed to validate resource") - } -} diff --git a/internal/resource/stringer.go b/internal/resource/stringer.go deleted file mode 100644 index 075c08ac0d9c4..0000000000000 --- a/internal/resource/stringer.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource - -import ( - "fmt" - - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// IDToString returns a string representation of pbresource.ID. This should not -// be relied upon nor parsed and is provided just for debugging and logging -// reasons. -// -// This format should be aligned with ReferenceToString and -// (ReferenceKey).String. -func IDToString(id *pbresource.ID) string { - s := fmt.Sprintf("%s/%s/%s", - TypeToString(id.Type), - TenancyToString(id.Tenancy), - id.Name, - ) - if id.Uid != "" { - return s + "?uid=" + id.Uid - } - return s -} - -// ReferenceToString returns a string representation of pbresource.Reference. -// This should not be relied upon nor parsed and is provided just for debugging -// and logging reasons. -// -// This format should be aligned with IDToString and (ReferenceKey).String. -func ReferenceToString(ref *pbresource.Reference) string { - s := fmt.Sprintf("%s/%s/%s", - TypeToString(ref.Type), - TenancyToString(ref.Tenancy), - ref.Name, - ) - - if ref.Section != "" { - return s + "?section=" + ref.Section - } - return s -} - -// TenancyToString returns a string representation of pbresource.Tenancy. This -// should not be relied upon nor parsed and is provided just for debugging and -// logging reasons. -func TenancyToString(tenancy *pbresource.Tenancy) string { - return fmt.Sprintf("%s.%s.%s", tenancy.Partition, tenancy.PeerName, tenancy.Namespace) -} - -// TypeToString returns a string representation of pbresource.Type. This should -// not be relied upon nor parsed and is provided just for debugging and logging -// reasons. -func TypeToString(typ *pbresource.Type) string { - return ToGVK(typ) -} diff --git a/internal/resource/tenancy.go b/internal/resource/tenancy.go deleted file mode 100644 index 16032205badda..0000000000000 --- a/internal/resource/tenancy.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resource - -import ( - "fmt" - "strings" - - "github.com/hashicorp/consul/proto-public/pbresource" -) - -const ( - DefaultPartitionName = "default" - DefaultNamespaceName = "default" -) - -// Scope describes the tenancy scope of a resource. -type Scope int - -const ( - // There is no default scope, it must be set explicitly. - ScopeUndefined Scope = iota - // ScopeCluster describes a resource that is scoped to a cluster. - ScopeCluster - // ScopePartition describes a resource that is scoped to a partition. - ScopePartition - // ScopeNamespace applies to a resource that is scoped to a partition and namespace. - ScopeNamespace -) - -func (s Scope) String() string { - switch s { - case ScopeUndefined: - return "undefined" - case ScopeCluster: - return "cluster" - case ScopePartition: - return "partition" - case ScopeNamespace: - return "namespace" - } - panic(fmt.Sprintf("string mapping missing for scope %v", int(s))) -} - -// Normalize lowercases the partition and namespace. -func Normalize(tenancy *pbresource.Tenancy) { - if tenancy == nil { - return - } - tenancy.Partition = strings.ToLower(tenancy.Partition) - tenancy.Namespace = strings.ToLower(tenancy.Namespace) -} - -// DefaultClusteredTenancy returns the default tenancy for a cluster scoped resource. -func DefaultClusteredTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - // TODO(spatel): Remove as part of "peer is not part of tenancy" ADR - PeerName: "local", - } -} - -// DefaultPartitionedTenancy returns the default tenancy for a partition scoped resource. -func DefaultPartitionedTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - Partition: DefaultPartitionName, - // TODO(spatel): Remove as part of "peer is not part of tenancy" ADR - PeerName: "local", - } -} - -// DefaultNamespedTenancy returns the default tenancy for a namespace scoped resource. -func DefaultNamespacedTenancy() *pbresource.Tenancy { - return &pbresource.Tenancy{ - Partition: DefaultPartitionName, - Namespace: DefaultNamespaceName, - // TODO(spatel): Remove as part of "peer is not part of tenancy" ADR - PeerName: "local", - } -} diff --git a/internal/resource/tombstone.go b/internal/resource/tombstone.go index d86ae96ec4d50..6d0285c602de9 100644 --- a/internal/resource/tombstone.go +++ b/internal/resource/tombstone.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package resource import "github.com/hashicorp/consul/proto-public/pbresource" diff --git a/internal/resourcehcl/any.go b/internal/resourcehcl/any.go deleted file mode 100644 index 3d797c48e5b88..0000000000000 --- a/internal/resourcehcl/any.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcehcl - -import ( - "errors" - "fmt" - - "google.golang.org/protobuf/reflect/protoreflect" - - "github.com/hashicorp/consul/internal/protohcl" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// anyProvider implements protohcl.AnyTypeProvider to infer the `Data` block -// type from `ID.Type`. -type anyProvider struct { - base protohcl.AnyTypeProvider - reg resource.Registry -} - -func (p anyProvider) AnyType(ctx *protohcl.UnmarshalContext, decoder protohcl.MessageDecoder) (protoreflect.FullName, protohcl.MessageDecoder, error) { - if ctx.Name != "Data" { - return p.base.AnyType(ctx, decoder) - } - - if ctx.Parent == nil || ctx.Parent.Message == nil { - return p.base.AnyType(ctx, decoder) - } - - res, isResource := ctx.Parent.Message.Interface().(*pbresource.Resource) - if !isResource { - return p.base.AnyType(ctx, decoder) - } - - resourceType := res.GetId().GetType() - if res == nil { - return "", nil, errors.New("ID.Type not found") - } - - reg, ok := p.reg.Resolve(resourceType) - if !ok { - return "", nil, fmt.Errorf("unknown resource type: %s", resource.ToGVK(resourceType)) - } - - return reg.Proto.ProtoReflect().Descriptor().FullName(), decoder, nil -} diff --git a/internal/resourcehcl/naming.go b/internal/resourcehcl/naming.go deleted file mode 100644 index a1160cc323639..0000000000000 --- a/internal/resourcehcl/naming.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcehcl - -import ( - "strings" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -// fieldNamer implements protohcl.FieldNamer to name fields using PascalCase -// with support for acroynms (e.g. ID, TCP). -type fieldNamer struct{ acroynms []string } - -func (n fieldNamer) NameField(fd protoreflect.FieldDescriptor) string { - camel := fd.JSONName() - upper := strings.ToUpper(camel) - - for _, a := range n.acroynms { - if upper == a { - return a - } - } - - return strings.ToUpper(camel[:1]) + camel[1:] -} - -func (n fieldNamer) GetField(fds protoreflect.FieldDescriptors, name string) protoreflect.FieldDescriptor { - for _, a := range n.acroynms { - if name == a { - return fds.ByJSONName(strings.ToLower(a)) - } - } - - camel := strings.ToLower(name[:1]) + name[1:] - return fds.ByJSONName(camel) -} diff --git a/internal/resourcehcl/testdata/gvk-no-arguments.error b/internal/resourcehcl/testdata/gvk-no-arguments.error deleted file mode 100644 index 1c290dd3d6135..0000000000000 --- a/internal/resourcehcl/testdata/gvk-no-arguments.error +++ /dev/null @@ -1 +0,0 @@ -gvk-no-arguments.hcl:2,14-15: Not enough function arguments; Function "gvk" expects 1 argument(s). Missing value for "GVK String". \ No newline at end of file diff --git a/internal/resourcehcl/testdata/gvk-no-arguments.hcl b/internal/resourcehcl/testdata/gvk-no-arguments.hcl deleted file mode 100644 index 69aee02b2cfa8..0000000000000 --- a/internal/resourcehcl/testdata/gvk-no-arguments.hcl +++ /dev/null @@ -1,4 +0,0 @@ -ID { - Type = gvk() - Name = "foo" -} diff --git a/internal/resourcehcl/testdata/invalid-group.error b/internal/resourcehcl/testdata/invalid-group.error deleted file mode 100644 index 6db3a339c2a18..0000000000000 --- a/internal/resourcehcl/testdata/invalid-group.error +++ /dev/null @@ -1 +0,0 @@ -invalid-group.hcl:3,13-17: Failed to unmarshal argument Group: expected value of type string but actual type is number \ No newline at end of file diff --git a/internal/resourcehcl/testdata/invalid-group.hcl b/internal/resourcehcl/testdata/invalid-group.hcl deleted file mode 100644 index ca6920163ecce..0000000000000 --- a/internal/resourcehcl/testdata/invalid-group.hcl +++ /dev/null @@ -1,8 +0,0 @@ -ID { - Type { - Group = 1234 - GroupVersion = "v1" - Kind = "Artist" - } - Name = "foo" -} diff --git a/internal/resourcehcl/testdata/invalid-gvk.error b/internal/resourcehcl/testdata/invalid-gvk.error deleted file mode 100644 index 92ebca5eb0c12..0000000000000 --- a/internal/resourcehcl/testdata/invalid-gvk.error +++ /dev/null @@ -1 +0,0 @@ -invalid-gvk.hcl:2,10-14: Error in function call; Call to function "gvk" failed: GVK string must be in the form .., got: nope. \ No newline at end of file diff --git a/internal/resourcehcl/testdata/invalid-gvk.hcl b/internal/resourcehcl/testdata/invalid-gvk.hcl deleted file mode 100644 index 565a4cc3f9c84..0000000000000 --- a/internal/resourcehcl/testdata/invalid-gvk.hcl +++ /dev/null @@ -1,4 +0,0 @@ -ID { - Type = gvk("nope") - Name = "foo" -} diff --git a/internal/resourcehcl/testdata/invalid-metadata.error b/internal/resourcehcl/testdata/invalid-metadata.error deleted file mode 100644 index 352f2ffa056c6..0000000000000 --- a/internal/resourcehcl/testdata/invalid-metadata.error +++ /dev/null @@ -1 +0,0 @@ -invalid-metadata.hcl:6,12-8,2: Failed to unmarshal argument Metadata["foo"]: expected value of type string but actual type is tuple \ No newline at end of file diff --git a/internal/resourcehcl/testdata/invalid-metadata.hcl b/internal/resourcehcl/testdata/invalid-metadata.hcl deleted file mode 100644 index aa10b5686e7f1..0000000000000 --- a/internal/resourcehcl/testdata/invalid-metadata.hcl +++ /dev/null @@ -1,8 +0,0 @@ -ID { - Type = gvk("demo.v1.Artist") - Name = "korn" -} - -Metadata = { - "foo" = ["bar"] -} diff --git a/internal/resourcehcl/testdata/invalid-name.error b/internal/resourcehcl/testdata/invalid-name.error deleted file mode 100644 index ba977a2e279c7..0000000000000 --- a/internal/resourcehcl/testdata/invalid-name.error +++ /dev/null @@ -1 +0,0 @@ -invalid-name.hcl:3,10-14: Failed to unmarshal argument Name: expected value of type string but actual type is number \ No newline at end of file diff --git a/internal/resourcehcl/testdata/invalid-name.hcl b/internal/resourcehcl/testdata/invalid-name.hcl deleted file mode 100644 index 54ca6b186bbcf..0000000000000 --- a/internal/resourcehcl/testdata/invalid-name.hcl +++ /dev/null @@ -1,4 +0,0 @@ -ID { - Type = gvk("demo.v1.Artist") - Name = 1234 -} diff --git a/internal/resourcehcl/testdata/no-blocks-any-first.golden b/internal/resourcehcl/testdata/no-blocks-any-first.golden deleted file mode 100644 index 18a7cfd9aeecb..0000000000000 --- a/internal/resourcehcl/testdata/no-blocks-any-first.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"name":"korn","type":{"group":"demo","groupVersion":"v1","kind":"Artist"}},"data":{"@type":"hashicorp.consul.internal.demo.v1.Artist","name":"Korn"}} \ No newline at end of file diff --git a/internal/resourcehcl/testdata/no-blocks-any-first.hcl b/internal/resourcehcl/testdata/no-blocks-any-first.hcl deleted file mode 100644 index 8eb8d75f43170..0000000000000 --- a/internal/resourcehcl/testdata/no-blocks-any-first.hcl +++ /dev/null @@ -1,8 +0,0 @@ -Data = { - Name = "Korn" -} - -ID = { - Type = gvk("demo.v1.Artist") - Name = "korn" -} diff --git a/internal/resourcehcl/testdata/no-blocks.golden b/internal/resourcehcl/testdata/no-blocks.golden deleted file mode 100644 index c7243ad16163b..0000000000000 --- a/internal/resourcehcl/testdata/no-blocks.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"type":{"group":"mesh","groupVersion":"v1alpha1","kind":"Upstreams"}},"data":{"@type":"hashicorp.consul.mesh.v1alpha1.Upstreams","workloads":{"prefixes":["api"]},"upstreams":[{"destinationRef":{"name":"db","type":{"group":"catalog","groupVersion":"v1alpha1","kind":"Service"}},"destinationPort":"tcp","ipPort":{"port":1234}}]}} diff --git a/internal/resourcehcl/testdata/no-blocks.hcl b/internal/resourcehcl/testdata/no-blocks.hcl deleted file mode 100644 index b134e81246213..0000000000000 --- a/internal/resourcehcl/testdata/no-blocks.hcl +++ /dev/null @@ -1,33 +0,0 @@ -ID = { - Type = { - Group = "mesh" - GroupVersion = "v1alpha1" - Kind = "Upstreams" - } -} - -Data = { - Workloads = { - Prefixes = ["api"] - } - - Upstreams = [ - { - DestinationRef = { - Type = { - Group = "catalog" - GroupVersion = "v1alpha1" - Kind = "Service" - } - - Name = "db" - } - - DestinationPort = "tcp" - - IpPort = { - Port = 1234 - } - } - ] -} diff --git a/internal/resourcehcl/testdata/owner.golden b/internal/resourcehcl/testdata/owner.golden deleted file mode 100644 index 9054db09bfd35..0000000000000 --- a/internal/resourcehcl/testdata/owner.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"name":"twisted-transistor","type":{"group":"demo","groupVersion":"v1","kind":"Album"}},"owner":{"name":"korn","type":{"group":"demo","groupVersion":"v1","kind":"Artist"}}} \ No newline at end of file diff --git a/internal/resourcehcl/testdata/owner.hcl b/internal/resourcehcl/testdata/owner.hcl deleted file mode 100644 index 2cc65e4c66582..0000000000000 --- a/internal/resourcehcl/testdata/owner.hcl +++ /dev/null @@ -1,9 +0,0 @@ -ID { - Type = gvk("demo.v1.Album") - Name = "twisted-transistor" -} - -Owner { - Type = gvk("demo.v1.Artist") - Name = "korn" -} diff --git a/internal/resourcehcl/testdata/simple-gvk.golden b/internal/resourcehcl/testdata/simple-gvk.golden deleted file mode 100644 index ba3fddcd6d176..0000000000000 --- a/internal/resourcehcl/testdata/simple-gvk.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"name":"korn","type":{"group":"demo","groupVersion":"v1","kind":"Artist"}},"metadata":{"foo":"bar"},"data":{"@type":"hashicorp.consul.internal.demo.v1.Artist","name":"Korn","genre":"GENRE_METAL"}} \ No newline at end of file diff --git a/internal/resourcehcl/testdata/simple-gvk.hcl b/internal/resourcehcl/testdata/simple-gvk.hcl deleted file mode 100644 index adddcd42c8c1c..0000000000000 --- a/internal/resourcehcl/testdata/simple-gvk.hcl +++ /dev/null @@ -1,13 +0,0 @@ -ID { - Type = gvk("demo.v1.Artist") - Name = "korn" -} - -Data { - Name = "Korn" - Genre = "GENRE_METAL" -} - -Metadata = { - "foo" = "bar" -} diff --git a/internal/resourcehcl/testdata/type-block.golden b/internal/resourcehcl/testdata/type-block.golden deleted file mode 100644 index 963695616bee8..0000000000000 --- a/internal/resourcehcl/testdata/type-block.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"name":"korn","type":{"group":"demo","groupVersion":"v1","kind":"Artist"}}} \ No newline at end of file diff --git a/internal/resourcehcl/testdata/type-block.hcl b/internal/resourcehcl/testdata/type-block.hcl deleted file mode 100644 index f927fbe2fe613..0000000000000 --- a/internal/resourcehcl/testdata/type-block.hcl +++ /dev/null @@ -1,8 +0,0 @@ -ID { - Type { - Group = "demo" - GroupVersion = "v1" - Kind = "Artist" - } - Name = "korn" -} diff --git a/internal/resourcehcl/testdata/unknown-field-block.error b/internal/resourcehcl/testdata/unknown-field-block.error deleted file mode 100644 index 602212543d66a..0000000000000 --- a/internal/resourcehcl/testdata/unknown-field-block.error +++ /dev/null @@ -1 +0,0 @@ -unknown-field-block.hcl:2,3-6: Unsupported argument; An argument named "Foo" is not expected here. \ No newline at end of file diff --git a/internal/resourcehcl/testdata/unknown-field-block.hcl b/internal/resourcehcl/testdata/unknown-field-block.hcl deleted file mode 100644 index 534fdb11b8d25..0000000000000 --- a/internal/resourcehcl/testdata/unknown-field-block.hcl +++ /dev/null @@ -1,3 +0,0 @@ -ID { - Foo = "bar" -} diff --git a/internal/resourcehcl/testdata/unknown-field-object.error b/internal/resourcehcl/testdata/unknown-field-object.error deleted file mode 100644 index b7651d5eb0d59..0000000000000 --- a/internal/resourcehcl/testdata/unknown-field-object.error +++ /dev/null @@ -1 +0,0 @@ -unknown-field-object.hcl:1,6-3,2: Unsupported argument; An argument named "Foo" is not expected here. \ No newline at end of file diff --git a/internal/resourcehcl/testdata/unknown-field-object.hcl b/internal/resourcehcl/testdata/unknown-field-object.hcl deleted file mode 100644 index 43220099bb0a3..0000000000000 --- a/internal/resourcehcl/testdata/unknown-field-object.hcl +++ /dev/null @@ -1,3 +0,0 @@ -ID = { - Foo = "bar" -} diff --git a/internal/resourcehcl/testdata/unknown-type.error b/internal/resourcehcl/testdata/unknown-type.error deleted file mode 100644 index 81e0ea1c81597..0000000000000 --- a/internal/resourcehcl/testdata/unknown-type.error +++ /dev/null @@ -1 +0,0 @@ -error getting type for Any field: unknown resource type: foo.bar.Baz \ No newline at end of file diff --git a/internal/resourcehcl/testdata/unknown-type.hcl b/internal/resourcehcl/testdata/unknown-type.hcl deleted file mode 100644 index f1669b8ba882b..0000000000000 --- a/internal/resourcehcl/testdata/unknown-type.hcl +++ /dev/null @@ -1,8 +0,0 @@ -ID { - Type = gvk("foo.bar.Baz") - Name = "qux" -} - -Data { - Foo = "bar" -} diff --git a/internal/resourcehcl/testdata/upstreams.golden b/internal/resourcehcl/testdata/upstreams.golden deleted file mode 100644 index 26608ae3d5d7c..0000000000000 --- a/internal/resourcehcl/testdata/upstreams.golden +++ /dev/null @@ -1 +0,0 @@ -{"id":{"name":"api","type":{"group":"mesh","groupVersion":"v1alpha1","kind":"Upstreams"}},"data":{"@type":"hashicorp.consul.mesh.v1alpha1.Upstreams","workloads":{"prefixes":["api"]},"upstreams":[{"destinationRef":{"name":"db","type":{"group":"catalog","groupVersion":"v1alpha1","kind":"Service"}},"destinationPort":"tcp","ipPort":{"port":1234}}]}} diff --git a/internal/resourcehcl/testdata/upstreams.hcl b/internal/resourcehcl/testdata/upstreams.hcl deleted file mode 100644 index c0993e4d5bac1..0000000000000 --- a/internal/resourcehcl/testdata/upstreams.hcl +++ /dev/null @@ -1,25 +0,0 @@ -ID { - Type = gvk("mesh.v1alpha1.Upstreams") - Name = "api" -} - -Data { - Workloads { - Prefixes = ["api"] - } - - Upstreams = [ - { - DestinationRef = { - Type = gvk("catalog.v1alpha1.Service") - Name = "db" - } - - DestinationPort = "tcp" - - IpPort = { - Port = 1234 - } - } - ] -} diff --git a/internal/resourcehcl/unmarshal.go b/internal/resourcehcl/unmarshal.go deleted file mode 100644 index 610ebc641b825..0000000000000 --- a/internal/resourcehcl/unmarshal.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcehcl - -import ( - "reflect" - - "github.com/zclconf/go-cty/cty" - "github.com/zclconf/go-cty/cty/function" - - "github.com/hashicorp/consul/internal/protohcl" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/proto-public/pbresource" -) - -// Unmarshal the given HCL source into a resource. -func Unmarshal(src []byte, reg resource.Registry) (*pbresource.Resource, error) { - return UnmarshalOptions{}.Unmarshal(src, reg) -} - -type UnmarshalOptions struct{ SourceFileName string } - -// Unmarshal the given HCL source into a resource. -func (u UnmarshalOptions) Unmarshal(src []byte, reg resource.Registry) (*pbresource.Resource, error) { - var out pbresource.Resource - err := (protohcl.UnmarshalOptions{ - SourceFileName: u.SourceFileName, - AnyTypeProvider: anyProvider{ - base: &protohcl.AnyTypeURLProvider{TypeURLFieldName: "Type"}, - reg: reg, - }, - FieldNamer: fieldNamer{acroynms: []string{"ID", "TCP", "UDP", "HTTP"}}, - Functions: map[string]function.Function{"gvk": gvk}, - }).Unmarshal(src, &out) - return &out, err -} - -var ( - typeType = cty.Capsule("type", reflect.TypeOf(pbresource.Type{})) - - gvk = function.New(&function.Spec{ - Params: []function.Parameter{ - {Name: "GVK String", Type: cty.String}, - }, - Type: function.StaticReturnType(typeType), - Impl: func(args []cty.Value, _ cty.Type) (cty.Value, error) { - t, err := resource.ParseGVK(args[0].AsString()) - if err != nil { - return cty.NilVal, err - } - return cty.CapsuleVal(typeType, t), nil - }, - }) -) diff --git a/internal/resourcehcl/unmarshal_test.go b/internal/resourcehcl/unmarshal_test.go deleted file mode 100644 index 5e35f7df66b13..0000000000000 --- a/internal/resourcehcl/unmarshal_test.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resourcehcl_test - -import ( - "flag" - "fmt" - "os" - "path" - "testing" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/encoding/protojson" - - "github.com/hashicorp/consul/internal/mesh" - "github.com/hashicorp/consul/internal/resource" - "github.com/hashicorp/consul/internal/resource/demo" - "github.com/hashicorp/consul/internal/resourcehcl" - "github.com/hashicorp/consul/proto-public/pbresource" - "github.com/hashicorp/consul/proto/private/prototest" -) - -var update = flag.Bool("update", false, "update golden files") - -func TestUnmarshal(t *testing.T) { - entries, err := os.ReadDir("./testdata") - require.NoError(t, err) - - read := func(t *testing.T, path string) ([]byte, bool) { - t.Helper() - - bytes, err := os.ReadFile(fmt.Sprintf("./testdata/%s", path)) - switch { - case err == nil: - return bytes, true - case os.IsNotExist(err): - return nil, false - } - - t.Fatalf("failed to read file %s %v", path, err) - return nil, false - } - - write := func(t *testing.T, path string, src []byte) { - t.Helper() - - require.NoError(t, os.WriteFile(fmt.Sprintf("./testdata/%s", path), src, 0o600)) - } - - for _, entry := range entries { - name := entry.Name() - ext := path.Ext(name) - - if ext != ".hcl" { - continue - } - - base := name[0 : len(name)-len(ext)] - - t.Run(base, func(t *testing.T) { - input, _ := read(t, name) - - registry := resource.NewRegistry() - demo.RegisterTypes(registry) - mesh.RegisterTypes(registry) - - output, err := resourcehcl.UnmarshalOptions{SourceFileName: name}. - Unmarshal(input, registry) - - if *update { - if err == nil { - json, err := protojson.Marshal(output) - require.NoError(t, err) - write(t, base+".golden", json) - } else { - write(t, base+".error", []byte(err.Error())) - } - } - - goldenJSON, haveGoldenJSON := read(t, base+".golden") - goldenError, haveGoldenError := read(t, base+".error") - - if haveGoldenError && haveGoldenJSON { - t.Fatalf("both %s.golden and %s.error exist, delete one", base, base) - } - - if !haveGoldenError && !haveGoldenJSON && !*update { - t.Fatalf("neither %s.golden or %s.error exist, run the tests again with the -update flag to create one", base, base) - } - - if haveGoldenError { - require.Error(t, err) - require.Equal(t, string(goldenError), err.Error()) - } - - if haveGoldenJSON { - require.NoError(t, err) - - var exp pbresource.Resource - require.NoError(t, protojson.Unmarshal(goldenJSON, &exp)) - prototest.AssertDeepEqual(t, &exp, output) - } - }) - } -} diff --git a/internal/storage/conformance/conformance.go b/internal/storage/conformance/conformance.go index 543a574fb5a60..22356a88a9c15 100644 --- a/internal/storage/conformance/conformance.go +++ b/internal/storage/conformance/conformance.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package conformance diff --git a/internal/storage/inmem/backend.go b/internal/storage/inmem/backend.go index bf256e508f4d6..fc22aa5ace81b 100644 --- a/internal/storage/inmem/backend.go +++ b/internal/storage/inmem/backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/inmem/backend_test.go b/internal/storage/inmem/backend_test.go index 7978dcdf29935..e37de15afab44 100644 --- a/internal/storage/inmem/backend_test.go +++ b/internal/storage/inmem/backend_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem_test diff --git a/internal/storage/inmem/event_index.go b/internal/storage/inmem/event_index.go index f71e809289aca..68d9ec13b142a 100644 --- a/internal/storage/inmem/event_index.go +++ b/internal/storage/inmem/event_index.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/inmem/schema.go b/internal/storage/inmem/schema.go index 37e39dbc57076..6a58eacd586b1 100644 --- a/internal/storage/inmem/schema.go +++ b/internal/storage/inmem/schema.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/inmem/snapshot.go b/internal/storage/inmem/snapshot.go index 36739ac65b20e..6233f4d30bfe4 100644 --- a/internal/storage/inmem/snapshot.go +++ b/internal/storage/inmem/snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/inmem/snapshot_test.go b/internal/storage/inmem/snapshot_test.go index f3e1bdbaa79e5..b703495d2c7fa 100644 --- a/internal/storage/inmem/snapshot_test.go +++ b/internal/storage/inmem/snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem_test diff --git a/internal/storage/inmem/store.go b/internal/storage/inmem/store.go index d9c27d339fa3d..5c50b1c138a3f 100644 --- a/internal/storage/inmem/store.go +++ b/internal/storage/inmem/store.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/inmem/watch.go b/internal/storage/inmem/watch.go index bdab0fc5ee864..85c657e3a3c6c 100644 --- a/internal/storage/inmem/watch.go +++ b/internal/storage/inmem/watch.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package inmem diff --git a/internal/storage/raft/backend.go b/internal/storage/raft/backend.go index 8a7a973c3e7cf..4e1cd05bbb18a 100644 --- a/internal/storage/raft/backend.go +++ b/internal/storage/raft/backend.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package raft diff --git a/internal/storage/raft/conformance_test.go b/internal/storage/raft/conformance_test.go index 6c75e462d21c3..ef79087e171d2 100644 --- a/internal/storage/raft/conformance_test.go +++ b/internal/storage/raft/conformance_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package raft_test diff --git a/internal/storage/raft/forwarding.go b/internal/storage/raft/forwarding.go index 2700339afbe58..798ca58465d5e 100644 --- a/internal/storage/raft/forwarding.go +++ b/internal/storage/raft/forwarding.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package raft diff --git a/internal/storage/storage.go b/internal/storage/storage.go index 2a86a769fee94..24a763e395473 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package storage diff --git a/internal/testing/golden/golden.go b/internal/testing/golden/golden.go index 4466ad4cbcff8..079f69f02aa5a 100644 --- a/internal/testing/golden/golden.go +++ b/internal/testing/golden/golden.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package golden diff --git a/internal/tools/proto-gen-rpc-glue/e2e/consul/agent/structs/structs.go b/internal/tools/proto-gen-rpc-glue/e2e/consul/agent/structs/structs.go index 6e76027299ded..59d2a19b8c9bb 100644 --- a/internal/tools/proto-gen-rpc-glue/e2e/consul/agent/structs/structs.go +++ b/internal/tools/proto-gen-rpc-glue/e2e/consul/agent/structs/structs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package structs diff --git a/internal/tools/proto-gen-rpc-glue/e2e/consul/proto/pbcommon/common.go b/internal/tools/proto-gen-rpc-glue/e2e/consul/proto/pbcommon/common.go index 1395e682edd3c..5c1b497e55185 100644 --- a/internal/tools/proto-gen-rpc-glue/e2e/consul/proto/pbcommon/common.go +++ b/internal/tools/proto-gen-rpc-glue/e2e/consul/proto/pbcommon/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbcommon diff --git a/internal/tools/proto-gen-rpc-glue/e2e/source.pb.go b/internal/tools/proto-gen-rpc-glue/e2e/source.pb.go index c69dac63b5c08..3a83b84317526 100644 --- a/internal/tools/proto-gen-rpc-glue/e2e/source.pb.go +++ b/internal/tools/proto-gen-rpc-glue/e2e/source.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build example // +build example diff --git a/internal/tools/proto-gen-rpc-glue/main.go b/internal/tools/proto-gen-rpc-glue/main.go index 2412c3386208d..65a25122bc708 100644 --- a/internal/tools/proto-gen-rpc-glue/main.go +++ b/internal/tools/proto-gen-rpc-glue/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/internal/tools/proto-gen-rpc-glue/main_test.go b/internal/tools/proto-gen-rpc-glue/main_test.go index 01eb28e92a31d..87ed4e3917ede 100644 --- a/internal/tools/proto-gen-rpc-glue/main_test.go +++ b/internal/tools/proto-gen-rpc-glue/main_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/internal/tools/protoc-gen-consul-rate-limit/main.go b/internal/tools/protoc-gen-consul-rate-limit/main.go index 349c371c28e9c..b4bf5711584a6 100644 --- a/internal/tools/protoc-gen-consul-rate-limit/main.go +++ b/internal/tools/protoc-gen-consul-rate-limit/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // protoc-gen-consul-rate-limit // This protoc plugin maintains the mapping of gRPC method names to diff --git a/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go b/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go index b1f00a2dcdd7c..bd9ea5779ce14 100644 --- a/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go +++ b/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/ipaddr/detect.go b/ipaddr/detect.go index bc2bf56c350cb..e208b13ed5be5 100644 --- a/ipaddr/detect.go +++ b/ipaddr/detect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ipaddr diff --git a/ipaddr/detect_test.go b/ipaddr/detect_test.go index c199492c174f9..865421e10cf00 100644 --- a/ipaddr/detect_test.go +++ b/ipaddr/detect_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ipaddr diff --git a/ipaddr/ipaddr.go b/ipaddr/ipaddr.go index 89f8c70a4ceba..92a04e80181d2 100644 --- a/ipaddr/ipaddr.go +++ b/ipaddr/ipaddr.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ipaddr diff --git a/ipaddr/ipaddr_test.go b/ipaddr/ipaddr_test.go index 009144c2de25d..a8aae7f32dde1 100644 --- a/ipaddr/ipaddr_test.go +++ b/ipaddr/ipaddr_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ipaddr diff --git a/lib/cluster.go b/lib/cluster.go index a97ceea722e97..3b121da59835c 100644 --- a/lib/cluster.go +++ b/lib/cluster.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/cluster_test.go b/lib/cluster_test.go index 3493a6fb39f12..44b77332dfec1 100644 --- a/lib/cluster_test.go +++ b/lib/cluster_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/decode/decode.go b/lib/decode/decode.go index 645916d2d6654..fc1558a9f7890 100644 --- a/lib/decode/decode.go +++ b/lib/decode/decode.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 /* Package decode provides tools for customizing the decoding of configuration, diff --git a/lib/decode/decode_test.go b/lib/decode/decode_test.go index 3219e96b4bf9a..b1250ebcc81aa 100644 --- a/lib/decode/decode_test.go +++ b/lib/decode/decode_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package decode diff --git a/lib/eof.go b/lib/eof.go index e208ca73d7535..b8f6ac0e240ec 100644 --- a/lib/eof.go +++ b/lib/eof.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/eof_test.go b/lib/eof_test.go index 330a1152a8eb7..373846a72c942 100644 --- a/lib/eof_test.go +++ b/lib/eof_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/file/atomic.go b/lib/file/atomic.go index 4053f443d8b36..3fa5890052c8d 100644 --- a/lib/file/atomic.go +++ b/lib/file/atomic.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/lib/file/atomic_test.go b/lib/file/atomic_test.go index baf4bc1771f8e..a74b2d2ecd497 100644 --- a/lib/file/atomic_test.go +++ b/lib/file/atomic_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package file diff --git a/lib/hoststats/collector.go b/lib/hoststats/collector.go index fb316e0dce38f..c4c57b35c5c25 100644 --- a/lib/hoststats/collector.go +++ b/lib/hoststats/collector.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hoststats import ( diff --git a/lib/hoststats/cpu.go b/lib/hoststats/cpu.go index 420a80ef94240..45633b40df064 100644 --- a/lib/hoststats/cpu.go +++ b/lib/hoststats/cpu.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hoststats import ( diff --git a/lib/hoststats/cpu_test.go b/lib/hoststats/cpu_test.go index dcc1df9aab50e..5d5efbe9769a1 100644 --- a/lib/hoststats/cpu_test.go +++ b/lib/hoststats/cpu_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hoststats import ( diff --git a/lib/hoststats/host.go b/lib/hoststats/host.go index 3a44618d20f16..426cf43ea21e5 100644 --- a/lib/hoststats/host.go +++ b/lib/hoststats/host.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hoststats import ( diff --git a/lib/hoststats/metrics.go b/lib/hoststats/metrics.go index 95055cea43fb3..c89d40b813ff1 100644 --- a/lib/hoststats/metrics.go +++ b/lib/hoststats/metrics.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package hoststats import ( diff --git a/lib/json.go b/lib/json.go index 7e58942a823de..c5ae22b2f90c7 100644 --- a/lib/json.go +++ b/lib/json.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/map_walker.go b/lib/map_walker.go index 1be33b61f15fd..3e8cec77ca643 100644 --- a/lib/map_walker.go +++ b/lib/map_walker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/map_walker_test.go b/lib/map_walker_test.go index 6156abe4624f8..2a3b4c189d9ec 100644 --- a/lib/map_walker_test.go +++ b/lib/map_walker_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/maps/maps.go b/lib/maps/maps.go index ae19d030a2c01..1996d5f4cd9a9 100644 --- a/lib/maps/maps.go +++ b/lib/maps/maps.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package maps diff --git a/lib/maps/maps_test.go b/lib/maps/maps_test.go index 5d0f4edbc44ef..bebb9afb5f155 100644 --- a/lib/maps/maps_test.go +++ b/lib/maps/maps_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package maps diff --git a/lib/math.go b/lib/math.go index 673dfb84e99cf..75859a2a65801 100644 --- a/lib/math.go +++ b/lib/math.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/math_test.go b/lib/math_test.go index 2ce631fe75dce..7ac4141a268c8 100644 --- a/lib/math_test.go +++ b/lib/math_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib_test diff --git a/lib/mutex/mutex.go b/lib/mutex/mutex.go index 8101204c2e006..a28290c0b3b44 100644 --- a/lib/mutex/mutex.go +++ b/lib/mutex/mutex.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 /* Package mutex implements the sync.Locker interface using x/sync/semaphore. It diff --git a/lib/mutex/mutex_test.go b/lib/mutex/mutex_test.go index 2d51706e4e855..000681d03e86f 100644 --- a/lib/mutex/mutex_test.go +++ b/lib/mutex/mutex_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package mutex diff --git a/lib/path.go b/lib/path.go index fd45378ec1804..347de0cbde09b 100644 --- a/lib/path.go +++ b/lib/path.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/retry/retry.go b/lib/retry/retry.go index e0605f89c4a89..ee9a8b2354e63 100644 --- a/lib/retry/retry.go +++ b/lib/retry/retry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package retry diff --git a/lib/retry/retry_test.go b/lib/retry/retry_test.go index d8a822f6b606a..74bb982b91edc 100644 --- a/lib/retry/retry_test.go +++ b/lib/retry/retry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package retry diff --git a/lib/routine/routine.go b/lib/routine/routine.go index b5ebe85e22f14..3bcbd1fbee452 100644 --- a/lib/routine/routine.go +++ b/lib/routine/routine.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package routine diff --git a/lib/routine/routine_test.go b/lib/routine/routine_test.go index c04311ac59f49..cfb98d98c3c84 100644 --- a/lib/routine/routine_test.go +++ b/lib/routine/routine_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package routine diff --git a/lib/rtt.go b/lib/rtt.go index d716e6fcbe1c5..5d90431f5d65a 100644 --- a/lib/rtt.go +++ b/lib/rtt.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/rtt_test.go b/lib/rtt_test.go index 1e7779b9addeb..a8a6786ecf622 100644 --- a/lib/rtt_test.go +++ b/lib/rtt_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/semaphore/semaphore.go b/lib/semaphore/semaphore.go index fdfbbb34db021..662d21152868a 100644 --- a/lib/semaphore/semaphore.go +++ b/lib/semaphore/semaphore.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Package semaphore implements a simple semaphore that is based on // golang.org/x/sync/semaphore but doesn't support weights. It's advantage over diff --git a/lib/semaphore/semaphore_test.go b/lib/semaphore/semaphore_test.go index b3182e1107af7..d7da1979b00f4 100644 --- a/lib/semaphore/semaphore_test.go +++ b/lib/semaphore/semaphore_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package semaphore diff --git a/lib/serf/serf.go b/lib/serf/serf.go index 932fed427ba94..ad5297e58b616 100644 --- a/lib/serf/serf.go +++ b/lib/serf/serf.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package serf diff --git a/lib/stop_context.go b/lib/stop_context.go index 98bde25e452b5..ea560e0929e96 100644 --- a/lib/stop_context.go +++ b/lib/stop_context.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/stop_context_test.go b/lib/stop_context_test.go index b62749513f2f7..6da3a6fc61aea 100644 --- a/lib/stop_context_test.go +++ b/lib/stop_context_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/strings.go b/lib/strings.go index 7213a93259141..d268845acc9c4 100644 --- a/lib/strings.go +++ b/lib/strings.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/stringslice/stringslice.go b/lib/stringslice/stringslice.go index 7c32864b9458c..325f603d778dc 100644 --- a/lib/stringslice/stringslice.go +++ b/lib/stringslice/stringslice.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stringslice diff --git a/lib/stringslice/stringslice_test.go b/lib/stringslice/stringslice_test.go index dd25071757442..975fe34976ec2 100644 --- a/lib/stringslice/stringslice_test.go +++ b/lib/stringslice/stringslice_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package stringslice diff --git a/lib/telemetry.go b/lib/telemetry.go index e06341eefb05b..b66ec721b1dc0 100644 --- a/lib/telemetry.go +++ b/lib/telemetry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/telemetry_test.go b/lib/telemetry_test.go index ab0f7e5b91411..a2c0075598ecc 100644 --- a/lib/telemetry_test.go +++ b/lib/telemetry_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/template/hil.go b/lib/template/hil.go index 502f10d258b20..5b9cc0e2cf148 100644 --- a/lib/template/hil.go +++ b/lib/template/hil.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package template diff --git a/lib/template/hil_test.go b/lib/template/hil_test.go index 4f582f61d1685..84f3558a4a6a4 100644 --- a/lib/template/hil_test.go +++ b/lib/template/hil_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package template diff --git a/lib/translate.go b/lib/translate.go index 6fd49010fc81e..adb58539c0fd9 100644 --- a/lib/translate.go +++ b/lib/translate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/translate_test.go b/lib/translate_test.go index f36588b7404b1..36d113004a749 100644 --- a/lib/translate_test.go +++ b/lib/translate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/ttlcache/eviction.go b/lib/ttlcache/eviction.go index 5d5012e7dbacb..3e20bb09b6276 100644 --- a/lib/ttlcache/eviction.go +++ b/lib/ttlcache/eviction.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 /* Package ttlcache provides an ExpiryHeap that can be used by a cache to track the diff --git a/lib/ttlcache/eviction_test.go b/lib/ttlcache/eviction_test.go index 18bf2fbbc78bf..fe55b68cf1760 100644 --- a/lib/ttlcache/eviction_test.go +++ b/lib/ttlcache/eviction_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ttlcache diff --git a/lib/useragent.go b/lib/useragent.go index 89c73dec55297..e967ed11ffc74 100644 --- a/lib/useragent.go +++ b/lib/useragent.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/useragent_test.go b/lib/useragent_test.go index 23df537c9d4ac..4890e454a598b 100644 --- a/lib/useragent_test.go +++ b/lib/useragent_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/lib/uuid.go b/lib/uuid.go index 2c0d657f5b062..8db9517d70228 100644 --- a/lib/uuid.go +++ b/lib/uuid.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package lib diff --git a/logging/gated_writer.go b/logging/gated_writer.go index 5a28c8cf52339..2e0023369a770 100644 --- a/logging/gated_writer.go +++ b/logging/gated_writer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/gated_writer_test.go b/logging/gated_writer_test.go index cc44ad04b2b94..f0adc8de85a18 100644 --- a/logging/gated_writer_test.go +++ b/logging/gated_writer_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/grpc.go b/logging/grpc.go index ebe2207e454b8..f565b865fbd93 100644 --- a/logging/grpc.go +++ b/logging/grpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/grpc_test.go b/logging/grpc_test.go index 0a90f11066093..29f1c976e555d 100644 --- a/logging/grpc_test.go +++ b/logging/grpc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/log_levels.go b/logging/log_levels.go index 5ed830ee30503..dc3bb8b530b8f 100644 --- a/logging/log_levels.go +++ b/logging/log_levels.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/logfile.go b/logging/logfile.go index bc7b38d91c263..c836a73f9d996 100644 --- a/logging/logfile.go +++ b/logging/logfile.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/logfile_test.go b/logging/logfile_test.go index ae9d8fb1b0cd3..7412938be8616 100644 --- a/logging/logfile_test.go +++ b/logging/logfile_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/logger.go b/logging/logger.go index 8d63ed7e15eb3..fb5128790fd0a 100644 --- a/logging/logger.go +++ b/logging/logger.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/logger_test.go b/logging/logger_test.go index 5cb0c1e44189a..ca5f1eecd2481 100644 --- a/logging/logger_test.go +++ b/logging/logger_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/monitor/monitor.go b/logging/monitor/monitor.go index 6a812a879f642..7440a6586f632 100644 --- a/logging/monitor/monitor.go +++ b/logging/monitor/monitor.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package monitor diff --git a/logging/monitor/monitor_test.go b/logging/monitor/monitor_test.go index 5f834f4f2322e..ba77eab36fdd7 100644 --- a/logging/monitor/monitor_test.go +++ b/logging/monitor/monitor_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package monitor diff --git a/logging/names.go b/logging/names.go index 69a859443cfb9..1c7ecc4487872 100644 --- a/logging/names.go +++ b/logging/names.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/syslog.go b/logging/syslog.go index ceb0ae0ac2f2d..8eb1391fcb3b3 100644 --- a/logging/syslog.go +++ b/logging/syslog.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package logging diff --git a/logging/syslog_test.go b/logging/syslog_test.go index 1b3d66feba0c6..fdef92b5284b4 100644 --- a/logging/syslog_test.go +++ b/logging/syslog_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build linux || darwin || dragonfly || freebsd || netbsd || openbsd || solaris // +build linux darwin dragonfly freebsd netbsd openbsd solaris diff --git a/logging/syslog_unsupported_test.go b/logging/syslog_unsupported_test.go index dab3d47d72fc2..d616580d2f220 100644 --- a/logging/syslog_unsupported_test.go +++ b/logging/syslog_unsupported_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows || plan9 || nacl // +build windows plan9 nacl diff --git a/main.go b/main.go index d29454035b12f..63f5a4f26dd84 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/proto-public/LICENSE b/proto-public/LICENSE deleted file mode 100644 index 7c5baa45e1c29..0000000000000 --- a/proto-public/LICENSE +++ /dev/null @@ -1,365 +0,0 @@ -Copyright (c) 2020 HashiCorp, Inc. - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go deleted file mode 100644 index 85aa74cd41db5..0000000000000 --- a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbcatalog/v1alpha1/failover_policy.proto - -package catalogv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *FailoverPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *FailoverPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *FailoverConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *FailoverConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *FailoverDestination) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *FailoverDestination) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go deleted file mode 100644 index 568405a1cd535..0000000000000 --- a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go +++ /dev/null @@ -1,457 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbcatalog/v1alpha1/failover_policy.proto - -package catalogv1alpha1 - -import ( - pbresource "github.com/hashicorp/consul/proto-public/pbresource" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FailoverMode int32 - -const ( - FailoverMode_FAILOVER_MODE_UNSPECIFIED FailoverMode = 0 - FailoverMode_FAILOVER_MODE_SEQUENTIAL FailoverMode = 1 - FailoverMode_FAILOVER_MODE_ORDER_BY_LOCALITY FailoverMode = 2 -) - -// Enum value maps for FailoverMode. -var ( - FailoverMode_name = map[int32]string{ - 0: "FAILOVER_MODE_UNSPECIFIED", - 1: "FAILOVER_MODE_SEQUENTIAL", - 2: "FAILOVER_MODE_ORDER_BY_LOCALITY", - } - FailoverMode_value = map[string]int32{ - "FAILOVER_MODE_UNSPECIFIED": 0, - "FAILOVER_MODE_SEQUENTIAL": 1, - "FAILOVER_MODE_ORDER_BY_LOCALITY": 2, - } -) - -func (x FailoverMode) Enum() *FailoverMode { - p := new(FailoverMode) - *p = x - return p -} - -func (x FailoverMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FailoverMode) Descriptor() protoreflect.EnumDescriptor { - return file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes[0].Descriptor() -} - -func (FailoverMode) Type() protoreflect.EnumType { - return &file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes[0] -} - -func (x FailoverMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FailoverMode.Descriptor instead. -func (FailoverMode) EnumDescriptor() ([]byte, []int) { - return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{0} -} - -// This is a Resource type. -type FailoverPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Config defines failover for any named port not present in PortConfigs. - Config *FailoverConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // PortConfigs defines failover for a specific port on this service and takes - // precedence over Config. - PortConfigs map[string]*FailoverConfig `protobuf:"bytes,2,rep,name=port_configs,json=portConfigs,proto3" json:"port_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *FailoverPolicy) Reset() { - *x = FailoverPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FailoverPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailoverPolicy) ProtoMessage() {} - -func (x *FailoverPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailoverPolicy.ProtoReflect.Descriptor instead. -func (*FailoverPolicy) Descriptor() ([]byte, []int) { - return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{0} -} - -func (x *FailoverPolicy) GetConfig() *FailoverConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *FailoverPolicy) GetPortConfigs() map[string]*FailoverConfig { - if x != nil { - return x.PortConfigs - } - return nil -} - -type FailoverConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Destinations specifies a fixed list of failover destinations to try. We - // never try a destination multiple times, so those are subtracted from this - // list before proceeding. - Destinations []*FailoverDestination `protobuf:"bytes,1,rep,name=destinations,proto3" json:"destinations,omitempty"` - // Mode specifies the type of failover that will be performed. Valid values are - // "sequential", "" (equivalent to "sequential") and "order-by-locality". - Mode FailoverMode `protobuf:"varint,2,opt,name=mode,proto3,enum=hashicorp.consul.catalog.v1alpha1.FailoverMode" json:"mode,omitempty"` - Regions []string `protobuf:"bytes,3,rep,name=regions,proto3" json:"regions,omitempty"` - // SamenessGroup specifies the sameness group to failover to. - SamenessGroup string `protobuf:"bytes,4,opt,name=sameness_group,json=samenessGroup,proto3" json:"sameness_group,omitempty"` -} - -func (x *FailoverConfig) Reset() { - *x = FailoverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FailoverConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailoverConfig) ProtoMessage() {} - -func (x *FailoverConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailoverConfig.ProtoReflect.Descriptor instead. -func (*FailoverConfig) Descriptor() ([]byte, []int) { - return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{1} -} - -func (x *FailoverConfig) GetDestinations() []*FailoverDestination { - if x != nil { - return x.Destinations - } - return nil -} - -func (x *FailoverConfig) GetMode() FailoverMode { - if x != nil { - return x.Mode - } - return FailoverMode_FAILOVER_MODE_UNSPECIFIED -} - -func (x *FailoverConfig) GetRegions() []string { - if x != nil { - return x.Regions - } - return nil -} - -func (x *FailoverConfig) GetSamenessGroup() string { - if x != nil { - return x.SamenessGroup - } - return "" -} - -type FailoverDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This must be a Service. - Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` - // TODO: what should an empty port mean? - Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` - Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` -} - -func (x *FailoverDestination) Reset() { - *x = FailoverDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FailoverDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailoverDestination) ProtoMessage() {} - -func (x *FailoverDestination) ProtoReflect() protoreflect.Message { - mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailoverDestination.ProtoReflect.Descriptor instead. -func (*FailoverDestination) Descriptor() ([]byte, []int) { - return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{2} -} - -func (x *FailoverDestination) GetRef() *pbresource.Reference { - if x != nil { - return x.Ref - } - return nil -} - -func (x *FailoverDestination) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - -func (x *FailoverDestination) GetDatacenter() string { - if x != nil { - return x.Datacenter - } - return "" -} - -var File_pbcatalog_v1alpha1_failover_policy_proto protoreflect.FileDescriptor - -var file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, 0x70, - 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x46, 0x61, 0x69, - 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x49, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0b, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x71, 0x0a, - 0x10, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xf2, 0x01, 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, - 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x43, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, - 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, - 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, - 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2a, 0x70, 0x0a, 0x0c, 0x46, 0x61, 0x69, - 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x41, 0x49, - 0x4c, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, - 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, - 0x54, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x4f, 0x56, - 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, - 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x02, 0x42, 0xb0, 0x02, 0x0a, 0x25, - 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x43, 0xaa, - 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x43, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbcatalog_v1alpha1_failover_policy_proto_rawDescOnce sync.Once - file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData = file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc -) - -func file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP() []byte { - file_pbcatalog_v1alpha1_failover_policy_proto_rawDescOnce.Do(func() { - file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData) - }) - return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData -} - -var file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_pbcatalog_v1alpha1_failover_policy_proto_goTypes = []interface{}{ - (FailoverMode)(0), // 0: hashicorp.consul.catalog.v1alpha1.FailoverMode - (*FailoverPolicy)(nil), // 1: hashicorp.consul.catalog.v1alpha1.FailoverPolicy - (*FailoverConfig)(nil), // 2: hashicorp.consul.catalog.v1alpha1.FailoverConfig - (*FailoverDestination)(nil), // 3: hashicorp.consul.catalog.v1alpha1.FailoverDestination - nil, // 4: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry - (*pbresource.Reference)(nil), // 5: hashicorp.consul.resource.Reference -} -var file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs = []int32{ - 2, // 0: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.config:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverConfig - 4, // 1: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.port_configs:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry - 3, // 2: hashicorp.consul.catalog.v1alpha1.FailoverConfig.destinations:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverDestination - 0, // 3: hashicorp.consul.catalog.v1alpha1.FailoverConfig.mode:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverMode - 5, // 4: hashicorp.consul.catalog.v1alpha1.FailoverDestination.ref:type_name -> hashicorp.consul.resource.Reference - 2, // 5: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry.value:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverConfig - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_pbcatalog_v1alpha1_failover_policy_proto_init() } -func file_pbcatalog_v1alpha1_failover_policy_proto_init() { - if File_pbcatalog_v1alpha1_failover_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailoverPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailoverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailoverDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbcatalog_v1alpha1_failover_policy_proto_goTypes, - DependencyIndexes: file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs, - EnumInfos: file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes, - MessageInfos: file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes, - }.Build() - File_pbcatalog_v1alpha1_failover_policy_proto = out.File - file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc = nil - file_pbcatalog_v1alpha1_failover_policy_proto_goTypes = nil - file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs = nil -} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.proto b/proto-public/pbcatalog/v1alpha1/failover_policy.proto deleted file mode 100644 index 69dcec0d973de..0000000000000 --- a/proto-public/pbcatalog/v1alpha1/failover_policy.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.catalog.v1alpha1; - -import "pbresource/resource.proto"; - -// This is a Resource type. -message FailoverPolicy { - // Config defines failover for any named port not present in PortConfigs. - FailoverConfig config = 1; - - // PortConfigs defines failover for a specific port on this service and takes - // precedence over Config. - map port_configs = 2; -} - -message FailoverConfig { - // Destinations specifies a fixed list of failover destinations to try. We - // never try a destination multiple times, so those are subtracted from this - // list before proceeding. - repeated FailoverDestination destinations = 1; - - // Mode specifies the type of failover that will be performed. Valid values are - // "sequential", "" (equivalent to "sequential") and "order-by-locality". - FailoverMode mode = 2; - repeated string regions = 3; - - // SamenessGroup specifies the sameness group to failover to. - string sameness_group = 4; -} - -message FailoverDestination { - // This must be a Service. - hashicorp.consul.resource.Reference ref = 1; - // TODO: what should an empty port mean? - string port = 2; - string datacenter = 3; -} - -enum FailoverMode { - FAILOVER_MODE_UNSPECIFIED = 0; - FAILOVER_MODE_SEQUENTIAL = 1; - FAILOVER_MODE_ORDER_BY_LOCALITY = 2; -} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy_extras.go b/proto-public/pbcatalog/v1alpha1/failover_policy_extras.go deleted file mode 100644 index 8c1f2d104caed..0000000000000 --- a/proto-public/pbcatalog/v1alpha1/failover_policy_extras.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package catalogv1alpha1 - -import pbresource "github.com/hashicorp/consul/proto-public/pbresource" - -// GetUnderlyingDestinations will collect FailoverDestinations from all -// internal fields and bundle them up in one slice. -// -// NOTE: no deduplication occurs. -func (x *FailoverPolicy) GetUnderlyingDestinations() []*FailoverDestination { - if x == nil { - return nil - } - - estimate := 0 - if x.Config != nil { - estimate += len(x.Config.Destinations) - } - for _, pc := range x.PortConfigs { - estimate += len(pc.Destinations) - } - - out := make([]*FailoverDestination, 0, estimate) - if x.Config != nil { - out = append(out, x.Config.Destinations...) - } - for _, pc := range x.PortConfigs { - out = append(out, pc.Destinations...) - } - return out -} - -// GetUnderlyingDestinationRefs is like GetUnderlyingDestinations except it -// returns a slice of References. -// -// NOTE: no deduplication occurs. -func (x *FailoverPolicy) GetUnderlyingDestinationRefs() []*pbresource.Reference { - if x == nil { - return nil - } - - dests := x.GetUnderlyingDestinations() - - out := make([]*pbresource.Reference, 0, len(dests)) - for _, dest := range dests { - if dest.Ref != nil { - out = append(out, dest.Ref) - } - } - - return out -} - -// IsEmpty returns true if a config has no definition. -func (x *FailoverConfig) IsEmpty() bool { - if x == nil { - return true - } - return len(x.Destinations) == 0 && - x.Mode == 0 && - len(x.Regions) == 0 && - x.SamenessGroup == "" -} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy_extras_test.go b/proto-public/pbcatalog/v1alpha1/failover_policy_extras_test.go deleted file mode 100644 index f9fe3e879dcaf..0000000000000 --- a/proto-public/pbcatalog/v1alpha1/failover_policy_extras_test.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package catalogv1alpha1 - -import ( - "testing" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - - pbresource "github.com/hashicorp/consul/proto-public/pbresource" -) - -func TestFailoverPolicy_IsEmpty(t *testing.T) { - t.Run("nil", func(t *testing.T) { - var fc *FailoverConfig - require.True(t, fc.IsEmpty()) - }) - t.Run("empty", func(t *testing.T) { - fc := &FailoverConfig{} - require.True(t, fc.IsEmpty()) - }) - t.Run("dest", func(t *testing.T) { - fc := &FailoverConfig{ - Destinations: []*FailoverDestination{ - newFailoverDestination("foo"), - }, - } - require.False(t, fc.IsEmpty()) - }) - t.Run("regions", func(t *testing.T) { - fc := &FailoverConfig{ - Regions: []string{"us-east"}, - } - require.False(t, fc.IsEmpty()) - }) - t.Run("regions", func(t *testing.T) { - fc := &FailoverConfig{ - SamenessGroup: "blah", - } - require.False(t, fc.IsEmpty()) - }) -} - -func TestFailoverPolicy_GetUnderlyingDestinations_AndRefs(t *testing.T) { - type testcase struct { - failover *FailoverPolicy - expectDests []*FailoverDestination - expectRefs []*pbresource.Reference - } - - run := func(t *testing.T, tc testcase) { - assertSliceEquals(t, tc.expectDests, tc.failover.GetUnderlyingDestinations()) - assertSliceEquals(t, tc.expectRefs, tc.failover.GetUnderlyingDestinationRefs()) - } - - cases := map[string]testcase{ - "nil": {}, - "kitchen sink dests": { - failover: &FailoverPolicy{ - Config: &FailoverConfig{ - Destinations: []*FailoverDestination{ - newFailoverDestination("foo"), - newFailoverDestination("bar"), - }, - }, - PortConfigs: map[string]*FailoverConfig{ - "admin": { - Destinations: []*FailoverDestination{ - newFailoverDestination("admin"), - }, - }, - "web": { - Destinations: []*FailoverDestination{ - newFailoverDestination("foo"), // duplicated - newFailoverDestination("www"), - }, - }, - }, - }, - expectDests: []*FailoverDestination{ - newFailoverDestination("foo"), - newFailoverDestination("bar"), - newFailoverDestination("admin"), - newFailoverDestination("foo"), // duplicated - newFailoverDestination("www"), - }, - expectRefs: []*pbresource.Reference{ - newFailoverRef("foo"), - newFailoverRef("bar"), - newFailoverRef("admin"), - newFailoverRef("foo"), // duplicated - newFailoverRef("www"), - }, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func assertSliceEquals[V proto.Message](t *testing.T, expect, got []V) { - t.Helper() - - require.Len(t, got, len(expect)) - - // O(N*M) scan - var expectedMissing []string - for _, expectVal := range expect { - found := false - for j, gotVal := range got { - if proto.Equal(expectVal, gotVal) { - found = true - got = append(got[:j], got[j+1:]...) // remove found item - break - } - } - - if !found { - expectedMissing = append(expectedMissing, protoToString(t, expectVal)) - } - } - - if len(expectedMissing) > 0 || len(got) > 0 { - var gotMissing []string - for _, gotVal := range got { - gotMissing = append(gotMissing, protoToString(t, gotVal)) - } - - t.Fatalf("assertion failed: unmatched values\n\texpected: %s\n\tactual: %s", - expectedMissing, - gotMissing, - ) - } -} - -func protoToString[V proto.Message](t *testing.T, pb V) string { - m := protojson.MarshalOptions{ - Indent: " ", - } - gotJSON, err := m.Marshal(pb) - require.NoError(t, err) - return string(gotJSON) -} - -func newFailoverRef(name string) *pbresource.Reference { - return &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "fake", - GroupVersion: "v1alpha1", - Kind: "fake", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "default", - Namespace: "default", - PeerName: "local", - }, - Name: name, - } -} - -func newFailoverDestination(name string) *FailoverDestination { - return &FailoverDestination{ - Ref: newFailoverRef(name), - } -} diff --git a/proto-public/pbcatalog/v1alpha1/selector.pb.go b/proto-public/pbcatalog/v1alpha1/selector.pb.go index 8caf0f51d6c89..a6f5a3ef880d3 100644 --- a/proto-public/pbcatalog/v1alpha1/selector.pb.go +++ b/proto-public/pbcatalog/v1alpha1/selector.pb.go @@ -31,7 +31,6 @@ type WorkloadSelector struct { Prefixes []string `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` - Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` } func (x *WorkloadSelector) Reset() { @@ -80,13 +79,6 @@ func (x *WorkloadSelector) GetNames() []string { return nil } -func (x *WorkloadSelector) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - var File_pbcatalog_v1alpha1_selector_proto protoreflect.FileDescriptor var file_pbcatalog_v1alpha1_selector_proto_rawDesc = []byte{ @@ -94,32 +86,31 @@ var file_pbcatalog_v1alpha1_selector_proto_rawDesc = []byte{ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x5c, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x44, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x42, 0xaa, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, - 0x43, 0x43, 0xaa, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, - 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xaa, 0x02, 0x0a, + 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x43, 0xaa, 0x02, 0x21, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, + 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/proto-public/pbcatalog/v1alpha1/selector.proto b/proto-public/pbcatalog/v1alpha1/selector.proto index 1b5aa366e07fc..b1b39409ba3a6 100644 --- a/proto-public/pbcatalog/v1alpha1/selector.proto +++ b/proto-public/pbcatalog/v1alpha1/selector.proto @@ -9,5 +9,4 @@ package hashicorp.consul.catalog.v1alpha1; message WorkloadSelector { repeated string prefixes = 1; repeated string names = 2; - string filter = 3; } diff --git a/proto-public/pbmesh/v1alpha1/common.pb.binary.go b/proto-public/pbmesh/v1alpha1/common.pb.binary.go deleted file mode 100644 index a02a97e494a17..0000000000000 --- a/proto-public/pbmesh/v1alpha1/common.pb.binary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/common.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ParentReference) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ParentReference) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *BackendReference) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *BackendReference) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/common.pb.go b/proto-public/pbmesh/v1alpha1/common.pb.go deleted file mode 100644 index 4262d3872c3db..0000000000000 --- a/proto-public/pbmesh/v1alpha1/common.pb.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/common.proto - -package meshv1alpha1 - -import ( - pbresource "github.com/hashicorp/consul/proto-public/pbresource" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// NOTE: roughly equivalent to structs.ResourceReference -type ParentReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // For east/west configuration, this should point to a pbcatalog.Service. - // For north/south it should point to a gateway (TBD) - Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` - // Port is the network port this Route targets. It can be interpreted - // differently based on the type of parent resource. - // - // When the parent resource is a Gateway, this targets all listeners - // listening on the specified port that also support this kind of Route(and - // select this Route). It’s not recommended to set Port unless the networking - // behaviors specified in a Route must apply to a specific port as opposed to - // a listener(s) whose port(s) may be changed. When both Port and SectionName - // are specified, the name and port of the selected listener must match both - // specified values. - // - // Implementations MAY choose to support other parent resources. - // Implementations supporting other types of parent resources MUST clearly - // document how/if Port is interpreted. - // - // For the purpose of status, an attachment is considered successful as long - // as the parent resource accepts it partially. For example, Gateway - // listeners can restrict which Routes can attach to them by Route kind, - // namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - // the referencing Route, the Route MUST be considered successfully attached. - // If no Gateway listeners accept attachment from this Route, the Route MUST - // be considered detached from the Gateway. - // - // For east/west this is the name of the consul port. - // For north/south this is the stringified integer port expected by GAMMA. - // - // https://gateway-api.sigs.k8s.io/geps/gep-957/ - Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *ParentReference) Reset() { - *x = ParentReference{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParentReference) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParentReference) ProtoMessage() {} - -func (x *ParentReference) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParentReference.ProtoReflect.Descriptor instead. -func (*ParentReference) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_common_proto_rawDescGZIP(), []int{0} -} - -func (x *ParentReference) GetRef() *pbresource.Reference { - if x != nil { - return x.Ref - } - return nil -} - -func (x *ParentReference) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - -type BackendReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // For east/west configuration, this should point to either a - // pbcatalog.Service or ServiceSubset. - // - // For Partition/PeerName fields likely we could map them to ServiceImports - // (MCS+GAMMA) when translating - Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` - // For east/west this is the name of the consul port. - Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` - // NOT IN GAMMA; multi-cluster + GWapi is still unknown - // - // Likely we could map this to ServiceImports (MCS+GAMMA) when translating - // to/from k8s. - // - // https://gateway-api.sigs.k8s.io/geps/gep-1748/ - Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` -} - -func (x *BackendReference) Reset() { - *x = BackendReference{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BackendReference) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackendReference) ProtoMessage() {} - -func (x *BackendReference) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackendReference.ProtoReflect.Descriptor instead. -func (*BackendReference) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_common_proto_rawDescGZIP(), []int{1} -} - -func (x *BackendReference) GetRef() *pbresource.Reference { - if x != nil { - return x.Ref - } - return nil -} - -func (x *BackendReference) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - -func (x *BackendReference) GetDatacenter() string { - if x != nil { - return x.Datacenter - } - return "" -} - -var File_pbmesh_v1alpha1_common_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_common_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, - 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, - 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x7e, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, - 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, - 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, - 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x93, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, - 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, - 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, - 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_common_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_common_proto_rawDescData = file_pbmesh_v1alpha1_common_proto_rawDesc -) - -func file_pbmesh_v1alpha1_common_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_common_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_common_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_common_proto_rawDescData -} - -var file_pbmesh_v1alpha1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_pbmesh_v1alpha1_common_proto_goTypes = []interface{}{ - (*ParentReference)(nil), // 0: hashicorp.consul.mesh.v1alpha1.ParentReference - (*BackendReference)(nil), // 1: hashicorp.consul.mesh.v1alpha1.BackendReference - (*pbresource.Reference)(nil), // 2: hashicorp.consul.resource.Reference -} -var file_pbmesh_v1alpha1_common_proto_depIdxs = []int32{ - 2, // 0: hashicorp.consul.mesh.v1alpha1.ParentReference.ref:type_name -> hashicorp.consul.resource.Reference - 2, // 1: hashicorp.consul.mesh.v1alpha1.BackendReference.ref:type_name -> hashicorp.consul.resource.Reference - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_common_proto_init() } -func file_pbmesh_v1alpha1_common_proto_init() { - if File_pbmesh_v1alpha1_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParentReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackendReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_common_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_common_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_common_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_common_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_common_proto = out.File - file_pbmesh_v1alpha1_common_proto_rawDesc = nil - file_pbmesh_v1alpha1_common_proto_goTypes = nil - file_pbmesh_v1alpha1_common_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/common.proto b/proto-public/pbmesh/v1alpha1/common.proto deleted file mode 100644 index 48668e59dd5a7..0000000000000 --- a/proto-public/pbmesh/v1alpha1/common.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbresource/resource.proto"; - -// NOTE: roughly equivalent to structs.ResourceReference -message ParentReference { - // For east/west configuration, this should point to a pbcatalog.Service. - // For north/south it should point to a gateway (TBD) - hashicorp.consul.resource.Reference ref = 1; - - // Port is the network port this Route targets. It can be interpreted - // differently based on the type of parent resource. - // - // When the parent resource is a Gateway, this targets all listeners - // listening on the specified port that also support this kind of Route(and - // select this Route). It’s not recommended to set Port unless the networking - // behaviors specified in a Route must apply to a specific port as opposed to - // a listener(s) whose port(s) may be changed. When both Port and SectionName - // are specified, the name and port of the selected listener must match both - // specified values. - // - // Implementations MAY choose to support other parent resources. - // Implementations supporting other types of parent resources MUST clearly - // document how/if Port is interpreted. - // - // For the purpose of status, an attachment is considered successful as long - // as the parent resource accepts it partially. For example, Gateway - // listeners can restrict which Routes can attach to them by Route kind, - // namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - // the referencing Route, the Route MUST be considered successfully attached. - // If no Gateway listeners accept attachment from this Route, the Route MUST - // be considered detached from the Gateway. - // - // For east/west this is the name of the consul port. - // For north/south this is the stringified integer port expected by GAMMA. - // - // https://gateway-api.sigs.k8s.io/geps/gep-957/ - string port = 2; -} - -message BackendReference { - // For east/west configuration, this should point to either a - // pbcatalog.Service or ServiceSubset. - // - // For Partition/PeerName fields likely we could map them to ServiceImports - // (MCS+GAMMA) when translating - hashicorp.consul.resource.Reference ref = 1; - - // For east/west this is the name of the consul port. - string port = 2; - - // NOT IN GAMMA; multi-cluster + GWapi is still unknown - // - // Likely we could map this to ServiceImports (MCS+GAMMA) when translating - // to/from k8s. - // - // https://gateway-api.sigs.k8s.io/geps/gep-1748/ - string datacenter = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go b/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go deleted file mode 100644 index cd30ceac27071..0000000000000 --- a/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/computed_routes.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ComputedRoutes) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ComputedRoutes) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ComputedPortRoutes) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ComputedPortRoutes) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedHTTPRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedHTTPRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedHTTPRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedHTTPRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedHTTPBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedHTTPBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedGRPCRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedGRPCRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedGRPCRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedGRPCRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedGRPCBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedGRPCBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedTCPRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedTCPRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedTCPRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedTCPRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InterpretedTCPBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InterpretedTCPBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *BackendTargetDetails) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *BackendTargetDetails) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.pb.go b/proto-public/pbmesh/v1alpha1/computed_routes.pb.go deleted file mode 100644 index 605e4fbd679e1..0000000000000 --- a/proto-public/pbmesh/v1alpha1/computed_routes.pb.go +++ /dev/null @@ -1,1321 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/computed_routes.proto - -package meshv1alpha1 - -import ( - v1alpha1 "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a Resource type. -type ComputedRoutes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PortedConfigs map[string]*ComputedPortRoutes `protobuf:"bytes,1,rep,name=ported_configs,json=portedConfigs,proto3" json:"ported_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ComputedRoutes) Reset() { - *x = ComputedRoutes{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComputedRoutes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComputedRoutes) ProtoMessage() {} - -func (x *ComputedRoutes) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ComputedRoutes.ProtoReflect.Descriptor instead. -func (*ComputedRoutes) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{0} -} - -func (x *ComputedRoutes) GetPortedConfigs() map[string]*ComputedPortRoutes { - if x != nil { - return x.PortedConfigs - } - return nil -} - -type ComputedPortRoutes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Config: - // - // *ComputedPortRoutes_Http - // *ComputedPortRoutes_Grpc - // *ComputedPortRoutes_Tcp - Config isComputedPortRoutes_Config `protobuf_oneof:"config"` - UsingDefaultConfig bool `protobuf:"varint,4,opt,name=using_default_config,json=usingDefaultConfig,proto3" json:"using_default_config,omitempty"` // TODO - // map key is an opaque string; like disco chain target name - Targets map[string]*BackendTargetDetails `protobuf:"bytes,5,rep,name=targets,proto3" json:"targets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ComputedPortRoutes) Reset() { - *x = ComputedPortRoutes{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComputedPortRoutes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComputedPortRoutes) ProtoMessage() {} - -func (x *ComputedPortRoutes) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ComputedPortRoutes.ProtoReflect.Descriptor instead. -func (*ComputedPortRoutes) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{1} -} - -func (m *ComputedPortRoutes) GetConfig() isComputedPortRoutes_Config { - if m != nil { - return m.Config - } - return nil -} - -func (x *ComputedPortRoutes) GetHttp() *InterpretedHTTPRoute { - if x, ok := x.GetConfig().(*ComputedPortRoutes_Http); ok { - return x.Http - } - return nil -} - -func (x *ComputedPortRoutes) GetGrpc() *InterpretedGRPCRoute { - if x, ok := x.GetConfig().(*ComputedPortRoutes_Grpc); ok { - return x.Grpc - } - return nil -} - -func (x *ComputedPortRoutes) GetTcp() *InterpretedTCPRoute { - if x, ok := x.GetConfig().(*ComputedPortRoutes_Tcp); ok { - return x.Tcp - } - return nil -} - -func (x *ComputedPortRoutes) GetUsingDefaultConfig() bool { - if x != nil { - return x.UsingDefaultConfig - } - return false -} - -func (x *ComputedPortRoutes) GetTargets() map[string]*BackendTargetDetails { - if x != nil { - return x.Targets - } - return nil -} - -type isComputedPortRoutes_Config interface { - isComputedPortRoutes_Config() -} - -type ComputedPortRoutes_Http struct { - Http *InterpretedHTTPRoute `protobuf:"bytes,1,opt,name=http,proto3,oneof"` -} - -type ComputedPortRoutes_Grpc struct { - Grpc *InterpretedGRPCRoute `protobuf:"bytes,2,opt,name=grpc,proto3,oneof"` -} - -type ComputedPortRoutes_Tcp struct { - Tcp *InterpretedTCPRoute `protobuf:"bytes,3,opt,name=tcp,proto3,oneof"` -} - -func (*ComputedPortRoutes_Http) isComputedPortRoutes_Config() {} - -func (*ComputedPortRoutes_Grpc) isComputedPortRoutes_Config() {} - -func (*ComputedPortRoutes_Tcp) isComputedPortRoutes_Config() {} - -type InterpretedHTTPRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` - Rules []*InterpretedHTTPRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *InterpretedHTTPRoute) Reset() { - *x = InterpretedHTTPRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedHTTPRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedHTTPRoute) ProtoMessage() {} - -func (x *InterpretedHTTPRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedHTTPRoute.ProtoReflect.Descriptor instead. -func (*InterpretedHTTPRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{2} -} - -func (x *InterpretedHTTPRoute) GetParentRef() *ParentReference { - if x != nil { - return x.ParentRef - } - return nil -} - -func (x *InterpretedHTTPRoute) GetRules() []*InterpretedHTTPRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -type InterpretedHTTPRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Matches []*HTTPRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` - Filters []*HTTPRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - BackendRefs []*InterpretedHTTPBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` - Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` - Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` -} - -func (x *InterpretedHTTPRouteRule) Reset() { - *x = InterpretedHTTPRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedHTTPRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedHTTPRouteRule) ProtoMessage() {} - -func (x *InterpretedHTTPRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedHTTPRouteRule.ProtoReflect.Descriptor instead. -func (*InterpretedHTTPRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{3} -} - -func (x *InterpretedHTTPRouteRule) GetMatches() []*HTTPRouteMatch { - if x != nil { - return x.Matches - } - return nil -} - -func (x *InterpretedHTTPRouteRule) GetFilters() []*HTTPRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *InterpretedHTTPRouteRule) GetBackendRefs() []*InterpretedHTTPBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -func (x *InterpretedHTTPRouteRule) GetTimeouts() *HTTPRouteTimeouts { - if x != nil { - return x.Timeouts - } - return nil -} - -func (x *InterpretedHTTPRouteRule) GetRetries() *HTTPRouteRetries { - if x != nil { - return x.Retries - } - return nil -} - -type InterpretedHTTPBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - Filters []*HTTPRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *InterpretedHTTPBackendRef) Reset() { - *x = InterpretedHTTPBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedHTTPBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedHTTPBackendRef) ProtoMessage() {} - -func (x *InterpretedHTTPBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedHTTPBackendRef.ProtoReflect.Descriptor instead. -func (*InterpretedHTTPBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{4} -} - -func (x *InterpretedHTTPBackendRef) GetBackendTarget() string { - if x != nil { - return x.BackendTarget - } - return "" -} - -func (x *InterpretedHTTPBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *InterpretedHTTPBackendRef) GetFilters() []*HTTPRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -type InterpretedGRPCRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` - Rules []*InterpretedGRPCRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *InterpretedGRPCRoute) Reset() { - *x = InterpretedGRPCRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedGRPCRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedGRPCRoute) ProtoMessage() {} - -func (x *InterpretedGRPCRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedGRPCRoute.ProtoReflect.Descriptor instead. -func (*InterpretedGRPCRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{5} -} - -func (x *InterpretedGRPCRoute) GetParentRef() *ParentReference { - if x != nil { - return x.ParentRef - } - return nil -} - -func (x *InterpretedGRPCRoute) GetRules() []*InterpretedGRPCRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -type InterpretedGRPCRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Matches []*GRPCRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` - Filters []*GRPCRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - BackendRefs []*InterpretedGRPCBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` - Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` - Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` -} - -func (x *InterpretedGRPCRouteRule) Reset() { - *x = InterpretedGRPCRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedGRPCRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedGRPCRouteRule) ProtoMessage() {} - -func (x *InterpretedGRPCRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedGRPCRouteRule.ProtoReflect.Descriptor instead. -func (*InterpretedGRPCRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{6} -} - -func (x *InterpretedGRPCRouteRule) GetMatches() []*GRPCRouteMatch { - if x != nil { - return x.Matches - } - return nil -} - -func (x *InterpretedGRPCRouteRule) GetFilters() []*GRPCRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *InterpretedGRPCRouteRule) GetBackendRefs() []*InterpretedGRPCBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -func (x *InterpretedGRPCRouteRule) GetTimeouts() *HTTPRouteTimeouts { - if x != nil { - return x.Timeouts - } - return nil -} - -func (x *InterpretedGRPCRouteRule) GetRetries() *HTTPRouteRetries { - if x != nil { - return x.Retries - } - return nil -} - -type InterpretedGRPCBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - Filters []*GRPCRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *InterpretedGRPCBackendRef) Reset() { - *x = InterpretedGRPCBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedGRPCBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedGRPCBackendRef) ProtoMessage() {} - -func (x *InterpretedGRPCBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedGRPCBackendRef.ProtoReflect.Descriptor instead. -func (*InterpretedGRPCBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{7} -} - -func (x *InterpretedGRPCBackendRef) GetBackendTarget() string { - if x != nil { - return x.BackendTarget - } - return "" -} - -func (x *InterpretedGRPCBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *InterpretedGRPCBackendRef) GetFilters() []*GRPCRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -type InterpretedTCPRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` - Rules []*InterpretedTCPRouteRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *InterpretedTCPRoute) Reset() { - *x = InterpretedTCPRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedTCPRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedTCPRoute) ProtoMessage() {} - -func (x *InterpretedTCPRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedTCPRoute.ProtoReflect.Descriptor instead. -func (*InterpretedTCPRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{8} -} - -func (x *InterpretedTCPRoute) GetParentRef() *ParentReference { - if x != nil { - return x.ParentRef - } - return nil -} - -func (x *InterpretedTCPRoute) GetRules() []*InterpretedTCPRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -type InterpretedTCPRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendRefs []*InterpretedTCPBackendRef `protobuf:"bytes,1,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` -} - -func (x *InterpretedTCPRouteRule) Reset() { - *x = InterpretedTCPRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedTCPRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedTCPRouteRule) ProtoMessage() {} - -func (x *InterpretedTCPRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedTCPRouteRule.ProtoReflect.Descriptor instead. -func (*InterpretedTCPRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{9} -} - -func (x *InterpretedTCPRouteRule) GetBackendRefs() []*InterpretedTCPBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -// TODO: look into smuggling the target through a different typeURL, or just -// skip in favor of letting the caller do their own lookups? -type InterpretedTCPBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *InterpretedTCPBackendRef) Reset() { - *x = InterpretedTCPBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterpretedTCPBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterpretedTCPBackendRef) ProtoMessage() {} - -func (x *InterpretedTCPBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InterpretedTCPBackendRef.ProtoReflect.Descriptor instead. -func (*InterpretedTCPBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{10} -} - -func (x *InterpretedTCPBackendRef) GetBackendTarget() string { - if x != nil { - return x.BackendTarget - } - return "" -} - -func (x *InterpretedTCPBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -type BackendTargetDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // identity info - BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` - NullRouteTraffic bool `protobuf:"varint,2,opt,name=null_route_traffic,json=nullRouteTraffic,proto3" json:"null_route_traffic,omitempty"` - Service *v1alpha1.Service `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"` - FailoverPolicy *v1alpha1.FailoverPolicy `protobuf:"bytes,4,opt,name=failover_policy,json=failoverPolicy,proto3" json:"failover_policy,omitempty"` - DestinationPolicy *DestinationPolicy `protobuf:"bytes,5,opt,name=destination_policy,json=destinationPolicy,proto3" json:"destination_policy,omitempty"` -} - -func (x *BackendTargetDetails) Reset() { - *x = BackendTargetDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BackendTargetDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackendTargetDetails) ProtoMessage() {} - -func (x *BackendTargetDetails) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackendTargetDetails.ProtoReflect.Descriptor instead. -func (*BackendTargetDetails) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{11} -} - -func (x *BackendTargetDetails) GetBackendRef() *BackendReference { - if x != nil { - return x.BackendRef - } - return nil -} - -func (x *BackendTargetDetails) GetNullRouteTraffic() bool { - if x != nil { - return x.NullRouteTraffic - } - return false -} - -func (x *BackendTargetDetails) GetService() *v1alpha1.Service { - if x != nil { - return x.Service - } - return nil -} - -func (x *BackendTargetDetails) GetFailoverPolicy() *v1alpha1.FailoverPolicy { - if x != nil { - return x.FailoverPolicy - } - return nil -} - -func (x *BackendTargetDetails) GetDestinationPolicy() *DestinationPolicy { - if x != nil { - return x.DestinationPolicy - } - return nil -} - -var File_pbmesh_v1alpha1_computed_routes_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x28, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x61, 0x69, 0x6c, - 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, - 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x0e, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x41, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x1a, 0x74, 0x0a, 0x12, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfe, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x4a, - 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x4a, 0x0a, 0x04, 0x67, 0x72, - 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x47, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, - 0x30, 0x0a, 0x14, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x75, - 0x73, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x59, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x70, 0x0a, 0x0c, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xbc, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x66, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, - 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x18, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, - 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x0c, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, - 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, - 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x14, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x66, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, - 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x18, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, - 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x0c, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, - 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, - 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x66, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xb4, 0x01, 0x0a, - 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x66, 0x12, 0x4d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x5b, - 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x22, 0x59, 0x0a, 0x18, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x9b, 0x03, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, - 0x51, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, - 0x6e, 0x75, 0x6c, 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x12, 0x44, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, - 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x60, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x9b, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, - 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, - 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_computed_routes_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_computed_routes_proto_rawDescData = file_pbmesh_v1alpha1_computed_routes_proto_rawDesc -) - -func file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_computed_routes_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_computed_routes_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_computed_routes_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_computed_routes_proto_rawDescData -} - -var file_pbmesh_v1alpha1_computed_routes_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_pbmesh_v1alpha1_computed_routes_proto_goTypes = []interface{}{ - (*ComputedRoutes)(nil), // 0: hashicorp.consul.mesh.v1alpha1.ComputedRoutes - (*ComputedPortRoutes)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes - (*InterpretedHTTPRoute)(nil), // 2: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute - (*InterpretedHTTPRouteRule)(nil), // 3: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule - (*InterpretedHTTPBackendRef)(nil), // 4: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef - (*InterpretedGRPCRoute)(nil), // 5: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute - (*InterpretedGRPCRouteRule)(nil), // 6: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule - (*InterpretedGRPCBackendRef)(nil), // 7: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef - (*InterpretedTCPRoute)(nil), // 8: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute - (*InterpretedTCPRouteRule)(nil), // 9: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule - (*InterpretedTCPBackendRef)(nil), // 10: hashicorp.consul.mesh.v1alpha1.InterpretedTCPBackendRef - (*BackendTargetDetails)(nil), // 11: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails - nil, // 12: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry - nil, // 13: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry - (*ParentReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ParentReference - (*HTTPRouteMatch)(nil), // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - (*HTTPRouteFilter)(nil), // 16: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - (*HTTPRouteTimeouts)(nil), // 17: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - (*HTTPRouteRetries)(nil), // 18: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - (*GRPCRouteMatch)(nil), // 19: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - (*GRPCRouteFilter)(nil), // 20: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - (*BackendReference)(nil), // 21: hashicorp.consul.mesh.v1alpha1.BackendReference - (*v1alpha1.Service)(nil), // 22: hashicorp.consul.catalog.v1alpha1.Service - (*v1alpha1.FailoverPolicy)(nil), // 23: hashicorp.consul.catalog.v1alpha1.FailoverPolicy - (*DestinationPolicy)(nil), // 24: hashicorp.consul.mesh.v1alpha1.DestinationPolicy -} -var file_pbmesh_v1alpha1_computed_routes_proto_depIdxs = []int32{ - 12, // 0: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.ported_configs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry - 2, // 1: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.http:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute - 5, // 2: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.grpc:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute - 8, // 3: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute - 13, // 4: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.targets:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry - 14, // 5: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 3, // 6: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule - 15, // 7: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - 16, // 8: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 4, // 9: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef - 17, // 10: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 18, // 11: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 16, // 12: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 14, // 13: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 6, // 14: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule - 19, // 15: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - 20, // 16: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 7, // 17: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef - 17, // 18: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 18, // 19: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 20, // 20: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 14, // 21: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 9, // 22: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule - 10, // 23: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPBackendRef - 21, // 24: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference - 22, // 25: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service:type_name -> hashicorp.consul.catalog.v1alpha1.Service - 23, // 26: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.failover_policy:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverPolicy - 24, // 27: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.destination_policy:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationPolicy - 1, // 28: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes - 11, // 29: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetails - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_computed_routes_proto_init() } -func file_pbmesh_v1alpha1_computed_routes_proto_init() { - if File_pbmesh_v1alpha1_computed_routes_proto != nil { - return - } - file_pbmesh_v1alpha1_common_proto_init() - file_pbmesh_v1alpha1_destination_policy_proto_init() - file_pbmesh_v1alpha1_grpc_route_proto_init() - file_pbmesh_v1alpha1_http_route_proto_init() - file_pbmesh_v1alpha1_http_route_retries_proto_init() - file_pbmesh_v1alpha1_http_route_timeouts_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComputedRoutes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComputedPortRoutes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedHTTPRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedHTTPRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedHTTPBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedGRPCRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedGRPCRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedGRPCBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedTCPRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedTCPRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterpretedTCPBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackendTargetDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ComputedPortRoutes_Http)(nil), - (*ComputedPortRoutes_Grpc)(nil), - (*ComputedPortRoutes_Tcp)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_computed_routes_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_computed_routes_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_computed_routes_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_computed_routes_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_computed_routes_proto = out.File - file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = nil - file_pbmesh_v1alpha1_computed_routes_proto_goTypes = nil - file_pbmesh_v1alpha1_computed_routes_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.proto b/proto-public/pbmesh/v1alpha1/computed_routes.proto deleted file mode 100644 index d48d417d68233..0000000000000 --- a/proto-public/pbmesh/v1alpha1/computed_routes.proto +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbcatalog/v1alpha1/failover_policy.proto"; -import "pbcatalog/v1alpha1/service.proto"; -import "pbmesh/v1alpha1/common.proto"; -import "pbmesh/v1alpha1/destination_policy.proto"; -import "pbmesh/v1alpha1/grpc_route.proto"; -import "pbmesh/v1alpha1/http_route.proto"; -import "pbmesh/v1alpha1/http_route_retries.proto"; -import "pbmesh/v1alpha1/http_route_timeouts.proto"; - -// This is a Resource type. -message ComputedRoutes { - map ported_configs = 1; -} - -message ComputedPortRoutes { - oneof config { - InterpretedHTTPRoute http = 1; - InterpretedGRPCRoute grpc = 2; - InterpretedTCPRoute tcp = 3; - } - bool using_default_config = 4; // TODO - - // map key is an opaque string; like disco chain target name - map targets = 5; -} - -message InterpretedHTTPRoute { - ParentReference parent_ref = 1; - reserved 2; // hostnames - repeated InterpretedHTTPRouteRule rules = 3; -} - -message InterpretedHTTPRouteRule { - repeated HTTPRouteMatch matches = 1; - repeated HTTPRouteFilter filters = 2; - repeated InterpretedHTTPBackendRef backend_refs = 3; - HTTPRouteTimeouts timeouts = 4; - HTTPRouteRetries retries = 5; -} - -message InterpretedHTTPBackendRef { - string backend_target = 1; - uint32 weight = 2; - repeated HTTPRouteFilter filters = 3; -} - -message InterpretedGRPCRoute { - ParentReference parent_ref = 1; - reserved 2; // hostnames - repeated InterpretedGRPCRouteRule rules = 3; -} - -message InterpretedGRPCRouteRule { - repeated GRPCRouteMatch matches = 1; - repeated GRPCRouteFilter filters = 2; - repeated InterpretedGRPCBackendRef backend_refs = 3; - HTTPRouteTimeouts timeouts = 4; - HTTPRouteRetries retries = 5; -} - -message InterpretedGRPCBackendRef { - string backend_target = 1; - uint32 weight = 2; - repeated GRPCRouteFilter filters = 3; -} - -message InterpretedTCPRoute { - ParentReference parent_ref = 1; - repeated InterpretedTCPRouteRule rules = 2; -} - -message InterpretedTCPRouteRule { - repeated InterpretedTCPBackendRef backend_refs = 1; -} - -// TODO: look into smuggling the target through a different typeURL, or just -// skip in favor of letting the caller do their own lookups? -message InterpretedTCPBackendRef { - string backend_target = 1; - uint32 weight = 2; -} - -message BackendTargetDetails { - // identity info - BackendReference backend_ref = 1; - - bool null_route_traffic = 2; - - hashicorp.consul.catalog.v1alpha1.Service service = 3; - hashicorp.consul.catalog.v1alpha1.FailoverPolicy failover_policy = 4; - DestinationPolicy destination_policy = 5; -} diff --git a/proto-public/pbmesh/v1alpha1/connection.pb.go b/proto-public/pbmesh/v1alpha1/connection.pb.go index 221845b26dbb8..5edc0ee76d1d7 100644 --- a/proto-public/pbmesh/v1alpha1/connection.pb.go +++ b/proto-public/pbmesh/v1alpha1/connection.pb.go @@ -12,7 +12,6 @@ package meshv1alpha1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -24,61 +23,60 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type BalanceConnections int32 +type BalanceInboundConnections int32 const ( // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - BalanceConnections_BALANCE_CONNECTIONS_DEFAULT BalanceConnections = 0 - BalanceConnections_BALANCE_CONNECTIONS_EXACT BalanceConnections = 1 + BalanceInboundConnections_BALANCE_INBOUND_CONNECTIONS_DEFAULT BalanceInboundConnections = 0 + BalanceInboundConnections_BALANCE_INBOUND_CONNECTIONS_EXACT BalanceInboundConnections = 1 ) -// Enum value maps for BalanceConnections. +// Enum value maps for BalanceInboundConnections. var ( - BalanceConnections_name = map[int32]string{ - 0: "BALANCE_CONNECTIONS_DEFAULT", - 1: "BALANCE_CONNECTIONS_EXACT", + BalanceInboundConnections_name = map[int32]string{ + 0: "BALANCE_INBOUND_CONNECTIONS_DEFAULT", + 1: "BALANCE_INBOUND_CONNECTIONS_EXACT", } - BalanceConnections_value = map[string]int32{ - "BALANCE_CONNECTIONS_DEFAULT": 0, - "BALANCE_CONNECTIONS_EXACT": 1, + BalanceInboundConnections_value = map[string]int32{ + "BALANCE_INBOUND_CONNECTIONS_DEFAULT": 0, + "BALANCE_INBOUND_CONNECTIONS_EXACT": 1, } ) -func (x BalanceConnections) Enum() *BalanceConnections { - p := new(BalanceConnections) +func (x BalanceInboundConnections) Enum() *BalanceInboundConnections { + p := new(BalanceInboundConnections) *p = x return p } -func (x BalanceConnections) String() string { +func (x BalanceInboundConnections) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (BalanceConnections) Descriptor() protoreflect.EnumDescriptor { +func (BalanceInboundConnections) Descriptor() protoreflect.EnumDescriptor { return file_pbmesh_v1alpha1_connection_proto_enumTypes[0].Descriptor() } -func (BalanceConnections) Type() protoreflect.EnumType { +func (BalanceInboundConnections) Type() protoreflect.EnumType { return &file_pbmesh_v1alpha1_connection_proto_enumTypes[0] } -func (x BalanceConnections) Number() protoreflect.EnumNumber { +func (x BalanceInboundConnections) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use BalanceConnections.Descriptor instead. -func (BalanceConnections) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use BalanceInboundConnections.Descriptor instead. +func (BalanceInboundConnections) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_connection_proto_rawDescGZIP(), []int{0} } -// Referenced by ProxyConfiguration type ConnectionConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` + ConnectTimeoutMs uint64 `protobuf:"varint,2,opt,name=connect_timeout_ms,json=connectTimeoutMs,proto3" json:"connect_timeout_ms,omitempty"` + RequestTimeoutMs uint64 `protobuf:"varint,3,opt,name=request_timeout_ms,json=requestTimeoutMs,proto3" json:"request_timeout_ms,omitempty"` } func (x *ConnectionConfig) Reset() { @@ -113,28 +111,27 @@ func (*ConnectionConfig) Descriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_connection_proto_rawDescGZIP(), []int{0} } -func (x *ConnectionConfig) GetConnectTimeout() *durationpb.Duration { +func (x *ConnectionConfig) GetConnectTimeoutMs() uint64 { if x != nil { - return x.ConnectTimeout + return x.ConnectTimeoutMs } - return nil + return 0 } -func (x *ConnectionConfig) GetRequestTimeout() *durationpb.Duration { +func (x *ConnectionConfig) GetRequestTimeoutMs() uint64 { if x != nil { - return x.RequestTimeout + return x.RequestTimeoutMs } - return nil + return 0 } -// Referenced by ProxyConfiguration type InboundConnectionsConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MaxInboundConnections uint64 `protobuf:"varint,12,opt,name=max_inbound_connections,json=maxInboundConnections,proto3" json:"max_inbound_connections,omitempty"` - BalanceInboundConnections BalanceConnections `protobuf:"varint,13,opt,name=balance_inbound_connections,json=balanceInboundConnections,proto3,enum=hashicorp.consul.mesh.v1alpha1.BalanceConnections" json:"balance_inbound_connections,omitempty"` + MaxInboundConnections uint64 `protobuf:"varint,12,opt,name=max_inbound_connections,json=maxInboundConnections,proto3" json:"max_inbound_connections,omitempty"` + BalanceInboundConnections BalanceInboundConnections `protobuf:"varint,13,opt,name=balance_inbound_connections,json=balanceInboundConnections,proto3,enum=hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections" json:"balance_inbound_connections,omitempty"` } func (x *InboundConnectionsConfig) Reset() { @@ -176,11 +173,11 @@ func (x *InboundConnectionsConfig) GetMaxInboundConnections() uint64 { return 0 } -func (x *InboundConnectionsConfig) GetBalanceInboundConnections() BalanceConnections { +func (x *InboundConnectionsConfig) GetBalanceInboundConnections() BalanceInboundConnections { if x != nil { return x.BalanceInboundConnections } - return BalanceConnections_BALANCE_CONNECTIONS_DEFAULT + return BalanceInboundConnections_BALANCE_INBOUND_CONNECTIONS_DEFAULT } var File_pbmesh_v1alpha1_connection_proto protoreflect.FileDescriptor @@ -190,54 +187,52 @@ var file_pbmesh_v1alpha1_connection_proto_rawDesc = []byte{ 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, - 0xc6, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x17, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x6d, - 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x1b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x54, 0x0a, 0x12, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, - 0x0a, 0x1b, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, - 0x1d, 0x0a, 0x19, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, 0x42, 0x97, - 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x61, 0x31, 0x22, 0x6e, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x4d, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x4d, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x15, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x79, 0x0a, 0x1b, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2a, 0x6b, 0x0a, 0x19, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, + 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x44, + 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x41, 0x4c, 0x41, + 0x4e, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, + 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, 0x42, + 0x97, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, + 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -255,20 +250,17 @@ func file_pbmesh_v1alpha1_connection_proto_rawDescGZIP() []byte { var file_pbmesh_v1alpha1_connection_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_pbmesh_v1alpha1_connection_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_pbmesh_v1alpha1_connection_proto_goTypes = []interface{}{ - (BalanceConnections)(0), // 0: hashicorp.consul.mesh.v1alpha1.BalanceConnections + (BalanceInboundConnections)(0), // 0: hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections (*ConnectionConfig)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ConnectionConfig (*InboundConnectionsConfig)(nil), // 2: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration } var file_pbmesh_v1alpha1_connection_proto_depIdxs = []int32{ - 3, // 0: hashicorp.consul.mesh.v1alpha1.ConnectionConfig.connect_timeout:type_name -> google.protobuf.Duration - 3, // 1: hashicorp.consul.mesh.v1alpha1.ConnectionConfig.request_timeout:type_name -> google.protobuf.Duration - 0, // 2: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig.balance_inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceConnections - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 0: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig.balance_inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_pbmesh_v1alpha1_connection_proto_init() } diff --git a/proto-public/pbmesh/v1alpha1/connection.proto b/proto-public/pbmesh/v1alpha1/connection.proto index 8cae7c1c10995..8a1f4f0e7c575 100644 --- a/proto-public/pbmesh/v1alpha1/connection.proto +++ b/proto-public/pbmesh/v1alpha1/connection.proto @@ -5,22 +5,18 @@ syntax = "proto3"; package hashicorp.consul.mesh.v1alpha1; -import "google/protobuf/duration.proto"; - -// Referenced by ProxyConfiguration message ConnectionConfig { - google.protobuf.Duration connect_timeout = 1; - google.protobuf.Duration request_timeout = 2; + uint64 connect_timeout_ms = 2; + uint64 request_timeout_ms = 3; } -// Referenced by ProxyConfiguration message InboundConnectionsConfig { uint64 max_inbound_connections = 12; - BalanceConnections balance_inbound_connections = 13; + BalanceInboundConnections balance_inbound_connections = 13; } -enum BalanceConnections { +enum BalanceInboundConnections { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - BALANCE_CONNECTIONS_DEFAULT = 0; - BALANCE_CONNECTIONS_EXACT = 1; + BALANCE_INBOUND_CONNECTIONS_DEFAULT = 0; + BALANCE_INBOUND_CONNECTIONS_EXACT = 1; } diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go b/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go deleted file mode 100644 index e77b667108700..0000000000000 --- a/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/destination_policy.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DestinationPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DestinationPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DestinationConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DestinationConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LocalityPrioritization) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LocalityPrioritization) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LoadBalancer) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LoadBalancer) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RingHashConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RingHashConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LeastRequestConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LeastRequestConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HashPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HashPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *CookieConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *CookieConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.pb.go b/proto-public/pbmesh/v1alpha1/destination_policy.pb.go deleted file mode 100644 index 44a3049d5eb2f..0000000000000 --- a/proto-public/pbmesh/v1alpha1/destination_policy.pb.go +++ /dev/null @@ -1,1091 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/destination_policy.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LocalityPrioritizationMode int32 - -const ( - LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED LocalityPrioritizationMode = 0 - LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_NONE LocalityPrioritizationMode = 1 - LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_FAILOVER LocalityPrioritizationMode = 2 -) - -// Enum value maps for LocalityPrioritizationMode. -var ( - LocalityPrioritizationMode_name = map[int32]string{ - 0: "LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED", - 1: "LOCALITY_PRIORITIZATION_MODE_NONE", - 2: "LOCALITY_PRIORITIZATION_MODE_FAILOVER", - } - LocalityPrioritizationMode_value = map[string]int32{ - "LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED": 0, - "LOCALITY_PRIORITIZATION_MODE_NONE": 1, - "LOCALITY_PRIORITIZATION_MODE_FAILOVER": 2, - } -) - -func (x LocalityPrioritizationMode) Enum() *LocalityPrioritizationMode { - p := new(LocalityPrioritizationMode) - *p = x - return p -} - -func (x LocalityPrioritizationMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LocalityPrioritizationMode) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[0].Descriptor() -} - -func (LocalityPrioritizationMode) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[0] -} - -func (x LocalityPrioritizationMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LocalityPrioritizationMode.Descriptor instead. -func (LocalityPrioritizationMode) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{0} -} - -type LoadBalancerPolicy int32 - -const ( - LoadBalancerPolicy_LOAD_BALANCER_POLICY_UNSPECIFIED LoadBalancerPolicy = 0 - LoadBalancerPolicy_LOAD_BALANCER_POLICY_RANDOM LoadBalancerPolicy = 1 - LoadBalancerPolicy_LOAD_BALANCER_POLICY_ROUND_ROBIN LoadBalancerPolicy = 2 - LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST LoadBalancerPolicy = 3 - LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV LoadBalancerPolicy = 4 - LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH LoadBalancerPolicy = 5 -) - -// Enum value maps for LoadBalancerPolicy. -var ( - LoadBalancerPolicy_name = map[int32]string{ - 0: "LOAD_BALANCER_POLICY_UNSPECIFIED", - 1: "LOAD_BALANCER_POLICY_RANDOM", - 2: "LOAD_BALANCER_POLICY_ROUND_ROBIN", - 3: "LOAD_BALANCER_POLICY_LEAST_REQUEST", - 4: "LOAD_BALANCER_POLICY_MAGLEV", - 5: "LOAD_BALANCER_POLICY_RING_HASH", - } - LoadBalancerPolicy_value = map[string]int32{ - "LOAD_BALANCER_POLICY_UNSPECIFIED": 0, - "LOAD_BALANCER_POLICY_RANDOM": 1, - "LOAD_BALANCER_POLICY_ROUND_ROBIN": 2, - "LOAD_BALANCER_POLICY_LEAST_REQUEST": 3, - "LOAD_BALANCER_POLICY_MAGLEV": 4, - "LOAD_BALANCER_POLICY_RING_HASH": 5, - } -) - -func (x LoadBalancerPolicy) Enum() *LoadBalancerPolicy { - p := new(LoadBalancerPolicy) - *p = x - return p -} - -func (x LoadBalancerPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LoadBalancerPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[1].Descriptor() -} - -func (LoadBalancerPolicy) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[1] -} - -func (x LoadBalancerPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LoadBalancerPolicy.Descriptor instead. -func (LoadBalancerPolicy) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{1} -} - -type HashPolicyField int32 - -const ( - HashPolicyField_HASH_POLICY_FIELD_UNSPECIFIED HashPolicyField = 0 - HashPolicyField_HASH_POLICY_FIELD_HEADER HashPolicyField = 1 - HashPolicyField_HASH_POLICY_FIELD_COOKIE HashPolicyField = 2 - HashPolicyField_HASH_POLICY_FIELD_QUERY_PARAMETER HashPolicyField = 3 -) - -// Enum value maps for HashPolicyField. -var ( - HashPolicyField_name = map[int32]string{ - 0: "HASH_POLICY_FIELD_UNSPECIFIED", - 1: "HASH_POLICY_FIELD_HEADER", - 2: "HASH_POLICY_FIELD_COOKIE", - 3: "HASH_POLICY_FIELD_QUERY_PARAMETER", - } - HashPolicyField_value = map[string]int32{ - "HASH_POLICY_FIELD_UNSPECIFIED": 0, - "HASH_POLICY_FIELD_HEADER": 1, - "HASH_POLICY_FIELD_COOKIE": 2, - "HASH_POLICY_FIELD_QUERY_PARAMETER": 3, - } -) - -func (x HashPolicyField) Enum() *HashPolicyField { - p := new(HashPolicyField) - *p = x - return p -} - -func (x HashPolicyField) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HashPolicyField) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[2].Descriptor() -} - -func (HashPolicyField) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[2] -} - -func (x HashPolicyField) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HashPolicyField.Descriptor instead. -func (HashPolicyField) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{2} -} - -// DestinationPolicy is the destination-controlled set of defaults that -// are used when similar controls defined in an UpstreamConfig are left -// unspecified. -// -// Users may wish to share commonly configured settings for communicating with -// a service in one place, but yet retain the ability to tweak those on a -// client-by-client basis, which is why there are separate resources to control -// the definition of these values from either end of the connection. -// -// This is a Resource type. -type DestinationPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PortConfigs map[string]*DestinationConfig `protobuf:"bytes,1,rep,name=port_configs,json=portConfigs,proto3" json:"port_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DestinationPolicy) Reset() { - *x = DestinationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationPolicy) ProtoMessage() {} - -func (x *DestinationPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DestinationPolicy.ProtoReflect.Descriptor instead. -func (*DestinationPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{0} -} - -func (x *DestinationPolicy) GetPortConfigs() map[string]*DestinationConfig { - if x != nil { - return x.PortConfigs - } - return nil -} - -type DestinationConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ConnectTimeout is the timeout for establishing new network connections - // to this service. - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // RequestTimeout is the timeout for an HTTP request to complete before the - // connection is automatically terminated. If unspecified, defaults to 15 - // seconds. - RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // LoadBalancer determines the load balancing policy and configuration for - // services issuing requests to this upstream service. - LoadBalancer *LoadBalancer `protobuf:"bytes,3,opt,name=load_balancer,json=loadBalancer,proto3" json:"load_balancer,omitempty"` - // LocalityPrioritization controls whether the locality of services within the - // local partition will be used to prioritize connectivity. - LocalityPrioritization *LocalityPrioritization `protobuf:"bytes,4,opt,name=locality_prioritization,json=localityPrioritization,proto3" json:"locality_prioritization,omitempty"` -} - -func (x *DestinationConfig) Reset() { - *x = DestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationConfig) ProtoMessage() {} - -func (x *DestinationConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DestinationConfig.ProtoReflect.Descriptor instead. -func (*DestinationConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{1} -} - -func (x *DestinationConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *DestinationConfig) GetRequestTimeout() *durationpb.Duration { - if x != nil { - return x.RequestTimeout - } - return nil -} - -func (x *DestinationConfig) GetLoadBalancer() *LoadBalancer { - if x != nil { - return x.LoadBalancer - } - return nil -} - -func (x *DestinationConfig) GetLocalityPrioritization() *LocalityPrioritization { - if x != nil { - return x.LocalityPrioritization - } - return nil -} - -type LocalityPrioritization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Mode specifies the type of prioritization that will be performed - // when selecting nodes in the local partition. - // Valid values are: "" (default "none"), "none", and "failover". - Mode LocalityPrioritizationMode `protobuf:"varint,1,opt,name=mode,proto3,enum=hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode" json:"mode,omitempty"` -} - -func (x *LocalityPrioritization) Reset() { - *x = LocalityPrioritization{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalityPrioritization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalityPrioritization) ProtoMessage() {} - -func (x *LocalityPrioritization) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalityPrioritization.ProtoReflect.Descriptor instead. -func (*LocalityPrioritization) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{2} -} - -func (x *LocalityPrioritization) GetMode() LocalityPrioritizationMode { - if x != nil { - return x.Mode - } - return LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED -} - -// LoadBalancer determines the load balancing policy and configuration -// for services issuing requests to this upstream service. -type LoadBalancer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Policy is the load balancing policy used to select a host - Policy LoadBalancerPolicy `protobuf:"varint,1,opt,name=policy,proto3,enum=hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy" json:"policy,omitempty"` - // HashPolicies is a list of hash policies to use for hashing load balancing - // algorithms. Hash policies are evaluated individually and combined such - // that identical lists result in the same hash. - // - // If no hash policies are present, or none are successfully evaluated, - // then a random backend host will be selected. - HashPolicies []*HashPolicy `protobuf:"bytes,2,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"` - // Types that are assignable to Config: - // - // *LoadBalancer_RingHashConfig - // *LoadBalancer_LeastRequestConfig - Config isLoadBalancer_Config `protobuf_oneof:"config"` -} - -func (x *LoadBalancer) Reset() { - *x = LoadBalancer{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancer) ProtoMessage() {} - -func (x *LoadBalancer) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancer.ProtoReflect.Descriptor instead. -func (*LoadBalancer) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{3} -} - -func (x *LoadBalancer) GetPolicy() LoadBalancerPolicy { - if x != nil { - return x.Policy - } - return LoadBalancerPolicy_LOAD_BALANCER_POLICY_UNSPECIFIED -} - -func (x *LoadBalancer) GetHashPolicies() []*HashPolicy { - if x != nil { - return x.HashPolicies - } - return nil -} - -func (m *LoadBalancer) GetConfig() isLoadBalancer_Config { - if m != nil { - return m.Config - } - return nil -} - -func (x *LoadBalancer) GetRingHashConfig() *RingHashConfig { - if x, ok := x.GetConfig().(*LoadBalancer_RingHashConfig); ok { - return x.RingHashConfig - } - return nil -} - -func (x *LoadBalancer) GetLeastRequestConfig() *LeastRequestConfig { - if x, ok := x.GetConfig().(*LoadBalancer_LeastRequestConfig); ok { - return x.LeastRequestConfig - } - return nil -} - -type isLoadBalancer_Config interface { - isLoadBalancer_Config() -} - -type LoadBalancer_RingHashConfig struct { - // RingHashConfig contains configuration for the "ring_hash" policy type - RingHashConfig *RingHashConfig `protobuf:"bytes,3,opt,name=ring_hash_config,json=ringHashConfig,proto3,oneof"` -} - -type LoadBalancer_LeastRequestConfig struct { - // LeastRequestConfig contains configuration for the "least_request" policy type - LeastRequestConfig *LeastRequestConfig `protobuf:"bytes,4,opt,name=least_request_config,json=leastRequestConfig,proto3,oneof"` -} - -func (*LoadBalancer_RingHashConfig) isLoadBalancer_Config() {} - -func (*LoadBalancer_LeastRequestConfig) isLoadBalancer_Config() {} - -// RingHashConfig contains configuration for the "ring_hash" policy type -type RingHashConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MinimumRingSize determines the minimum number of entries in the hash ring - MinimumRingSize uint64 `protobuf:"varint,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` - // MaximumRingSize determines the maximum number of entries in the hash ring - MaximumRingSize uint64 `protobuf:"varint,2,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` -} - -func (x *RingHashConfig) Reset() { - *x = RingHashConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RingHashConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RingHashConfig) ProtoMessage() {} - -func (x *RingHashConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RingHashConfig.ProtoReflect.Descriptor instead. -func (*RingHashConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{4} -} - -func (x *RingHashConfig) GetMinimumRingSize() uint64 { - if x != nil { - return x.MinimumRingSize - } - return 0 -} - -func (x *RingHashConfig) GetMaximumRingSize() uint64 { - if x != nil { - return x.MaximumRingSize - } - return 0 -} - -// LeastRequestConfig contains configuration for the "least_request" policy type -type LeastRequestConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ChoiceCount determines the number of random healthy hosts from which to select the one with the least requests. - ChoiceCount uint32 `protobuf:"varint,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` -} - -func (x *LeastRequestConfig) Reset() { - *x = LeastRequestConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeastRequestConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeastRequestConfig) ProtoMessage() {} - -func (x *LeastRequestConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeastRequestConfig.ProtoReflect.Descriptor instead. -func (*LeastRequestConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{5} -} - -func (x *LeastRequestConfig) GetChoiceCount() uint32 { - if x != nil { - return x.ChoiceCount - } - return 0 -} - -// HashPolicy defines which attributes will be hashed by hash-based LB algorithms -type HashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Field is the attribute type to hash on. - // Must be one of "header","cookie", or "query_parameter". - // Cannot be specified along with SourceIP. - Field HashPolicyField `protobuf:"varint,1,opt,name=field,proto3,enum=hashicorp.consul.mesh.v1alpha1.HashPolicyField" json:"field,omitempty"` - // FieldValue is the value to hash. - // ie. header name, cookie name, URL query parameter name - // Cannot be specified along with SourceIP. - FieldValue string `protobuf:"bytes,2,opt,name=field_value,json=fieldValue,proto3" json:"field_value,omitempty"` - // CookieConfig contains configuration for the "cookie" hash policy type. - CookieConfig *CookieConfig `protobuf:"bytes,3,opt,name=cookie_config,json=cookieConfig,proto3" json:"cookie_config,omitempty"` - // SourceIP determines whether the hash should be of the source IP rather than of a field and field value. - // Cannot be specified along with Field or FieldValue. - SourceIp bool `protobuf:"varint,4,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` - // Terminal will short circuit the computation of the hash when multiple hash policies are present. - // If a hash is computed when a Terminal policy is evaluated, - // then that hash will be used and subsequent hash policies will be ignored. - Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *HashPolicy) Reset() { - *x = HashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HashPolicy) ProtoMessage() {} - -func (x *HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead. -func (*HashPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{6} -} - -func (x *HashPolicy) GetField() HashPolicyField { - if x != nil { - return x.Field - } - return HashPolicyField_HASH_POLICY_FIELD_UNSPECIFIED -} - -func (x *HashPolicy) GetFieldValue() string { - if x != nil { - return x.FieldValue - } - return "" -} - -func (x *HashPolicy) GetCookieConfig() *CookieConfig { - if x != nil { - return x.CookieConfig - } - return nil -} - -func (x *HashPolicy) GetSourceIp() bool { - if x != nil { - return x.SourceIp - } - return false -} - -func (x *HashPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -// CookieConfig contains configuration for the "cookie" hash policy type. -// This is specified to have Envoy generate a cookie for a client on its first request. -type CookieConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Generates a session cookie with no expiration. - Session bool `protobuf:"varint,1,opt,name=session,proto3" json:"session,omitempty"` - // TTL for generated cookies. Cannot be specified for session cookies. - Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` - // The path to set for the cookie - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *CookieConfig) Reset() { - *x = CookieConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CookieConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CookieConfig) ProtoMessage() {} - -func (x *CookieConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CookieConfig.ProtoReflect.Descriptor instead. -func (*CookieConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{7} -} - -func (x *CookieConfig) GetSession() bool { - if x != nil { - return x.Session - } - return false -} - -func (x *CookieConfig) GetTtl() *durationpb.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *CookieConfig) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -var File_pbmesh_v1alpha1_destination_policy_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_destination_policy_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x11, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x65, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x6f, 0x72, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x71, 0x0a, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x02, 0x0a, 0x11, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x0c, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x17, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x16, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xf9, 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x61, 0x64, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, - 0x52, 0x0e, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x66, 0x0a, 0x14, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x68, 0x0a, 0x0e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, - 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x37, 0x0a, 0x12, - 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x02, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x51, 0x0a, 0x0d, - 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x1a, 0x0a, 0x08, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x69, 0x0a, 0x0c, 0x43, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x2a, 0x9c, 0x01, 0x0a, 0x1a, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x28, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, - 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, - 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x4c, 0x4f, 0x43, 0x41, 0x4c, - 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x4f, 0x56, 0x45, 0x52, - 0x10, 0x02, 0x2a, 0xee, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x4f, 0x41, - 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, - 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1f, 0x0a, 0x1b, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x01, - 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, - 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, - 0x4f, 0x42, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, - 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4c, - 0x45, 0x41, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x1f, - 0x0a, 0x1b, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, - 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4d, 0x41, 0x47, 0x4c, 0x45, 0x56, 0x10, 0x04, 0x12, - 0x22, 0x0a, 0x1e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x53, - 0x48, 0x10, 0x05, 0x2a, 0x97, 0x01, 0x0a, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x1d, 0x48, 0x41, 0x53, 0x48, 0x5f, - 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, - 0x53, 0x48, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, - 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, 0x53, 0x48, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x43, 0x4f, - 0x4f, 0x4b, 0x49, 0x45, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x50, - 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x52, - 0x59, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x03, 0x42, 0x9e, 0x02, - 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x42, 0x16, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, - 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, - 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, - 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_destination_policy_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_destination_policy_proto_rawDescData = file_pbmesh_v1alpha1_destination_policy_proto_rawDesc -) - -func file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_destination_policy_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_destination_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_destination_policy_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_destination_policy_proto_rawDescData -} - -var file_pbmesh_v1alpha1_destination_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_pbmesh_v1alpha1_destination_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_pbmesh_v1alpha1_destination_policy_proto_goTypes = []interface{}{ - (LocalityPrioritizationMode)(0), // 0: hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode - (LoadBalancerPolicy)(0), // 1: hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy - (HashPolicyField)(0), // 2: hashicorp.consul.mesh.v1alpha1.HashPolicyField - (*DestinationPolicy)(nil), // 3: hashicorp.consul.mesh.v1alpha1.DestinationPolicy - (*DestinationConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.DestinationConfig - (*LocalityPrioritization)(nil), // 5: hashicorp.consul.mesh.v1alpha1.LocalityPrioritization - (*LoadBalancer)(nil), // 6: hashicorp.consul.mesh.v1alpha1.LoadBalancer - (*RingHashConfig)(nil), // 7: hashicorp.consul.mesh.v1alpha1.RingHashConfig - (*LeastRequestConfig)(nil), // 8: hashicorp.consul.mesh.v1alpha1.LeastRequestConfig - (*HashPolicy)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HashPolicy - (*CookieConfig)(nil), // 10: hashicorp.consul.mesh.v1alpha1.CookieConfig - nil, // 11: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry - (*durationpb.Duration)(nil), // 12: google.protobuf.Duration -} -var file_pbmesh_v1alpha1_destination_policy_proto_depIdxs = []int32{ - 11, // 0: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.port_configs:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry - 12, // 1: hashicorp.consul.mesh.v1alpha1.DestinationConfig.connect_timeout:type_name -> google.protobuf.Duration - 12, // 2: hashicorp.consul.mesh.v1alpha1.DestinationConfig.request_timeout:type_name -> google.protobuf.Duration - 6, // 3: hashicorp.consul.mesh.v1alpha1.DestinationConfig.load_balancer:type_name -> hashicorp.consul.mesh.v1alpha1.LoadBalancer - 5, // 4: hashicorp.consul.mesh.v1alpha1.DestinationConfig.locality_prioritization:type_name -> hashicorp.consul.mesh.v1alpha1.LocalityPrioritization - 0, // 5: hashicorp.consul.mesh.v1alpha1.LocalityPrioritization.mode:type_name -> hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode - 1, // 6: hashicorp.consul.mesh.v1alpha1.LoadBalancer.policy:type_name -> hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy - 9, // 7: hashicorp.consul.mesh.v1alpha1.LoadBalancer.hash_policies:type_name -> hashicorp.consul.mesh.v1alpha1.HashPolicy - 7, // 8: hashicorp.consul.mesh.v1alpha1.LoadBalancer.ring_hash_config:type_name -> hashicorp.consul.mesh.v1alpha1.RingHashConfig - 8, // 9: hashicorp.consul.mesh.v1alpha1.LoadBalancer.least_request_config:type_name -> hashicorp.consul.mesh.v1alpha1.LeastRequestConfig - 2, // 10: hashicorp.consul.mesh.v1alpha1.HashPolicy.field:type_name -> hashicorp.consul.mesh.v1alpha1.HashPolicyField - 10, // 11: hashicorp.consul.mesh.v1alpha1.HashPolicy.cookie_config:type_name -> hashicorp.consul.mesh.v1alpha1.CookieConfig - 12, // 12: hashicorp.consul.mesh.v1alpha1.CookieConfig.ttl:type_name -> google.protobuf.Duration - 4, // 13: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationConfig - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_destination_policy_proto_init() } -func file_pbmesh_v1alpha1_destination_policy_proto_init() { - if File_pbmesh_v1alpha1_destination_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityPrioritization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RingHashConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeastRequestConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CookieConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*LoadBalancer_RingHashConfig)(nil), - (*LoadBalancer_LeastRequestConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_destination_policy_proto_rawDesc, - NumEnums: 3, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_destination_policy_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_destination_policy_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_destination_policy_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_destination_policy_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_destination_policy_proto = out.File - file_pbmesh_v1alpha1_destination_policy_proto_rawDesc = nil - file_pbmesh_v1alpha1_destination_policy_proto_goTypes = nil - file_pbmesh_v1alpha1_destination_policy_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.proto b/proto-public/pbmesh/v1alpha1/destination_policy.proto deleted file mode 100644 index cc03f38d8c05f..0000000000000 --- a/proto-public/pbmesh/v1alpha1/destination_policy.proto +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "google/protobuf/duration.proto"; - -// DestinationPolicy is the destination-controlled set of defaults that -// are used when similar controls defined in an UpstreamConfig are left -// unspecified. -// -// Users may wish to share commonly configured settings for communicating with -// a service in one place, but yet retain the ability to tweak those on a -// client-by-client basis, which is why there are separate resources to control -// the definition of these values from either end of the connection. -// -// This is a Resource type. -message DestinationPolicy { - map port_configs = 1; -} - -message DestinationConfig { - // ConnectTimeout is the timeout for establishing new network connections - // to this service. - google.protobuf.Duration connect_timeout = 1; - - // RequestTimeout is the timeout for an HTTP request to complete before the - // connection is automatically terminated. If unspecified, defaults to 15 - // seconds. - google.protobuf.Duration request_timeout = 2; - - // LoadBalancer determines the load balancing policy and configuration for - // services issuing requests to this upstream service. - LoadBalancer load_balancer = 3; - - // LocalityPrioritization controls whether the locality of services within the - // local partition will be used to prioritize connectivity. - LocalityPrioritization locality_prioritization = 4; -} - -message LocalityPrioritization { - // Mode specifies the type of prioritization that will be performed - // when selecting nodes in the local partition. - // Valid values are: "" (default "none"), "none", and "failover". - LocalityPrioritizationMode mode = 1; -} - -enum LocalityPrioritizationMode { - LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED = 0; - LOCALITY_PRIORITIZATION_MODE_NONE = 1; - LOCALITY_PRIORITIZATION_MODE_FAILOVER = 2; -} - -// LoadBalancer determines the load balancing policy and configuration -// for services issuing requests to this upstream service. -// -message LoadBalancer { - // Policy is the load balancing policy used to select a host - LoadBalancerPolicy policy = 1; - - // HashPolicies is a list of hash policies to use for hashing load balancing - // algorithms. Hash policies are evaluated individually and combined such - // that identical lists result in the same hash. - // - // If no hash policies are present, or none are successfully evaluated, - // then a random backend host will be selected. - repeated HashPolicy hash_policies = 2; - - oneof config { - // RingHashConfig contains configuration for the "ring_hash" policy type - RingHashConfig ring_hash_config = 3; - - // LeastRequestConfig contains configuration for the "least_request" policy type - LeastRequestConfig least_request_config = 4; - } -} - -enum LoadBalancerPolicy { - LOAD_BALANCER_POLICY_UNSPECIFIED = 0; - LOAD_BALANCER_POLICY_RANDOM = 1; - LOAD_BALANCER_POLICY_ROUND_ROBIN = 2; - LOAD_BALANCER_POLICY_LEAST_REQUEST = 3; - LOAD_BALANCER_POLICY_MAGLEV = 4; - LOAD_BALANCER_POLICY_RING_HASH = 5; -} - -// RingHashConfig contains configuration for the "ring_hash" policy type -message RingHashConfig { - // MinimumRingSize determines the minimum number of entries in the hash ring - uint64 minimum_ring_size = 1; - - // MaximumRingSize determines the maximum number of entries in the hash ring - uint64 maximum_ring_size = 2; -} - -// LeastRequestConfig contains configuration for the "least_request" policy type -message LeastRequestConfig { - // ChoiceCount determines the number of random healthy hosts from which to select the one with the least requests. - uint32 choice_count = 1; -} - -// HashPolicy defines which attributes will be hashed by hash-based LB algorithms -message HashPolicy { - // Field is the attribute type to hash on. - // Must be one of "header","cookie", or "query_parameter". - // Cannot be specified along with SourceIP. - HashPolicyField field = 1; - - // FieldValue is the value to hash. - // ie. header name, cookie name, URL query parameter name - // Cannot be specified along with SourceIP. - string field_value = 2; - - // CookieConfig contains configuration for the "cookie" hash policy type. - CookieConfig cookie_config = 3; - - // SourceIP determines whether the hash should be of the source IP rather than of a field and field value. - // Cannot be specified along with Field or FieldValue. - bool source_ip = 4; - - // Terminal will short circuit the computation of the hash when multiple hash policies are present. - // If a hash is computed when a Terminal policy is evaluated, - // then that hash will be used and subsequent hash policies will be ignored. - bool terminal = 5; -} - -enum HashPolicyField { - HASH_POLICY_FIELD_UNSPECIFIED = 0; - HASH_POLICY_FIELD_HEADER = 1; - HASH_POLICY_FIELD_COOKIE = 2; - HASH_POLICY_FIELD_QUERY_PARAMETER = 3; -} - -// CookieConfig contains configuration for the "cookie" hash policy type. -// This is specified to have Envoy generate a cookie for a client on its first request. -message CookieConfig { - // Generates a session cookie with no expiration. - bool session = 1; - - // TTL for generated cookies. Cannot be specified for session cookies. - google.protobuf.Duration ttl = 2; - - // The path to set for the cookie - string path = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go deleted file mode 100644 index 40efa6110d0b7..0000000000000 --- a/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/grpc_route.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCRouteMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCRouteMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCMethodMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCMethodMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCHeaderMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCHeaderMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCRouteFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCRouteFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *GRPCBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *GRPCBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.pb.go b/proto-public/pbmesh/v1alpha1/grpc_route.pb.go deleted file mode 100644 index 2f25aae654e70..0000000000000 --- a/proto-public/pbmesh/v1alpha1/grpc_route.pb.go +++ /dev/null @@ -1,887 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/grpc_route.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GRPCMethodMatchType int32 - -const ( - GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_UNSPECIFIED GRPCMethodMatchType = 0 - GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT GRPCMethodMatchType = 1 - GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_REGEX GRPCMethodMatchType = 2 -) - -// Enum value maps for GRPCMethodMatchType. -var ( - GRPCMethodMatchType_name = map[int32]string{ - 0: "GRPC_METHOD_MATCH_TYPE_UNSPECIFIED", - 1: "GRPC_METHOD_MATCH_TYPE_EXACT", - 2: "GRPC_METHOD_MATCH_TYPE_REGEX", - } - GRPCMethodMatchType_value = map[string]int32{ - "GRPC_METHOD_MATCH_TYPE_UNSPECIFIED": 0, - "GRPC_METHOD_MATCH_TYPE_EXACT": 1, - "GRPC_METHOD_MATCH_TYPE_REGEX": 2, - } -) - -func (x GRPCMethodMatchType) Enum() *GRPCMethodMatchType { - p := new(GRPCMethodMatchType) - *p = x - return p -} - -func (x GRPCMethodMatchType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GRPCMethodMatchType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_grpc_route_proto_enumTypes[0].Descriptor() -} - -func (GRPCMethodMatchType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_grpc_route_proto_enumTypes[0] -} - -func (x GRPCMethodMatchType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GRPCMethodMatchType.Descriptor instead. -func (GRPCMethodMatchType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{0} -} - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRoute -// -// This is a Resource type. -type GRPCRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` - Hostnames []string `protobuf:"bytes,2,rep,name=hostnames,proto3" json:"hostnames,omitempty"` - // Rules are a list of GRPC matchers, filters and actions. - Rules []*GRPCRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *GRPCRoute) Reset() { - *x = GRPCRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCRoute) ProtoMessage() {} - -func (x *GRPCRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCRoute.ProtoReflect.Descriptor instead. -func (*GRPCRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{0} -} - -func (x *GRPCRoute) GetParentRefs() []*ParentReference { - if x != nil { - return x.ParentRefs - } - return nil -} - -func (x *GRPCRoute) GetHostnames() []string { - if x != nil { - return x.Hostnames - } - return nil -} - -func (x *GRPCRoute) GetRules() []*GRPCRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -type GRPCRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Matches []*GRPCRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` - Filters []*GRPCRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - BackendRefs []*GRPCBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` - // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. - Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` - // ALTERNATIVE: - Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` -} - -func (x *GRPCRouteRule) Reset() { - *x = GRPCRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCRouteRule) ProtoMessage() {} - -func (x *GRPCRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCRouteRule.ProtoReflect.Descriptor instead. -func (*GRPCRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{1} -} - -func (x *GRPCRouteRule) GetMatches() []*GRPCRouteMatch { - if x != nil { - return x.Matches - } - return nil -} - -func (x *GRPCRouteRule) GetFilters() []*GRPCRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *GRPCRouteRule) GetBackendRefs() []*GRPCBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -func (x *GRPCRouteRule) GetTimeouts() *HTTPRouteTimeouts { - if x != nil { - return x.Timeouts - } - return nil -} - -func (x *GRPCRouteRule) GetRetries() *HTTPRouteRetries { - if x != nil { - return x.Retries - } - return nil -} - -type GRPCRouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Method specifies a gRPC request service/method matcher. If this field is - // not specified, all services and methods will match. - Method *GRPCMethodMatch `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` - // Headers specifies gRPC request header matchers. Multiple match values are - // ANDed together, meaning, a request MUST match all the specified headers to - // select the route. - Headers []*GRPCHeaderMatch `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *GRPCRouteMatch) Reset() { - *x = GRPCRouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCRouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCRouteMatch) ProtoMessage() {} - -func (x *GRPCRouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCRouteMatch.ProtoReflect.Descriptor instead. -func (*GRPCRouteMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{2} -} - -func (x *GRPCRouteMatch) GetMethod() *GRPCMethodMatch { - if x != nil { - return x.Method - } - return nil -} - -func (x *GRPCRouteMatch) GetHeaders() []*GRPCHeaderMatch { - if x != nil { - return x.Headers - } - return nil -} - -type GRPCMethodMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type specifies how to match against the service and/or method. Support: - // Core (Exact with service and method specified) - Type GRPCMethodMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType" json:"type,omitempty"` - // Value of the service to match against. If left empty or omitted, will - // match any service. - // - // At least one of Service and Method MUST be a non-empty string. - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - // Value of the method to match against. If left empty or omitted, will match - // all services. - // - // At least one of Service and Method MUST be a non-empty string.} - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` -} - -func (x *GRPCMethodMatch) Reset() { - *x = GRPCMethodMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCMethodMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCMethodMatch) ProtoMessage() {} - -func (x *GRPCMethodMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCMethodMatch.ProtoReflect.Descriptor instead. -func (*GRPCMethodMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{3} -} - -func (x *GRPCMethodMatch) GetType() GRPCMethodMatchType { - if x != nil { - return x.Type - } - return GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_UNSPECIFIED -} - -func (x *GRPCMethodMatch) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *GRPCMethodMatch) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -type GRPCHeaderMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type HeaderMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.HeaderMatchType" json:"type,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *GRPCHeaderMatch) Reset() { - *x = GRPCHeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCHeaderMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCHeaderMatch) ProtoMessage() {} - -func (x *GRPCHeaderMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCHeaderMatch.ProtoReflect.Descriptor instead. -func (*GRPCHeaderMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{4} -} - -func (x *GRPCHeaderMatch) GetType() HeaderMatchType { - if x != nil { - return x.Type - } - return HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED -} - -func (x *GRPCHeaderMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GRPCHeaderMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type GRPCRouteFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // RequestHeaderModifier defines a schema for a filter that modifies request - // headers. - RequestHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,1,opt,name=request_header_modifier,json=requestHeaderModifier,proto3" json:"request_header_modifier,omitempty"` - // ResponseHeaderModifier defines a schema for a filter that modifies - // response headers. - ResponseHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,2,opt,name=response_header_modifier,json=responseHeaderModifier,proto3" json:"response_header_modifier,omitempty"` - // URLRewrite defines a schema for a filter that modifies a request during - // forwarding. - UrlRewrite *HTTPURLRewriteFilter `protobuf:"bytes,5,opt,name=url_rewrite,json=urlRewrite,proto3" json:"url_rewrite,omitempty"` -} - -func (x *GRPCRouteFilter) Reset() { - *x = GRPCRouteFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCRouteFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCRouteFilter) ProtoMessage() {} - -func (x *GRPCRouteFilter) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCRouteFilter.ProtoReflect.Descriptor instead. -func (*GRPCRouteFilter) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{5} -} - -func (x *GRPCRouteFilter) GetRequestHeaderModifier() *HTTPHeaderFilter { - if x != nil { - return x.RequestHeaderModifier - } - return nil -} - -func (x *GRPCRouteFilter) GetResponseHeaderModifier() *HTTPHeaderFilter { - if x != nil { - return x.ResponseHeaderModifier - } - return nil -} - -func (x *GRPCRouteFilter) GetUrlRewrite() *HTTPURLRewriteFilter { - if x != nil { - return x.UrlRewrite - } - return nil -} - -type GRPCBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - // If only one backend is specified and it has a weight greater than 0, 100% - // of the traffic is forwarded to that backend. If weight is set to 0, no - // traffic should be forwarded for this entry. If unspecified, weight defaults - // to 1. - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Filters defined at this level should be executed if and only if the - // request is being forwarded to the backend defined here. - Filters []*GRPCRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *GRPCBackendRef) Reset() { - *x = GRPCBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCBackendRef) ProtoMessage() {} - -func (x *GRPCBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GRPCBackendRef.ProtoReflect.Descriptor instead. -func (*GRPCBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{6} -} - -func (x *GRPCBackendRef) GetBackendRef() *BackendReference { - if x != nil { - return x.BackendRef - } - return nil -} - -func (x *GRPCBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *GRPCBackendRef) GetFilters() []*GRPCRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -var File_pbmesh_v1alpha1_grpc_route_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_grpc_route_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x09, 0x47, 0x52, 0x50, 0x43, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x0d, 0x47, - 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x42, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, - 0xa4, 0x01, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x49, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, - 0x50, 0x43, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbe, 0x02, 0x0a, 0x0f, 0x47, 0x52, 0x50, - 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, - 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x75, 0x72, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, - 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x75, - 0x72, 0x6c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x47, 0x52, - 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, - 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2a, 0x81, 0x01, 0x0a, 0x13, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, - 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, - 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, - 0x43, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, - 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, - 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x42, 0x96, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x47, - 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, - 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, - 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_grpc_route_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_grpc_route_proto_rawDescData = file_pbmesh_v1alpha1_grpc_route_proto_rawDesc -) - -func file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_grpc_route_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_grpc_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_grpc_route_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_grpc_route_proto_rawDescData -} - -var file_pbmesh_v1alpha1_grpc_route_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_grpc_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_pbmesh_v1alpha1_grpc_route_proto_goTypes = []interface{}{ - (GRPCMethodMatchType)(0), // 0: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType - (*GRPCRoute)(nil), // 1: hashicorp.consul.mesh.v1alpha1.GRPCRoute - (*GRPCRouteRule)(nil), // 2: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule - (*GRPCRouteMatch)(nil), // 3: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - (*GRPCMethodMatch)(nil), // 4: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch - (*GRPCHeaderMatch)(nil), // 5: hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch - (*GRPCRouteFilter)(nil), // 6: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - (*GRPCBackendRef)(nil), // 7: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef - (*ParentReference)(nil), // 8: hashicorp.consul.mesh.v1alpha1.ParentReference - (*HTTPRouteTimeouts)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - (*HTTPRouteRetries)(nil), // 10: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - (HeaderMatchType)(0), // 11: hashicorp.consul.mesh.v1alpha1.HeaderMatchType - (*HTTPHeaderFilter)(nil), // 12: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - (*HTTPURLRewriteFilter)(nil), // 13: hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter - (*BackendReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.BackendReference -} -var file_pbmesh_v1alpha1_grpc_route_proto_depIdxs = []int32{ - 8, // 0: hashicorp.consul.mesh.v1alpha1.GRPCRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 2, // 1: hashicorp.consul.mesh.v1alpha1.GRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteRule - 3, // 2: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - 6, // 3: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 7, // 4: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCBackendRef - 9, // 5: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 10, // 6: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 4, // 7: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch.method:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch - 5, // 8: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch.headers:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch - 0, // 9: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType - 11, // 10: hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.HeaderMatchType - 12, // 11: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.request_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - 12, // 12: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.response_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - 13, // 13: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.url_rewrite:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter - 14, // 14: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference - 6, // 15: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_grpc_route_proto_init() } -func file_pbmesh_v1alpha1_grpc_route_proto_init() { - if File_pbmesh_v1alpha1_grpc_route_proto != nil { - return - } - file_pbmesh_v1alpha1_common_proto_init() - file_pbmesh_v1alpha1_http_route_proto_init() - file_pbmesh_v1alpha1_http_route_retries_proto_init() - file_pbmesh_v1alpha1_http_route_timeouts_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCRouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCMethodMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCHeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCRouteFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_grpc_route_proto_rawDesc, - NumEnums: 1, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_grpc_route_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_grpc_route_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_grpc_route_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_grpc_route_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_grpc_route_proto = out.File - file_pbmesh_v1alpha1_grpc_route_proto_rawDesc = nil - file_pbmesh_v1alpha1_grpc_route_proto_goTypes = nil - file_pbmesh_v1alpha1_grpc_route_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.proto b/proto-public/pbmesh/v1alpha1/grpc_route.proto deleted file mode 100644 index ce4ca4d917ca8..0000000000000 --- a/proto-public/pbmesh/v1alpha1/grpc_route.proto +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbmesh/v1alpha1/common.proto"; -import "pbmesh/v1alpha1/http_route.proto"; -import "pbmesh/v1alpha1/http_route_retries.proto"; -import "pbmesh/v1alpha1/http_route_timeouts.proto"; - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRoute -// -// This is a Resource type. -message GRPCRoute { - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - repeated ParentReference parent_refs = 1; - - repeated string hostnames = 2; - - // Rules are a list of GRPC matchers, filters and actions. - repeated GRPCRouteRule rules = 3; -} - -message GRPCRouteRule { - repeated GRPCRouteMatch matches = 1; - repeated GRPCRouteFilter filters = 2; - repeated GRPCBackendRef backend_refs = 3; - - // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. - HTTPRouteTimeouts timeouts = 4; - // ALTERNATIVE: - HTTPRouteRetries retries = 5; -} - -message GRPCRouteMatch { - // Method specifies a gRPC request service/method matcher. If this field is - // not specified, all services and methods will match. - GRPCMethodMatch method = 1; - - // Headers specifies gRPC request header matchers. Multiple match values are - // ANDed together, meaning, a request MUST match all the specified headers to - // select the route. - repeated GRPCHeaderMatch headers = 2; -} - -message GRPCMethodMatch { - // Type specifies how to match against the service and/or method. Support: - // Core (Exact with service and method specified) - GRPCMethodMatchType type = 1; - - // Value of the service to match against. If left empty or omitted, will - // match any service. - // - // At least one of Service and Method MUST be a non-empty string. - string service = 2; - - // Value of the method to match against. If left empty or omitted, will match - // all services. - // - // At least one of Service and Method MUST be a non-empty string.} - string method = 3; -} - -enum GRPCMethodMatchType { - GRPC_METHOD_MATCH_TYPE_UNSPECIFIED = 0; - GRPC_METHOD_MATCH_TYPE_EXACT = 1; - GRPC_METHOD_MATCH_TYPE_REGEX = 2; -} - -message GRPCHeaderMatch { - HeaderMatchType type = 1; - string name = 2; - string value = 3; -} - -message GRPCRouteFilter { - // RequestHeaderModifier defines a schema for a filter that modifies request - // headers. - HTTPHeaderFilter request_header_modifier = 1; - - // ResponseHeaderModifier defines a schema for a filter that modifies - // response headers. - HTTPHeaderFilter response_header_modifier = 2; - - // URLRewrite defines a schema for a filter that modifies a request during - // forwarding. - HTTPURLRewriteFilter url_rewrite = 5; -} - -message GRPCBackendRef { - BackendReference backend_ref = 1; - - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - //If only one backend is specified and it has a weight greater than 0, 100% - //of the traffic is forwarded to that backend. If weight is set to 0, no - //traffic should be forwarded for this entry. If unspecified, weight defaults - //to 1. - uint32 weight = 2; - - // Filters defined at this level should be executed if and only if the - // request is being forwarded to the backend defined here. - repeated GRPCRouteFilter filters = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go deleted file mode 100644 index 81b3901a5bd98..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/http_route.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRouteMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRouteMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPPathMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPPathMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPHeaderMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPHeaderMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPQueryParamMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPQueryParamMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRouteFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRouteFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPHeaderFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPHeaderFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPHeader) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPHeader) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPURLRewriteFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPURLRewriteFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/http_route.pb.go b/proto-public/pbmesh/v1alpha1/http_route.pb.go deleted file mode 100644 index f69b84f226568..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route.pb.go +++ /dev/null @@ -1,1441 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/http_route.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PathMatchType specifies the semantics of how HTTP paths should be compared. -// Valid PathMatchType values, along with their support levels, are: -// -// PathPrefix and Exact paths must be syntactically valid: -// -// - Must begin with the / character -// - Must not contain consecutive / characters (e.g. /foo///, //). -// - Note that values may be added to this enum, implementations must ensure that unknown values will not cause a crash. -// -// Unknown values here must result in the implementation setting the Accepted -// Condition for the Route to status: False, with a Reason of UnsupportedValue. -type PathMatchType int32 - -const ( - PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED PathMatchType = 0 - PathMatchType_PATH_MATCH_TYPE_EXACT PathMatchType = 1 - PathMatchType_PATH_MATCH_TYPE_PREFIX PathMatchType = 2 - PathMatchType_PATH_MATCH_TYPE_REGEX PathMatchType = 3 -) - -// Enum value maps for PathMatchType. -var ( - PathMatchType_name = map[int32]string{ - 0: "PATH_MATCH_TYPE_UNSPECIFIED", - 1: "PATH_MATCH_TYPE_EXACT", - 2: "PATH_MATCH_TYPE_PREFIX", - 3: "PATH_MATCH_TYPE_REGEX", - } - PathMatchType_value = map[string]int32{ - "PATH_MATCH_TYPE_UNSPECIFIED": 0, - "PATH_MATCH_TYPE_EXACT": 1, - "PATH_MATCH_TYPE_PREFIX": 2, - "PATH_MATCH_TYPE_REGEX": 3, - } -) - -func (x PathMatchType) Enum() *PathMatchType { - p := new(PathMatchType) - *p = x - return p -} - -func (x PathMatchType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PathMatchType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_http_route_proto_enumTypes[0].Descriptor() -} - -func (PathMatchType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[0] -} - -func (x PathMatchType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PathMatchType.Descriptor instead. -func (PathMatchType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{0} -} - -// HeaderMatchType specifies the semantics of how HTTP header values should be -// compared. Valid HeaderMatchType values, along with their conformance levels, -// are: -// -// Note that values may be added to this enum, implementations must ensure that -// unknown values will not cause a crash. -// -// Unknown values here must result in the implementation setting the Accepted -// Condition for the Route to status: False, with a Reason of UnsupportedValue. -type HeaderMatchType int32 - -const ( - HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED HeaderMatchType = 0 - HeaderMatchType_HEADER_MATCH_TYPE_EXACT HeaderMatchType = 1 - HeaderMatchType_HEADER_MATCH_TYPE_REGEX HeaderMatchType = 2 - // consul only after this point (service-router compat) - HeaderMatchType_HEADER_MATCH_TYPE_PRESENT HeaderMatchType = 3 - HeaderMatchType_HEADER_MATCH_TYPE_PREFIX HeaderMatchType = 4 - HeaderMatchType_HEADER_MATCH_TYPE_SUFFIX HeaderMatchType = 5 -) - -// Enum value maps for HeaderMatchType. -var ( - HeaderMatchType_name = map[int32]string{ - 0: "HEADER_MATCH_TYPE_UNSPECIFIED", - 1: "HEADER_MATCH_TYPE_EXACT", - 2: "HEADER_MATCH_TYPE_REGEX", - 3: "HEADER_MATCH_TYPE_PRESENT", - 4: "HEADER_MATCH_TYPE_PREFIX", - 5: "HEADER_MATCH_TYPE_SUFFIX", - } - HeaderMatchType_value = map[string]int32{ - "HEADER_MATCH_TYPE_UNSPECIFIED": 0, - "HEADER_MATCH_TYPE_EXACT": 1, - "HEADER_MATCH_TYPE_REGEX": 2, - "HEADER_MATCH_TYPE_PRESENT": 3, - "HEADER_MATCH_TYPE_PREFIX": 4, - "HEADER_MATCH_TYPE_SUFFIX": 5, - } -) - -func (x HeaderMatchType) Enum() *HeaderMatchType { - p := new(HeaderMatchType) - *p = x - return p -} - -func (x HeaderMatchType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HeaderMatchType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_http_route_proto_enumTypes[1].Descriptor() -} - -func (HeaderMatchType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[1] -} - -func (x HeaderMatchType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HeaderMatchType.Descriptor instead. -func (HeaderMatchType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{1} -} - -type QueryParamMatchType int32 - -const ( - QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_UNSPECIFIED QueryParamMatchType = 0 - QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_EXACT QueryParamMatchType = 1 - QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_REGEX QueryParamMatchType = 2 - // consul only after this point (service-router compat) - QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_PRESENT QueryParamMatchType = 3 -) - -// Enum value maps for QueryParamMatchType. -var ( - QueryParamMatchType_name = map[int32]string{ - 0: "QUERY_PARAM_MATCH_TYPE_UNSPECIFIED", - 1: "QUERY_PARAM_MATCH_TYPE_EXACT", - 2: "QUERY_PARAM_MATCH_TYPE_REGEX", - 3: "QUERY_PARAM_MATCH_TYPE_PRESENT", - } - QueryParamMatchType_value = map[string]int32{ - "QUERY_PARAM_MATCH_TYPE_UNSPECIFIED": 0, - "QUERY_PARAM_MATCH_TYPE_EXACT": 1, - "QUERY_PARAM_MATCH_TYPE_REGEX": 2, - "QUERY_PARAM_MATCH_TYPE_PRESENT": 3, - } -) - -func (x QueryParamMatchType) Enum() *QueryParamMatchType { - p := new(QueryParamMatchType) - *p = x - return p -} - -func (x QueryParamMatchType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (QueryParamMatchType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_http_route_proto_enumTypes[2].Descriptor() -} - -func (QueryParamMatchType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[2] -} - -func (x QueryParamMatchType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use QueryParamMatchType.Descriptor instead. -func (QueryParamMatchType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{2} -} - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRoute -// -// This is a Resource type. -type HTTPRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` - // Hostnames are the hostnames for which this HTTPRoute should respond to requests. - Hostnames []string `protobuf:"bytes,2,rep,name=hostnames,proto3" json:"hostnames,omitempty"` - // Rules are a list of HTTP-based routing rules that this route should - // use for constructing a routing table. - Rules []*HTTPRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *HTTPRoute) Reset() { - *x = HTTPRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRoute) ProtoMessage() {} - -func (x *HTTPRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRoute.ProtoReflect.Descriptor instead. -func (*HTTPRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{0} -} - -func (x *HTTPRoute) GetParentRefs() []*ParentReference { - if x != nil { - return x.ParentRefs - } - return nil -} - -func (x *HTTPRoute) GetHostnames() []string { - if x != nil { - return x.Hostnames - } - return nil -} - -func (x *HTTPRoute) GetRules() []*HTTPRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -// HTTPRouteRule specifies the routing rules used to determine what upstream -// service an HTTP request is routed to. -type HTTPRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Matches specified the matching criteria used in the routing table. If a - // request matches the given HTTPMatch configuration, then traffic is routed - // to services specified in the Services field. - Matches []*HTTPRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` - Filters []*HTTPRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - // BackendRefs defines the backend(s) where matching requests should be sent. - // - // Failure behavior here depends on how many BackendRefs are specified and - // how many are invalid. - // - // If all entries in BackendRefs are invalid, and there are also no filters - // specified in this route rule, all traffic which matches this rule MUST - // receive a 500 status code. - // - // See the HTTPBackendRef definition for the rules about what makes a single - // HTTPBackendRef invalid. - // - // When a HTTPBackendRef is invalid, 500 status codes MUST be returned for - // requests that would have otherwise been routed to an invalid backend. If - // multiple backends are specified, and some are invalid, the proportion of - // requests that would otherwise have been routed to an invalid backend MUST - // receive a 500 status code. - // - // For example, if two backends are specified with equal weights, and one is - // invalid, 50 percent of traffic must receive a 500. Implementations may - // choose how that 50 percent is determined. - BackendRefs []*HTTPBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` - // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. - Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` - // ALTERNATIVE: - Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` -} - -func (x *HTTPRouteRule) Reset() { - *x = HTTPRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouteRule) ProtoMessage() {} - -func (x *HTTPRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRouteRule.ProtoReflect.Descriptor instead. -func (*HTTPRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{1} -} - -func (x *HTTPRouteRule) GetMatches() []*HTTPRouteMatch { - if x != nil { - return x.Matches - } - return nil -} - -func (x *HTTPRouteRule) GetFilters() []*HTTPRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *HTTPRouteRule) GetBackendRefs() []*HTTPBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -func (x *HTTPRouteRule) GetTimeouts() *HTTPRouteTimeouts { - if x != nil { - return x.Timeouts - } - return nil -} - -func (x *HTTPRouteRule) GetRetries() *HTTPRouteRetries { - if x != nil { - return x.Retries - } - return nil -} - -type HTTPRouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path specifies a HTTP request path matcher. If this field is not - // specified, a default prefix match on the “/” path is provided. - Path *HTTPPathMatch `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Headers specifies HTTP request header matchers. Multiple match values are - // ANDed together, meaning, a request must match all the specified headers to - // select the route. - Headers []*HTTPHeaderMatch `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` - // QueryParams specifies HTTP query parameter matchers. Multiple match values - // are ANDed together, meaning, a request must match all the specified query - // parameters to select the route. - QueryParams []*HTTPQueryParamMatch `protobuf:"bytes,3,rep,name=query_params,json=queryParams,proto3" json:"query_params,omitempty"` - // Method specifies HTTP method matcher. When specified, this route will be - // matched only if the request has the specified method. - Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` -} - -func (x *HTTPRouteMatch) Reset() { - *x = HTTPRouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouteMatch) ProtoMessage() {} - -func (x *HTTPRouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRouteMatch.ProtoReflect.Descriptor instead. -func (*HTTPRouteMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{2} -} - -func (x *HTTPRouteMatch) GetPath() *HTTPPathMatch { - if x != nil { - return x.Path - } - return nil -} - -func (x *HTTPRouteMatch) GetHeaders() []*HTTPHeaderMatch { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HTTPRouteMatch) GetQueryParams() []*HTTPQueryParamMatch { - if x != nil { - return x.QueryParams - } - return nil -} - -func (x *HTTPRouteMatch) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -type HTTPPathMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type specifies how to match against the path Value. - Type PathMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.PathMatchType" json:"type,omitempty"` - // Value of the HTTP path to match against. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HTTPPathMatch) Reset() { - *x = HTTPPathMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPPathMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPPathMatch) ProtoMessage() {} - -func (x *HTTPPathMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPPathMatch.ProtoReflect.Descriptor instead. -func (*HTTPPathMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{3} -} - -func (x *HTTPPathMatch) GetType() PathMatchType { - if x != nil { - return x.Type - } - return PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED -} - -func (x *HTTPPathMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type HTTPHeaderMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type specifies how to match against the value of the header. - Type HeaderMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.HeaderMatchType" json:"type,omitempty"` - // Name is the name of the HTTP Header to be matched. Name matching MUST be - // case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - // - // If multiple entries specify equivalent header names, only the first entry - // with an equivalent name MUST be considered for a match. Subsequent entries - // with an equivalent header name MUST be ignored. Due to the - // case-insensitivity of header names, “foo” and “Foo” are considered - // equivalent. - // - // When a header is repeated in an HTTP request, it is - // implementation-specific behavior as to how this is represented. Generally, - // proxies should follow the guidance from the RFC: - // https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding - // processing a repeated header, with special handling for “Set-Cookie”. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Value is the value of HTTP Header to be matched. - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // NOTE: not in gamma; service-router compat - Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` -} - -func (x *HTTPHeaderMatch) Reset() { - *x = HTTPHeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPHeaderMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPHeaderMatch) ProtoMessage() {} - -func (x *HTTPHeaderMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPHeaderMatch.ProtoReflect.Descriptor instead. -func (*HTTPHeaderMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{4} -} - -func (x *HTTPHeaderMatch) GetType() HeaderMatchType { - if x != nil { - return x.Type - } - return HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED -} - -func (x *HTTPHeaderMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HTTPHeaderMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *HTTPHeaderMatch) GetInvert() bool { - if x != nil { - return x.Invert - } - return false -} - -type HTTPQueryParamMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type specifies how to match against the value of the query parameter. - Type QueryParamMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.QueryParamMatchType" json:"type,omitempty"` - // Name is the name of the HTTP query param to be matched. This must be an - // exact string match. (See - // https://tools.ietf.org/html/rfc7230#section-2.7.3). - // - // If multiple entries specify equivalent query param names, only the first - // entry with an equivalent name MUST be considered for a match. Subsequent - // entries with an equivalent query param name MUST be ignored. - // - // If a query param is repeated in an HTTP request, the behavior is purposely - // left undefined, since different data planes have different capabilities. - // However, it is recommended that implementations should match against the - // first value of the param if the data plane supports it, as this behavior - // is expected in other load balancing contexts outside of the Gateway API. - // - // Users SHOULD NOT route traffic based on repeated query params to guard - // themselves against potential differences in the implementations. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Value is the value of HTTP query param to be matched. - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HTTPQueryParamMatch) Reset() { - *x = HTTPQueryParamMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPQueryParamMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPQueryParamMatch) ProtoMessage() {} - -func (x *HTTPQueryParamMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPQueryParamMatch.ProtoReflect.Descriptor instead. -func (*HTTPQueryParamMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{5} -} - -func (x *HTTPQueryParamMatch) GetType() QueryParamMatchType { - if x != nil { - return x.Type - } - return QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_UNSPECIFIED -} - -func (x *HTTPQueryParamMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HTTPQueryParamMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type HTTPRouteFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // RequestHeaderModifier defines a schema for a filter that modifies request - // headers. - RequestHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,1,opt,name=request_header_modifier,json=requestHeaderModifier,proto3" json:"request_header_modifier,omitempty"` - // ResponseHeaderModifier defines a schema for a filter that modifies - // response headers. - ResponseHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,2,opt,name=response_header_modifier,json=responseHeaderModifier,proto3" json:"response_header_modifier,omitempty"` - // URLRewrite defines a schema for a filter that modifies a request during - // forwarding. - UrlRewrite *HTTPURLRewriteFilter `protobuf:"bytes,5,opt,name=url_rewrite,json=urlRewrite,proto3" json:"url_rewrite,omitempty"` -} - -func (x *HTTPRouteFilter) Reset() { - *x = HTTPRouteFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouteFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouteFilter) ProtoMessage() {} - -func (x *HTTPRouteFilter) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRouteFilter.ProtoReflect.Descriptor instead. -func (*HTTPRouteFilter) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{6} -} - -func (x *HTTPRouteFilter) GetRequestHeaderModifier() *HTTPHeaderFilter { - if x != nil { - return x.RequestHeaderModifier - } - return nil -} - -func (x *HTTPRouteFilter) GetResponseHeaderModifier() *HTTPHeaderFilter { - if x != nil { - return x.ResponseHeaderModifier - } - return nil -} - -func (x *HTTPRouteFilter) GetUrlRewrite() *HTTPURLRewriteFilter { - if x != nil { - return x.UrlRewrite - } - return nil -} - -type HTTPHeaderFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Set overwrites the request with the given header (name, value) before the - // action. - Set []*HTTPHeader `protobuf:"bytes,1,rep,name=set,proto3" json:"set,omitempty"` - // Add adds the given header(s) (name, value) to the request before the - // action. It appends to any existing values associated with the header name. - Add []*HTTPHeader `protobuf:"bytes,2,rep,name=add,proto3" json:"add,omitempty"` - // Remove the given header(s) from the HTTP request before the action. The - // value of Remove is a list of HTTP header names. Note that the header names - // are case-insensitive (see - // https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - Remove []string `protobuf:"bytes,3,rep,name=remove,proto3" json:"remove,omitempty"` -} - -func (x *HTTPHeaderFilter) Reset() { - *x = HTTPHeaderFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPHeaderFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPHeaderFilter) ProtoMessage() {} - -func (x *HTTPHeaderFilter) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPHeaderFilter.ProtoReflect.Descriptor instead. -func (*HTTPHeaderFilter) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{7} -} - -func (x *HTTPHeaderFilter) GetSet() []*HTTPHeader { - if x != nil { - return x.Set - } - return nil -} - -func (x *HTTPHeaderFilter) GetAdd() []*HTTPHeader { - if x != nil { - return x.Add - } - return nil -} - -func (x *HTTPHeaderFilter) GetRemove() []string { - if x != nil { - return x.Remove - } - return nil -} - -type HTTPHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HTTPHeader) Reset() { - *x = HTTPHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPHeader) ProtoMessage() {} - -func (x *HTTPHeader) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPHeader.ProtoReflect.Descriptor instead. -func (*HTTPHeader) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{8} -} - -func (x *HTTPHeader) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HTTPHeader) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type HTTPURLRewriteFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` -} - -func (x *HTTPURLRewriteFilter) Reset() { - *x = HTTPURLRewriteFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPURLRewriteFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPURLRewriteFilter) ProtoMessage() {} - -func (x *HTTPURLRewriteFilter) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPURLRewriteFilter.ProtoReflect.Descriptor instead. -func (*HTTPURLRewriteFilter) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{9} -} - -func (x *HTTPURLRewriteFilter) GetPathPrefix() string { - if x != nil { - return x.PathPrefix - } - return "" -} - -type HTTPBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - // If only one backend is specified and it has a weight greater than 0, 100% - // of the traffic is forwarded to that backend. If weight is set to 0, no - // traffic should be forwarded for this entry. If unspecified, weight defaults - // to 1. - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Filters defined at this level should be executed if and only if the - // request is being forwarded to the backend defined here. - Filters []*HTTPRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *HTTPBackendRef) Reset() { - *x = HTTPBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPBackendRef) ProtoMessage() {} - -func (x *HTTPBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPBackendRef.ProtoReflect.Descriptor instead. -func (*HTTPBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{10} -} - -func (x *HTTPBackendRef) GetBackendRef() *BackendReference { - if x != nil { - return x.BackendRef - } - return nil -} - -func (x *HTTPBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *HTTPBackendRef) GetFilters() []*HTTPRouteFilter { - if x != nil { - return x.Filters - } - return nil -} - -var File_pbmesh_v1alpha1_http_route_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_http_route_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, 0x6d, 0x65, - 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, - 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x0d, 0x48, 0x54, 0x54, - 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, - 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x51, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8e, 0x02, - 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, - 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x68, - 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x54, - 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x6e, 0x76, 0x65, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, - 0x65, 0x72, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbe, - 0x02, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x18, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x75, 0x72, 0x6c, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, - 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x0a, 0x75, 0x72, 0x6c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, - 0xa6, 0x01, 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x03, 0x73, - 0x65, 0x74, 0x12, 0x3c, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x03, 0x61, 0x64, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x36, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x37, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x48, 0x54, - 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, - 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2a, 0x82, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, - 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, - 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, - 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, - 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x03, 0x2a, 0xc9, 0x01, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x48, - 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x48, - 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x48, 0x45, 0x41, 0x44, - 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, - 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x44, 0x45, - 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x45, - 0x46, 0x49, 0x58, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, - 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x58, 0x10, 0x05, 0x2a, 0xa5, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x51, - 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x41, 0x52, - 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, - 0x41, 0x43, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, - 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x51, 0x55, 0x45, 0x52, 0x59, - 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x42, 0x96, 0x02, 0x0a, 0x22, - 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x42, 0x0e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, - 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, - 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, - 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_http_route_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_http_route_proto_rawDescData = file_pbmesh_v1alpha1_http_route_proto_rawDesc -) - -func file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_http_route_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_http_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_http_route_proto_rawDescData -} - -var file_pbmesh_v1alpha1_http_route_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_pbmesh_v1alpha1_http_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_pbmesh_v1alpha1_http_route_proto_goTypes = []interface{}{ - (PathMatchType)(0), // 0: hashicorp.consul.mesh.v1alpha1.PathMatchType - (HeaderMatchType)(0), // 1: hashicorp.consul.mesh.v1alpha1.HeaderMatchType - (QueryParamMatchType)(0), // 2: hashicorp.consul.mesh.v1alpha1.QueryParamMatchType - (*HTTPRoute)(nil), // 3: hashicorp.consul.mesh.v1alpha1.HTTPRoute - (*HTTPRouteRule)(nil), // 4: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule - (*HTTPRouteMatch)(nil), // 5: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - (*HTTPPathMatch)(nil), // 6: hashicorp.consul.mesh.v1alpha1.HTTPPathMatch - (*HTTPHeaderMatch)(nil), // 7: hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch - (*HTTPQueryParamMatch)(nil), // 8: hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch - (*HTTPRouteFilter)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - (*HTTPHeaderFilter)(nil), // 10: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - (*HTTPHeader)(nil), // 11: hashicorp.consul.mesh.v1alpha1.HTTPHeader - (*HTTPURLRewriteFilter)(nil), // 12: hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter - (*HTTPBackendRef)(nil), // 13: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef - (*ParentReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ParentReference - (*HTTPRouteTimeouts)(nil), // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - (*HTTPRouteRetries)(nil), // 16: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - (*BackendReference)(nil), // 17: hashicorp.consul.mesh.v1alpha1.BackendReference -} -var file_pbmesh_v1alpha1_http_route_proto_depIdxs = []int32{ - 14, // 0: hashicorp.consul.mesh.v1alpha1.HTTPRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 4, // 1: hashicorp.consul.mesh.v1alpha1.HTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRule - 5, // 2: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - 9, // 3: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 13, // 4: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPBackendRef - 15, // 5: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 16, // 6: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 6, // 7: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.path:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPPathMatch - 7, // 8: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.headers:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch - 8, // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.query_params:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch - 0, // 10: hashicorp.consul.mesh.v1alpha1.HTTPPathMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.PathMatchType - 1, // 11: hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.HeaderMatchType - 2, // 12: hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.QueryParamMatchType - 10, // 13: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.request_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - 10, // 14: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.response_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter - 12, // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.url_rewrite:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter - 11, // 16: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter.set:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeader - 11, // 17: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter.add:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeader - 17, // 18: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference - 9, // 19: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_http_route_proto_init() } -func file_pbmesh_v1alpha1_http_route_proto_init() { - if File_pbmesh_v1alpha1_http_route_proto != nil { - return - } - file_pbmesh_v1alpha1_common_proto_init() - file_pbmesh_v1alpha1_http_route_retries_proto_init() - file_pbmesh_v1alpha1_http_route_timeouts_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_http_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPPathMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPHeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPQueryParamMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouteFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPHeaderFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPURLRewriteFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_http_route_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_http_route_proto_rawDesc, - NumEnums: 3, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_http_route_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_http_route_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_http_route_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_http_route_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_http_route_proto = out.File - file_pbmesh_v1alpha1_http_route_proto_rawDesc = nil - file_pbmesh_v1alpha1_http_route_proto_goTypes = nil - file_pbmesh_v1alpha1_http_route_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/http_route.proto b/proto-public/pbmesh/v1alpha1/http_route.proto deleted file mode 100644 index ea14176b1b7c0..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route.proto +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbmesh/v1alpha1/common.proto"; -import "pbmesh/v1alpha1/http_route_retries.proto"; -import "pbmesh/v1alpha1/http_route_timeouts.proto"; - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRoute -// -// This is a Resource type. -message HTTPRoute { - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - repeated ParentReference parent_refs = 1; - - // Hostnames are the hostnames for which this HTTPRoute should respond to requests. - repeated string hostnames = 2; - - // Rules are a list of HTTP-based routing rules that this route should - // use for constructing a routing table. - repeated HTTPRouteRule rules = 3; -} - -// HTTPRouteRule specifies the routing rules used to determine what upstream -// service an HTTP request is routed to. -message HTTPRouteRule { - // Matches specified the matching criteria used in the routing table. If a - // request matches the given HTTPMatch configuration, then traffic is routed - // to services specified in the Services field. - repeated HTTPRouteMatch matches = 1; - - repeated HTTPRouteFilter filters = 2; - - // BackendRefs defines the backend(s) where matching requests should be sent. - // - // Failure behavior here depends on how many BackendRefs are specified and - // how many are invalid. - // - // If all entries in BackendRefs are invalid, and there are also no filters - // specified in this route rule, all traffic which matches this rule MUST - // receive a 500 status code. - // - // See the HTTPBackendRef definition for the rules about what makes a single - // HTTPBackendRef invalid. - // - // When a HTTPBackendRef is invalid, 500 status codes MUST be returned for - // requests that would have otherwise been routed to an invalid backend. If - // multiple backends are specified, and some are invalid, the proportion of - // requests that would otherwise have been routed to an invalid backend MUST - // receive a 500 status code. - // - // For example, if two backends are specified with equal weights, and one is - // invalid, 50 percent of traffic must receive a 500. Implementations may - // choose how that 50 percent is determined. - repeated HTTPBackendRef backend_refs = 3; - - // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. - HTTPRouteTimeouts timeouts = 4; - // ALTERNATIVE: - HTTPRouteRetries retries = 5; -} - -message HTTPRouteMatch { - // Path specifies a HTTP request path matcher. If this field is not - // specified, a default prefix match on the “/” path is provided. - HTTPPathMatch path = 1; - - // Headers specifies HTTP request header matchers. Multiple match values are - // ANDed together, meaning, a request must match all the specified headers to - // select the route. - repeated HTTPHeaderMatch headers = 2; - - // QueryParams specifies HTTP query parameter matchers. Multiple match values - // are ANDed together, meaning, a request must match all the specified query - // parameters to select the route. - repeated HTTPQueryParamMatch query_params = 3; - - // Method specifies HTTP method matcher. When specified, this route will be - // matched only if the request has the specified method. - string method = 4; -} - -message HTTPPathMatch { - // Type specifies how to match against the path Value. - PathMatchType type = 1; - // Value of the HTTP path to match against. - string value = 2; -} - -// PathMatchType specifies the semantics of how HTTP paths should be compared. -// Valid PathMatchType values, along with their support levels, are: -// -// PathPrefix and Exact paths must be syntactically valid: -// -// - Must begin with the / character -// - Must not contain consecutive / characters (e.g. /foo///, //). -// - Note that values may be added to this enum, implementations must ensure that unknown values will not cause a crash. -// -// Unknown values here must result in the implementation setting the Accepted -// Condition for the Route to status: False, with a Reason of UnsupportedValue. -enum PathMatchType { - PATH_MATCH_TYPE_UNSPECIFIED = 0; - PATH_MATCH_TYPE_EXACT = 1; - PATH_MATCH_TYPE_PREFIX = 2; - PATH_MATCH_TYPE_REGEX = 3; -} - -message HTTPHeaderMatch { - // Type specifies how to match against the value of the header. - HeaderMatchType type = 1; - - // Name is the name of the HTTP Header to be matched. Name matching MUST be - // case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - // - // If multiple entries specify equivalent header names, only the first entry - // with an equivalent name MUST be considered for a match. Subsequent entries - // with an equivalent header name MUST be ignored. Due to the - // case-insensitivity of header names, “foo” and “Foo” are considered - // equivalent. - // - // When a header is repeated in an HTTP request, it is - // implementation-specific behavior as to how this is represented. Generally, - // proxies should follow the guidance from the RFC: - // https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding - // processing a repeated header, with special handling for “Set-Cookie”. - string name = 2; - - // Value is the value of HTTP Header to be matched. - string value = 3; - - // NOTE: not in gamma; service-router compat - bool invert = 4; -} - -// HeaderMatchType specifies the semantics of how HTTP header values should be -// compared. Valid HeaderMatchType values, along with their conformance levels, -// are: -// -// Note that values may be added to this enum, implementations must ensure that -// unknown values will not cause a crash. -// -// Unknown values here must result in the implementation setting the Accepted -// Condition for the Route to status: False, with a Reason of UnsupportedValue. -enum HeaderMatchType { - HEADER_MATCH_TYPE_UNSPECIFIED = 0; - HEADER_MATCH_TYPE_EXACT = 1; - HEADER_MATCH_TYPE_REGEX = 2; - // consul only after this point (service-router compat) - HEADER_MATCH_TYPE_PRESENT = 3; - HEADER_MATCH_TYPE_PREFIX = 4; - HEADER_MATCH_TYPE_SUFFIX = 5; -} - -message HTTPQueryParamMatch { - // Type specifies how to match against the value of the query parameter. - QueryParamMatchType type = 1; - - // Name is the name of the HTTP query param to be matched. This must be an - // exact string match. (See - // https://tools.ietf.org/html/rfc7230#section-2.7.3). - // - // If multiple entries specify equivalent query param names, only the first - // entry with an equivalent name MUST be considered for a match. Subsequent - // entries with an equivalent query param name MUST be ignored. - // - // If a query param is repeated in an HTTP request, the behavior is purposely - // left undefined, since different data planes have different capabilities. - // However, it is recommended that implementations should match against the - // first value of the param if the data plane supports it, as this behavior - // is expected in other load balancing contexts outside of the Gateway API. - // - // Users SHOULD NOT route traffic based on repeated query params to guard - // themselves against potential differences in the implementations. - string name = 2; - - // Value is the value of HTTP query param to be matched. - string value = 3; -} - -enum QueryParamMatchType { - QUERY_PARAM_MATCH_TYPE_UNSPECIFIED = 0; - QUERY_PARAM_MATCH_TYPE_EXACT = 1; - QUERY_PARAM_MATCH_TYPE_REGEX = 2; - // consul only after this point (service-router compat) - QUERY_PARAM_MATCH_TYPE_PRESENT = 3; -} - -message HTTPRouteFilter { - // RequestHeaderModifier defines a schema for a filter that modifies request - // headers. - HTTPHeaderFilter request_header_modifier = 1; - - // ResponseHeaderModifier defines a schema for a filter that modifies - // response headers. - HTTPHeaderFilter response_header_modifier = 2; - - // URLRewrite defines a schema for a filter that modifies a request during - // forwarding. - HTTPURLRewriteFilter url_rewrite = 5; -} - -message HTTPHeaderFilter { - // Set overwrites the request with the given header (name, value) before the - // action. - repeated HTTPHeader set = 1; - - // Add adds the given header(s) (name, value) to the request before the - // action. It appends to any existing values associated with the header name. - repeated HTTPHeader add = 2; - - // Remove the given header(s) from the HTTP request before the action. The - // value of Remove is a list of HTTP header names. Note that the header names - // are case-insensitive (see - // https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - repeated string remove = 3; -} - -message HTTPHeader { - string name = 1; - string value = 2; -} - -message HTTPURLRewriteFilter { - string path_prefix = 1; -} - -message HTTPBackendRef { - BackendReference backend_ref = 1; - - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - //If only one backend is specified and it has a weight greater than 0, 100% - //of the traffic is forwarded to that backend. If weight is set to 0, no - //traffic should be forwarded for this entry. If unspecified, weight defaults - //to 1. - uint32 weight = 2; - - // Filters defined at this level should be executed if and only if the - // request is being forwarded to the backend defined here. - repeated HTTPRouteFilter filters = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go deleted file mode 100644 index b84704f0e1aa1..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/http_route_retries.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRouteRetries) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRouteRetries) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go deleted file mode 100644 index 5a34d26a3260e..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/http_route_retries.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ALTERNATIVE: not using policy attachment semantics -type HTTPRouteRetries struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // NumRetries is the number of times to retry the request when a retryable - // result occurs. - Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - // RetryOnConnectFailure allows for connection failure errors to trigger a - // retry. - OnConnectFailure bool `protobuf:"varint,2,opt,name=on_connect_failure,json=onConnectFailure,proto3" json:"on_connect_failure,omitempty"` - // RetryOn allows setting envoy specific conditions when a request should - // be automatically retried. - OnConditions []string `protobuf:"bytes,3,rep,name=on_conditions,json=onConditions,proto3" json:"on_conditions,omitempty"` - // RetryOnStatusCodes is a flat list of http response status codes that are - // eligible for retry. This again should be feasible in any reasonable proxy. - OnStatusCodes []uint32 `protobuf:"varint,4,rep,packed,name=on_status_codes,json=onStatusCodes,proto3" json:"on_status_codes,omitempty"` -} - -func (x *HTTPRouteRetries) Reset() { - *x = HTTPRouteRetries{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouteRetries) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouteRetries) ProtoMessage() {} - -func (x *HTTPRouteRetries) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRouteRetries.ProtoReflect.Descriptor instead. -func (*HTTPRouteRetries) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_retries_proto_rawDescGZIP(), []int{0} -} - -func (x *HTTPRouteRetries) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *HTTPRouteRetries) GetOnConnectFailure() bool { - if x != nil { - return x.OnConnectFailure - } - return false -} - -func (x *HTTPRouteRetries) GetOnConditions() []string { - if x != nil { - return x.OnConditions - } - return nil -} - -func (x *HTTPRouteRetries) GetOnStatusCodes() []uint32 { - if x != nil { - return x.OnStatusCodes - } - return nil -} - -var File_pbmesh_v1alpha1_http_route_retries_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0xa5, 0x01, 0x0a, 0x10, 0x48, - 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6e, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x73, 0x42, 0x9d, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x48, 0x74, 0x74, 0x70, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, - 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, - 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_http_route_retries_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData = file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc -) - -func file_pbmesh_v1alpha1_http_route_retries_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_http_route_retries_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData -} - -var file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pbmesh_v1alpha1_http_route_retries_proto_goTypes = []interface{}{ - (*HTTPRouteRetries)(nil), // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries -} -var file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_http_route_retries_proto_init() } -func file_pbmesh_v1alpha1_http_route_retries_proto_init() { - if File_pbmesh_v1alpha1_http_route_retries_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouteRetries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_http_route_retries_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_http_route_retries_proto = out.File - file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc = nil - file_pbmesh_v1alpha1_http_route_retries_proto_goTypes = nil - file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.proto b/proto-public/pbmesh/v1alpha1/http_route_retries.proto deleted file mode 100644 index 3ea112027abec..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_retries.proto +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -// ALTERNATIVE: not using policy attachment semantics -message HTTPRouteRetries { - // NumRetries is the number of times to retry the request when a retryable - // result occurs. - int32 number = 1; - - // RetryOnConnectFailure allows for connection failure errors to trigger a - // retry. - bool on_connect_failure = 2; - - // RetryOn allows setting envoy specific conditions when a request should - // be automatically retried. - repeated string on_conditions = 3; - - // RetryOnStatusCodes is a flat list of http response status codes that are - // eligible for retry. This again should be feasible in any reasonable proxy. - repeated uint32 on_status_codes = 4; -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go deleted file mode 100644 index cb38ff24c577f..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/http_route_timeouts.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HTTPRouteTimeouts) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HTTPRouteTimeouts) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go deleted file mode 100644 index 0fc421e43e5b5..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/http_route_timeouts.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute. -// Timeout values are formatted like 1h/1m/1s/1ms as parsed by Golang time.ParseDuration -// and MUST BE >= 1ms. -// -// ALTERNATIVE: not using policy attachment semantics -type HTTPRouteTimeouts struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request specifies the duration for processing an HTTP client request after which the - // gateway will time out if unable to send a response. - // Whether the gateway starts the timeout before or after the entire client request stream - // has been received, is implementation-dependent. - // - // For example, setting the `rules.timeouts.request` field to the value `10s` in an - // `HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds - // to complete. - // - // When this field is unspecified, request timeout behavior is implementation-dependent. - Request *durationpb.Duration `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // BackendRequest specifies a timeout for an individual request from the gateway - // to a backend service. Typically used in conjuction with retry configuration, - // if supported by an implementation. - // - // The value of BackendRequest defaults to and must be <= the value of Request timeout. - // - // Support: Extended - // - // TODO(rb): net-new feature - BackendRequest *durationpb.Duration `protobuf:"bytes,2,opt,name=backend_request,json=backendRequest,proto3" json:"backend_request,omitempty"` - // TODO(RB): this is a consul-only feature - Idle *durationpb.Duration `protobuf:"bytes,3,opt,name=idle,proto3" json:"idle,omitempty"` -} - -func (x *HTTPRouteTimeouts) Reset() { - *x = HTTPRouteTimeouts{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouteTimeouts) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouteTimeouts) ProtoMessage() {} - -func (x *HTTPRouteTimeouts) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPRouteTimeouts.ProtoReflect.Descriptor instead. -func (*HTTPRouteTimeouts) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescGZIP(), []int{0} -} - -func (x *HTTPRouteTimeouts) GetRequest() *durationpb.Duration { - if x != nil { - return x.Request - } - return nil -} - -func (x *HTTPRouteTimeouts) GetBackendRequest() *durationpb.Duration { - if x != nil { - return x.BackendRequest - } - return nil -} - -func (x *HTTPRouteTimeouts) GetIdle() *durationpb.Duration { - if x != nil { - return x.Idle - } - return nil -} - -var File_pbmesh_v1alpha1_http_route_timeouts_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x11, - 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x73, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x64, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x42, 0x9e, 0x02, 0x0a, 0x22, 0x63, 0x6f, - 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x42, 0x16, 0x48, 0x74, 0x74, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, - 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, - 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData = file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc -) - -func file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData -} - -var file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes = []interface{}{ - (*HTTPRouteTimeouts)(nil), // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration -} -var file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs = []int32{ - 1, // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.request:type_name -> google.protobuf.Duration - 1, // 1: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.backend_request:type_name -> google.protobuf.Duration - 1, // 2: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.idle:type_name -> google.protobuf.Duration - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_http_route_timeouts_proto_init() } -func file_pbmesh_v1alpha1_http_route_timeouts_proto_init() { - if File_pbmesh_v1alpha1_http_route_timeouts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouteTimeouts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_http_route_timeouts_proto = out.File - file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc = nil - file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes = nil - file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto b/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto deleted file mode 100644 index f33587496b552..0000000000000 --- a/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "google/protobuf/duration.proto"; - -// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute. -// Timeout values are formatted like 1h/1m/1s/1ms as parsed by Golang time.ParseDuration -// and MUST BE >= 1ms. -// -// ALTERNATIVE: not using policy attachment semantics -message HTTPRouteTimeouts { - // Request specifies the duration for processing an HTTP client request after which the - // gateway will time out if unable to send a response. - // Whether the gateway starts the timeout before or after the entire client request stream - // has been received, is implementation-dependent. - // - // For example, setting the `rules.timeouts.request` field to the value `10s` in an - // `HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds - // to complete. - // - // When this field is unspecified, request timeout behavior is implementation-dependent. - google.protobuf.Duration request = 1; - - // BackendRequest specifies a timeout for an individual request from the gateway - // to a backend service. Typically used in conjuction with retry configuration, - // if supported by an implementation. - // - // The value of BackendRequest defaults to and must be <= the value of Request timeout. - // - // Support: Extended - // - // TODO(rb): net-new feature - google.protobuf.Duration backend_request = 2; - - // TODO(RB): this is a consul-only feature - google.protobuf.Duration idle = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.binary.go deleted file mode 100644 index 813f6d3ebb6a5..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.binary.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/access_logs.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *AccessLogs) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *AccessLogs) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.go deleted file mode 100644 index bedb5f988072f..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.pb.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/access_logs.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LogSinkType int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - LogSinkType_LOG_SINK_TYPE_DEFAULT LogSinkType = 0 - LogSinkType_LOG_SINK_TYPE_FILE LogSinkType = 1 - LogSinkType_LOG_SINK_TYPE_STDERR LogSinkType = 2 - LogSinkType_LOG_SINK_TYPE_STDOUT LogSinkType = 3 -) - -// Enum value maps for LogSinkType. -var ( - LogSinkType_name = map[int32]string{ - 0: "LOG_SINK_TYPE_DEFAULT", - 1: "LOG_SINK_TYPE_FILE", - 2: "LOG_SINK_TYPE_STDERR", - 3: "LOG_SINK_TYPE_STDOUT", - } - LogSinkType_value = map[string]int32{ - "LOG_SINK_TYPE_DEFAULT": 0, - "LOG_SINK_TYPE_FILE": 1, - "LOG_SINK_TYPE_STDERR": 2, - "LOG_SINK_TYPE_STDOUT": 3, - } -) - -func (x LogSinkType) Enum() *LogSinkType { - p := new(LogSinkType) - *p = x - return p -} - -func (x LogSinkType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LogSinkType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_enumTypes[0].Descriptor() -} - -func (LogSinkType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_enumTypes[0] -} - -func (x LogSinkType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LogSinkType.Descriptor instead. -func (LogSinkType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescGZIP(), []int{0} -} - -type AccessLogs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // enabled enables access logging. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // disable_listener_logs turns off just listener logs for connections rejected by Envoy because they don't - // have a matching listener filter. - DisableListenerLogs bool `protobuf:"varint,2,opt,name=disable_listener_logs,json=disableListenerLogs,proto3" json:"disable_listener_logs,omitempty"` - // type selects the output for logs: "file", "stderr". "stdout" - Type LogSinkType `protobuf:"varint,3,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.LogSinkType" json:"type,omitempty"` - // path is the output file to write logs - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` - // The presence of one format string or the other implies the access log string encoding. - // Defining both is invalid. - // - // Types that are assignable to Format: - // - // *AccessLogs_Json - // *AccessLogs_Text - Format isAccessLogs_Format `protobuf_oneof:"format"` -} - -func (x *AccessLogs) Reset() { - *x = AccessLogs{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLogs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLogs) ProtoMessage() {} - -func (x *AccessLogs) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLogs.ProtoReflect.Descriptor instead. -func (*AccessLogs) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescGZIP(), []int{0} -} - -func (x *AccessLogs) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *AccessLogs) GetDisableListenerLogs() bool { - if x != nil { - return x.DisableListenerLogs - } - return false -} - -func (x *AccessLogs) GetType() LogSinkType { - if x != nil { - return x.Type - } - return LogSinkType_LOG_SINK_TYPE_DEFAULT -} - -func (x *AccessLogs) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (m *AccessLogs) GetFormat() isAccessLogs_Format { - if m != nil { - return m.Format - } - return nil -} - -func (x *AccessLogs) GetJson() string { - if x, ok := x.GetFormat().(*AccessLogs_Json); ok { - return x.Json - } - return "" -} - -func (x *AccessLogs) GetText() string { - if x, ok := x.GetFormat().(*AccessLogs_Text); ok { - return x.Text - } - return "" -} - -type isAccessLogs_Format interface { - isAccessLogs_Format() -} - -type AccessLogs_Json struct { - Json string `protobuf:"bytes,5,opt,name=json,proto3,oneof"` -} - -type AccessLogs_Text struct { - Text string `protobuf:"bytes,6,opt,name=text,proto3,oneof"` -} - -func (*AccessLogs_Json) isAccessLogs_Format() {} - -func (*AccessLogs_Text) isAccessLogs_Format() {} - -var File_pbmesh_v1alpha1_pbproxystate_access_logs_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xf2, 0x01, - 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, 0x6b, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x04, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x2a, 0x74, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, 0x6b, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, - 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, - 0x4c, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x12, 0x18, - 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x54, 0x44, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x42, 0xdb, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0f, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, - 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, - 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_goTypes = []interface{}{ - (LogSinkType)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.LogSinkType - (*AccessLogs)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.AccessLogs -} -var file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_depIdxs = []int32{ - 0, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.AccessLogs.type:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LogSinkType - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_access_logs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLogs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*AccessLogs_Json)(nil), - (*AccessLogs_Text)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_access_logs_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_access_logs_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.proto deleted file mode 100644 index 00770c0c146e6..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/access_logs.proto +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -message AccessLogs { - // enabled enables access logging. - bool enabled = 1; - // disable_listener_logs turns off just listener logs for connections rejected by Envoy because they don't - // have a matching listener filter. - bool disable_listener_logs = 2; - // type selects the output for logs: "file", "stderr". "stdout" - LogSinkType type = 3; - // path is the output file to write logs - string path = 4; - // The presence of one format string or the other implies the access log string encoding. - // Defining both is invalid. - oneof format { - string json = 5; - string text = 6; - } -} - -enum LogSinkType { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - LOG_SINK_TYPE_DEFAULT = 0; - LOG_SINK_TYPE_FILE = 1; - LOG_SINK_TYPE_STDERR = 2; - LOG_SINK_TYPE_STDOUT = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.binary.go deleted file mode 100644 index 84ba62db40830..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.binary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/address.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HostPortAddress) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HostPortAddress) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UnixSocketAddress) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UnixSocketAddress) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.go deleted file mode 100644 index 0afb768f4aa45..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/address.pb.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/address.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type HostPortAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *HostPortAddress) Reset() { - *x = HostPortAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HostPortAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HostPortAddress) ProtoMessage() {} - -func (x *HostPortAddress) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HostPortAddress.ProtoReflect.Descriptor instead. -func (*HostPortAddress) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescGZIP(), []int{0} -} - -func (x *HostPortAddress) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *HostPortAddress) GetPort() uint32 { - if x != nil { - return x.Port - } - return 0 -} - -type UnixSocketAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // path is the file system path at which to bind a Unix domain socket listener. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // mode is the Unix file mode for the socket file. It should be provided - // in the numeric notation, for example, "0600". - Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"` -} - -func (x *UnixSocketAddress) Reset() { - *x = UnixSocketAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnixSocketAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnixSocketAddress) ProtoMessage() {} - -func (x *UnixSocketAddress) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnixSocketAddress.ProtoReflect.Descriptor instead. -func (*UnixSocketAddress) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescGZIP(), []int{1} -} - -func (x *UnixSocketAddress) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *UnixSocketAddress) GetMode() string { - if x != nil { - return x.Mode - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_address_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x39, 0x0a, 0x0f, 0x48, 0x6f, 0x73, - 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3b, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x42, 0xd8, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, - 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, - 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, - 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, - 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_pbmesh_v1alpha1_pbproxystate_address_proto_goTypes = []interface{}{ - (*HostPortAddress)(nil), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.HostPortAddress - (*UnixSocketAddress)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.UnixSocketAddress -} -var file_pbmesh_v1alpha1_pbproxystate_address_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_address_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_address_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_address_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostPortAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnixSocketAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_address_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_address_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_address_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_address_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_address_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_address_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_address_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/address.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/address.proto deleted file mode 100644 index 2d08199a0ecc9..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/address.proto +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -message HostPortAddress { - string host = 1; - uint32 port = 2; -} - -message UnixSocketAddress { - // path is the file system path at which to bind a Unix domain socket listener. - string path = 1; - - // mode is the Unix file mode for the socket file. It should be provided - // in the numeric notation, for example, "0600". - string mode = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.binary.go deleted file mode 100644 index 54087655a2c8e..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.binary.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/cluster.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Cluster) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Cluster) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *FailoverGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *FailoverGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *FailoverGroupConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *FailoverGroupConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *EndpointGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *EndpointGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DynamicEndpointGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DynamicEndpointGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *PassthroughEndpointGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *PassthroughEndpointGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DNSEndpointGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DNSEndpointGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *StaticEndpointGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *StaticEndpointGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L4WeightedClusterGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L4WeightedClusterGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L7WeightedClusterGroup) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L7WeightedClusterGroup) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L4WeightedDestinationCluster) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L4WeightedDestinationCluster) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L7WeightedDestinationCluster) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L7WeightedDestinationCluster) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DynamicEndpointGroupConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DynamicEndpointGroupConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LBPolicyLeastRequest) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LBPolicyLeastRequest) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LBPolicyRoundRobin) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LBPolicyRoundRobin) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LBPolicyRandom) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LBPolicyRandom) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LBPolicyRingHash) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LBPolicyRingHash) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LBPolicyMaglev) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LBPolicyMaglev) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *CircuitBreakers) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *CircuitBreakers) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamLimits) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamLimits) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *OutlierDetection) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *OutlierDetection) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamConnectionOptions) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamConnectionOptions) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *PassthroughEndpointGroupConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *PassthroughEndpointGroupConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DNSEndpointGroupConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DNSEndpointGroupConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *StaticEndpointGroupConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *StaticEndpointGroupConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.go deleted file mode 100644 index a641988f422a6..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.pb.go +++ /dev/null @@ -1,2554 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/cluster.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type DiscoveryType int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - DiscoveryType_DISCOVERY_TYPE_LOGICAL DiscoveryType = 0 - DiscoveryType_DISCOVERY_TYPE_STRICT DiscoveryType = 1 -) - -// Enum value maps for DiscoveryType. -var ( - DiscoveryType_name = map[int32]string{ - 0: "DISCOVERY_TYPE_LOGICAL", - 1: "DISCOVERY_TYPE_STRICT", - } - DiscoveryType_value = map[string]int32{ - "DISCOVERY_TYPE_LOGICAL": 0, - "DISCOVERY_TYPE_STRICT": 1, - } -) - -func (x DiscoveryType) Enum() *DiscoveryType { - p := new(DiscoveryType) - *p = x - return p -} - -func (x DiscoveryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DiscoveryType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_enumTypes[0].Descriptor() -} - -func (DiscoveryType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_enumTypes[0] -} - -func (x DiscoveryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DiscoveryType.Descriptor instead. -func (DiscoveryType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{0} -} - -type Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the cluster. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // group is either a failover group or endpoint group. If this cluster needs to failover to other clusters, use the failover group. If this cluster routes directly to endpoints, use the endpoint group. - // - // Types that are assignable to Group: - // - // *Cluster_FailoverGroup - // *Cluster_EndpointGroup - Group isCluster_Group `protobuf_oneof:"group"` - // escape_hatch_cluster_json configures a user configured escape hatch cluster. - EscapeHatchClusterJson string `protobuf:"bytes,4,opt,name=escape_hatch_cluster_json,json=escapeHatchClusterJson,proto3" json:"escape_hatch_cluster_json,omitempty"` - // alt_stat_name is the name used for observability in place of cluster name if provided. - AltStatName string `protobuf:"bytes,5,opt,name=alt_stat_name,json=altStatName,proto3" json:"alt_stat_name,omitempty"` - // protocol is the local path protocol or the service protocol. - Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` -} - -func (x *Cluster) Reset() { - *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster) ProtoMessage() {} - -func (x *Cluster) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. -func (*Cluster) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{0} -} - -func (x *Cluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Cluster) GetGroup() isCluster_Group { - if m != nil { - return m.Group - } - return nil -} - -func (x *Cluster) GetFailoverGroup() *FailoverGroup { - if x, ok := x.GetGroup().(*Cluster_FailoverGroup); ok { - return x.FailoverGroup - } - return nil -} - -func (x *Cluster) GetEndpointGroup() *EndpointGroup { - if x, ok := x.GetGroup().(*Cluster_EndpointGroup); ok { - return x.EndpointGroup - } - return nil -} - -func (x *Cluster) GetEscapeHatchClusterJson() string { - if x != nil { - return x.EscapeHatchClusterJson - } - return "" -} - -func (x *Cluster) GetAltStatName() string { - if x != nil { - return x.AltStatName - } - return "" -} - -func (x *Cluster) GetProtocol() string { - if x != nil { - return x.Protocol - } - return "" -} - -type isCluster_Group interface { - isCluster_Group() -} - -type Cluster_FailoverGroup struct { - FailoverGroup *FailoverGroup `protobuf:"bytes,2,opt,name=failover_group,json=failoverGroup,proto3,oneof"` -} - -type Cluster_EndpointGroup struct { - EndpointGroup *EndpointGroup `protobuf:"bytes,3,opt,name=endpoint_group,json=endpointGroup,proto3,oneof"` -} - -func (*Cluster_FailoverGroup) isCluster_Group() {} - -func (*Cluster_EndpointGroup) isCluster_Group() {} - -type FailoverGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // endpoint_groups is an ordered list of which groups to failover to. - EndpointGroups []*EndpointGroup `protobuf:"bytes,1,rep,name=endpoint_groups,json=endpointGroups,proto3" json:"endpoint_groups,omitempty"` - Config *FailoverGroupConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *FailoverGroup) Reset() { - *x = FailoverGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FailoverGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailoverGroup) ProtoMessage() {} - -func (x *FailoverGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailoverGroup.ProtoReflect.Descriptor instead. -func (*FailoverGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{1} -} - -func (x *FailoverGroup) GetEndpointGroups() []*EndpointGroup { - if x != nil { - return x.EndpointGroups - } - return nil -} - -func (x *FailoverGroup) GetConfig() *FailoverGroupConfig { - if x != nil { - return x.Config - } - return nil -} - -type FailoverGroupConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UseAltStatName bool `protobuf:"varint,1,opt,name=use_alt_stat_name,json=useAltStatName,proto3" json:"use_alt_stat_name,omitempty"` - ConnectTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` -} - -func (x *FailoverGroupConfig) Reset() { - *x = FailoverGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FailoverGroupConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailoverGroupConfig) ProtoMessage() {} - -func (x *FailoverGroupConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailoverGroupConfig.ProtoReflect.Descriptor instead. -func (*FailoverGroupConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{2} -} - -func (x *FailoverGroupConfig) GetUseAltStatName() bool { - if x != nil { - return x.UseAltStatName - } - return false -} - -func (x *FailoverGroupConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -type EndpointGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Group: - // - // *EndpointGroup_Dynamic - // *EndpointGroup_Static - // *EndpointGroup_Dns - // *EndpointGroup_Passthrough - Group isEndpointGroup_Group `protobuf_oneof:"group"` -} - -func (x *EndpointGroup) Reset() { - *x = EndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointGroup) ProtoMessage() {} - -func (x *EndpointGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointGroup.ProtoReflect.Descriptor instead. -func (*EndpointGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{3} -} - -func (m *EndpointGroup) GetGroup() isEndpointGroup_Group { - if m != nil { - return m.Group - } - return nil -} - -func (x *EndpointGroup) GetDynamic() *DynamicEndpointGroup { - if x, ok := x.GetGroup().(*EndpointGroup_Dynamic); ok { - return x.Dynamic - } - return nil -} - -func (x *EndpointGroup) GetStatic() *StaticEndpointGroup { - if x, ok := x.GetGroup().(*EndpointGroup_Static); ok { - return x.Static - } - return nil -} - -func (x *EndpointGroup) GetDns() *DNSEndpointGroup { - if x, ok := x.GetGroup().(*EndpointGroup_Dns); ok { - return x.Dns - } - return nil -} - -func (x *EndpointGroup) GetPassthrough() *PassthroughEndpointGroup { - if x, ok := x.GetGroup().(*EndpointGroup_Passthrough); ok { - return x.Passthrough - } - return nil -} - -type isEndpointGroup_Group interface { - isEndpointGroup_Group() -} - -type EndpointGroup_Dynamic struct { - // dynamic endpoint group is used to reach mesh destinations that are dynamically configured from Consul's catalog. - Dynamic *DynamicEndpointGroup `protobuf:"bytes,1,opt,name=dynamic,proto3,oneof"` -} - -type EndpointGroup_Static struct { - // static endpoint group is used to reach local app ports. - Static *StaticEndpointGroup `protobuf:"bytes,2,opt,name=static,proto3,oneof"` -} - -type EndpointGroup_Dns struct { - // dns is used to reach mesh and non-mesh destinations using a hostname. - Dns *DNSEndpointGroup `protobuf:"bytes,3,opt,name=dns,proto3,oneof"` -} - -type EndpointGroup_Passthrough struct { - // passthrough is used to reach destinations that don't have endpoints saved in Consul. - Passthrough *PassthroughEndpointGroup `protobuf:"bytes,4,opt,name=passthrough,proto3,oneof"` -} - -func (*EndpointGroup_Dynamic) isEndpointGroup_Group() {} - -func (*EndpointGroup_Static) isEndpointGroup_Group() {} - -func (*EndpointGroup_Dns) isEndpointGroup_Group() {} - -func (*EndpointGroup_Passthrough) isEndpointGroup_Group() {} - -type DynamicEndpointGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config configures how to connect to the endpoints. - Config *DynamicEndpointGroupConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // outbound_tls will configure what TLS information to use when connecting to an upstream. - OutboundTls *TransportSocket `protobuf:"bytes,2,opt,name=outbound_tls,json=outboundTls,proto3" json:"outbound_tls,omitempty"` -} - -func (x *DynamicEndpointGroup) Reset() { - *x = DynamicEndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicEndpointGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicEndpointGroup) ProtoMessage() {} - -func (x *DynamicEndpointGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicEndpointGroup.ProtoReflect.Descriptor instead. -func (*DynamicEndpointGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{4} -} - -func (x *DynamicEndpointGroup) GetConfig() *DynamicEndpointGroupConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *DynamicEndpointGroup) GetOutboundTls() *TransportSocket { - if x != nil { - return x.OutboundTls - } - return nil -} - -type PassthroughEndpointGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config configures how to connect to the endpoints. - Config *PassthroughEndpointGroupConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // outbound_tls will configure what TLS information to use when connecting to an upstream. - OutboundTls *TransportSocket `protobuf:"bytes,2,opt,name=outbound_tls,json=outboundTls,proto3" json:"outbound_tls,omitempty"` -} - -func (x *PassthroughEndpointGroup) Reset() { - *x = PassthroughEndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PassthroughEndpointGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PassthroughEndpointGroup) ProtoMessage() {} - -func (x *PassthroughEndpointGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PassthroughEndpointGroup.ProtoReflect.Descriptor instead. -func (*PassthroughEndpointGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{5} -} - -func (x *PassthroughEndpointGroup) GetConfig() *PassthroughEndpointGroupConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *PassthroughEndpointGroup) GetOutboundTls() *TransportSocket { - if x != nil { - return x.OutboundTls - } - return nil -} - -type DNSEndpointGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config configures how to connect to the endpoints. - Config *DNSEndpointGroupConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // outbound_tls will configure what TLS information to use when connecting to an upstream. - OutboundTls *TransportSocket `protobuf:"bytes,2,opt,name=outbound_tls,json=outboundTls,proto3" json:"outbound_tls,omitempty"` -} - -func (x *DNSEndpointGroup) Reset() { - *x = DNSEndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DNSEndpointGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DNSEndpointGroup) ProtoMessage() {} - -func (x *DNSEndpointGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DNSEndpointGroup.ProtoReflect.Descriptor instead. -func (*DNSEndpointGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{6} -} - -func (x *DNSEndpointGroup) GetConfig() *DNSEndpointGroupConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *DNSEndpointGroup) GetOutboundTls() *TransportSocket { - if x != nil { - return x.OutboundTls - } - return nil -} - -// StaticEndpointGroup is used to reach local app ports. -type StaticEndpointGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config configures how to connect to the endpoints. - Config *StaticEndpointGroupConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *StaticEndpointGroup) Reset() { - *x = StaticEndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StaticEndpointGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StaticEndpointGroup) ProtoMessage() {} - -func (x *StaticEndpointGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StaticEndpointGroup.ProtoReflect.Descriptor instead. -func (*StaticEndpointGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{7} -} - -func (x *StaticEndpointGroup) GetConfig() *StaticEndpointGroupConfig { - if x != nil { - return x.Config - } - return nil -} - -type L4WeightedClusterGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // clusters to route to by weight. - Clusters []*L4WeightedDestinationCluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` -} - -func (x *L4WeightedClusterGroup) Reset() { - *x = L4WeightedClusterGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L4WeightedClusterGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L4WeightedClusterGroup) ProtoMessage() {} - -func (x *L4WeightedClusterGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L4WeightedClusterGroup.ProtoReflect.Descriptor instead. -func (*L4WeightedClusterGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{8} -} - -func (x *L4WeightedClusterGroup) GetClusters() []*L4WeightedDestinationCluster { - if x != nil { - return x.Clusters - } - return nil -} - -type L7WeightedClusterGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // clusters to route to by weight. - Clusters []*L7WeightedDestinationCluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` -} - -func (x *L7WeightedClusterGroup) Reset() { - *x = L7WeightedClusterGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7WeightedClusterGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7WeightedClusterGroup) ProtoMessage() {} - -func (x *L7WeightedClusterGroup) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7WeightedClusterGroup.ProtoReflect.Descriptor instead. -func (*L7WeightedClusterGroup) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{9} -} - -func (x *L7WeightedClusterGroup) GetClusters() []*L7WeightedDestinationCluster { - if x != nil { - return x.Clusters - } - return nil -} - -type L4WeightedDestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Weight *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *L4WeightedDestinationCluster) Reset() { - *x = L4WeightedDestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L4WeightedDestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L4WeightedDestinationCluster) ProtoMessage() {} - -func (x *L4WeightedDestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L4WeightedDestinationCluster.ProtoReflect.Descriptor instead. -func (*L4WeightedDestinationCluster) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{10} -} - -func (x *L4WeightedDestinationCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *L4WeightedDestinationCluster) GetWeight() *wrapperspb.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -type L7WeightedDestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Weight *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - HeaderMutations []*HeaderMutation `protobuf:"bytes,3,rep,name=header_mutations,json=headerMutations,proto3" json:"header_mutations,omitempty"` -} - -func (x *L7WeightedDestinationCluster) Reset() { - *x = L7WeightedDestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7WeightedDestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7WeightedDestinationCluster) ProtoMessage() {} - -func (x *L7WeightedDestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7WeightedDestinationCluster.ProtoReflect.Descriptor instead. -func (*L7WeightedDestinationCluster) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{11} -} - -func (x *L7WeightedDestinationCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *L7WeightedDestinationCluster) GetWeight() *wrapperspb.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -func (x *L7WeightedDestinationCluster) GetHeaderMutations() []*HeaderMutation { - if x != nil { - return x.HeaderMutations - } - return nil -} - -type DynamicEndpointGroupConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - DisablePanicThreshold bool `protobuf:"varint,2,opt,name=disable_panic_threshold,json=disablePanicThreshold,proto3" json:"disable_panic_threshold,omitempty"` - // Types that are assignable to LbPolicy: - // - // *DynamicEndpointGroupConfig_LeastRequest - // *DynamicEndpointGroupConfig_RoundRobin - // *DynamicEndpointGroupConfig_Random - // *DynamicEndpointGroupConfig_RingHash - // *DynamicEndpointGroupConfig_Maglev - LbPolicy isDynamicEndpointGroupConfig_LbPolicy `protobuf_oneof:"lb_policy"` - CircuitBreakers *CircuitBreakers `protobuf:"bytes,8,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` - OutlierDetection *OutlierDetection `protobuf:"bytes,9,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,10,opt,name=upstream_connection_options,json=upstreamConnectionOptions,proto3" json:"upstream_connection_options,omitempty"` - UseAltStatName bool `protobuf:"varint,11,opt,name=use_alt_stat_name,json=useAltStatName,proto3" json:"use_alt_stat_name,omitempty"` -} - -func (x *DynamicEndpointGroupConfig) Reset() { - *x = DynamicEndpointGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicEndpointGroupConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicEndpointGroupConfig) ProtoMessage() {} - -func (x *DynamicEndpointGroupConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicEndpointGroupConfig.ProtoReflect.Descriptor instead. -func (*DynamicEndpointGroupConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{12} -} - -func (x *DynamicEndpointGroupConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetDisablePanicThreshold() bool { - if x != nil { - return x.DisablePanicThreshold - } - return false -} - -func (m *DynamicEndpointGroupConfig) GetLbPolicy() isDynamicEndpointGroupConfig_LbPolicy { - if m != nil { - return m.LbPolicy - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetLeastRequest() *LBPolicyLeastRequest { - if x, ok := x.GetLbPolicy().(*DynamicEndpointGroupConfig_LeastRequest); ok { - return x.LeastRequest - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetRoundRobin() *LBPolicyRoundRobin { - if x, ok := x.GetLbPolicy().(*DynamicEndpointGroupConfig_RoundRobin); ok { - return x.RoundRobin - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetRandom() *LBPolicyRandom { - if x, ok := x.GetLbPolicy().(*DynamicEndpointGroupConfig_Random); ok { - return x.Random - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetRingHash() *LBPolicyRingHash { - if x, ok := x.GetLbPolicy().(*DynamicEndpointGroupConfig_RingHash); ok { - return x.RingHash - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetMaglev() *LBPolicyMaglev { - if x, ok := x.GetLbPolicy().(*DynamicEndpointGroupConfig_Maglev); ok { - return x.Maglev - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetCircuitBreakers() *CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetOutlierDetection() *OutlierDetection { - if x != nil { - return x.OutlierDetection - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { - if x != nil { - return x.UpstreamConnectionOptions - } - return nil -} - -func (x *DynamicEndpointGroupConfig) GetUseAltStatName() bool { - if x != nil { - return x.UseAltStatName - } - return false -} - -type isDynamicEndpointGroupConfig_LbPolicy interface { - isDynamicEndpointGroupConfig_LbPolicy() -} - -type DynamicEndpointGroupConfig_LeastRequest struct { - LeastRequest *LBPolicyLeastRequest `protobuf:"bytes,3,opt,name=least_request,json=leastRequest,proto3,oneof"` -} - -type DynamicEndpointGroupConfig_RoundRobin struct { - RoundRobin *LBPolicyRoundRobin `protobuf:"bytes,4,opt,name=round_robin,json=roundRobin,proto3,oneof"` -} - -type DynamicEndpointGroupConfig_Random struct { - Random *LBPolicyRandom `protobuf:"bytes,5,opt,name=random,proto3,oneof"` -} - -type DynamicEndpointGroupConfig_RingHash struct { - RingHash *LBPolicyRingHash `protobuf:"bytes,6,opt,name=ring_hash,json=ringHash,proto3,oneof"` -} - -type DynamicEndpointGroupConfig_Maglev struct { - Maglev *LBPolicyMaglev `protobuf:"bytes,7,opt,name=maglev,proto3,oneof"` -} - -func (*DynamicEndpointGroupConfig_LeastRequest) isDynamicEndpointGroupConfig_LbPolicy() {} - -func (*DynamicEndpointGroupConfig_RoundRobin) isDynamicEndpointGroupConfig_LbPolicy() {} - -func (*DynamicEndpointGroupConfig_Random) isDynamicEndpointGroupConfig_LbPolicy() {} - -func (*DynamicEndpointGroupConfig_RingHash) isDynamicEndpointGroupConfig_LbPolicy() {} - -func (*DynamicEndpointGroupConfig_Maglev) isDynamicEndpointGroupConfig_LbPolicy() {} - -type LBPolicyLeastRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChoiceCount *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` -} - -func (x *LBPolicyLeastRequest) Reset() { - *x = LBPolicyLeastRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LBPolicyLeastRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LBPolicyLeastRequest) ProtoMessage() {} - -func (x *LBPolicyLeastRequest) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LBPolicyLeastRequest.ProtoReflect.Descriptor instead. -func (*LBPolicyLeastRequest) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{13} -} - -func (x *LBPolicyLeastRequest) GetChoiceCount() *wrapperspb.UInt32Value { - if x != nil { - return x.ChoiceCount - } - return nil -} - -type LBPolicyRoundRobin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *LBPolicyRoundRobin) Reset() { - *x = LBPolicyRoundRobin{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LBPolicyRoundRobin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LBPolicyRoundRobin) ProtoMessage() {} - -func (x *LBPolicyRoundRobin) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LBPolicyRoundRobin.ProtoReflect.Descriptor instead. -func (*LBPolicyRoundRobin) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{14} -} - -type LBPolicyRandom struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *LBPolicyRandom) Reset() { - *x = LBPolicyRandom{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LBPolicyRandom) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LBPolicyRandom) ProtoMessage() {} - -func (x *LBPolicyRandom) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LBPolicyRandom.ProtoReflect.Descriptor instead. -func (*LBPolicyRandom) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{15} -} - -type LBPolicyRingHash struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MinimumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` - MaximumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` -} - -func (x *LBPolicyRingHash) Reset() { - *x = LBPolicyRingHash{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LBPolicyRingHash) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LBPolicyRingHash) ProtoMessage() {} - -func (x *LBPolicyRingHash) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LBPolicyRingHash.ProtoReflect.Descriptor instead. -func (*LBPolicyRingHash) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{16} -} - -func (x *LBPolicyRingHash) GetMinimumRingSize() *wrapperspb.UInt64Value { - if x != nil { - return x.MinimumRingSize - } - return nil -} - -func (x *LBPolicyRingHash) GetMaximumRingSize() *wrapperspb.UInt64Value { - if x != nil { - return x.MaximumRingSize - } - return nil -} - -type LBPolicyMaglev struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *LBPolicyMaglev) Reset() { - *x = LBPolicyMaglev{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LBPolicyMaglev) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LBPolicyMaglev) ProtoMessage() {} - -func (x *LBPolicyMaglev) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LBPolicyMaglev.ProtoReflect.Descriptor instead. -func (*LBPolicyMaglev) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{17} -} - -type CircuitBreakers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpstreamLimits *UpstreamLimits `protobuf:"bytes,1,opt,name=upstream_limits,json=upstreamLimits,proto3" json:"upstream_limits,omitempty"` -} - -func (x *CircuitBreakers) Reset() { - *x = CircuitBreakers{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers) ProtoMessage() {} - -func (x *CircuitBreakers) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers.ProtoReflect.Descriptor instead. -func (*CircuitBreakers) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{18} -} - -func (x *CircuitBreakers) GetUpstreamLimits() *UpstreamLimits { - if x != nil { - return x.UpstreamLimits - } - return nil -} - -type UpstreamLimits struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxConnections *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - MaxPendingRequests *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` - MaxConcurrentRequests *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_concurrent_requests,json=maxConcurrentRequests,proto3" json:"max_concurrent_requests,omitempty"` -} - -func (x *UpstreamLimits) Reset() { - *x = UpstreamLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamLimits) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamLimits) ProtoMessage() {} - -func (x *UpstreamLimits) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamLimits.ProtoReflect.Descriptor instead. -func (*UpstreamLimits) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{19} -} - -func (x *UpstreamLimits) GetMaxConnections() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConnections - } - return nil -} - -func (x *UpstreamLimits) GetMaxPendingRequests() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxPendingRequests - } - return nil -} - -func (x *UpstreamLimits) GetMaxConcurrentRequests() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConcurrentRequests - } - return nil -} - -type OutlierDetection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - Consecutive_5Xx *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=consecutive_5xx,json=consecutive5xx,proto3" json:"consecutive_5xx,omitempty"` - EnforcingConsecutive_5Xx *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` - MaxEjectionPercent *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` - BaseEjectionTime *durationpb.Duration `protobuf:"bytes,5,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` -} - -func (x *OutlierDetection) Reset() { - *x = OutlierDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutlierDetection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutlierDetection) ProtoMessage() {} - -func (x *OutlierDetection) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutlierDetection.ProtoReflect.Descriptor instead. -func (*OutlierDetection) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{20} -} - -func (x *OutlierDetection) GetInterval() *durationpb.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *OutlierDetection) GetConsecutive_5Xx() *wrapperspb.UInt32Value { - if x != nil { - return x.Consecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutive_5Xx() *wrapperspb.UInt32Value { - if x != nil { - return x.EnforcingConsecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetMaxEjectionPercent() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxEjectionPercent - } - return nil -} - -func (x *OutlierDetection) GetBaseEjectionTime() *durationpb.Duration { - if x != nil { - return x.BaseEjectionTime - } - return nil -} - -type UpstreamConnectionOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TcpKeepaliveTime *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=tcp_keepalive_time,json=tcpKeepaliveTime,proto3" json:"tcp_keepalive_time,omitempty"` - TcpKeepaliveInterval *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tcp_keepalive_interval,json=tcpKeepaliveInterval,proto3" json:"tcp_keepalive_interval,omitempty"` - TcpKeepaliveProbes *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=tcp_keepalive_probes,json=tcpKeepaliveProbes,proto3" json:"tcp_keepalive_probes,omitempty"` -} - -func (x *UpstreamConnectionOptions) Reset() { - *x = UpstreamConnectionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamConnectionOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamConnectionOptions) ProtoMessage() {} - -func (x *UpstreamConnectionOptions) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamConnectionOptions.ProtoReflect.Descriptor instead. -func (*UpstreamConnectionOptions) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{21} -} - -func (x *UpstreamConnectionOptions) GetTcpKeepaliveTime() *wrapperspb.UInt32Value { - if x != nil { - return x.TcpKeepaliveTime - } - return nil -} - -func (x *UpstreamConnectionOptions) GetTcpKeepaliveInterval() *wrapperspb.UInt32Value { - if x != nil { - return x.TcpKeepaliveInterval - } - return nil -} - -func (x *UpstreamConnectionOptions) GetTcpKeepaliveProbes() *wrapperspb.UInt32Value { - if x != nil { - return x.TcpKeepaliveProbes - } - return nil -} - -type PassthroughEndpointGroupConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` -} - -func (x *PassthroughEndpointGroupConfig) Reset() { - *x = PassthroughEndpointGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PassthroughEndpointGroupConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PassthroughEndpointGroupConfig) ProtoMessage() {} - -func (x *PassthroughEndpointGroupConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PassthroughEndpointGroupConfig.ProtoReflect.Descriptor instead. -func (*PassthroughEndpointGroupConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{22} -} - -func (x *PassthroughEndpointGroupConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -type DNSEndpointGroupConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - DisablePanicThreshold bool `protobuf:"varint,2,opt,name=disable_panic_threshold,json=disablePanicThreshold,proto3" json:"disable_panic_threshold,omitempty"` - DiscoveryType DiscoveryType `protobuf:"varint,3,opt,name=discovery_type,json=discoveryType,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.DiscoveryType" json:"discovery_type,omitempty"` - CircuitBreakers *CircuitBreakers `protobuf:"bytes,4,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` - OutlierDetection *OutlierDetection `protobuf:"bytes,5,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,6,opt,name=upstream_connection_options,json=upstreamConnectionOptions,proto3" json:"upstream_connection_options,omitempty"` - UseAltStatName bool `protobuf:"varint,7,opt,name=use_alt_stat_name,json=useAltStatName,proto3" json:"use_alt_stat_name,omitempty"` -} - -func (x *DNSEndpointGroupConfig) Reset() { - *x = DNSEndpointGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DNSEndpointGroupConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DNSEndpointGroupConfig) ProtoMessage() {} - -func (x *DNSEndpointGroupConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DNSEndpointGroupConfig.ProtoReflect.Descriptor instead. -func (*DNSEndpointGroupConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{23} -} - -func (x *DNSEndpointGroupConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *DNSEndpointGroupConfig) GetDisablePanicThreshold() bool { - if x != nil { - return x.DisablePanicThreshold - } - return false -} - -func (x *DNSEndpointGroupConfig) GetDiscoveryType() DiscoveryType { - if x != nil { - return x.DiscoveryType - } - return DiscoveryType_DISCOVERY_TYPE_LOGICAL -} - -func (x *DNSEndpointGroupConfig) GetCircuitBreakers() *CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -func (x *DNSEndpointGroupConfig) GetOutlierDetection() *OutlierDetection { - if x != nil { - return x.OutlierDetection - } - return nil -} - -func (x *DNSEndpointGroupConfig) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { - if x != nil { - return x.UpstreamConnectionOptions - } - return nil -} - -func (x *DNSEndpointGroupConfig) GetUseAltStatName() bool { - if x != nil { - return x.UseAltStatName - } - return false -} - -type StaticEndpointGroupConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - CircuitBreakers *CircuitBreakers `protobuf:"bytes,2,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` -} - -func (x *StaticEndpointGroupConfig) Reset() { - *x = StaticEndpointGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StaticEndpointGroupConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StaticEndpointGroupConfig) ProtoMessage() {} - -func (x *StaticEndpointGroupConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StaticEndpointGroupConfig.ProtoReflect.Descriptor instead. -func (*StaticEndpointGroupConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP(), []int{24} -} - -func (x *StaticEndpointGroupConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *StaticEndpointGroupConfig) GetCircuitBreakers() *CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -var File_pbmesh_v1alpha1_pbproxystate_cluster_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, - 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x02, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x6f, - 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x63, 0x0a, 0x0e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0d, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x39, 0x0a, - 0x19, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x68, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x16, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x48, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x6c, 0x74, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0xce, 0x01, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x63, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x29, 0x0a, 0x11, 0x75, 0x73, - 0x65, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x91, 0x03, 0x0a, 0x0d, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5d, 0x0a, 0x07, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, - 0x00, 0x52, 0x07, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, 0x51, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x44, 0x4e, 0x53, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x48, 0x00, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x69, 0x0a, 0x0b, 0x70, 0x61, 0x73, - 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x61, 0x73, - 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, - 0x6f, 0x75, 0x67, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xd8, 0x01, - 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0b, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x6c, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x73, - 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x63, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x0c, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0b, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x6c, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x10, - 0x44, 0x4e, 0x53, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x43, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, - 0x4e, 0x53, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, - 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x6c, 0x73, 0x22, 0x75, - 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x7f, 0x0a, 0x16, 0x4c, 0x34, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x65, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x49, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x4c, 0x34, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x7f, 0x0a, 0x16, 0x4c, 0x37, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x65, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x4c, 0x37, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x68, 0x0a, 0x1c, 0x4c, 0x34, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x1c, 0x4c, 0x37, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x66, 0x0a, 0x10, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x88, 0x08, 0x0a, 0x1a, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, - 0x68, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4c, 0x65, 0x61, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x65, 0x61, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x0b, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x42, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x48, - 0x00, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x12, 0x55, 0x0a, - 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x42, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x5c, 0x0a, 0x09, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x69, - 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x08, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x55, 0x0a, 0x06, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x48, - 0x00, 0x52, 0x06, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x12, 0x67, 0x0a, 0x10, 0x63, 0x69, 0x72, - 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, - 0x72, 0x73, 0x12, 0x6a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x6c, - 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, - 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x86, - 0x01, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, 0x61, - 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, - 0x57, 0x0a, 0x14, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4c, 0x65, 0x61, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x4c, 0x42, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x22, 0x10, - 0x0a, 0x0e, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x22, 0xa6, 0x01, 0x0a, 0x10, 0x4c, 0x42, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, - 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x48, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, - 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x4c, 0x42, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x22, 0x77, 0x0a, 0x0f, 0x43, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x64, - 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x52, 0x0e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x22, 0xfd, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, - 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, - 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x54, - 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6d, - 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x22, 0x83, 0x03, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x35, 0x78, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x12, 0x58, 0x0a, 0x19, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x35, 0x78, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, - 0x78, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, - 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x12, 0x47, 0x0a, 0x12, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65, 0x45, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8b, 0x02, 0x0a, 0x19, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4a, 0x0a, 0x12, 0x74, 0x63, 0x70, 0x5f, - 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x10, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x16, 0x74, 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x14, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4e, 0x0a, 0x14, 0x74, 0x63, 0x70, 0x5f, - 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x64, 0x0a, 0x1e, 0x50, 0x61, 0x73, 0x73, - 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x80, - 0x05, 0x0a, 0x16, 0x44, 0x4e, 0x53, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, - 0x17, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x61, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x63, 0x69, 0x72, 0x63, - 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, - 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x12, 0x6a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, - 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, - 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x86, 0x01, - 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x67, 0x0a, 0x10, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x69, 0x72, 0x63, - 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, - 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2a, 0x46, 0x0a, 0x0d, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, - 0x16, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x53, - 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, - 0x43, 0x54, 0x10, 0x01, 0x42, 0xd8, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, - 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 25) -var file_pbmesh_v1alpha1_pbproxystate_cluster_proto_goTypes = []interface{}{ - (DiscoveryType)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.DiscoveryType - (*Cluster)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.Cluster - (*FailoverGroup)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroup - (*FailoverGroupConfig)(nil), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroupConfig - (*EndpointGroup)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup - (*DynamicEndpointGroup)(nil), // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroup - (*PassthroughEndpointGroup)(nil), // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroup - (*DNSEndpointGroup)(nil), // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroup - (*StaticEndpointGroup)(nil), // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroup - (*L4WeightedClusterGroup)(nil), // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4WeightedClusterGroup - (*L7WeightedClusterGroup)(nil), // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedClusterGroup - (*L4WeightedDestinationCluster)(nil), // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4WeightedDestinationCluster - (*L7WeightedDestinationCluster)(nil), // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedDestinationCluster - (*DynamicEndpointGroupConfig)(nil), // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig - (*LBPolicyLeastRequest)(nil), // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyLeastRequest - (*LBPolicyRoundRobin)(nil), // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRoundRobin - (*LBPolicyRandom)(nil), // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRandom - (*LBPolicyRingHash)(nil), // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRingHash - (*LBPolicyMaglev)(nil), // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyMaglev - (*CircuitBreakers)(nil), // 19: hashicorp.consul.mesh.v1alpha1.pbproxystate.CircuitBreakers - (*UpstreamLimits)(nil), // 20: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamLimits - (*OutlierDetection)(nil), // 21: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection - (*UpstreamConnectionOptions)(nil), // 22: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions - (*PassthroughEndpointGroupConfig)(nil), // 23: hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroupConfig - (*DNSEndpointGroupConfig)(nil), // 24: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig - (*StaticEndpointGroupConfig)(nil), // 25: hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroupConfig - (*durationpb.Duration)(nil), // 26: google.protobuf.Duration - (*TransportSocket)(nil), // 27: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - (*wrapperspb.UInt32Value)(nil), // 28: google.protobuf.UInt32Value - (*HeaderMutation)(nil), // 29: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - (*wrapperspb.UInt64Value)(nil), // 30: google.protobuf.UInt64Value -} -var file_pbmesh_v1alpha1_pbproxystate_cluster_proto_depIdxs = []int32{ - 2, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Cluster.failover_group:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroup - 4, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.Cluster.endpoint_group:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup - 4, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroup.endpoint_groups:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup - 3, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroup.config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroupConfig - 26, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.FailoverGroupConfig.connect_timeout:type_name -> google.protobuf.Duration - 5, // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup.dynamic:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroup - 8, // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup.static:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroup - 7, // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup.dns:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroup - 6, // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointGroup.passthrough:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroup - 13, // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroup.config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig - 27, // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroup.outbound_tls:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - 23, // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroup.config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroupConfig - 27, // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroup.outbound_tls:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - 24, // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroup.config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig - 27, // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroup.outbound_tls:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - 25, // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroup.config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroupConfig - 11, // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4WeightedClusterGroup.clusters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L4WeightedDestinationCluster - 12, // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedClusterGroup.clusters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedDestinationCluster - 28, // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4WeightedDestinationCluster.weight:type_name -> google.protobuf.UInt32Value - 28, // 19: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedDestinationCluster.weight:type_name -> google.protobuf.UInt32Value - 29, // 20: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedDestinationCluster.header_mutations:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - 26, // 21: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.connect_timeout:type_name -> google.protobuf.Duration - 14, // 22: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.least_request:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyLeastRequest - 15, // 23: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.round_robin:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRoundRobin - 16, // 24: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.random:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRandom - 17, // 25: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.ring_hash:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRingHash - 18, // 26: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.maglev:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyMaglev - 19, // 27: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.circuit_breakers:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CircuitBreakers - 21, // 28: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.outlier_detection:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection - 22, // 29: hashicorp.consul.mesh.v1alpha1.pbproxystate.DynamicEndpointGroupConfig.upstream_connection_options:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions - 28, // 30: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyLeastRequest.choice_count:type_name -> google.protobuf.UInt32Value - 30, // 31: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRingHash.minimum_ring_size:type_name -> google.protobuf.UInt64Value - 30, // 32: hashicorp.consul.mesh.v1alpha1.pbproxystate.LBPolicyRingHash.maximum_ring_size:type_name -> google.protobuf.UInt64Value - 20, // 33: hashicorp.consul.mesh.v1alpha1.pbproxystate.CircuitBreakers.upstream_limits:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamLimits - 28, // 34: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamLimits.max_connections:type_name -> google.protobuf.UInt32Value - 28, // 35: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamLimits.max_pending_requests:type_name -> google.protobuf.UInt32Value - 28, // 36: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamLimits.max_concurrent_requests:type_name -> google.protobuf.UInt32Value - 26, // 37: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection.interval:type_name -> google.protobuf.Duration - 28, // 38: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection.consecutive_5xx:type_name -> google.protobuf.UInt32Value - 28, // 39: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection.enforcing_consecutive_5xx:type_name -> google.protobuf.UInt32Value - 28, // 40: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection.max_ejection_percent:type_name -> google.protobuf.UInt32Value - 26, // 41: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 28, // 42: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions.tcp_keepalive_time:type_name -> google.protobuf.UInt32Value - 28, // 43: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions.tcp_keepalive_interval:type_name -> google.protobuf.UInt32Value - 28, // 44: hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions.tcp_keepalive_probes:type_name -> google.protobuf.UInt32Value - 26, // 45: hashicorp.consul.mesh.v1alpha1.pbproxystate.PassthroughEndpointGroupConfig.connect_timeout:type_name -> google.protobuf.Duration - 26, // 46: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig.connect_timeout:type_name -> google.protobuf.Duration - 0, // 47: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig.discovery_type:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DiscoveryType - 19, // 48: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig.circuit_breakers:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CircuitBreakers - 21, // 49: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig.outlier_detection:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.OutlierDetection - 22, // 50: hashicorp.consul.mesh.v1alpha1.pbproxystate.DNSEndpointGroupConfig.upstream_connection_options:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.UpstreamConnectionOptions - 26, // 51: hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroupConfig.connect_timeout:type_name -> google.protobuf.Duration - 19, // 52: hashicorp.consul.mesh.v1alpha1.pbproxystate.StaticEndpointGroupConfig.circuit_breakers:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CircuitBreakers - 53, // [53:53] is the sub-list for method output_type - 53, // [53:53] is the sub-list for method input_type - 53, // [53:53] is the sub-list for extension type_name - 53, // [53:53] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_cluster_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_cluster_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_cluster_proto != nil { - return - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_init() - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailoverGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailoverGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicEndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PassthroughEndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DNSEndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StaticEndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L4WeightedClusterGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7WeightedClusterGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L4WeightedDestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7WeightedDestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicEndpointGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LBPolicyLeastRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LBPolicyRoundRobin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LBPolicyRandom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LBPolicyRingHash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LBPolicyMaglev); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutlierDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamConnectionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PassthroughEndpointGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DNSEndpointGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StaticEndpointGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Cluster_FailoverGroup)(nil), - (*Cluster_EndpointGroup)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*EndpointGroup_Dynamic)(nil), - (*EndpointGroup_Static)(nil), - (*EndpointGroup_Dns)(nil), - (*EndpointGroup_Passthrough)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes[12].OneofWrappers = []interface{}{ - (*DynamicEndpointGroupConfig_LeastRequest)(nil), - (*DynamicEndpointGroupConfig_RoundRobin)(nil), - (*DynamicEndpointGroupConfig_Random)(nil), - (*DynamicEndpointGroupConfig_RingHash)(nil), - (*DynamicEndpointGroupConfig_Maglev)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDesc, - NumEnums: 1, - NumMessages: 25, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_cluster_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_cluster_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_cluster_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_cluster_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_cluster_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.proto deleted file mode 100644 index 802e873401e8c..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/cluster.proto +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "pbmesh/v1alpha1/pbproxystate/header_mutations.proto"; -import "pbmesh/v1alpha1/pbproxystate/transport_socket.proto"; - -message Cluster { - // name is the name of the cluster. - string name = 1; - // group is either a failover group or endpoint group. If this cluster needs to failover to other clusters, use the failover group. If this cluster routes directly to endpoints, use the endpoint group. - oneof group { - FailoverGroup failover_group = 2; - EndpointGroup endpoint_group = 3; - } - // escape_hatch_cluster_json configures a user configured escape hatch cluster. - string escape_hatch_cluster_json = 4; - // alt_stat_name is the name used for observability in place of cluster name if provided. - string alt_stat_name = 5; - // protocol is the local path protocol or the service protocol. - string protocol = 6; -} - -message FailoverGroup { - // endpoint_groups is an ordered list of which groups to failover to. - repeated EndpointGroup endpoint_groups = 1; - FailoverGroupConfig config = 2; -} - -message FailoverGroupConfig { - bool use_alt_stat_name = 1; - google.protobuf.Duration connect_timeout = 2; -} - -message EndpointGroup { - oneof group { - // dynamic endpoint group is used to reach mesh destinations that are dynamically configured from Consul's catalog. - DynamicEndpointGroup dynamic = 1; - // static endpoint group is used to reach local app ports. - StaticEndpointGroup static = 2; - // dns is used to reach mesh and non-mesh destinations using a hostname. - DNSEndpointGroup dns = 3; - // passthrough is used to reach destinations that don't have endpoints saved in Consul. - PassthroughEndpointGroup passthrough = 4; - } -} - -message DynamicEndpointGroup { - // config configures how to connect to the endpoints. - DynamicEndpointGroupConfig config = 1; - // outbound_tls will configure what TLS information to use when connecting to an upstream. - TransportSocket outbound_tls = 2; -} - -message PassthroughEndpointGroup { - // config configures how to connect to the endpoints. - PassthroughEndpointGroupConfig config = 1; - // outbound_tls will configure what TLS information to use when connecting to an upstream. - TransportSocket outbound_tls = 2; -} - -message DNSEndpointGroup { - // config configures how to connect to the endpoints. - DNSEndpointGroupConfig config = 1; - // outbound_tls will configure what TLS information to use when connecting to an upstream. - TransportSocket outbound_tls = 2; -} - -// StaticEndpointGroup is used to reach local app ports. -message StaticEndpointGroup { - // config configures how to connect to the endpoints. - StaticEndpointGroupConfig config = 1; -} - -message L4WeightedClusterGroup { - // clusters to route to by weight. - repeated L4WeightedDestinationCluster clusters = 1; -} - -message L7WeightedClusterGroup { - // clusters to route to by weight. - repeated L7WeightedDestinationCluster clusters = 1; -} - -message L4WeightedDestinationCluster { - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - string name = 1; - google.protobuf.UInt32Value weight = 2; -} - -message L7WeightedDestinationCluster { - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - string name = 1; - google.protobuf.UInt32Value weight = 2; - repeated HeaderMutation header_mutations = 3; -} - -message DynamicEndpointGroupConfig { - google.protobuf.Duration connect_timeout = 1; - bool disable_panic_threshold = 2; - oneof lb_policy { - LBPolicyLeastRequest least_request = 3; - LBPolicyRoundRobin round_robin = 4; - LBPolicyRandom random = 5; - LBPolicyRingHash ring_hash = 6; - LBPolicyMaglev maglev = 7; - } - CircuitBreakers circuit_breakers = 8; - OutlierDetection outlier_detection = 9; - UpstreamConnectionOptions upstream_connection_options = 10; - bool use_alt_stat_name = 11; -} - -message LBPolicyLeastRequest { - google.protobuf.UInt32Value choice_count = 1; -} -message LBPolicyRoundRobin {} - -message LBPolicyRandom {} - -message LBPolicyRingHash { - google.protobuf.UInt64Value minimum_ring_size = 1; - google.protobuf.UInt64Value maximum_ring_size = 2; -} - -message LBPolicyMaglev {} - -message CircuitBreakers { - UpstreamLimits upstream_limits = 1; -} - -message UpstreamLimits { - google.protobuf.UInt32Value max_connections = 1; - google.protobuf.UInt32Value max_pending_requests = 2; - google.protobuf.UInt32Value max_concurrent_requests = 3; -} - -message OutlierDetection { - google.protobuf.Duration interval = 1; - google.protobuf.UInt32Value consecutive_5xx = 2; - google.protobuf.UInt32Value enforcing_consecutive_5xx = 3; - google.protobuf.UInt32Value max_ejection_percent = 4; - google.protobuf.Duration base_ejection_time = 5; -} - -message UpstreamConnectionOptions { - google.protobuf.UInt32Value tcp_keepalive_time = 1; - google.protobuf.UInt32Value tcp_keepalive_interval = 2; - google.protobuf.UInt32Value tcp_keepalive_probes = 3; -} - -message PassthroughEndpointGroupConfig { - google.protobuf.Duration connect_timeout = 1; -} - -message DNSEndpointGroupConfig { - google.protobuf.Duration connect_timeout = 1; - bool disable_panic_threshold = 2; - DiscoveryType discovery_type = 3; - CircuitBreakers circuit_breakers = 4; - OutlierDetection outlier_detection = 5; - UpstreamConnectionOptions upstream_connection_options = 6; - bool use_alt_stat_name = 7; -} - -enum DiscoveryType { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - DISCOVERY_TYPE_LOGICAL = 0; - DISCOVERY_TYPE_STRICT = 1; -} - -message StaticEndpointGroupConfig { - google.protobuf.Duration connect_timeout = 1; - CircuitBreakers circuit_breakers = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.binary.go deleted file mode 100644 index 62f943ca762e2..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.binary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/endpoints.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Endpoints) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Endpoints) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Endpoint) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Endpoint) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.go deleted file mode 100644 index ce14e15f722d7..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.pb.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/endpoints.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type HealthStatus int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - HealthStatus_HEALTH_STATUS_UNKNOWN HealthStatus = 0 - HealthStatus_HEALTH_STATUS_HEALTHY HealthStatus = 1 - HealthStatus_HEALTH_STATUS_UNHEALTHY HealthStatus = 2 -) - -// Enum value maps for HealthStatus. -var ( - HealthStatus_name = map[int32]string{ - 0: "HEALTH_STATUS_UNKNOWN", - 1: "HEALTH_STATUS_HEALTHY", - 2: "HEALTH_STATUS_UNHEALTHY", - } - HealthStatus_value = map[string]int32{ - "HEALTH_STATUS_UNKNOWN": 0, - "HEALTH_STATUS_HEALTHY": 1, - "HEALTH_STATUS_UNHEALTHY": 2, - } -) - -func (x HealthStatus) Enum() *HealthStatus { - p := new(HealthStatus) - *p = x - return p -} - -func (x HealthStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_enumTypes[0].Descriptor() -} - -func (HealthStatus) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_enumTypes[0] -} - -func (x HealthStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HealthStatus.Descriptor instead. -func (HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescGZIP(), []int{0} -} - -type Endpoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Endpoints []*Endpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` -} - -func (x *Endpoints) Reset() { - *x = Endpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoints) ProtoMessage() {} - -func (x *Endpoints) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Endpoints.ProtoReflect.Descriptor instead. -func (*Endpoints) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescGZIP(), []int{0} -} - -func (x *Endpoints) GetEndpoints() []*Endpoint { - if x != nil { - return x.Endpoints - } - return nil -} - -type Endpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Address: - // - // *Endpoint_HostPort - // *Endpoint_UnixSocket - Address isEndpoint_Address `protobuf_oneof:"address"` - HealthStatus HealthStatus `protobuf:"varint,3,opt,name=health_status,json=healthStatus,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.HealthStatus" json:"health_status,omitempty"` - LoadBalancingWeight *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` -} - -func (x *Endpoint) Reset() { - *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoint) ProtoMessage() {} - -func (x *Endpoint) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. -func (*Endpoint) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescGZIP(), []int{1} -} - -func (m *Endpoint) GetAddress() isEndpoint_Address { - if m != nil { - return m.Address - } - return nil -} - -func (x *Endpoint) GetHostPort() *HostPortAddress { - if x, ok := x.GetAddress().(*Endpoint_HostPort); ok { - return x.HostPort - } - return nil -} - -func (x *Endpoint) GetUnixSocket() *UnixSocketAddress { - if x, ok := x.GetAddress().(*Endpoint_UnixSocket); ok { - return x.UnixSocket - } - return nil -} - -func (x *Endpoint) GetHealthStatus() HealthStatus { - if x != nil { - return x.HealthStatus - } - return HealthStatus_HEALTH_STATUS_UNKNOWN -} - -func (x *Endpoint) GetLoadBalancingWeight() *wrapperspb.UInt32Value { - if x != nil { - return x.LoadBalancingWeight - } - return nil -} - -type isEndpoint_Address interface { - isEndpoint_Address() -} - -type Endpoint_HostPort struct { - HostPort *HostPortAddress `protobuf:"bytes,1,opt,name=host_port,json=hostPort,proto3,oneof"` -} - -type Endpoint_UnixSocket struct { - UnixSocket *UnixSocketAddress `protobuf:"bytes,2,opt,name=unix_socket,json=unixSocket,proto3,oneof"` -} - -func (*Endpoint_HostPort) isEndpoint_Address() {} - -func (*Endpoint_UnixSocket) isEndpoint_Address() {} - -var File_pbmesh_v1alpha1_pbproxystate_endpoints_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x62, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x09, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x87, 0x03, 0x0a, 0x08, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x61, 0x0a, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x6e, 0x69, 0x78, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x5e, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x50, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, - 0x6e, 0x67, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2a, 0x61, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x45, 0x41, - 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x48, 0x45, 0x41, - 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x42, 0xda, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0e, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, - 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_goTypes = []interface{}{ - (HealthStatus)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.HealthStatus - (*Endpoints)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoints - (*Endpoint)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint - (*HostPortAddress)(nil), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.HostPortAddress - (*UnixSocketAddress)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.UnixSocketAddress - (*wrapperspb.UInt32Value)(nil), // 5: google.protobuf.UInt32Value -} -var file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_depIdxs = []int32{ - 2, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoints.endpoints:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint - 3, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint.host_port:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HostPortAddress - 4, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint.unix_socket:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.UnixSocketAddress - 0, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint.health_status:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HealthStatus - 5, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoint.load_balancing_weight:type_name -> google.protobuf.UInt32Value - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_endpoints_proto != nil { - return - } - file_pbmesh_v1alpha1_pbproxystate_address_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Endpoint_HostPort)(nil), - (*Endpoint_UnixSocket)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_endpoints_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_endpoints_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.proto deleted file mode 100644 index 28ff53b7eec1d..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/endpoints.proto +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -import "google/protobuf/wrappers.proto"; -import "pbmesh/v1alpha1/pbproxystate/address.proto"; - -message Endpoints { - repeated Endpoint endpoints = 1; -} - -message Endpoint { - oneof address { - HostPortAddress host_port = 1; - UnixSocketAddress unix_socket = 2; - } - HealthStatus health_status = 3; - google.protobuf.UInt32Value load_balancing_weight = 4; -} - -enum HealthStatus { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - HEALTH_STATUS_UNKNOWN = 0; - HEALTH_STATUS_HEALTHY = 1; - HEALTH_STATUS_UNHEALTHY = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.binary.go deleted file mode 100644 index b684a26f32e0a..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.binary.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/escape_hatches.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *EscapeHatches) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *EscapeHatches) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.go deleted file mode 100644 index 9250341dbef53..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/escape_hatches.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EscapeHatches struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // listener_tracing_json contains user provided tracing configuration. - ListenerTracingJson string `protobuf:"bytes,1,opt,name=listener_tracing_json,json=listenerTracingJson,proto3" json:"listener_tracing_json,omitempty"` -} - -func (x *EscapeHatches) Reset() { - *x = EscapeHatches{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EscapeHatches) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EscapeHatches) ProtoMessage() {} - -func (x *EscapeHatches) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EscapeHatches.ProtoReflect.Descriptor instead. -func (*EscapeHatches) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescGZIP(), []int{0} -} - -func (x *EscapeHatches) GetListenerTracingJson() string { - if x != nil { - return x.ListenerTracingJson - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x65, - 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x68, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x22, 0x43, 0x0a, 0x0d, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x48, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x72, - 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0xde, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x12, 0x45, 0x73, 0x63, 0x61, 0x70, - 0x65, 0x48, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, - 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, - 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_goTypes = []interface{}{ - (*EscapeHatches)(nil), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.EscapeHatches -} -var file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EscapeHatches); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_escape_hatches_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.proto deleted file mode 100644 index ab88711827804..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/escape_hatches.proto +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -message EscapeHatches { - // listener_tracing_json contains user provided tracing configuration. - string listener_tracing_json = 1; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.binary.go deleted file mode 100644 index 55d9155e9f7a8..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.binary.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/header_mutations.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HeaderMutation) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HeaderMutation) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RequestHeaderAdd) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RequestHeaderAdd) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RequestHeaderRemove) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RequestHeaderRemove) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ResponseHeaderAdd) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ResponseHeaderAdd) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ResponseHeaderRemove) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ResponseHeaderRemove) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Header) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Header) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.go deleted file mode 100644 index 71d0b5dc3c02c..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.pb.go +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/header_mutations.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AppendAction int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD AppendAction = 0 - AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD AppendAction = 1 -) - -// Enum value maps for AppendAction. -var ( - AppendAction_name = map[int32]string{ - 0: "APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD", - 1: "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD", - } - AppendAction_value = map[string]int32{ - "APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD": 0, - "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD": 1, - } -) - -func (x AppendAction) Enum() *AppendAction { - p := new(AppendAction) - *p = x - return p -} - -func (x AppendAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AppendAction) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_enumTypes[0].Descriptor() -} - -func (AppendAction) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_enumTypes[0] -} - -func (x AppendAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AppendAction.Descriptor instead. -func (AppendAction) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{0} -} - -// Note: it's nice to have this list of header mutations as opposed to configuration similar to Envoy because it -// translates more nicely from GAMMA HTTPRoute, and our existing service router config. Then xds code can handle turning -// it into envoy xds. -type HeaderMutation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Action: - // - // *HeaderMutation_RequestHeaderAdd - // *HeaderMutation_RequestHeaderRemove - // *HeaderMutation_ResponseHeaderAdd - // *HeaderMutation_ResponseHeaderRemove - Action isHeaderMutation_Action `protobuf_oneof:"action"` -} - -func (x *HeaderMutation) Reset() { - *x = HeaderMutation{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMutation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMutation) ProtoMessage() {} - -func (x *HeaderMutation) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMutation.ProtoReflect.Descriptor instead. -func (*HeaderMutation) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{0} -} - -func (m *HeaderMutation) GetAction() isHeaderMutation_Action { - if m != nil { - return m.Action - } - return nil -} - -func (x *HeaderMutation) GetRequestHeaderAdd() *RequestHeaderAdd { - if x, ok := x.GetAction().(*HeaderMutation_RequestHeaderAdd); ok { - return x.RequestHeaderAdd - } - return nil -} - -func (x *HeaderMutation) GetRequestHeaderRemove() *RequestHeaderRemove { - if x, ok := x.GetAction().(*HeaderMutation_RequestHeaderRemove); ok { - return x.RequestHeaderRemove - } - return nil -} - -func (x *HeaderMutation) GetResponseHeaderAdd() *ResponseHeaderAdd { - if x, ok := x.GetAction().(*HeaderMutation_ResponseHeaderAdd); ok { - return x.ResponseHeaderAdd - } - return nil -} - -func (x *HeaderMutation) GetResponseHeaderRemove() *ResponseHeaderRemove { - if x, ok := x.GetAction().(*HeaderMutation_ResponseHeaderRemove); ok { - return x.ResponseHeaderRemove - } - return nil -} - -type isHeaderMutation_Action interface { - isHeaderMutation_Action() -} - -type HeaderMutation_RequestHeaderAdd struct { - RequestHeaderAdd *RequestHeaderAdd `protobuf:"bytes,1,opt,name=request_header_add,json=requestHeaderAdd,proto3,oneof"` -} - -type HeaderMutation_RequestHeaderRemove struct { - RequestHeaderRemove *RequestHeaderRemove `protobuf:"bytes,2,opt,name=request_header_remove,json=requestHeaderRemove,proto3,oneof"` -} - -type HeaderMutation_ResponseHeaderAdd struct { - ResponseHeaderAdd *ResponseHeaderAdd `protobuf:"bytes,3,opt,name=response_header_add,json=responseHeaderAdd,proto3,oneof"` -} - -type HeaderMutation_ResponseHeaderRemove struct { - ResponseHeaderRemove *ResponseHeaderRemove `protobuf:"bytes,4,opt,name=response_header_remove,json=responseHeaderRemove,proto3,oneof"` -} - -func (*HeaderMutation_RequestHeaderAdd) isHeaderMutation_Action() {} - -func (*HeaderMutation_RequestHeaderRemove) isHeaderMutation_Action() {} - -func (*HeaderMutation_ResponseHeaderAdd) isHeaderMutation_Action() {} - -func (*HeaderMutation_ResponseHeaderRemove) isHeaderMutation_Action() {} - -type RequestHeaderAdd struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - AppendAction AppendAction `protobuf:"varint,2,opt,name=append_action,json=appendAction,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.AppendAction" json:"append_action,omitempty"` -} - -func (x *RequestHeaderAdd) Reset() { - *x = RequestHeaderAdd{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestHeaderAdd) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestHeaderAdd) ProtoMessage() {} - -func (x *RequestHeaderAdd) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestHeaderAdd.ProtoReflect.Descriptor instead. -func (*RequestHeaderAdd) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{1} -} - -func (x *RequestHeaderAdd) GetHeader() *Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *RequestHeaderAdd) GetAppendAction() AppendAction { - if x != nil { - return x.AppendAction - } - return AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD -} - -type RequestHeaderRemove struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HeaderKeys []string `protobuf:"bytes,1,rep,name=header_keys,json=headerKeys,proto3" json:"header_keys,omitempty"` -} - -func (x *RequestHeaderRemove) Reset() { - *x = RequestHeaderRemove{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestHeaderRemove) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestHeaderRemove) ProtoMessage() {} - -func (x *RequestHeaderRemove) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestHeaderRemove.ProtoReflect.Descriptor instead. -func (*RequestHeaderRemove) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{2} -} - -func (x *RequestHeaderRemove) GetHeaderKeys() []string { - if x != nil { - return x.HeaderKeys - } - return nil -} - -type ResponseHeaderAdd struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - AppendAction AppendAction `protobuf:"varint,2,opt,name=append_action,json=appendAction,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.AppendAction" json:"append_action,omitempty"` -} - -func (x *ResponseHeaderAdd) Reset() { - *x = ResponseHeaderAdd{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseHeaderAdd) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseHeaderAdd) ProtoMessage() {} - -func (x *ResponseHeaderAdd) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseHeaderAdd.ProtoReflect.Descriptor instead. -func (*ResponseHeaderAdd) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{3} -} - -func (x *ResponseHeaderAdd) GetHeader() *Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *ResponseHeaderAdd) GetAppendAction() AppendAction { - if x != nil { - return x.AppendAction - } - return AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD -} - -type ResponseHeaderRemove struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HeaderKeys []string `protobuf:"bytes,1,rep,name=header_keys,json=headerKeys,proto3" json:"header_keys,omitempty"` -} - -func (x *ResponseHeaderRemove) Reset() { - *x = ResponseHeaderRemove{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseHeaderRemove) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseHeaderRemove) ProtoMessage() {} - -func (x *ResponseHeaderRemove) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseHeaderRemove.ProtoReflect.Descriptor instead. -func (*ResponseHeaderRemove) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{4} -} - -func (x *ResponseHeaderRemove) GetHeaderKeys() []string { - if x != nil { - return x.HeaderKeys - } - return nil -} - -type Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Header) Reset() { - *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Header) ProtoMessage() {} - -func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP(), []int{5} -} - -func (x *Header) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Header) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_header_mutations_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x22, 0xee, 0x03, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x12, 0x76, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x70, 0x0a, 0x13, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x12, 0x79, - 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, - 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xc0, 0x01, - 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x5e, 0x0a, 0x0d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x37, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x67, 0x0a, 0x0c, 0x41, - 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x25, 0x41, - 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, - 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, - 0x5f, 0x41, 0x44, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, - 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, - 0x44, 0x44, 0x10, 0x01, 0x42, 0xe0, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, - 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, - 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_goTypes = []interface{}{ - (AppendAction)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.AppendAction - (*HeaderMutation)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - (*RequestHeaderAdd)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderAdd - (*RequestHeaderRemove)(nil), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderRemove - (*ResponseHeaderAdd)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderAdd - (*ResponseHeaderRemove)(nil), // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderRemove - (*Header)(nil), // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.Header -} -var file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_depIdxs = []int32{ - 2, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation.request_header_add:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderAdd - 3, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation.request_header_remove:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderRemove - 4, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation.response_header_add:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderAdd - 5, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation.response_header_remove:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderRemove - 6, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderAdd.header:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Header - 0, // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.RequestHeaderAdd.append_action:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.AppendAction - 6, // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderAdd.header:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Header - 0, // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.ResponseHeaderAdd.append_action:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.AppendAction - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_header_mutations_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestHeaderAdd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestHeaderRemove); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseHeaderAdd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseHeaderRemove); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HeaderMutation_RequestHeaderAdd)(nil), - (*HeaderMutation_RequestHeaderRemove)(nil), - (*HeaderMutation_ResponseHeaderAdd)(nil), - (*HeaderMutation_ResponseHeaderRemove)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_header_mutations_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.proto deleted file mode 100644 index ca3bd6ee79cc5..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -// Note: it's nice to have this list of header mutations as opposed to configuration similar to Envoy because it -// translates more nicely from GAMMA HTTPRoute, and our existing service router config. Then xds code can handle turning -// it into envoy xds. -message HeaderMutation { - oneof action { - RequestHeaderAdd request_header_add = 1; - RequestHeaderRemove request_header_remove = 2; - ResponseHeaderAdd response_header_add = 3; - ResponseHeaderRemove response_header_remove = 4; - } -} - -message RequestHeaderAdd { - Header header = 1; - AppendAction append_action = 2; -} - -message RequestHeaderRemove { - repeated string header_keys = 1; -} - -message ResponseHeaderAdd { - Header header = 1; - AppendAction append_action = 2; -} - -message ResponseHeaderRemove { - repeated string header_keys = 1; -} - -message Header { - string key = 1; - string value = 2; -} - -enum AppendAction { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD = 0; - APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD = 1; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.binary.go deleted file mode 100644 index 7eb87f443f197..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.binary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/intentions.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L7Intention) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L7Intention) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L4Intention) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L4Intention) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.go deleted file mode 100644 index 171c5f357f375..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.pb.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/intentions.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type L7Intention struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *L7Intention) Reset() { - *x = L7Intention{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7Intention) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7Intention) ProtoMessage() {} - -func (x *L7Intention) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7Intention.ProtoReflect.Descriptor instead. -func (*L7Intention) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescGZIP(), []int{0} -} - -type L4Intention struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *L4Intention) Reset() { - *x = L4Intention{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L4Intention) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L4Intention) ProtoMessage() {} - -func (x *L4Intention) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L4Intention.ProtoReflect.Descriptor instead. -func (*L4Intention) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescGZIP(), []int{1} -} - -var File_pbmesh_v1alpha1_pbproxystate_intentions_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x0d, 0x0a, 0x0b, - 0x4c, 0x37, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, - 0x34, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xdb, 0x02, 0x0a, 0x2f, 0x63, - 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0f, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, - 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, - 0xaa, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, - 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, - 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, - 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, - 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_pbmesh_v1alpha1_pbproxystate_intentions_proto_goTypes = []interface{}{ - (*L7Intention)(nil), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Intention - (*L4Intention)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Intention -} -var file_pbmesh_v1alpha1_pbproxystate_intentions_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_intentions_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_intentions_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_intentions_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7Intention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L4Intention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_intentions_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_intentions_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_intentions_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_intentions_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.proto deleted file mode 100644 index 37f009cc30395..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/intentions.proto +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -message L7Intention {} - -message L4Intention {} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.binary.go deleted file mode 100644 index 333fa99892e07..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.binary.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/listener.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Listener) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Listener) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Router) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Router) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Match) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Match) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *CidrRange) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *CidrRange) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L4Destination) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L4Destination) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *L7Destination) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *L7Destination) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *SNIDestination) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *SNIDestination) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.go deleted file mode 100644 index 24c6f5fc8ce53..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.pb.go +++ /dev/null @@ -1,1269 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/listener.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Direction int32 - -const ( - // DIRECTION_UNSPECIFIED is used by mesh gateway listeners. - Direction_DIRECTION_UNSPECIFIED Direction = 0 - Direction_DIRECTION_INBOUND Direction = 1 - Direction_DIRECTION_OUTBOUND Direction = 2 -) - -// Enum value maps for Direction. -var ( - Direction_name = map[int32]string{ - 0: "DIRECTION_UNSPECIFIED", - 1: "DIRECTION_INBOUND", - 2: "DIRECTION_OUTBOUND", - } - Direction_value = map[string]int32{ - "DIRECTION_UNSPECIFIED": 0, - "DIRECTION_INBOUND": 1, - "DIRECTION_OUTBOUND": 2, - } -) - -func (x Direction) Enum() *Direction { - p := new(Direction) - *p = x - return p -} - -func (x Direction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Direction) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[0].Descriptor() -} - -func (Direction) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[0] -} - -func (x Direction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Direction.Descriptor instead. -func (Direction) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{0} -} - -type BalanceConnections int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - BalanceConnections_BALANCE_CONNECTIONS_DEFAULT BalanceConnections = 0 - BalanceConnections_BALANCE_CONNECTIONS_EXACT BalanceConnections = 1 -) - -// Enum value maps for BalanceConnections. -var ( - BalanceConnections_name = map[int32]string{ - 0: "BALANCE_CONNECTIONS_DEFAULT", - 1: "BALANCE_CONNECTIONS_EXACT", - } - BalanceConnections_value = map[string]int32{ - "BALANCE_CONNECTIONS_DEFAULT": 0, - "BALANCE_CONNECTIONS_EXACT": 1, - } -) - -func (x BalanceConnections) Enum() *BalanceConnections { - p := new(BalanceConnections) - *p = x - return p -} - -func (x BalanceConnections) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BalanceConnections) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[1].Descriptor() -} - -func (BalanceConnections) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[1] -} - -func (x BalanceConnections) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BalanceConnections.Descriptor instead. -func (BalanceConnections) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{1} -} - -// Capabilities map to proxy functionality to enable. These enable tproxy, l7 protocol/alpn inspection, or l4 sni/alpn inspection. -type Capability int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - Capability_CAPABILITY_TRANSPARENT Capability = 0 - Capability_CAPABILITY_L7_PROTOCOL_INSPECTION Capability = 1 - Capability_CAPABILITY_L4_TLS_INSPECTION Capability = 2 -) - -// Enum value maps for Capability. -var ( - Capability_name = map[int32]string{ - 0: "CAPABILITY_TRANSPARENT", - 1: "CAPABILITY_L7_PROTOCOL_INSPECTION", - 2: "CAPABILITY_L4_TLS_INSPECTION", - } - Capability_value = map[string]int32{ - "CAPABILITY_TRANSPARENT": 0, - "CAPABILITY_L7_PROTOCOL_INSPECTION": 1, - "CAPABILITY_L4_TLS_INSPECTION": 2, - } -) - -func (x Capability) Enum() *Capability { - p := new(Capability) - *p = x - return p -} - -func (x Capability) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Capability) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[2].Descriptor() -} - -func (Capability) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[2] -} - -func (x Capability) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Capability.Descriptor instead. -func (Capability) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{2} -} - -type L7Protocol int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - L7Protocol_L7_PROTOCOL_HTTP L7Protocol = 0 - L7Protocol_L7_PROTOCOL_HTTP2 L7Protocol = 1 - L7Protocol_L7_PROTOCOL_GRPC L7Protocol = 2 -) - -// Enum value maps for L7Protocol. -var ( - L7Protocol_name = map[int32]string{ - 0: "L7_PROTOCOL_HTTP", - 1: "L7_PROTOCOL_HTTP2", - 2: "L7_PROTOCOL_GRPC", - } - L7Protocol_value = map[string]int32{ - "L7_PROTOCOL_HTTP": 0, - "L7_PROTOCOL_HTTP2": 1, - "L7_PROTOCOL_GRPC": 2, - } -) - -func (x L7Protocol) Enum() *L7Protocol { - p := new(L7Protocol) - *p = x - return p -} - -func (x L7Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (L7Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[3].Descriptor() -} - -func (L7Protocol) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes[3] -} - -func (x L7Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use L7Protocol.Descriptor instead. -func (L7Protocol) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{3} -} - -type Listener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the listener. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // direction tells the listener the direction of traffic. - Direction Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.Direction" json:"direction,omitempty"` - // bind_address describes where to listen. - // - // Types that are assignable to BindAddress: - // - // *Listener_HostPort - // *Listener_UnixSocket - BindAddress isListener_BindAddress `protobuf_oneof:"bind_address"` - // routers describes how to route traffic from this listener. - Routers []*Router `protobuf:"bytes,5,rep,name=routers,proto3" json:"routers,omitempty"` - // default_router describes where to route if none of the other router matches match the connection. - DefaultRouter *Router `protobuf:"bytes,6,opt,name=default_router,json=defaultRouter,proto3" json:"default_router,omitempty"` - // capabilities describe Envoy proxy functionality to enable. These map closely to Envoy listener filters. - Capabilities []Capability `protobuf:"varint,7,rep,packed,name=capabilities,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.Capability" json:"capabilities,omitempty"` - // balance_connections configures how the listener should balance connections. - BalanceConnections BalanceConnections `protobuf:"varint,8,opt,name=balance_connections,json=balanceConnections,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.BalanceConnections" json:"balance_connections,omitempty"` - // escape_hatch_listener_json configures a user configured escape hatch listener. - EscapeHatchListener string `protobuf:"bytes,9,opt,name=escape_hatch_listener,json=escapeHatchListener,proto3" json:"escape_hatch_listener,omitempty"` - // use_escape_hatch_tracing configures whether to use the top level user configured tracing escape hatch for this listener. - UseEscapeHatchTracing bool `protobuf:"varint,10,opt,name=use_escape_hatch_tracing,json=useEscapeHatchTracing,proto3" json:"use_escape_hatch_tracing,omitempty"` -} - -func (x *Listener) Reset() { - *x = Listener{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener) ProtoMessage() {} - -func (x *Listener) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener.ProtoReflect.Descriptor instead. -func (*Listener) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{0} -} - -func (x *Listener) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Listener) GetDirection() Direction { - if x != nil { - return x.Direction - } - return Direction_DIRECTION_UNSPECIFIED -} - -func (m *Listener) GetBindAddress() isListener_BindAddress { - if m != nil { - return m.BindAddress - } - return nil -} - -func (x *Listener) GetHostPort() *HostPortAddress { - if x, ok := x.GetBindAddress().(*Listener_HostPort); ok { - return x.HostPort - } - return nil -} - -func (x *Listener) GetUnixSocket() *UnixSocketAddress { - if x, ok := x.GetBindAddress().(*Listener_UnixSocket); ok { - return x.UnixSocket - } - return nil -} - -func (x *Listener) GetRouters() []*Router { - if x != nil { - return x.Routers - } - return nil -} - -func (x *Listener) GetDefaultRouter() *Router { - if x != nil { - return x.DefaultRouter - } - return nil -} - -func (x *Listener) GetCapabilities() []Capability { - if x != nil { - return x.Capabilities - } - return nil -} - -func (x *Listener) GetBalanceConnections() BalanceConnections { - if x != nil { - return x.BalanceConnections - } - return BalanceConnections_BALANCE_CONNECTIONS_DEFAULT -} - -func (x *Listener) GetEscapeHatchListener() string { - if x != nil { - return x.EscapeHatchListener - } - return "" -} - -func (x *Listener) GetUseEscapeHatchTracing() bool { - if x != nil { - return x.UseEscapeHatchTracing - } - return false -} - -type isListener_BindAddress interface { - isListener_BindAddress() -} - -type Listener_HostPort struct { - HostPort *HostPortAddress `protobuf:"bytes,3,opt,name=host_port,json=hostPort,proto3,oneof"` -} - -type Listener_UnixSocket struct { - UnixSocket *UnixSocketAddress `protobuf:"bytes,4,opt,name=unix_socket,json=unixSocket,proto3,oneof"` -} - -func (*Listener_HostPort) isListener_BindAddress() {} - -func (*Listener_UnixSocket) isListener_BindAddress() {} - -type Router struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // match specifies how to match traffic coming into this listener. If the traffic matches, it will be routed to the - // destination. - Match *Match `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Types that are assignable to Destination: - // - // *Router_L4 - // *Router_L7 - // *Router_Sni - Destination isRouter_Destination `protobuf_oneof:"destination"` - // inbound_tls is used by inbound listeners that terminate TLS. - InboundTls *TransportSocket `protobuf:"bytes,5,opt,name=inbound_tls,json=inboundTls,proto3" json:"inbound_tls,omitempty"` -} - -func (x *Router) Reset() { - *x = Router{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Router) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Router) ProtoMessage() {} - -func (x *Router) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Router.ProtoReflect.Descriptor instead. -func (*Router) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{1} -} - -func (x *Router) GetMatch() *Match { - if x != nil { - return x.Match - } - return nil -} - -func (m *Router) GetDestination() isRouter_Destination { - if m != nil { - return m.Destination - } - return nil -} - -func (x *Router) GetL4() *L4Destination { - if x, ok := x.GetDestination().(*Router_L4); ok { - return x.L4 - } - return nil -} - -func (x *Router) GetL7() *L7Destination { - if x, ok := x.GetDestination().(*Router_L7); ok { - return x.L7 - } - return nil -} - -func (x *Router) GetSni() *SNIDestination { - if x, ok := x.GetDestination().(*Router_Sni); ok { - return x.Sni - } - return nil -} - -func (x *Router) GetInboundTls() *TransportSocket { - if x != nil { - return x.InboundTls - } - return nil -} - -type isRouter_Destination interface { - isRouter_Destination() -} - -type Router_L4 struct { - // l4 is an l4 destination to route to, which will have a reference to a cluster. - L4 *L4Destination `protobuf:"bytes,2,opt,name=l4,proto3,oneof"` -} - -type Router_L7 struct { - // l7 is an l7 destination to route to, which will have a reference to a route. - L7 *L7Destination `protobuf:"bytes,3,opt,name=l7,proto3,oneof"` -} - -type Router_Sni struct { - // sni is an SNI destination, which means there will be no references, but the SNI name will be tied to the cluster - // name, so we should generate all clusters. - Sni *SNIDestination `protobuf:"bytes,4,opt,name=sni,proto3,oneof"` -} - -func (*Router_L4) isRouter_Destination() {} - -func (*Router_L7) isRouter_Destination() {} - -func (*Router_Sni) isRouter_Destination() {} - -type Match struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DestinationPort *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - PrefixRanges []*CidrRange `protobuf:"bytes,2,rep,name=prefix_ranges,json=prefixRanges,proto3" json:"prefix_ranges,omitempty"` - SourcePrefixRanges []*CidrRange `protobuf:"bytes,3,rep,name=source_prefix_ranges,json=sourcePrefixRanges,proto3" json:"source_prefix_ranges,omitempty"` - // server_names matches based on SNI of the incoming request. - ServerNames []string `protobuf:"bytes,4,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` -} - -func (x *Match) Reset() { - *x = Match{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Match) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Match) ProtoMessage() {} - -func (x *Match) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Match.ProtoReflect.Descriptor instead. -func (*Match) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{2} -} - -func (x *Match) GetDestinationPort() *wrapperspb.UInt32Value { - if x != nil { - return x.DestinationPort - } - return nil -} - -func (x *Match) GetPrefixRanges() []*CidrRange { - if x != nil { - return x.PrefixRanges - } - return nil -} - -func (x *Match) GetSourcePrefixRanges() []*CidrRange { - if x != nil { - return x.SourcePrefixRanges - } - return nil -} - -func (x *Match) GetServerNames() []string { - if x != nil { - return x.ServerNames - } - return nil -} - -type CidrRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` - PrefixLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` -} - -func (x *CidrRange) Reset() { - *x = CidrRange{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CidrRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CidrRange) ProtoMessage() {} - -func (x *CidrRange) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead. -func (*CidrRange) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{3} -} - -func (x *CidrRange) GetAddressPrefix() string { - if x != nil { - return x.AddressPrefix - } - return "" -} - -func (x *CidrRange) GetPrefixLen() *wrapperspb.UInt32Value { - if x != nil { - return x.PrefixLen - } - return nil -} - -type L4Destination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is a key in the top level clusters map. This specifies which cluster to go to in this L4 destination. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // intentions is a list of intentions for this destination. - Intentions []*L4Intention `protobuf:"bytes,3,rep,name=intentions,proto3" json:"intentions,omitempty"` - // add_empty_intention specifies whether to add an empty intention for this destination, when there are no other intentions specified. - AddEmptyIntention bool `protobuf:"varint,4,opt,name=add_empty_intention,json=addEmptyIntention,proto3" json:"add_empty_intention,omitempty"` - // max_inbound_connections specifies how many connections this destination can accept. - MaxInboundConnections uint64 `protobuf:"varint,5,opt,name=max_inbound_connections,json=maxInboundConnections,proto3" json:"max_inbound_connections,omitempty"` -} - -func (x *L4Destination) Reset() { - *x = L4Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L4Destination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L4Destination) ProtoMessage() {} - -func (x *L4Destination) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L4Destination.ProtoReflect.Descriptor instead. -func (*L4Destination) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{4} -} - -func (x *L4Destination) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *L4Destination) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *L4Destination) GetIntentions() []*L4Intention { - if x != nil { - return x.Intentions - } - return nil -} - -func (x *L4Destination) GetAddEmptyIntention() bool { - if x != nil { - return x.AddEmptyIntention - } - return false -} - -func (x *L4Destination) GetMaxInboundConnections() uint64 { - if x != nil { - return x.MaxInboundConnections - } - return 0 -} - -type L7Destination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is a key in the top level routes map. This specifies which route to go to in this L7 destination. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // protocol for the destination. - Protocol L7Protocol `protobuf:"varint,3,opt,name=protocol,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Protocol" json:"protocol,omitempty"` - // intentions is a list of intentions for this destination. - Intentions []*L7Intention `protobuf:"bytes,4,rep,name=intentions,proto3" json:"intentions,omitempty"` - // add_empty_intention specifies whether to add an empty intention for this destination, when there are no other intentions specified. - AddEmptyIntention bool `protobuf:"varint,5,opt,name=add_empty_intention,json=addEmptyIntention,proto3" json:"add_empty_intention,omitempty"` - // include_xfcc specifies whether to add xfcc header. - IncludeXfcc bool `protobuf:"varint,6,opt,name=include_xfcc,json=includeXfcc,proto3" json:"include_xfcc,omitempty"` - // static_route specifies whether this is a static route that is inlined in the listener filter. This is required to - // match existing xds config. - StaticRoute bool `protobuf:"varint,7,opt,name=static_route,json=staticRoute,proto3" json:"static_route,omitempty"` - // max_inbound_connections specifies how many connections this destination can accept. - MaxInboundConnections uint64 `protobuf:"varint,8,opt,name=max_inbound_connections,json=maxInboundConnections,proto3" json:"max_inbound_connections,omitempty"` -} - -func (x *L7Destination) Reset() { - *x = L7Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7Destination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7Destination) ProtoMessage() {} - -func (x *L7Destination) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7Destination.ProtoReflect.Descriptor instead. -func (*L7Destination) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{5} -} - -func (x *L7Destination) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *L7Destination) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *L7Destination) GetProtocol() L7Protocol { - if x != nil { - return x.Protocol - } - return L7Protocol_L7_PROTOCOL_HTTP -} - -func (x *L7Destination) GetIntentions() []*L7Intention { - if x != nil { - return x.Intentions - } - return nil -} - -func (x *L7Destination) GetAddEmptyIntention() bool { - if x != nil { - return x.AddEmptyIntention - } - return false -} - -func (x *L7Destination) GetIncludeXfcc() bool { - if x != nil { - return x.IncludeXfcc - } - return false -} - -func (x *L7Destination) GetStaticRoute() bool { - if x != nil { - return x.StaticRoute - } - return false -} - -func (x *L7Destination) GetMaxInboundConnections() uint64 { - if x != nil { - return x.MaxInboundConnections - } - return 0 -} - -type SNIDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` -} - -func (x *SNIDestination) Reset() { - *x = SNIDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SNIDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SNIDestination) ProtoMessage() {} - -func (x *SNIDestination) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SNIDestination.ProtoReflect.Descriptor instead. -func (*SNIDestination) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP(), []int{6} -} - -func (x *SNIDestination) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_listener_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x62, 0x6d, 0x65, - 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x06, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x5b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x61, - 0x0a, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x4d, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x5a, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0c, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x13, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, - 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x68, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x48, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, - 0x37, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x68, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x48, 0x61, 0x74, 0x63, - 0x68, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x0e, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xad, 0x03, 0x0a, 0x06, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4c, 0x0a, - 0x02, 0x6c, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x34, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x34, 0x12, 0x4c, 0x0a, 0x02, 0x6c, - 0x37, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x37, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x37, 0x12, 0x4f, 0x0a, 0x03, 0x73, 0x6e, 0x69, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x4e, 0x49, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x5d, 0x0a, 0x0b, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x6c, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xba, 0x02, 0x0a, 0x05, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x47, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x5b, 0x0a, 0x0d, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x6f, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x22, 0x86, 0x02, 0x0a, 0x0d, 0x4c, 0x34, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x58, 0x0a, - 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x4c, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x64, 0x64, 0x5f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x64, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xa1, 0x03, 0x0a, 0x0d, 0x4c, 0x37, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x53, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x37, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x58, 0x0a, 0x0a, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x37, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x64, 0x64, 0x5f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x61, 0x64, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x5f, 0x78, 0x66, 0x63, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x58, 0x66, 0x63, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x6d, - 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x6d, 0x61, - 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x31, 0x0a, 0x0e, 0x53, 0x4e, 0x49, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x2a, 0x55, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, - 0x0a, 0x11, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x2a, 0x54, 0x0a, - 0x12, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, - 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, - 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, - 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x45, 0x58, 0x41, 0x43, - 0x54, 0x10, 0x01, 0x2a, 0x71, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x25, 0x0a, - 0x21, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x37, 0x5f, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x49, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, - 0x54, 0x59, 0x5f, 0x4c, 0x34, 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x49, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x2a, 0x4f, 0x0a, 0x0a, 0x4c, 0x37, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x37, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, - 0x43, 0x4f, 0x4c, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x37, - 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, - 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x37, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, - 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x02, 0x42, 0xd9, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, - 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_pbmesh_v1alpha1_pbproxystate_listener_proto_goTypes = []interface{}{ - (Direction)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Direction - (BalanceConnections)(0), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.BalanceConnections - (Capability)(0), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.Capability - (L7Protocol)(0), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Protocol - (*Listener)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener - (*Router)(nil), // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router - (*Match)(nil), // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.Match - (*CidrRange)(nil), // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.CidrRange - (*L4Destination)(nil), // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Destination - (*L7Destination)(nil), // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Destination - (*SNIDestination)(nil), // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.SNIDestination - (*HostPortAddress)(nil), // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.HostPortAddress - (*UnixSocketAddress)(nil), // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.UnixSocketAddress - (*TransportSocket)(nil), // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - (*wrapperspb.UInt32Value)(nil), // 14: google.protobuf.UInt32Value - (*L4Intention)(nil), // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Intention - (*L7Intention)(nil), // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Intention -} -var file_pbmesh_v1alpha1_pbproxystate_listener_proto_depIdxs = []int32{ - 0, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.direction:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Direction - 11, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.host_port:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HostPortAddress - 12, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.unix_socket:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.UnixSocketAddress - 5, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.routers:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Router - 5, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.default_router:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Router - 2, // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.capabilities:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Capability - 1, // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener.balance_connections:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.BalanceConnections - 6, // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router.match:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Match - 8, // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router.l4:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Destination - 9, // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router.l7:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Destination - 10, // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router.sni:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.SNIDestination - 13, // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.Router.inbound_tls:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - 14, // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.Match.destination_port:type_name -> google.protobuf.UInt32Value - 7, // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.Match.prefix_ranges:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CidrRange - 7, // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.Match.source_prefix_ranges:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CidrRange - 14, // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value - 15, // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Destination.intentions:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L4Intention - 3, // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Destination.protocol:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Protocol - 16, // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Destination.intentions:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L7Intention - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_listener_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_listener_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_listener_proto != nil { - return - } - file_pbmesh_v1alpha1_pbproxystate_address_proto_init() - file_pbmesh_v1alpha1_pbproxystate_intentions_proto_init() - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Router); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Match); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CidrRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L4Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SNIDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Listener_HostPort)(nil), - (*Listener_UnixSocket)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Router_L4)(nil), - (*Router_L7)(nil), - (*Router_Sni)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDesc, - NumEnums: 4, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_listener_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_listener_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_listener_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_listener_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_listener_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_listener_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_listener_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_listener_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/listener.proto deleted file mode 100644 index d4a4dcda9f350..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/listener.proto +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -import "google/protobuf/wrappers.proto"; -import "pbmesh/v1alpha1/pbproxystate/address.proto"; -import "pbmesh/v1alpha1/pbproxystate/intentions.proto"; -import "pbmesh/v1alpha1/pbproxystate/transport_socket.proto"; - -message Listener { - // name is the name of the listener. - string name = 1; - // direction tells the listener the direction of traffic. - Direction direction = 2; - // bind_address describes where to listen. - oneof bind_address { - HostPortAddress host_port = 3; - UnixSocketAddress unix_socket = 4; - } - - // routers describes how to route traffic from this listener. - repeated Router routers = 5; - // default_router describes where to route if none of the other router matches match the connection. - Router default_router = 6; - // capabilities describe Envoy proxy functionality to enable. These map closely to Envoy listener filters. - repeated Capability capabilities = 7; - // balance_connections configures how the listener should balance connections. - BalanceConnections balance_connections = 8; - // escape_hatch_listener_json configures a user configured escape hatch listener. - string escape_hatch_listener = 9; - // use_escape_hatch_tracing configures whether to use the top level user configured tracing escape hatch for this listener. - bool use_escape_hatch_tracing = 10; -} - -enum Direction { - // DIRECTION_UNSPECIFIED is used by mesh gateway listeners. - DIRECTION_UNSPECIFIED = 0; - DIRECTION_INBOUND = 1; - DIRECTION_OUTBOUND = 2; -} - -enum BalanceConnections { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - BALANCE_CONNECTIONS_DEFAULT = 0; - BALANCE_CONNECTIONS_EXACT = 1; -} - -// Capabilities map to proxy functionality to enable. These enable tproxy, l7 protocol/alpn inspection, or l4 sni/alpn inspection. -enum Capability { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - CAPABILITY_TRANSPARENT = 0; - CAPABILITY_L7_PROTOCOL_INSPECTION = 1; - CAPABILITY_L4_TLS_INSPECTION = 2; -} - -message Router { - // match specifies how to match traffic coming into this listener. If the traffic matches, it will be routed to the - // destination. - Match match = 1; - oneof destination { - // l4 is an l4 destination to route to, which will have a reference to a cluster. - L4Destination l4 = 2; - // l7 is an l7 destination to route to, which will have a reference to a route. - L7Destination l7 = 3; - // sni is an SNI destination, which means there will be no references, but the SNI name will be tied to the cluster - // name, so we should generate all clusters. - SNIDestination sni = 4; - } - // inbound_tls is used by inbound listeners that terminate TLS. - TransportSocket inbound_tls = 5; -} - -message Match { - google.protobuf.UInt32Value destination_port = 1; - repeated CidrRange prefix_ranges = 2; - repeated CidrRange source_prefix_ranges = 3; - // server_names matches based on SNI of the incoming request. - repeated string server_names = 4; -} - -message CidrRange { - string address_prefix = 1; - google.protobuf.UInt32Value prefix_len = 2; -} - -message L4Destination { - // name is a key in the top level clusters map. This specifies which cluster to go to in this L4 destination. - string name = 1; - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - string stat_prefix = 2; - // intentions is a list of intentions for this destination. - repeated L4Intention intentions = 3; - // add_empty_intention specifies whether to add an empty intention for this destination, when there are no other intentions specified. - bool add_empty_intention = 4; - // max_inbound_connections specifies how many connections this destination can accept. - uint64 max_inbound_connections = 5; -} - -message L7Destination { - // name is a key in the top level routes map. This specifies which route to go to in this L7 destination. - string name = 1; - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - string stat_prefix = 2; - // protocol for the destination. - L7Protocol protocol = 3; - // intentions is a list of intentions for this destination. - repeated L7Intention intentions = 4; - // add_empty_intention specifies whether to add an empty intention for this destination, when there are no other intentions specified. - bool add_empty_intention = 5; - // include_xfcc specifies whether to add xfcc header. - bool include_xfcc = 6; - // static_route specifies whether this is a static route that is inlined in the listener filter. This is required to - // match existing xds config. - bool static_route = 7; - // max_inbound_connections specifies how many connections this destination can accept. - uint64 max_inbound_connections = 8; -} - -enum L7Protocol { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - L7_PROTOCOL_HTTP = 0; - L7_PROTOCOL_HTTP2 = 1; - L7_PROTOCOL_GRPC = 2; -} - -message SNIDestination { - // stat_prefix is for compatibility with v1 xds configuration, so it is generated in exactly the same way. - string stat_prefix = 1; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.binary.go deleted file mode 100644 index 5d42cb386296f..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.binary.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/references.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LeafCertificateRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LeafCertificateRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TrustBundleRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TrustBundleRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *EndpointRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *EndpointRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.go deleted file mode 100644 index cee7c44bc46b2..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/references.pb.go +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/references.proto - -package pbproxystate - -import ( - pbresource "github.com/hashicorp/consul/proto-public/pbresource" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LeafCertificateRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Partition string `protobuf:"bytes,3,opt,name=partition,proto3" json:"partition,omitempty"` - Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` - Datacenter string `protobuf:"bytes,5,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - DnsSan []string `protobuf:"bytes,6,rep,name=dns_san,json=dnsSan,proto3" json:"dns_san,omitempty"` -} - -func (x *LeafCertificateRef) Reset() { - *x = LeafCertificateRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeafCertificateRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeafCertificateRef) ProtoMessage() {} - -func (x *LeafCertificateRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeafCertificateRef.ProtoReflect.Descriptor instead. -func (*LeafCertificateRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescGZIP(), []int{0} -} - -func (x *LeafCertificateRef) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *LeafCertificateRef) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *LeafCertificateRef) GetPartition() string { - if x != nil { - return x.Partition - } - return "" -} - -func (x *LeafCertificateRef) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *LeafCertificateRef) GetDatacenter() string { - if x != nil { - return x.Datacenter - } - return "" -} - -func (x *LeafCertificateRef) GetDnsSan() []string { - if x != nil { - return x.DnsSan - } - return nil -} - -type TrustBundleRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` - TrustDomain string `protobuf:"bytes,2,opt,name=trust_domain,json=trustDomain,proto3" json:"trust_domain,omitempty"` -} - -func (x *TrustBundleRef) Reset() { - *x = TrustBundleRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TrustBundleRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TrustBundleRef) ProtoMessage() {} - -func (x *TrustBundleRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TrustBundleRef.ProtoReflect.Descriptor instead. -func (*TrustBundleRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescGZIP(), []int{1} -} - -func (x *TrustBundleRef) GetPeer() string { - if x != nil { - return x.Peer - } - return "" -} - -func (x *TrustBundleRef) GetTrustDomain() string { - if x != nil { - return x.TrustDomain - } - return "" -} - -type EndpointRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the ServiceEndpoints resource id. - Id *pbresource.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // port is the name of the port in the ServiceEndpoints to generate the Endpoints from. - Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *EndpointRef) Reset() { - *x = EndpointRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointRef) ProtoMessage() {} - -func (x *EndpointRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointRef.ProtoReflect.Descriptor instead. -func (*EndpointRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescGZIP(), []int{2} -} - -func (x *EndpointRef) GetId() *pbresource.ID { - if x != nil { - return x.Id - } - return nil -} - -func (x *EndpointRef) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_references_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x70, 0x62, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x66, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x6e, 0x73, 0x5f, 0x73, 0x61, 0x6e, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6e, 0x73, 0x53, 0x61, 0x6e, 0x22, 0x47, 0x0a, 0x0e, 0x54, - 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x65, 0x65, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x50, 0x0a, 0x0b, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x49, 0x44, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0xdb, 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0f, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, - 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_pbmesh_v1alpha1_pbproxystate_references_proto_goTypes = []interface{}{ - (*LeafCertificateRef)(nil), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificateRef - (*TrustBundleRef)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundleRef - (*EndpointRef)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointRef - (*pbresource.ID)(nil), // 3: hashicorp.consul.resource.ID -} -var file_pbmesh_v1alpha1_pbproxystate_references_proto_depIdxs = []int32{ - 3, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointRef.id:type_name -> hashicorp.consul.resource.ID - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_references_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_references_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_references_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeafCertificateRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrustBundleRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_references_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_references_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_references_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_references_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_references_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_references_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_references_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/references.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/references.proto deleted file mode 100644 index 3e2c1ddd45ca9..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/references.proto +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -import "pbresource/resource.proto"; - -message LeafCertificateRef { - string name = 1; - string namespace = 2; - string partition = 3; - string host = 4; - string datacenter = 5; - repeated string dns_san = 6; -} - -message TrustBundleRef { - string peer = 1; - string trust_domain = 2; -} - -message EndpointRef { - // id is the ServiceEndpoints resource id. - hashicorp.consul.resource.ID id = 1; - // port is the name of the port in the ServiceEndpoints to generate the Endpoints from. - string port = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.binary.go deleted file mode 100644 index 5d6ba14ecc912..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.binary.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/route.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *Route) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *Route) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *VirtualHost) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *VirtualHost) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RouteMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RouteMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *PathMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *PathMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *QueryParameterMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *QueryParameterMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HeaderMatch) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HeaderMatch) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RouteDestination) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RouteDestination) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DestinationConfiguration) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DestinationConfiguration) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RetryPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RetryPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TimeoutConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TimeoutConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LoadBalancerHashPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LoadBalancerHashPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *CookiePolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *CookiePolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *HeaderPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *HeaderPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *QueryParameterPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *QueryParameterPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ConnectionPropertiesPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ConnectionPropertiesPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *DestinationCluster) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *DestinationCluster) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.go deleted file mode 100644 index c6840dd18aaa2..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/route.pb.go +++ /dev/null @@ -1,1891 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/route.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // virtual_hosts is a list of virtual hosts. A virtual host is selected based on an incoming request's host header. - VirtualHosts []*VirtualHost `protobuf:"bytes,1,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{0} -} - -func (x *Route) GetVirtualHosts() []*VirtualHost { - if x != nil { - return x.VirtualHosts - } - return nil -} - -type VirtualHost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // domains are used to match an incoming request's host header and determine which virtual host to use. - Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - // header_mutations to apply to the request when it matches this virtual host. These are applied after any headers in - // the RouteRule. - HeaderMutations []*HeaderMutation `protobuf:"bytes,3,rep,name=header_mutations,json=headerMutations,proto3" json:"header_mutations,omitempty"` - // route_rules are a list of rules to use for what to do next with this request. The first rule with a match will be - // used. - RouteRules []*RouteRule `protobuf:"bytes,4,rep,name=route_rules,json=routeRules,proto3" json:"route_rules,omitempty"` -} - -func (x *VirtualHost) Reset() { - *x = VirtualHost{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualHost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualHost) ProtoMessage() {} - -func (x *VirtualHost) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualHost.ProtoReflect.Descriptor instead. -func (*VirtualHost) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{1} -} - -func (x *VirtualHost) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VirtualHost) GetDomains() []string { - if x != nil { - return x.Domains - } - return nil -} - -func (x *VirtualHost) GetHeaderMutations() []*HeaderMutation { - if x != nil { - return x.HeaderMutations - } - return nil -} - -func (x *VirtualHost) GetRouteRules() []*RouteRule { - if x != nil { - return x.RouteRules - } - return nil -} - -type RouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // match determines how to match the request. The first match determines which destination the request will go to. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // destination is where to send the request to. - Destination *RouteDestination `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - // header_mutations to apply to the request. These are applied before the VirtualHost header mutations. - HeaderMutations []*HeaderMutation `protobuf:"bytes,3,rep,name=header_mutations,json=headerMutations,proto3" json:"header_mutations,omitempty"` -} - -func (x *RouteRule) Reset() { - *x = RouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteRule) ProtoMessage() {} - -func (x *RouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteRule.ProtoReflect.Descriptor instead. -func (*RouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{2} -} - -func (x *RouteRule) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (x *RouteRule) GetDestination() *RouteDestination { - if x != nil { - return x.Destination - } - return nil -} - -func (x *RouteRule) GetHeaderMutations() []*HeaderMutation { - if x != nil { - return x.HeaderMutations - } - return nil -} - -// RouteMatch has configuration to match a request. -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PathMatch *PathMatch `protobuf:"bytes,1,opt,name=path_match,json=pathMatch,proto3" json:"path_match,omitempty"` - HeaderMatches []*HeaderMatch `protobuf:"bytes,2,rep,name=header_matches,json=headerMatches,proto3" json:"header_matches,omitempty"` - MethodMatches []string `protobuf:"bytes,3,rep,name=method_matches,json=methodMatches,proto3" json:"method_matches,omitempty"` - QueryParameterMatches []*QueryParameterMatch `protobuf:"bytes,4,rep,name=query_parameter_matches,json=queryParameterMatches,proto3" json:"query_parameter_matches,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{3} -} - -func (x *RouteMatch) GetPathMatch() *PathMatch { - if x != nil { - return x.PathMatch - } - return nil -} - -func (x *RouteMatch) GetHeaderMatches() []*HeaderMatch { - if x != nil { - return x.HeaderMatches - } - return nil -} - -func (x *RouteMatch) GetMethodMatches() []string { - if x != nil { - return x.MethodMatches - } - return nil -} - -func (x *RouteMatch) GetQueryParameterMatches() []*QueryParameterMatch { - if x != nil { - return x.QueryParameterMatches - } - return nil -} - -type PathMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PathMatch: - // - // *PathMatch_Exact - // *PathMatch_Prefix - // *PathMatch_Regex - PathMatch isPathMatch_PathMatch `protobuf_oneof:"path_match"` -} - -func (x *PathMatch) Reset() { - *x = PathMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PathMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PathMatch) ProtoMessage() {} - -func (x *PathMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PathMatch.ProtoReflect.Descriptor instead. -func (*PathMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{4} -} - -func (m *PathMatch) GetPathMatch() isPathMatch_PathMatch { - if m != nil { - return m.PathMatch - } - return nil -} - -func (x *PathMatch) GetExact() string { - if x, ok := x.GetPathMatch().(*PathMatch_Exact); ok { - return x.Exact - } - return "" -} - -func (x *PathMatch) GetPrefix() string { - if x, ok := x.GetPathMatch().(*PathMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *PathMatch) GetRegex() string { - if x, ok := x.GetPathMatch().(*PathMatch_Regex); ok { - return x.Regex - } - return "" -} - -type isPathMatch_PathMatch interface { - isPathMatch_PathMatch() -} - -type PathMatch_Exact struct { - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` -} - -type PathMatch_Prefix struct { - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` -} - -type PathMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` -} - -func (*PathMatch_Exact) isPathMatch_PathMatch() {} - -func (*PathMatch_Prefix) isPathMatch_PathMatch() {} - -func (*PathMatch_Regex) isPathMatch_PathMatch() {} - -type QueryParameterMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Match: - // - // *QueryParameterMatch_Exact - // *QueryParameterMatch_Regex - // *QueryParameterMatch_Present - Match isQueryParameterMatch_Match `protobuf_oneof:"match"` -} - -func (x *QueryParameterMatch) Reset() { - *x = QueryParameterMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameterMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameterMatch) ProtoMessage() {} - -func (x *QueryParameterMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameterMatch.ProtoReflect.Descriptor instead. -func (*QueryParameterMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryParameterMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *QueryParameterMatch) GetMatch() isQueryParameterMatch_Match { - if m != nil { - return m.Match - } - return nil -} - -func (x *QueryParameterMatch) GetExact() string { - if x, ok := x.GetMatch().(*QueryParameterMatch_Exact); ok { - return x.Exact - } - return "" -} - -func (x *QueryParameterMatch) GetRegex() string { - if x, ok := x.GetMatch().(*QueryParameterMatch_Regex); ok { - return x.Regex - } - return "" -} - -func (x *QueryParameterMatch) GetPresent() bool { - if x, ok := x.GetMatch().(*QueryParameterMatch_Present); ok { - return x.Present - } - return false -} - -type isQueryParameterMatch_Match interface { - isQueryParameterMatch_Match() -} - -type QueryParameterMatch_Exact struct { - Exact string `protobuf:"bytes,2,opt,name=exact,proto3,oneof"` -} - -type QueryParameterMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` -} - -type QueryParameterMatch_Present struct { - Present bool `protobuf:"varint,4,opt,name=present,proto3,oneof"` -} - -func (*QueryParameterMatch_Exact) isQueryParameterMatch_Match() {} - -func (*QueryParameterMatch_Regex) isQueryParameterMatch_Match() {} - -func (*QueryParameterMatch_Present) isQueryParameterMatch_Match() {} - -type HeaderMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Match: - // - // *HeaderMatch_Exact - // *HeaderMatch_Prefix - // *HeaderMatch_Suffix - // *HeaderMatch_Regex - // *HeaderMatch_Present - Match isHeaderMatch_Match `protobuf_oneof:"match"` - InvertMatch bool `protobuf:"varint,7,opt,name=invert_match,json=invertMatch,proto3" json:"invert_match,omitempty"` -} - -func (x *HeaderMatch) Reset() { - *x = HeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMatch) ProtoMessage() {} - -func (x *HeaderMatch) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMatch.ProtoReflect.Descriptor instead. -func (*HeaderMatch) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{6} -} - -func (x *HeaderMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HeaderMatch) GetMatch() isHeaderMatch_Match { - if m != nil { - return m.Match - } - return nil -} - -func (x *HeaderMatch) GetExact() string { - if x, ok := x.GetMatch().(*HeaderMatch_Exact); ok { - return x.Exact - } - return "" -} - -func (x *HeaderMatch) GetPrefix() string { - if x, ok := x.GetMatch().(*HeaderMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *HeaderMatch) GetSuffix() string { - if x, ok := x.GetMatch().(*HeaderMatch_Suffix); ok { - return x.Suffix - } - return "" -} - -func (x *HeaderMatch) GetRegex() string { - if x, ok := x.GetMatch().(*HeaderMatch_Regex); ok { - return x.Regex - } - return "" -} - -func (x *HeaderMatch) GetPresent() bool { - if x, ok := x.GetMatch().(*HeaderMatch_Present); ok { - return x.Present - } - return false -} - -func (x *HeaderMatch) GetInvertMatch() bool { - if x != nil { - return x.InvertMatch - } - return false -} - -type isHeaderMatch_Match interface { - isHeaderMatch_Match() -} - -type HeaderMatch_Exact struct { - Exact string `protobuf:"bytes,2,opt,name=exact,proto3,oneof"` -} - -type HeaderMatch_Prefix struct { - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3,oneof"` -} - -type HeaderMatch_Suffix struct { - Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3,oneof"` -} - -type HeaderMatch_Regex struct { - Regex string `protobuf:"bytes,5,opt,name=regex,proto3,oneof"` -} - -type HeaderMatch_Present struct { - Present bool `protobuf:"varint,6,opt,name=present,proto3,oneof"` -} - -func (*HeaderMatch_Exact) isHeaderMatch_Match() {} - -func (*HeaderMatch_Prefix) isHeaderMatch_Match() {} - -func (*HeaderMatch_Suffix) isHeaderMatch_Match() {} - -func (*HeaderMatch_Regex) isHeaderMatch_Match() {} - -func (*HeaderMatch_Present) isHeaderMatch_Match() {} - -// RouteDestination has configuration for where to send a request. -type RouteDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // destination is one or more clusters to route to. - // - // Types that are assignable to Destination: - // - // *RouteDestination_Cluster - // *RouteDestination_WeightedClusters - Destination isRouteDestination_Destination `protobuf_oneof:"destination"` - DestinationConfiguration *DestinationConfiguration `protobuf:"bytes,3,opt,name=destination_configuration,json=destinationConfiguration,proto3" json:"destination_configuration,omitempty"` -} - -func (x *RouteDestination) Reset() { - *x = RouteDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteDestination) ProtoMessage() {} - -func (x *RouteDestination) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteDestination.ProtoReflect.Descriptor instead. -func (*RouteDestination) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{7} -} - -func (m *RouteDestination) GetDestination() isRouteDestination_Destination { - if m != nil { - return m.Destination - } - return nil -} - -func (x *RouteDestination) GetCluster() *DestinationCluster { - if x, ok := x.GetDestination().(*RouteDestination_Cluster); ok { - return x.Cluster - } - return nil -} - -func (x *RouteDestination) GetWeightedClusters() *L7WeightedClusterGroup { - if x, ok := x.GetDestination().(*RouteDestination_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *RouteDestination) GetDestinationConfiguration() *DestinationConfiguration { - if x != nil { - return x.DestinationConfiguration - } - return nil -} - -type isRouteDestination_Destination interface { - isRouteDestination_Destination() -} - -type RouteDestination_Cluster struct { - Cluster *DestinationCluster `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteDestination_WeightedClusters struct { - WeightedClusters *L7WeightedClusterGroup `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -func (*RouteDestination_Cluster) isRouteDestination_Destination() {} - -func (*RouteDestination_WeightedClusters) isRouteDestination_Destination() {} - -type DestinationConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AutoHostRewrite *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3" json:"auto_host_rewrite,omitempty"` - HashPolicies []*LoadBalancerHashPolicy `protobuf:"bytes,2,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"` - TimeoutConfig *TimeoutConfig `protobuf:"bytes,3,opt,name=timeout_config,json=timeoutConfig,proto3" json:"timeout_config,omitempty"` - PrefixRewrite string `protobuf:"bytes,4,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"` - RetryPolicy *RetryPolicy `protobuf:"bytes,5,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` -} - -func (x *DestinationConfiguration) Reset() { - *x = DestinationConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationConfiguration) ProtoMessage() {} - -func (x *DestinationConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DestinationConfiguration.ProtoReflect.Descriptor instead. -func (*DestinationConfiguration) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{8} -} - -func (x *DestinationConfiguration) GetAutoHostRewrite() *wrapperspb.BoolValue { - if x != nil { - return x.AutoHostRewrite - } - return nil -} - -func (x *DestinationConfiguration) GetHashPolicies() []*LoadBalancerHashPolicy { - if x != nil { - return x.HashPolicies - } - return nil -} - -func (x *DestinationConfiguration) GetTimeoutConfig() *TimeoutConfig { - if x != nil { - return x.TimeoutConfig - } - return nil -} - -func (x *DestinationConfiguration) GetPrefixRewrite() string { - if x != nil { - return x.PrefixRewrite - } - return "" -} - -func (x *DestinationConfiguration) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RetryOn string `protobuf:"bytes,1,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` - NumRetries *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` - RetriableStatusCodes []uint32 `protobuf:"varint,3,rep,packed,name=retriable_status_codes,json=retriableStatusCodes,proto3" json:"retriable_status_codes,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{9} -} - -func (x *RetryPolicy) GetRetryOn() string { - if x != nil { - return x.RetryOn - } - return "" -} - -func (x *RetryPolicy) GetNumRetries() *wrapperspb.UInt32Value { - if x != nil { - return x.NumRetries - } - return nil -} - -func (x *RetryPolicy) GetRetriableStatusCodes() []uint32 { - if x != nil { - return x.RetriableStatusCodes - } - return nil -} - -type TimeoutConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` - IdleTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` -} - -func (x *TimeoutConfig) Reset() { - *x = TimeoutConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TimeoutConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeoutConfig) ProtoMessage() {} - -func (x *TimeoutConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeoutConfig.ProtoReflect.Descriptor instead. -func (*TimeoutConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{10} -} - -func (x *TimeoutConfig) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *TimeoutConfig) GetIdleTimeout() *durationpb.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -type LoadBalancerHashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Policy: - // - // *LoadBalancerHashPolicy_Cookie - // *LoadBalancerHashPolicy_Header - // *LoadBalancerHashPolicy_QueryParameter - // *LoadBalancerHashPolicy_ConnectionProperties - Policy isLoadBalancerHashPolicy_Policy `protobuf_oneof:"policy"` -} - -func (x *LoadBalancerHashPolicy) Reset() { - *x = LoadBalancerHashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancerHashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancerHashPolicy) ProtoMessage() {} - -func (x *LoadBalancerHashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancerHashPolicy.ProtoReflect.Descriptor instead. -func (*LoadBalancerHashPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{11} -} - -func (m *LoadBalancerHashPolicy) GetPolicy() isLoadBalancerHashPolicy_Policy { - if m != nil { - return m.Policy - } - return nil -} - -func (x *LoadBalancerHashPolicy) GetCookie() *CookiePolicy { - if x, ok := x.GetPolicy().(*LoadBalancerHashPolicy_Cookie); ok { - return x.Cookie - } - return nil -} - -func (x *LoadBalancerHashPolicy) GetHeader() *HeaderPolicy { - if x, ok := x.GetPolicy().(*LoadBalancerHashPolicy_Header); ok { - return x.Header - } - return nil -} - -func (x *LoadBalancerHashPolicy) GetQueryParameter() *QueryParameterPolicy { - if x, ok := x.GetPolicy().(*LoadBalancerHashPolicy_QueryParameter); ok { - return x.QueryParameter - } - return nil -} - -func (x *LoadBalancerHashPolicy) GetConnectionProperties() *ConnectionPropertiesPolicy { - if x, ok := x.GetPolicy().(*LoadBalancerHashPolicy_ConnectionProperties); ok { - return x.ConnectionProperties - } - return nil -} - -type isLoadBalancerHashPolicy_Policy interface { - isLoadBalancerHashPolicy_Policy() -} - -type LoadBalancerHashPolicy_Cookie struct { - Cookie *CookiePolicy `protobuf:"bytes,1,opt,name=cookie,proto3,oneof"` -} - -type LoadBalancerHashPolicy_Header struct { - Header *HeaderPolicy `protobuf:"bytes,2,opt,name=header,proto3,oneof"` -} - -type LoadBalancerHashPolicy_QueryParameter struct { - QueryParameter *QueryParameterPolicy `protobuf:"bytes,3,opt,name=query_parameter,json=queryParameter,proto3,oneof"` -} - -type LoadBalancerHashPolicy_ConnectionProperties struct { - ConnectionProperties *ConnectionPropertiesPolicy `protobuf:"bytes,4,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` -} - -func (*LoadBalancerHashPolicy_Cookie) isLoadBalancerHashPolicy_Policy() {} - -func (*LoadBalancerHashPolicy_Header) isLoadBalancerHashPolicy_Policy() {} - -func (*LoadBalancerHashPolicy_QueryParameter) isLoadBalancerHashPolicy_Policy() {} - -func (*LoadBalancerHashPolicy_ConnectionProperties) isLoadBalancerHashPolicy_Policy() {} - -type CookiePolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *CookiePolicy) Reset() { - *x = CookiePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CookiePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CookiePolicy) ProtoMessage() {} - -func (x *CookiePolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CookiePolicy.ProtoReflect.Descriptor instead. -func (*CookiePolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{12} -} - -func (x *CookiePolicy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CookiePolicy) GetTtl() *durationpb.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *CookiePolicy) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *CookiePolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type HeaderPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *HeaderPolicy) Reset() { - *x = HeaderPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderPolicy) ProtoMessage() {} - -func (x *HeaderPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderPolicy.ProtoReflect.Descriptor instead. -func (*HeaderPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{13} -} - -func (x *HeaderPolicy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HeaderPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type QueryParameterPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *QueryParameterPolicy) Reset() { - *x = QueryParameterPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameterPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameterPolicy) ProtoMessage() {} - -func (x *QueryParameterPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameterPolicy.ProtoReflect.Descriptor instead. -func (*QueryParameterPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryParameterPolicy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *QueryParameterPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type ConnectionPropertiesPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` - Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *ConnectionPropertiesPolicy) Reset() { - *x = ConnectionPropertiesPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConnectionPropertiesPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConnectionPropertiesPolicy) ProtoMessage() {} - -func (x *ConnectionPropertiesPolicy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConnectionPropertiesPolicy.ProtoReflect.Descriptor instead. -func (*ConnectionPropertiesPolicy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{15} -} - -func (x *ConnectionPropertiesPolicy) GetSourceIp() bool { - if x != nil { - return x.SourceIp - } - return false -} - -func (x *ConnectionPropertiesPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type DestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DestinationCluster) Reset() { - *x = DestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestinationCluster) ProtoMessage() {} - -func (x *DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DestinationCluster.ProtoReflect.Descriptor instead. -func (*DestinationCluster) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP(), []int{16} -} - -func (x *DestinationCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_pbmesh_v1alpha1_pbproxystate_route_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, - 0x73, 0x74, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x22, 0xfc, 0x01, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x66, - 0x0a, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, - 0xa3, 0x02, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4d, 0x0a, - 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5f, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, - 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe5, 0x02, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x09, 0x70, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5f, 0x0a, 0x0e, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0d, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x73, 0x12, 0x78, 0x0a, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0x63, 0x0a, - 0x09, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, - 0x63, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x05, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0x7e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1a, 0x0a, - 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0xcd, 0x01, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x18, - 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x12, 0x16, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x72, - 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, - 0x76, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0xf7, 0x02, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x43, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x37, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x19, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb3, 0x03, 0x0a, - 0x18, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x11, 0x61, 0x75, 0x74, - 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x68, - 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x0e, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, - 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x3d, 0x0a, - 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, - 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, - 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xba, 0x03, 0x0a, 0x16, 0x4c, 0x6f, 0x61, 0x64, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x0f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x7e, 0x0a, 0x15, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x22, 0x7f, 0x0a, 0x0c, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x3e, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x46, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x55, 0x0a, - 0x1a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xd6, - 0x02, 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, - 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, - 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_pbmesh_v1alpha1_pbproxystate_route_proto_goTypes = []interface{}{ - (*Route)(nil), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Route - (*VirtualHost)(nil), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.VirtualHost - (*RouteRule)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteRule - (*RouteMatch)(nil), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteMatch - (*PathMatch)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.PathMatch - (*QueryParameterMatch)(nil), // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.QueryParameterMatch - (*HeaderMatch)(nil), // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMatch - (*RouteDestination)(nil), // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteDestination - (*DestinationConfiguration)(nil), // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration - (*RetryPolicy)(nil), // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.RetryPolicy - (*TimeoutConfig)(nil), // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.TimeoutConfig - (*LoadBalancerHashPolicy)(nil), // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy - (*CookiePolicy)(nil), // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.CookiePolicy - (*HeaderPolicy)(nil), // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderPolicy - (*QueryParameterPolicy)(nil), // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.QueryParameterPolicy - (*ConnectionPropertiesPolicy)(nil), // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.ConnectionPropertiesPolicy - (*DestinationCluster)(nil), // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationCluster - (*HeaderMutation)(nil), // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - (*L7WeightedClusterGroup)(nil), // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedClusterGroup - (*wrapperspb.BoolValue)(nil), // 19: google.protobuf.BoolValue - (*wrapperspb.UInt32Value)(nil), // 20: google.protobuf.UInt32Value - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration -} -var file_pbmesh_v1alpha1_pbproxystate_route_proto_depIdxs = []int32{ - 1, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.Route.virtual_hosts:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.VirtualHost - 17, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.VirtualHost.header_mutations:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - 2, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.VirtualHost.route_rules:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteRule - 3, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteRule.match:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteMatch - 7, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteRule.destination:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteDestination - 17, // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteRule.header_mutations:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMutation - 4, // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteMatch.path_match:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.PathMatch - 6, // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteMatch.header_matches:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderMatch - 5, // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteMatch.query_parameter_matches:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.QueryParameterMatch - 16, // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteDestination.cluster:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationCluster - 18, // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteDestination.weighted_clusters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.L7WeightedClusterGroup - 8, // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.RouteDestination.destination_configuration:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration - 19, // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration.auto_host_rewrite:type_name -> google.protobuf.BoolValue - 11, // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration.hash_policies:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy - 10, // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration.timeout_config:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TimeoutConfig - 9, // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.DestinationConfiguration.retry_policy:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.RetryPolicy - 20, // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 21, // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.TimeoutConfig.timeout:type_name -> google.protobuf.Duration - 21, // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.TimeoutConfig.idle_timeout:type_name -> google.protobuf.Duration - 12, // 19: hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy.cookie:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.CookiePolicy - 13, // 20: hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy.header:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.HeaderPolicy - 14, // 21: hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy.query_parameter:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.QueryParameterPolicy - 15, // 22: hashicorp.consul.mesh.v1alpha1.pbproxystate.LoadBalancerHashPolicy.connection_properties:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.ConnectionPropertiesPolicy - 21, // 23: hashicorp.consul.mesh.v1alpha1.pbproxystate.CookiePolicy.ttl:type_name -> google.protobuf.Duration - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_route_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_route_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_route_proto != nil { - return - } - file_pbmesh_v1alpha1_pbproxystate_cluster_proto_init() - file_pbmesh_v1alpha1_pbproxystate_header_mutations_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualHost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PathMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeoutConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancerHashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CookiePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConnectionPropertiesPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*PathMatch_Exact)(nil), - (*PathMatch_Prefix)(nil), - (*PathMatch_Regex)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*QueryParameterMatch_Exact)(nil), - (*QueryParameterMatch_Regex)(nil), - (*QueryParameterMatch_Present)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*HeaderMatch_Exact)(nil), - (*HeaderMatch_Prefix)(nil), - (*HeaderMatch_Suffix)(nil), - (*HeaderMatch_Regex)(nil), - (*HeaderMatch_Present)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*RouteDestination_Cluster)(nil), - (*RouteDestination_WeightedClusters)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes[11].OneofWrappers = []interface{}{ - (*LoadBalancerHashPolicy_Cookie)(nil), - (*LoadBalancerHashPolicy_Header)(nil), - (*LoadBalancerHashPolicy_QueryParameter)(nil), - (*LoadBalancerHashPolicy_ConnectionProperties)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 17, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_route_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_route_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_route_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_route_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_route_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_route_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_route_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/route.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/route.proto deleted file mode 100644 index 2ec10f3737d16..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/route.proto +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "pbmesh/v1alpha1/pbproxystate/cluster.proto"; -import "pbmesh/v1alpha1/pbproxystate/header_mutations.proto"; - -message Route { - // virtual_hosts is a list of virtual hosts. A virtual host is selected based on an incoming request's host header. - repeated VirtualHost virtual_hosts = 1; -} - -message VirtualHost { - string name = 1; - // domains are used to match an incoming request's host header and determine which virtual host to use. - repeated string domains = 2; - // header_mutations to apply to the request when it matches this virtual host. These are applied after any headers in - // the RouteRule. - repeated HeaderMutation header_mutations = 3; - // route_rules are a list of rules to use for what to do next with this request. The first rule with a match will be - // used. - repeated RouteRule route_rules = 4; -} - -message RouteRule { - // match determines how to match the request. The first match determines which destination the request will go to. - RouteMatch match = 1; - // destination is where to send the request to. - RouteDestination destination = 2; - // header_mutations to apply to the request. These are applied before the VirtualHost header mutations. - repeated HeaderMutation header_mutations = 3; -} - -// RouteMatch has configuration to match a request. -message RouteMatch { - PathMatch path_match = 1; - repeated HeaderMatch header_matches = 2; - repeated string method_matches = 3; - repeated QueryParameterMatch query_parameter_matches = 4; -} - -message PathMatch { - oneof path_match { - string exact = 1; - string prefix = 2; - string regex = 3; - } -} - -message QueryParameterMatch { - string name = 1; - oneof match { - string exact = 2; - string regex = 3; - bool present = 4; - } -} - -message HeaderMatch { - string name = 1; - oneof match { - string exact = 2; - string prefix = 3; - string suffix = 4; - string regex = 5; - bool present = 6; - } - bool invert_match = 7; -} - -// RouteDestination has configuration for where to send a request. -message RouteDestination { - // destination is one or more clusters to route to. - oneof destination { - DestinationCluster cluster = 1; - L7WeightedClusterGroup weighted_clusters = 2; - } - DestinationConfiguration destination_configuration = 3; -} - -message DestinationConfiguration { - google.protobuf.BoolValue auto_host_rewrite = 1; - repeated LoadBalancerHashPolicy hash_policies = 2; - TimeoutConfig timeout_config = 3; - string prefix_rewrite = 4; - RetryPolicy retry_policy = 5; -} - -message RetryPolicy { - string retry_on = 1; - google.protobuf.UInt32Value num_retries = 2; - repeated uint32 retriable_status_codes = 3; -} - -message TimeoutConfig { - google.protobuf.Duration timeout = 1; - google.protobuf.Duration idle_timeout = 2; -} - -message LoadBalancerHashPolicy { - oneof policy { - CookiePolicy cookie = 1; - HeaderPolicy header = 2; - QueryParameterPolicy query_parameter = 3; - ConnectionPropertiesPolicy connection_properties = 4; - } -} - -message CookiePolicy { - string name = 1; - google.protobuf.Duration ttl = 2; - string path = 3; - bool terminal = 4; -} -message HeaderPolicy { - string name = 1; - bool terminal = 2; -} -message QueryParameterPolicy { - string name = 1; - bool terminal = 2; -} -message ConnectionPropertiesPolicy { - bool source_ip = 1; - bool terminal = 2; -} - -message DestinationCluster { - // name is the name of the cluster. This will be used to look up a cluster in the clusters map. - string name = 1; -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.binary.go b/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.binary.go deleted file mode 100644 index c659541c92149..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.binary.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/pbproxystate/transport_socket.proto - -package pbproxystate - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TLS) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TLS) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TransportSocket) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TransportSocket) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InboundMeshMTLS) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InboundMeshMTLS) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *OutboundMeshMTLS) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *OutboundMeshMTLS) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *InboundNonMeshTLS) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *InboundNonMeshTLS) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *OutboundNonMeshTLS) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *OutboundNonMeshTLS) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *MeshInboundValidationContext) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *MeshInboundValidationContext) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *MeshOutboundValidationContext) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *MeshOutboundValidationContext) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *NonMeshOutboundValidationContext) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *NonMeshOutboundValidationContext) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *SDSCertificate) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *SDSCertificate) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TLSParameters) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TLSParameters) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *LeafCertificate) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *LeafCertificate) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TrustBundle) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TrustBundle) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.go b/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.go deleted file mode 100644 index 816ddb717b0c6..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.pb.go +++ /dev/null @@ -1,1505 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/pbproxystate/transport_socket.proto - -package pbproxystate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TLSVersion int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - TLSVersion_TLS_VERSION_AUTO TLSVersion = 0 - TLSVersion_TLS_VERSION_1_0 TLSVersion = 1 - TLSVersion_TLS_VERSION_1_1 TLSVersion = 2 - TLSVersion_TLS_VERSION_1_2 TLSVersion = 3 - TLSVersion_TLS_VERSION_1_3 TLSVersion = 4 - TLSVersion_TLS_VERSION_INVALID TLSVersion = 5 - TLSVersion_TLS_VERSION_UNSPECIFIED TLSVersion = 6 -) - -// Enum value maps for TLSVersion. -var ( - TLSVersion_name = map[int32]string{ - 0: "TLS_VERSION_AUTO", - 1: "TLS_VERSION_1_0", - 2: "TLS_VERSION_1_1", - 3: "TLS_VERSION_1_2", - 4: "TLS_VERSION_1_3", - 5: "TLS_VERSION_INVALID", - 6: "TLS_VERSION_UNSPECIFIED", - } - TLSVersion_value = map[string]int32{ - "TLS_VERSION_AUTO": 0, - "TLS_VERSION_1_0": 1, - "TLS_VERSION_1_1": 2, - "TLS_VERSION_1_2": 3, - "TLS_VERSION_1_3": 4, - "TLS_VERSION_INVALID": 5, - "TLS_VERSION_UNSPECIFIED": 6, - } -) - -func (x TLSVersion) Enum() *TLSVersion { - p := new(TLSVersion) - *p = x - return p -} - -func (x TLSVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TLSVersion) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes[0].Descriptor() -} - -func (TLSVersion) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes[0] -} - -func (x TLSVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TLSVersion.Descriptor instead. -func (TLSVersion) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{0} -} - -type TLSCipherSuite int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256 TLSCipherSuite = 0 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305 TLSCipherSuite = 1 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256 TLSCipherSuite = 2 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305 TLSCipherSuite = 3 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA TLSCipherSuite = 4 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA TLSCipherSuite = 5 - TLSCipherSuite_TLS_CIPHER_SUITE_AES128_GCM_SHA256 TLSCipherSuite = 6 - TLSCipherSuite_TLS_CIPHER_SUITE_AES128_SHA TLSCipherSuite = 7 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384 TLSCipherSuite = 8 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384 TLSCipherSuite = 9 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA TLSCipherSuite = 10 - TLSCipherSuite_TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA TLSCipherSuite = 11 - TLSCipherSuite_TLS_CIPHER_SUITE_AES256_GCM_SHA384 TLSCipherSuite = 12 - TLSCipherSuite_TLS_CIPHER_SUITE_AES256_SHA TLSCipherSuite = 13 -) - -// Enum value maps for TLSCipherSuite. -var ( - TLSCipherSuite_name = map[int32]string{ - 0: "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256", - 1: "TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305", - 2: "TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256", - 3: "TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305", - 4: "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA", - 5: "TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA", - 6: "TLS_CIPHER_SUITE_AES128_GCM_SHA256", - 7: "TLS_CIPHER_SUITE_AES128_SHA", - 8: "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384", - 9: "TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384", - 10: "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA", - 11: "TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA", - 12: "TLS_CIPHER_SUITE_AES256_GCM_SHA384", - 13: "TLS_CIPHER_SUITE_AES256_SHA", - } - TLSCipherSuite_value = map[string]int32{ - "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256": 0, - "TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305": 1, - "TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256": 2, - "TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305": 3, - "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA": 4, - "TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA": 5, - "TLS_CIPHER_SUITE_AES128_GCM_SHA256": 6, - "TLS_CIPHER_SUITE_AES128_SHA": 7, - "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384": 8, - "TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384": 9, - "TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA": 10, - "TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA": 11, - "TLS_CIPHER_SUITE_AES256_GCM_SHA384": 12, - "TLS_CIPHER_SUITE_AES256_SHA": 13, - } -) - -func (x TLSCipherSuite) Enum() *TLSCipherSuite { - p := new(TLSCipherSuite) - *p = x - return p -} - -func (x TLSCipherSuite) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TLSCipherSuite) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes[1].Descriptor() -} - -func (TLSCipherSuite) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes[1] -} - -func (x TLSCipherSuite) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TLSCipherSuite.Descriptor instead. -func (TLSCipherSuite) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{1} -} - -type TLS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // inbound_tls_parameters has default TLS parameter configuration for inbound connections. These can be overridden per - // transport socket. - InboundTlsParameters *TLSParameters `protobuf:"bytes,1,opt,name=inbound_tls_parameters,json=inboundTlsParameters,proto3" json:"inbound_tls_parameters,omitempty"` - // outbound_tls_parameters has default TLS parameter configuration for inbound connections. These can be overridden per transport socket. - OutboundTlsParameters *TLSParameters `protobuf:"bytes,2,opt,name=outbound_tls_parameters,json=outboundTlsParameters,proto3" json:"outbound_tls_parameters,omitempty"` -} - -func (x *TLS) Reset() { - *x = TLS{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TLS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TLS) ProtoMessage() {} - -func (x *TLS) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TLS.ProtoReflect.Descriptor instead. -func (*TLS) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{0} -} - -func (x *TLS) GetInboundTlsParameters() *TLSParameters { - if x != nil { - return x.InboundTlsParameters - } - return nil -} - -func (x *TLS) GetOutboundTlsParameters() *TLSParameters { - if x != nil { - return x.OutboundTlsParameters - } - return nil -} - -type TransportSocket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name of the transport socket - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConnectionTls: - // - // *TransportSocket_InboundMesh - // *TransportSocket_OutboundMesh - // *TransportSocket_InboundNonMesh - // *TransportSocket_OutboundNonMesh - ConnectionTls isTransportSocket_ConnectionTls `protobuf_oneof:"connection_tls"` - // tls_parameters can override any top level tls parameters that are configured. - TlsParameters *TLSParameters `protobuf:"bytes,6,opt,name=tls_parameters,json=tlsParameters,proto3" json:"tls_parameters,omitempty"` - AlpnProtocols []string `protobuf:"bytes,7,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` -} - -func (x *TransportSocket) Reset() { - *x = TransportSocket{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransportSocket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransportSocket) ProtoMessage() {} - -func (x *TransportSocket) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransportSocket.ProtoReflect.Descriptor instead. -func (*TransportSocket) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{1} -} - -func (x *TransportSocket) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *TransportSocket) GetConnectionTls() isTransportSocket_ConnectionTls { - if m != nil { - return m.ConnectionTls - } - return nil -} - -func (x *TransportSocket) GetInboundMesh() *InboundMeshMTLS { - if x, ok := x.GetConnectionTls().(*TransportSocket_InboundMesh); ok { - return x.InboundMesh - } - return nil -} - -func (x *TransportSocket) GetOutboundMesh() *OutboundMeshMTLS { - if x, ok := x.GetConnectionTls().(*TransportSocket_OutboundMesh); ok { - return x.OutboundMesh - } - return nil -} - -func (x *TransportSocket) GetInboundNonMesh() *InboundNonMeshTLS { - if x, ok := x.GetConnectionTls().(*TransportSocket_InboundNonMesh); ok { - return x.InboundNonMesh - } - return nil -} - -func (x *TransportSocket) GetOutboundNonMesh() *OutboundNonMeshTLS { - if x, ok := x.GetConnectionTls().(*TransportSocket_OutboundNonMesh); ok { - return x.OutboundNonMesh - } - return nil -} - -func (x *TransportSocket) GetTlsParameters() *TLSParameters { - if x != nil { - return x.TlsParameters - } - return nil -} - -func (x *TransportSocket) GetAlpnProtocols() []string { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -type isTransportSocket_ConnectionTls interface { - isTransportSocket_ConnectionTls() -} - -type TransportSocket_InboundMesh struct { - // inbound_mesh is for incoming connections FROM the mesh. - InboundMesh *InboundMeshMTLS `protobuf:"bytes,2,opt,name=inbound_mesh,json=inboundMesh,proto3,oneof"` -} - -type TransportSocket_OutboundMesh struct { - // outbound_mesh is for outbound connections TO mesh destinations. - OutboundMesh *OutboundMeshMTLS `protobuf:"bytes,3,opt,name=outbound_mesh,json=outboundMesh,proto3,oneof"` -} - -type TransportSocket_InboundNonMesh struct { - // inbound_non_mesh is for incoming connections FROM non mesh. - InboundNonMesh *InboundNonMeshTLS `protobuf:"bytes,4,opt,name=inbound_non_mesh,json=inboundNonMesh,proto3,oneof"` -} - -type TransportSocket_OutboundNonMesh struct { - // outbound_non_mesh is for outbound connections TO non mesh destinations. - OutboundNonMesh *OutboundNonMeshTLS `protobuf:"bytes,5,opt,name=outbound_non_mesh,json=outboundNonMesh,proto3,oneof"` -} - -func (*TransportSocket_InboundMesh) isTransportSocket_ConnectionTls() {} - -func (*TransportSocket_OutboundMesh) isTransportSocket_ConnectionTls() {} - -func (*TransportSocket_InboundNonMesh) isTransportSocket_ConnectionTls() {} - -func (*TransportSocket_OutboundNonMesh) isTransportSocket_ConnectionTls() {} - -type InboundMeshMTLS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // identity_key is UUID key to use to look up the leaf certificate in ProxyState to present for incoming connections. - IdentityKey string `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // validation_context has what is needed to validate incoming connections. - ValidationContext *MeshInboundValidationContext `protobuf:"bytes,2,opt,name=validation_context,json=validationContext,proto3" json:"validation_context,omitempty"` -} - -func (x *InboundMeshMTLS) Reset() { - *x = InboundMeshMTLS{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InboundMeshMTLS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InboundMeshMTLS) ProtoMessage() {} - -func (x *InboundMeshMTLS) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InboundMeshMTLS.ProtoReflect.Descriptor instead. -func (*InboundMeshMTLS) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{2} -} - -func (x *InboundMeshMTLS) GetIdentityKey() string { - if x != nil { - return x.IdentityKey - } - return "" -} - -func (x *InboundMeshMTLS) GetValidationContext() *MeshInboundValidationContext { - if x != nil { - return x.ValidationContext - } - return nil -} - -type OutboundMeshMTLS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // identity_key is UUID key to use to look up the leaf certificate in ProxyState when connecting to destinations. - IdentityKey string `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // validation_context has what is needed to validate the destination. - ValidationContext *MeshOutboundValidationContext `protobuf:"bytes,2,opt,name=validation_context,json=validationContext,proto3" json:"validation_context,omitempty"` - // sni to use when connecting to the destination. - Sni string `protobuf:"bytes,3,opt,name=sni,proto3" json:"sni,omitempty"` -} - -func (x *OutboundMeshMTLS) Reset() { - *x = OutboundMeshMTLS{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutboundMeshMTLS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutboundMeshMTLS) ProtoMessage() {} - -func (x *OutboundMeshMTLS) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutboundMeshMTLS.ProtoReflect.Descriptor instead. -func (*OutboundMeshMTLS) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{3} -} - -func (x *OutboundMeshMTLS) GetIdentityKey() string { - if x != nil { - return x.IdentityKey - } - return "" -} - -func (x *OutboundMeshMTLS) GetValidationContext() *MeshOutboundValidationContext { - if x != nil { - return x.ValidationContext - } - return nil -} - -func (x *OutboundMeshMTLS) GetSni() string { - if x != nil { - return x.Sni - } - return "" -} - -type InboundNonMeshTLS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // identity is the reference to the leaf certificate to present for incoming connections. - // - // Types that are assignable to Identity: - // - // *InboundNonMeshTLS_LeafKey - // *InboundNonMeshTLS_Sds - Identity isInboundNonMeshTLS_Identity `protobuf_oneof:"identity"` -} - -func (x *InboundNonMeshTLS) Reset() { - *x = InboundNonMeshTLS{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InboundNonMeshTLS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InboundNonMeshTLS) ProtoMessage() {} - -func (x *InboundNonMeshTLS) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InboundNonMeshTLS.ProtoReflect.Descriptor instead. -func (*InboundNonMeshTLS) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{4} -} - -func (m *InboundNonMeshTLS) GetIdentity() isInboundNonMeshTLS_Identity { - if m != nil { - return m.Identity - } - return nil -} - -func (x *InboundNonMeshTLS) GetLeafKey() string { - if x, ok := x.GetIdentity().(*InboundNonMeshTLS_LeafKey); ok { - return x.LeafKey - } - return "" -} - -func (x *InboundNonMeshTLS) GetSds() *SDSCertificate { - if x, ok := x.GetIdentity().(*InboundNonMeshTLS_Sds); ok { - return x.Sds - } - return nil -} - -type isInboundNonMeshTLS_Identity interface { - isInboundNonMeshTLS_Identity() -} - -type InboundNonMeshTLS_LeafKey struct { - // leaf_key is the UUID key to use to look up the leaf certificate in the ProxyState leaf certificate map. - LeafKey string `protobuf:"bytes,1,opt,name=leaf_key,json=leafKey,proto3,oneof"` -} - -type InboundNonMeshTLS_Sds struct { - // sds refers to certificates retrieved via Envoy SDS. - Sds *SDSCertificate `protobuf:"bytes,2,opt,name=sds,proto3,oneof"` -} - -func (*InboundNonMeshTLS_LeafKey) isInboundNonMeshTLS_Identity() {} - -func (*InboundNonMeshTLS_Sds) isInboundNonMeshTLS_Identity() {} - -type OutboundNonMeshTLS struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // cert_file is a filename for a certificate to present for outbound connections. - CertFile string `protobuf:"bytes,1,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"` - // key_file is a filename for a key for outbound connections. - KeyFile string `protobuf:"bytes,2,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"` - // validation_context has what is needed to validate the destination. - ValidationContext *NonMeshOutboundValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3" json:"validation_context,omitempty"` -} - -func (x *OutboundNonMeshTLS) Reset() { - *x = OutboundNonMeshTLS{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutboundNonMeshTLS) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutboundNonMeshTLS) ProtoMessage() {} - -func (x *OutboundNonMeshTLS) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutboundNonMeshTLS.ProtoReflect.Descriptor instead. -func (*OutboundNonMeshTLS) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{5} -} - -func (x *OutboundNonMeshTLS) GetCertFile() string { - if x != nil { - return x.CertFile - } - return "" -} - -func (x *OutboundNonMeshTLS) GetKeyFile() string { - if x != nil { - return x.KeyFile - } - return "" -} - -func (x *OutboundNonMeshTLS) GetValidationContext() *NonMeshOutboundValidationContext { - if x != nil { - return x.ValidationContext - } - return nil -} - -type MeshInboundValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // trust_bundle_peer_name_keys is which trust bundles to use for validating incoming connections. If this workload is exported - // to peers, the incoming connection could be from a different peer, requiring that trust bundle to validate the - // connection. These could be local or peered trust bundles. This will be a key in the trust bundle map. - TrustBundlePeerNameKeys []string `protobuf:"bytes,1,rep,name=trust_bundle_peer_name_keys,json=trustBundlePeerNameKeys,proto3" json:"trust_bundle_peer_name_keys,omitempty"` -} - -func (x *MeshInboundValidationContext) Reset() { - *x = MeshInboundValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MeshInboundValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MeshInboundValidationContext) ProtoMessage() {} - -func (x *MeshInboundValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MeshInboundValidationContext.ProtoReflect.Descriptor instead. -func (*MeshInboundValidationContext) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{6} -} - -func (x *MeshInboundValidationContext) GetTrustBundlePeerNameKeys() []string { - if x != nil { - return x.TrustBundlePeerNameKeys - } - return nil -} - -type MeshOutboundValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // trust_bundle_peer_name_key is which trust bundle to use for the destination. It could be the local or a peer's trust bundle. - // This will be a key in the trust bundle map. - TrustBundlePeerNameKey string `protobuf:"bytes,1,opt,name=trust_bundle_peer_name_key,json=trustBundlePeerNameKey,proto3" json:"trust_bundle_peer_name_key,omitempty"` - // spiffe_ids is one or more spiffe IDs to validate. - SpiffeIds []string `protobuf:"bytes,2,rep,name=spiffe_ids,json=spiffeIds,proto3" json:"spiffe_ids,omitempty"` -} - -func (x *MeshOutboundValidationContext) Reset() { - *x = MeshOutboundValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MeshOutboundValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MeshOutboundValidationContext) ProtoMessage() {} - -func (x *MeshOutboundValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MeshOutboundValidationContext.ProtoReflect.Descriptor instead. -func (*MeshOutboundValidationContext) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{7} -} - -func (x *MeshOutboundValidationContext) GetTrustBundlePeerNameKey() string { - if x != nil { - return x.TrustBundlePeerNameKey - } - return "" -} - -func (x *MeshOutboundValidationContext) GetSpiffeIds() []string { - if x != nil { - return x.SpiffeIds - } - return nil -} - -type NonMeshOutboundValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ca_file is a filename for a ca for outbound connections to validate the destination. - CaFile string `protobuf:"bytes,1,opt,name=ca_file,json=caFile,proto3" json:"ca_file,omitempty"` -} - -func (x *NonMeshOutboundValidationContext) Reset() { - *x = NonMeshOutboundValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NonMeshOutboundValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NonMeshOutboundValidationContext) ProtoMessage() {} - -func (x *NonMeshOutboundValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NonMeshOutboundValidationContext.ProtoReflect.Descriptor instead. -func (*NonMeshOutboundValidationContext) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{8} -} - -func (x *NonMeshOutboundValidationContext) GetCaFile() string { - if x != nil { - return x.CaFile - } - return "" -} - -type SDSCertificate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - CertResource string `protobuf:"bytes,2,opt,name=cert_resource,json=certResource,proto3" json:"cert_resource,omitempty"` -} - -func (x *SDSCertificate) Reset() { - *x = SDSCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SDSCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SDSCertificate) ProtoMessage() {} - -func (x *SDSCertificate) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SDSCertificate.ProtoReflect.Descriptor instead. -func (*SDSCertificate) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{9} -} - -func (x *SDSCertificate) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *SDSCertificate) GetCertResource() string { - if x != nil { - return x.CertResource - } - return "" -} - -type TLSParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MinVersion TLSVersion `protobuf:"varint,1,opt,name=min_version,json=minVersion,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSVersion" json:"min_version,omitempty"` - MaxVersion TLSVersion `protobuf:"varint,2,opt,name=max_version,json=maxVersion,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSVersion" json:"max_version,omitempty"` - CipherSuites []TLSCipherSuite `protobuf:"varint,3,rep,packed,name=cipher_suites,json=cipherSuites,proto3,enum=hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSCipherSuite" json:"cipher_suites,omitempty"` -} - -func (x *TLSParameters) Reset() { - *x = TLSParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TLSParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TLSParameters) ProtoMessage() {} - -func (x *TLSParameters) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TLSParameters.ProtoReflect.Descriptor instead. -func (*TLSParameters) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{10} -} - -func (x *TLSParameters) GetMinVersion() TLSVersion { - if x != nil { - return x.MinVersion - } - return TLSVersion_TLS_VERSION_AUTO -} - -func (x *TLSParameters) GetMaxVersion() TLSVersion { - if x != nil { - return x.MaxVersion - } - return TLSVersion_TLS_VERSION_AUTO -} - -func (x *TLSParameters) GetCipherSuites() []TLSCipherSuite { - if x != nil { - return x.CipherSuites - } - return nil -} - -type LeafCertificate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cert string `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *LeafCertificate) Reset() { - *x = LeafCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeafCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeafCertificate) ProtoMessage() {} - -func (x *LeafCertificate) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeafCertificate.ProtoReflect.Descriptor instead. -func (*LeafCertificate) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{11} -} - -func (x *LeafCertificate) GetCert() string { - if x != nil { - return x.Cert - } - return "" -} - -func (x *LeafCertificate) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type TrustBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TrustDomain string `protobuf:"bytes,1,opt,name=trust_domain,json=trustDomain,proto3" json:"trust_domain,omitempty"` - Roots []string `protobuf:"bytes,2,rep,name=roots,proto3" json:"roots,omitempty"` -} - -func (x *TrustBundle) Reset() { - *x = TrustBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TrustBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TrustBundle) ProtoMessage() {} - -func (x *TrustBundle) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TrustBundle.ProtoReflect.Descriptor instead. -func (*TrustBundle) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{12} -} - -func (x *TrustBundle) GetTrustDomain() string { - if x != nil { - return x.TrustDomain - } - return "" -} - -func (x *TrustBundle) GetRoots() []string { - if x != nil { - return x.Roots - } - return nil -} - -var File_pbmesh_v1alpha1_pbproxystate_transport_socket_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x12, 0x70, 0x0a, 0x16, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x14, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, - 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x72, 0x0a, 0x17, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x22, 0xe5, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x4d, 0x54, 0x4c, 0x53, 0x48, 0x00, 0x52, 0x0b, - 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x12, 0x64, 0x0a, 0x0d, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x4d, 0x54, 0x4c, - 0x53, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, - 0x68, 0x12, 0x6a, 0x0a, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6e, 0x6f, 0x6e, - 0x5f, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, 0x54, 0x4c, 0x53, 0x48, 0x00, 0x52, 0x0e, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, 0x12, 0x6d, 0x0a, - 0x11, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, - 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, - 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, 0x54, 0x4c, 0x53, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, 0x12, 0x61, 0x0a, 0x0e, - 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x4d, 0x54, 0x4c, 0x53, 0x12, 0x21, 0x0a, 0x0c, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, - 0x78, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x49, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xc2, 0x01, 0x0a, 0x10, 0x4f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x4d, 0x54, 0x4c, 0x53, 0x12, 0x21, - 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, - 0x79, 0x12, 0x79, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x68, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x22, 0x8d, - 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, - 0x68, 0x54, 0x4c, 0x53, 0x12, 0x1b, 0x0a, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x66, 0x4b, 0x65, - 0x79, 0x12, 0x4f, 0x0a, 0x03, 0x73, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x44, 0x53, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x03, 0x73, - 0x64, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0xca, - 0x01, 0x0a, 0x12, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, - 0x73, 0x68, 0x54, 0x4c, 0x53, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x7c, 0x0a, - 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x5c, 0x0a, 0x1c, 0x4d, - 0x65, 0x73, 0x68, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3c, 0x0a, 0x1b, 0x74, - 0x72, 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x17, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x65, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x7a, 0x0a, 0x1d, 0x4d, 0x65, 0x73, - 0x68, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3a, 0x0a, 0x1a, 0x74, 0x72, - 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, - 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x70, 0x69, 0x66, - 0x66, 0x65, 0x49, 0x64, 0x73, 0x22, 0x3b, 0x0a, 0x20, 0x4e, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x68, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x46, 0x69, - 0x6c, 0x65, 0x22, 0x58, 0x0a, 0x0e, 0x53, 0x44, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x65, 0x72, 0x74, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa5, 0x02, 0x0a, - 0x0d, 0x54, 0x4c, 0x53, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x58, - 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, - 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0d, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x43, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, - 0x69, 0x74, 0x65, 0x73, 0x22, 0x37, 0x0a, 0x0f, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x46, 0x0a, - 0x0b, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x2a, 0xac, 0x01, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4c, - 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x10, 0x01, 0x12, - 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, - 0x5f, 0x31, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, - 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x12, 0x17, - 0x0a, 0x13, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x4c, 0x53, 0x5f, 0x56, - 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x06, 0x2a, 0x84, 0x05, 0x0a, 0x0e, 0x54, 0x4c, 0x53, 0x43, 0x69, 0x70, 0x68, - 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x2e, 0x54, 0x4c, 0x53, 0x5f, 0x43, - 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, - 0x45, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, - 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x00, 0x12, 0x32, 0x0a, 0x2e, 0x54, - 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, - 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x43, 0x48, 0x41, 0x43, - 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x01, 0x12, - 0x30, 0x0a, 0x2c, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, - 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x41, 0x45, - 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, - 0x02, 0x12, 0x30, 0x0a, 0x2c, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, - 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, - 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, - 0x35, 0x10, 0x03, 0x12, 0x2b, 0x0a, 0x27, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, - 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, 0x43, - 0x44, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x10, 0x04, - 0x12, 0x29, 0x0a, 0x25, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, - 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x41, - 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x10, 0x05, 0x12, 0x26, 0x0a, 0x22, 0x54, - 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, - 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, - 0x36, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, - 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x53, - 0x48, 0x41, 0x10, 0x07, 0x12, 0x32, 0x0a, 0x2e, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, - 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, - 0x43, 0x44, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x5f, - 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x08, 0x12, 0x30, 0x0a, 0x2c, 0x54, 0x4c, 0x53, 0x5f, - 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, - 0x48, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, - 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x09, 0x12, 0x2b, 0x0a, 0x27, 0x54, 0x4c, - 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, - 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x32, 0x35, - 0x36, 0x5f, 0x53, 0x48, 0x41, 0x10, 0x0a, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x4c, 0x53, 0x5f, 0x43, - 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, - 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x41, 0x45, 0x53, 0x32, 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, - 0x10, 0x0b, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x4c, 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, - 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x41, 0x45, 0x53, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, - 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0c, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x4c, - 0x53, 0x5f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x41, - 0x45, 0x53, 0x32, 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x10, 0x0d, 0x42, 0xe0, 0x02, 0x0a, 0x2f, - 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, - 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, - 0x05, 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0xca, 0x02, 0x2b, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0xe2, 0x02, 0x37, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2f, 0x48, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescData = file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDesc -) - -func file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDescData -} - -var file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_goTypes = []interface{}{ - (TLSVersion)(0), // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSVersion - (TLSCipherSuite)(0), // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSCipherSuite - (*TLS)(nil), // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLS - (*TransportSocket)(nil), // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket - (*InboundMeshMTLS)(nil), // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundMeshMTLS - (*OutboundMeshMTLS)(nil), // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundMeshMTLS - (*InboundNonMeshTLS)(nil), // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundNonMeshTLS - (*OutboundNonMeshTLS)(nil), // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundNonMeshTLS - (*MeshInboundValidationContext)(nil), // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.MeshInboundValidationContext - (*MeshOutboundValidationContext)(nil), // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.MeshOutboundValidationContext - (*NonMeshOutboundValidationContext)(nil), // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.NonMeshOutboundValidationContext - (*SDSCertificate)(nil), // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.SDSCertificate - (*TLSParameters)(nil), // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters - (*LeafCertificate)(nil), // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificate - (*TrustBundle)(nil), // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundle -} -var file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_depIdxs = []int32{ - 12, // 0: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLS.inbound_tls_parameters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters - 12, // 1: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLS.outbound_tls_parameters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters - 4, // 2: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket.inbound_mesh:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundMeshMTLS - 5, // 3: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket.outbound_mesh:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundMeshMTLS - 6, // 4: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket.inbound_non_mesh:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundNonMeshTLS - 7, // 5: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket.outbound_non_mesh:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundNonMeshTLS - 12, // 6: hashicorp.consul.mesh.v1alpha1.pbproxystate.TransportSocket.tls_parameters:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters - 8, // 7: hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundMeshMTLS.validation_context:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.MeshInboundValidationContext - 9, // 8: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundMeshMTLS.validation_context:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.MeshOutboundValidationContext - 11, // 9: hashicorp.consul.mesh.v1alpha1.pbproxystate.InboundNonMeshTLS.sds:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.SDSCertificate - 10, // 10: hashicorp.consul.mesh.v1alpha1.pbproxystate.OutboundNonMeshTLS.validation_context:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.NonMeshOutboundValidationContext - 0, // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters.min_version:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSVersion - 0, // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters.max_version:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSVersion - 1, // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSParameters.cipher_suites:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLSCipherSuite - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_init() } -func file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_init() { - if File_pbmesh_v1alpha1_pbproxystate_transport_socket_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TLS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransportSocket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InboundMeshMTLS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundMeshMTLS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InboundNonMeshTLS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundNonMeshTLS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MeshInboundValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MeshOutboundValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonMeshOutboundValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SDSCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TLSParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeafCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrustBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*TransportSocket_InboundMesh)(nil), - (*TransportSocket_OutboundMesh)(nil), - (*TransportSocket_InboundNonMesh)(nil), - (*TransportSocket_OutboundNonMesh)(nil), - } - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*InboundNonMeshTLS_LeafKey)(nil), - (*InboundNonMeshTLS_Sds)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDesc, - NumEnums: 2, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_pbproxystate_transport_socket_proto = out.File - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_rawDesc = nil - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_goTypes = nil - file_pbmesh_v1alpha1_pbproxystate_transport_socket_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.proto b/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.proto deleted file mode 100644 index 4d191ba580dd8..0000000000000 --- a/proto-public/pbmesh/v1alpha1/pbproxystate/transport_socket.proto +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1.pbproxystate; - -message TLS { - // inbound_tls_parameters has default TLS parameter configuration for inbound connections. These can be overridden per - // transport socket. - TLSParameters inbound_tls_parameters = 1; - // outbound_tls_parameters has default TLS parameter configuration for inbound connections. These can be overridden per transport socket. - TLSParameters outbound_tls_parameters = 2; -} - -message TransportSocket { - // name of the transport socket - string name = 1; - oneof connection_tls { - // inbound_mesh is for incoming connections FROM the mesh. - InboundMeshMTLS inbound_mesh = 2; - // outbound_mesh is for outbound connections TO mesh destinations. - OutboundMeshMTLS outbound_mesh = 3; - // inbound_non_mesh is for incoming connections FROM non mesh. - InboundNonMeshTLS inbound_non_mesh = 4; - // outbound_non_mesh is for outbound connections TO non mesh destinations. - OutboundNonMeshTLS outbound_non_mesh = 5; - } - // tls_parameters can override any top level tls parameters that are configured. - TLSParameters tls_parameters = 6; - repeated string alpn_protocols = 7; -} - -message InboundMeshMTLS { - // identity_key is UUID key to use to look up the leaf certificate in ProxyState to present for incoming connections. - string identity_key = 1; - // validation_context has what is needed to validate incoming connections. - MeshInboundValidationContext validation_context = 2; -} - -message OutboundMeshMTLS { - // identity_key is UUID key to use to look up the leaf certificate in ProxyState when connecting to destinations. - string identity_key = 1; - // validation_context has what is needed to validate the destination. - MeshOutboundValidationContext validation_context = 2; - // sni to use when connecting to the destination. - string sni = 3; -} - -message InboundNonMeshTLS { - // identity is the reference to the leaf certificate to present for incoming connections. - oneof identity { - // leaf_key is the UUID key to use to look up the leaf certificate in the ProxyState leaf certificate map. - string leaf_key = 1; - // sds refers to certificates retrieved via Envoy SDS. - SDSCertificate sds = 2; - } -} - -message OutboundNonMeshTLS { - // cert_file is a filename for a certificate to present for outbound connections. - string cert_file = 1; - // key_file is a filename for a key for outbound connections. - string key_file = 2; - // validation_context has what is needed to validate the destination. - NonMeshOutboundValidationContext validation_context = 3; -} - -message MeshInboundValidationContext { - // trust_bundle_peer_name_keys is which trust bundles to use for validating incoming connections. If this workload is exported - // to peers, the incoming connection could be from a different peer, requiring that trust bundle to validate the - // connection. These could be local or peered trust bundles. This will be a key in the trust bundle map. - repeated string trust_bundle_peer_name_keys = 1; -} - -message MeshOutboundValidationContext { - // trust_bundle_peer_name_key is which trust bundle to use for the destination. It could be the local or a peer's trust bundle. - // This will be a key in the trust bundle map. - string trust_bundle_peer_name_key = 1; - // spiffe_ids is one or more spiffe IDs to validate. - repeated string spiffe_ids = 2; -} - -message NonMeshOutboundValidationContext { - // ca_file is a filename for a ca for outbound connections to validate the destination. - string ca_file = 1; -} - -message SDSCertificate { - string cluster_name = 1; - string cert_resource = 2; -} - -message TLSParameters { - TLSVersion min_version = 1; - TLSVersion max_version = 2; - repeated TLSCipherSuite cipher_suites = 3; -} - -message LeafCertificate { - string cert = 1; - string key = 2; -} - -message TrustBundle { - string trust_domain = 1; - repeated string roots = 2; -} - -enum TLSVersion { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - TLS_VERSION_AUTO = 0; - TLS_VERSION_1_0 = 1; - TLS_VERSION_1_1 = 2; - TLS_VERSION_1_2 = 3; - TLS_VERSION_1_3 = 4; - TLS_VERSION_INVALID = 5; - TLS_VERSION_UNSPECIFIED = 6; -} - -enum TLSCipherSuite { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256 = 0; - TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305 = 1; - TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256 = 2; - TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305 = 3; - TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA = 4; - TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA = 5; - TLS_CIPHER_SUITE_AES128_GCM_SHA256 = 6; - TLS_CIPHER_SUITE_AES128_SHA = 7; - TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384 = 8; - TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384 = 9; - TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA = 10; - TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA = 11; - TLS_CIPHER_SUITE_AES256_GCM_SHA384 = 12; - TLS_CIPHER_SUITE_AES256_SHA = 13; -} diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go b/proto-public/pbmesh/v1alpha1/proxy.pb.binary.go similarity index 67% rename from proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go rename to proto-public/pbmesh/v1alpha1/proxy.pb.binary.go index bb706d5da3d66..f39ae6afec843 100644 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go +++ b/proto-public/pbmesh/v1alpha1/proxy.pb.binary.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/proxy_configuration.proto +// source: pbmesh/v1alpha1/proxy.proto package meshv1alpha1 @@ -46,23 +46,3 @@ func (msg *BootstrapConfig) MarshalBinary() ([]byte, error) { func (msg *BootstrapConfig) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *AccessLogsConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *AccessLogsConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *EnvoyExtension) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *EnvoyExtension) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/proxy.pb.go b/proto-public/pbmesh/v1alpha1/proxy.pb.go new file mode 100644 index 0000000000000..b6ef2edf873bd --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/proxy.pb.go @@ -0,0 +1,816 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/proxy.proto + +package meshv1alpha1 + +import ( + v1alpha1 "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ProxyMode int32 + +const ( + // ProxyModeDefault represents no specific mode and should + // be used to indicate that a different layer of the configuration + // chain should take precedence + // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX + ProxyMode_PROXY_MODE_DEFAULT ProxyMode = 0 + // ProxyModeTransparent represents that inbound and outbound application + // traffic is being captured and redirected through the proxy. + ProxyMode_PROXY_MODE_TRANSPARENT ProxyMode = 1 + // ProxyModeDirect represents that the proxy's listeners must be dialed directly + // by the local application and other proxies. + ProxyMode_PROXY_MODE_DIRECT ProxyMode = 2 +) + +// Enum value maps for ProxyMode. +var ( + ProxyMode_name = map[int32]string{ + 0: "PROXY_MODE_DEFAULT", + 1: "PROXY_MODE_TRANSPARENT", + 2: "PROXY_MODE_DIRECT", + } + ProxyMode_value = map[string]int32{ + "PROXY_MODE_DEFAULT": 0, + "PROXY_MODE_TRANSPARENT": 1, + "PROXY_MODE_DIRECT": 2, + } +) + +func (x ProxyMode) Enum() *ProxyMode { + p := new(ProxyMode) + *p = x + return p +} + +func (x ProxyMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProxyMode) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_proxy_proto_enumTypes[0].Descriptor() +} + +func (ProxyMode) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_proxy_proto_enumTypes[0] +} + +func (x ProxyMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProxyMode.Descriptor instead. +func (ProxyMode) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP(), []int{0} +} + +type ProxyConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Selection of workloads this proxy configuration should apply to. + // These can be prefixes or specific workload names. + Workloads *v1alpha1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` + // dynamic_config is the configuration that could be changed + // dynamically (i.e. without needing restart). + DynamicConfig *DynamicConfig `protobuf:"bytes,2,opt,name=dynamic_config,json=dynamicConfig,proto3" json:"dynamic_config,omitempty"` + // bootstrap_config is the configuration that requires proxies + // to be restarted to be applied. + BootstrapConfig *BootstrapConfig `protobuf:"bytes,3,opt,name=bootstrap_config,json=bootstrapConfig,proto3" json:"bootstrap_config,omitempty"` + // deprecated: prevent usage when using v2 APIs directly. + // needed for backwards compatibility + // + // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. + OpaqueConfig *structpb.Struct `protobuf:"bytes,4,opt,name=opaque_config,json=opaqueConfig,proto3" json:"opaque_config,omitempty"` +} + +func (x *ProxyConfiguration) Reset() { + *x = ProxyConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyConfiguration) ProtoMessage() {} + +func (x *ProxyConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyConfiguration.ProtoReflect.Descriptor instead. +func (*ProxyConfiguration) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *ProxyConfiguration) GetWorkloads() *v1alpha1.WorkloadSelector { + if x != nil { + return x.Workloads + } + return nil +} + +func (x *ProxyConfiguration) GetDynamicConfig() *DynamicConfig { + if x != nil { + return x.DynamicConfig + } + return nil +} + +func (x *ProxyConfiguration) GetBootstrapConfig() *BootstrapConfig { + if x != nil { + return x.BootstrapConfig + } + return nil +} + +// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. +func (x *ProxyConfiguration) GetOpaqueConfig() *structpb.Struct { + if x != nil { + return x.OpaqueConfig + } + return nil +} + +type DynamicConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // mode indicates the proxy's mode. This will default to 'transparent'. + Mode ProxyMode `protobuf:"varint,1,opt,name=mode,proto3,enum=hashicorp.consul.mesh.v1alpha1.ProxyMode" json:"mode,omitempty"` + TransparentProxy *TransparentProxy `protobuf:"bytes,2,opt,name=transparent_proxy,json=transparentProxy,proto3" json:"transparent_proxy,omitempty"` + // local_connection is the configuration that should be used + // to connect to the local application provided per-port. + // The map keys should correspond to port names on the workload. + LocalConnection map[string]*ConnectionConfig `protobuf:"bytes,3,rep,name=local_connection,json=localConnection,proto3" json:"local_connection,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // inbound_connections configures inbound connections to the proxy. + InboundConnections *InboundConnectionsConfig `protobuf:"bytes,4,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` + MeshGatewayMode MeshGatewayMode `protobuf:"varint,5,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` + ExposeConfig *ExposeConfig `protobuf:"bytes,6,opt,name=expose_config,json=exposeConfig,proto3" json:"expose_config,omitempty"` + PublicListenerJson string `protobuf:"bytes,7,opt,name=public_listener_json,json=publicListenerJson,proto3" json:"public_listener_json,omitempty"` + ListenerTracingJson string `protobuf:"bytes,8,opt,name=listener_tracing_json,json=listenerTracingJson,proto3" json:"listener_tracing_json,omitempty"` + LocalClusterJson string `protobuf:"bytes,9,opt,name=local_cluster_json,json=localClusterJson,proto3" json:"local_cluster_json,omitempty"` + // deprecated: + // local_workload_address, local_workload_port, and local_workload_socket_path + // are deprecated and are only needed for migration of existing resources. + // + // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. + LocalWorkloadAddress string `protobuf:"bytes,10,opt,name=local_workload_address,json=localWorkloadAddress,proto3" json:"local_workload_address,omitempty"` + // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. + LocalWorkloadPort uint32 `protobuf:"varint,11,opt,name=local_workload_port,json=localWorkloadPort,proto3" json:"local_workload_port,omitempty"` + // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. + LocalWorkloadSocketPath string `protobuf:"bytes,12,opt,name=local_workload_socket_path,json=localWorkloadSocketPath,proto3" json:"local_workload_socket_path,omitempty"` +} + +func (x *DynamicConfig) Reset() { + *x = DynamicConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DynamicConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DynamicConfig) ProtoMessage() {} + +func (x *DynamicConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DynamicConfig.ProtoReflect.Descriptor instead. +func (*DynamicConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *DynamicConfig) GetMode() ProxyMode { + if x != nil { + return x.Mode + } + return ProxyMode_PROXY_MODE_DEFAULT +} + +func (x *DynamicConfig) GetTransparentProxy() *TransparentProxy { + if x != nil { + return x.TransparentProxy + } + return nil +} + +func (x *DynamicConfig) GetLocalConnection() map[string]*ConnectionConfig { + if x != nil { + return x.LocalConnection + } + return nil +} + +func (x *DynamicConfig) GetInboundConnections() *InboundConnectionsConfig { + if x != nil { + return x.InboundConnections + } + return nil +} + +func (x *DynamicConfig) GetMeshGatewayMode() MeshGatewayMode { + if x != nil { + return x.MeshGatewayMode + } + return MeshGatewayMode_MESH_GATEWAY_MODE_UNSPECIFIED +} + +func (x *DynamicConfig) GetExposeConfig() *ExposeConfig { + if x != nil { + return x.ExposeConfig + } + return nil +} + +func (x *DynamicConfig) GetPublicListenerJson() string { + if x != nil { + return x.PublicListenerJson + } + return "" +} + +func (x *DynamicConfig) GetListenerTracingJson() string { + if x != nil { + return x.ListenerTracingJson + } + return "" +} + +func (x *DynamicConfig) GetLocalClusterJson() string { + if x != nil { + return x.LocalClusterJson + } + return "" +} + +// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. +func (x *DynamicConfig) GetLocalWorkloadAddress() string { + if x != nil { + return x.LocalWorkloadAddress + } + return "" +} + +// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. +func (x *DynamicConfig) GetLocalWorkloadPort() uint32 { + if x != nil { + return x.LocalWorkloadPort + } + return 0 +} + +// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy.proto. +func (x *DynamicConfig) GetLocalWorkloadSocketPath() string { + if x != nil { + return x.LocalWorkloadSocketPath + } + return "" +} + +type TransparentProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // outbound_listener_port is the port for the proxy's outbound listener. + // This defaults to 15001. + OutboundListenerPort uint32 `protobuf:"varint,1,opt,name=outbound_listener_port,json=outboundListenerPort,proto3" json:"outbound_listener_port,omitempty"` + // dialed_directly indicates whether this proxy should be dialed using original destination IP + // in the connection rather than load balance between all endpoints. + DialedDirectly bool `protobuf:"varint,2,opt,name=dialed_directly,json=dialedDirectly,proto3" json:"dialed_directly,omitempty"` +} + +func (x *TransparentProxy) Reset() { + *x = TransparentProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransparentProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransparentProxy) ProtoMessage() {} + +func (x *TransparentProxy) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransparentProxy.ProtoReflect.Descriptor instead. +func (*TransparentProxy) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *TransparentProxy) GetOutboundListenerPort() uint32 { + if x != nil { + return x.OutboundListenerPort + } + return 0 +} + +func (x *TransparentProxy) GetDialedDirectly() bool { + if x != nil { + return x.DialedDirectly + } + return false +} + +// BootstrapConfig is equivalent to configuration defined +// in our docs. +type BootstrapConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StatsdUrl string `protobuf:"bytes,1,opt,name=statsd_url,json=statsdUrl,proto3" json:"statsd_url,omitempty"` + DogstatsdUrl string `protobuf:"bytes,2,opt,name=dogstatsd_url,json=dogstatsdUrl,proto3" json:"dogstatsd_url,omitempty"` + StatsTags []string `protobuf:"bytes,3,rep,name=stats_tags,json=statsTags,proto3" json:"stats_tags,omitempty"` + PrometheusBindAddr string `protobuf:"bytes,4,opt,name=prometheus_bind_addr,json=prometheusBindAddr,proto3" json:"prometheus_bind_addr,omitempty"` + StatsBindAddr string `protobuf:"bytes,5,opt,name=stats_bind_addr,json=statsBindAddr,proto3" json:"stats_bind_addr,omitempty"` + ReadyBindAddr string `protobuf:"bytes,6,opt,name=ready_bind_addr,json=readyBindAddr,proto3" json:"ready_bind_addr,omitempty"` + OverrideJsonTpl string `protobuf:"bytes,7,opt,name=override_json_tpl,json=overrideJsonTpl,proto3" json:"override_json_tpl,omitempty"` + StaticClustersJson string `protobuf:"bytes,8,opt,name=static_clusters_json,json=staticClustersJson,proto3" json:"static_clusters_json,omitempty"` + StaticListenersJson string `protobuf:"bytes,9,opt,name=static_listeners_json,json=staticListenersJson,proto3" json:"static_listeners_json,omitempty"` + StatsSinksJson string `protobuf:"bytes,10,opt,name=stats_sinks_json,json=statsSinksJson,proto3" json:"stats_sinks_json,omitempty"` + StatsConfigJson string `protobuf:"bytes,11,opt,name=stats_config_json,json=statsConfigJson,proto3" json:"stats_config_json,omitempty"` + StatsFlushInterval string `protobuf:"bytes,12,opt,name=stats_flush_interval,json=statsFlushInterval,proto3" json:"stats_flush_interval,omitempty"` + TracingConfigJson string `protobuf:"bytes,13,opt,name=tracing_config_json,json=tracingConfigJson,proto3" json:"tracing_config_json,omitempty"` +} + +func (x *BootstrapConfig) Reset() { + *x = BootstrapConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapConfig) ProtoMessage() {} + +func (x *BootstrapConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapConfig.ProtoReflect.Descriptor instead. +func (*BootstrapConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP(), []int{3} +} + +func (x *BootstrapConfig) GetStatsdUrl() string { + if x != nil { + return x.StatsdUrl + } + return "" +} + +func (x *BootstrapConfig) GetDogstatsdUrl() string { + if x != nil { + return x.DogstatsdUrl + } + return "" +} + +func (x *BootstrapConfig) GetStatsTags() []string { + if x != nil { + return x.StatsTags + } + return nil +} + +func (x *BootstrapConfig) GetPrometheusBindAddr() string { + if x != nil { + return x.PrometheusBindAddr + } + return "" +} + +func (x *BootstrapConfig) GetStatsBindAddr() string { + if x != nil { + return x.StatsBindAddr + } + return "" +} + +func (x *BootstrapConfig) GetReadyBindAddr() string { + if x != nil { + return x.ReadyBindAddr + } + return "" +} + +func (x *BootstrapConfig) GetOverrideJsonTpl() string { + if x != nil { + return x.OverrideJsonTpl + } + return "" +} + +func (x *BootstrapConfig) GetStaticClustersJson() string { + if x != nil { + return x.StaticClustersJson + } + return "" +} + +func (x *BootstrapConfig) GetStaticListenersJson() string { + if x != nil { + return x.StaticListenersJson + } + return "" +} + +func (x *BootstrapConfig) GetStatsSinksJson() string { + if x != nil { + return x.StatsSinksJson + } + return "" +} + +func (x *BootstrapConfig) GetStatsConfigJson() string { + if x != nil { + return x.StatsConfigJson + } + return "" +} + +func (x *BootstrapConfig) GetStatsFlushInterval() string { + if x != nil { + return x.StatsFlushInterval + } + return "" +} + +func (x *BootstrapConfig) GetTracingConfigJson() string { + if x != nil { + return x.TracingConfigJson + } + return "" +} + +var File_pbmesh_v1alpha1_proxy_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_proxy_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x62, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, + 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, + 0x10, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x0d, 0x6f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x6f, + 0x70, 0x61, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xf0, 0x07, 0x0a, 0x0d, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x5d, 0x0a, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x6d, 0x0a, 0x10, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x13, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x16, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x74, 0x0a, 0x14, 0x4c, 0x6f, 0x63, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, + 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, + 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, + 0x79, 0x22, 0xc0, 0x04, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x64, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x67, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x67, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x6d, + 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, + 0x75, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, + 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x62, 0x69, 0x6e, 0x64, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x70, 0x6c, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4a, + 0x73, 0x6f, 0x6e, 0x54, 0x70, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, + 0x6b, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x73, + 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, + 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x4a, 0x73, 0x6f, 0x6e, 0x2a, 0x56, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, + 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x41, 0x52, + 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 0x42, 0x92, 0x02, 0x0a, + 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x0a, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, + 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, + 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_proxy_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_proxy_proto_rawDescData = file_pbmesh_v1alpha1_proxy_proto_rawDesc +) + +func file_pbmesh_v1alpha1_proxy_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_proxy_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_proxy_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_proxy_proto_rawDescData +} + +var file_pbmesh_v1alpha1_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pbmesh_v1alpha1_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_pbmesh_v1alpha1_proxy_proto_goTypes = []interface{}{ + (ProxyMode)(0), // 0: hashicorp.consul.mesh.v1alpha1.ProxyMode + (*ProxyConfiguration)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration + (*DynamicConfig)(nil), // 2: hashicorp.consul.mesh.v1alpha1.DynamicConfig + (*TransparentProxy)(nil), // 3: hashicorp.consul.mesh.v1alpha1.TransparentProxy + (*BootstrapConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.BootstrapConfig + nil, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry + (*v1alpha1.WorkloadSelector)(nil), // 6: hashicorp.consul.catalog.v1alpha1.WorkloadSelector + (*structpb.Struct)(nil), // 7: google.protobuf.Struct + (*InboundConnectionsConfig)(nil), // 8: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig + (MeshGatewayMode)(0), // 9: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + (*ExposeConfig)(nil), // 10: hashicorp.consul.mesh.v1alpha1.ExposeConfig + (*ConnectionConfig)(nil), // 11: hashicorp.consul.mesh.v1alpha1.ConnectionConfig +} +var file_pbmesh_v1alpha1_proxy_proto_depIdxs = []int32{ + 6, // 0: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector + 2, // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.dynamic_config:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig + 4, // 2: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.bootstrap_config:type_name -> hashicorp.consul.mesh.v1alpha1.BootstrapConfig + 7, // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.opaque_config:type_name -> google.protobuf.Struct + 0, // 4: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mode:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyMode + 3, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.transparent_proxy:type_name -> hashicorp.consul.mesh.v1alpha1.TransparentProxy + 5, // 6: hashicorp.consul.mesh.v1alpha1.DynamicConfig.local_connection:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry + 8, // 7: hashicorp.consul.mesh.v1alpha1.DynamicConfig.inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig + 9, // 8: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + 10, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.expose_config:type_name -> hashicorp.consul.mesh.v1alpha1.ExposeConfig + 11, // 10: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ConnectionConfig + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_proxy_proto_init() } +func file_pbmesh_v1alpha1_proxy_proto_init() { + if File_pbmesh_v1alpha1_proxy_proto != nil { + return + } + file_pbmesh_v1alpha1_connection_proto_init() + file_pbmesh_v1alpha1_expose_proto_init() + file_pbmesh_v1alpha1_routing_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DynamicConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransparentProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_proxy_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_proxy_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_proxy_proto_depIdxs, + EnumInfos: file_pbmesh_v1alpha1_proxy_proto_enumTypes, + MessageInfos: file_pbmesh_v1alpha1_proxy_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_proxy_proto = out.File + file_pbmesh_v1alpha1_proxy_proto_rawDesc = nil + file_pbmesh_v1alpha1_proxy_proto_goTypes = nil + file_pbmesh_v1alpha1_proxy_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.proto b/proto-public/pbmesh/v1alpha1/proxy.proto similarity index 60% rename from proto-public/pbmesh/v1alpha1/proxy_configuration.proto rename to proto-public/pbmesh/v1alpha1/proxy.proto index c20ff3d47c44e..06ebecbf4abac 100644 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.proto +++ b/proto-public/pbmesh/v1alpha1/proxy.proto @@ -11,7 +11,6 @@ import "pbmesh/v1alpha1/connection.proto"; import "pbmesh/v1alpha1/expose.proto"; import "pbmesh/v1alpha1/routing.proto"; -// This is a Resource type. message ProxyConfiguration { // Selection of workloads this proxy configuration should apply to. // These can be prefixes or specific workload names. @@ -36,35 +35,28 @@ message DynamicConfig { TransparentProxy transparent_proxy = 2; - MutualTLSMode mutual_tls_mode = 3; - // local_connection is the configuration that should be used // to connect to the local application provided per-port. // The map keys should correspond to port names on the workload. - map local_connection = 4; + map local_connection = 3; // inbound_connections configures inbound connections to the proxy. - InboundConnectionsConfig inbound_connections = 5; - - MeshGatewayMode mesh_gateway_mode = 6; - - ExposeConfig expose_config = 7; + InboundConnectionsConfig inbound_connections = 4; - // AccessLogs configures the output and format of Envoy access logs - AccessLogsConfig access_logs = 8; + MeshGatewayMode mesh_gateway_mode = 5; - repeated EnvoyExtension envoy_extensions = 9; + ExposeConfig expose_config = 6; - string public_listener_json = 10; - string listener_tracing_json = 11; - string local_cluster_json = 12; + string public_listener_json = 7; + string listener_tracing_json = 8; + string local_cluster_json = 9; // deprecated: // local_workload_address, local_workload_port, and local_workload_socket_path // are deprecated and are only needed for migration of existing resources. - string local_workload_address = 13 [deprecated = true]; - uint32 local_workload_port = 14 [deprecated = true]; - string local_workload_socket_path = 15 [deprecated = true]; + string local_workload_address = 10 [deprecated = true]; + uint32 local_workload_port = 11 [deprecated = true]; + string local_workload_socket_path = 12 [deprecated = true]; } message TransparentProxy { @@ -110,49 +102,3 @@ enum ProxyMode { // by the local application and other proxies. PROXY_MODE_DIRECT = 2; } - -// AccessLogsConfig contains the associated default settings for all Envoy -// instances within the datacenter or partition -message AccessLogsConfig { - // Enabled turns off all access logging - bool enabled = 1; - - // DisableListenerLogs turns off just listener logs for connections rejected by Envoy because they don't - // have a matching listener filter. - bool disable_listener_logs = 2; - - // Type selects the output for logs: "file", "stderr". "stdout" - LogSinkType type = 3; - - // Path is the output file to write logs - string path = 4; - - // The presence of one format string or the other implies the access log string encoding. - // Defining Both is invalid. - string json_format = 5; - string text_format = 6; -} - -enum LogSinkType { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - LOG_SINK_TYPE_DEFAULT = 0; - LOG_SINK_TYPE_FILE = 1; - LOG_SINK_TYPE_STDERR = 2; - LOG_SINK_TYPE_STDOUT = 3; -} - -// EnvoyExtension has configuration for an extension that patches Envoy resources. -message EnvoyExtension { - string name = 1; - bool required = 2; - google.protobuf.Struct arguments = 3; - string consul_version = 4; - string envoy_version = 5; -} - -enum MutualTLSMode { - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - MUTUAL_TLS_MODE_DEFAULT = 0; - MUTUAL_TLS_MODE_STRICT = 1; - MUTUAL_TLS_MODE_PERMISSIVE = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go b/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go deleted file mode 100644 index 0072714553dad..0000000000000 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go +++ /dev/null @@ -1,1214 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/proxy_configuration.proto - -package meshv1alpha1 - -import ( - v1alpha1 "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ProxyMode int32 - -const ( - // ProxyModeDefault represents no specific mode and should - // be used to indicate that a different layer of the configuration - // chain should take precedence - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - ProxyMode_PROXY_MODE_DEFAULT ProxyMode = 0 - // ProxyModeTransparent represents that inbound and outbound application - // traffic is being captured and redirected through the proxy. - ProxyMode_PROXY_MODE_TRANSPARENT ProxyMode = 1 - // ProxyModeDirect represents that the proxy's listeners must be dialed directly - // by the local application and other proxies. - ProxyMode_PROXY_MODE_DIRECT ProxyMode = 2 -) - -// Enum value maps for ProxyMode. -var ( - ProxyMode_name = map[int32]string{ - 0: "PROXY_MODE_DEFAULT", - 1: "PROXY_MODE_TRANSPARENT", - 2: "PROXY_MODE_DIRECT", - } - ProxyMode_value = map[string]int32{ - "PROXY_MODE_DEFAULT": 0, - "PROXY_MODE_TRANSPARENT": 1, - "PROXY_MODE_DIRECT": 2, - } -) - -func (x ProxyMode) Enum() *ProxyMode { - p := new(ProxyMode) - *p = x - return p -} - -func (x ProxyMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProxyMode) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[0].Descriptor() -} - -func (ProxyMode) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[0] -} - -func (x ProxyMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProxyMode.Descriptor instead. -func (ProxyMode) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{0} -} - -type LogSinkType int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - LogSinkType_LOG_SINK_TYPE_DEFAULT LogSinkType = 0 - LogSinkType_LOG_SINK_TYPE_FILE LogSinkType = 1 - LogSinkType_LOG_SINK_TYPE_STDERR LogSinkType = 2 - LogSinkType_LOG_SINK_TYPE_STDOUT LogSinkType = 3 -) - -// Enum value maps for LogSinkType. -var ( - LogSinkType_name = map[int32]string{ - 0: "LOG_SINK_TYPE_DEFAULT", - 1: "LOG_SINK_TYPE_FILE", - 2: "LOG_SINK_TYPE_STDERR", - 3: "LOG_SINK_TYPE_STDOUT", - } - LogSinkType_value = map[string]int32{ - "LOG_SINK_TYPE_DEFAULT": 0, - "LOG_SINK_TYPE_FILE": 1, - "LOG_SINK_TYPE_STDERR": 2, - "LOG_SINK_TYPE_STDOUT": 3, - } -) - -func (x LogSinkType) Enum() *LogSinkType { - p := new(LogSinkType) - *p = x - return p -} - -func (x LogSinkType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LogSinkType) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[1].Descriptor() -} - -func (LogSinkType) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[1] -} - -func (x LogSinkType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LogSinkType.Descriptor instead. -func (LogSinkType) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{1} -} - -type MutualTLSMode int32 - -const ( - // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX - MutualTLSMode_MUTUAL_TLS_MODE_DEFAULT MutualTLSMode = 0 - MutualTLSMode_MUTUAL_TLS_MODE_STRICT MutualTLSMode = 1 - MutualTLSMode_MUTUAL_TLS_MODE_PERMISSIVE MutualTLSMode = 2 -) - -// Enum value maps for MutualTLSMode. -var ( - MutualTLSMode_name = map[int32]string{ - 0: "MUTUAL_TLS_MODE_DEFAULT", - 1: "MUTUAL_TLS_MODE_STRICT", - 2: "MUTUAL_TLS_MODE_PERMISSIVE", - } - MutualTLSMode_value = map[string]int32{ - "MUTUAL_TLS_MODE_DEFAULT": 0, - "MUTUAL_TLS_MODE_STRICT": 1, - "MUTUAL_TLS_MODE_PERMISSIVE": 2, - } -) - -func (x MutualTLSMode) Enum() *MutualTLSMode { - p := new(MutualTLSMode) - *p = x - return p -} - -func (x MutualTLSMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MutualTLSMode) Descriptor() protoreflect.EnumDescriptor { - return file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[2].Descriptor() -} - -func (MutualTLSMode) Type() protoreflect.EnumType { - return &file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[2] -} - -func (x MutualTLSMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use MutualTLSMode.Descriptor instead. -func (MutualTLSMode) EnumDescriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{2} -} - -// This is a Resource type. -type ProxyConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selection of workloads this proxy configuration should apply to. - // These can be prefixes or specific workload names. - Workloads *v1alpha1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` - // dynamic_config is the configuration that could be changed - // dynamically (i.e. without needing restart). - DynamicConfig *DynamicConfig `protobuf:"bytes,2,opt,name=dynamic_config,json=dynamicConfig,proto3" json:"dynamic_config,omitempty"` - // bootstrap_config is the configuration that requires proxies - // to be restarted to be applied. - BootstrapConfig *BootstrapConfig `protobuf:"bytes,3,opt,name=bootstrap_config,json=bootstrapConfig,proto3" json:"bootstrap_config,omitempty"` - // deprecated: prevent usage when using v2 APIs directly. - // needed for backwards compatibility - // - // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - OpaqueConfig *structpb.Struct `protobuf:"bytes,4,opt,name=opaque_config,json=opaqueConfig,proto3" json:"opaque_config,omitempty"` -} - -func (x *ProxyConfiguration) Reset() { - *x = ProxyConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyConfiguration) ProtoMessage() {} - -func (x *ProxyConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyConfiguration.ProtoReflect.Descriptor instead. -func (*ProxyConfiguration) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{0} -} - -func (x *ProxyConfiguration) GetWorkloads() *v1alpha1.WorkloadSelector { - if x != nil { - return x.Workloads - } - return nil -} - -func (x *ProxyConfiguration) GetDynamicConfig() *DynamicConfig { - if x != nil { - return x.DynamicConfig - } - return nil -} - -func (x *ProxyConfiguration) GetBootstrapConfig() *BootstrapConfig { - if x != nil { - return x.BootstrapConfig - } - return nil -} - -// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. -func (x *ProxyConfiguration) GetOpaqueConfig() *structpb.Struct { - if x != nil { - return x.OpaqueConfig - } - return nil -} - -type DynamicConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // mode indicates the proxy's mode. This will default to 'transparent'. - Mode ProxyMode `protobuf:"varint,1,opt,name=mode,proto3,enum=hashicorp.consul.mesh.v1alpha1.ProxyMode" json:"mode,omitempty"` - TransparentProxy *TransparentProxy `protobuf:"bytes,2,opt,name=transparent_proxy,json=transparentProxy,proto3" json:"transparent_proxy,omitempty"` - MutualTlsMode MutualTLSMode `protobuf:"varint,3,opt,name=mutual_tls_mode,json=mutualTlsMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MutualTLSMode" json:"mutual_tls_mode,omitempty"` - // local_connection is the configuration that should be used - // to connect to the local application provided per-port. - // The map keys should correspond to port names on the workload. - LocalConnection map[string]*ConnectionConfig `protobuf:"bytes,4,rep,name=local_connection,json=localConnection,proto3" json:"local_connection,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // inbound_connections configures inbound connections to the proxy. - InboundConnections *InboundConnectionsConfig `protobuf:"bytes,5,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` - MeshGatewayMode MeshGatewayMode `protobuf:"varint,6,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` - ExposeConfig *ExposeConfig `protobuf:"bytes,7,opt,name=expose_config,json=exposeConfig,proto3" json:"expose_config,omitempty"` - // AccessLogs configures the output and format of Envoy access logs - AccessLogs *AccessLogsConfig `protobuf:"bytes,8,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs,omitempty"` - EnvoyExtensions []*EnvoyExtension `protobuf:"bytes,9,rep,name=envoy_extensions,json=envoyExtensions,proto3" json:"envoy_extensions,omitempty"` - PublicListenerJson string `protobuf:"bytes,10,opt,name=public_listener_json,json=publicListenerJson,proto3" json:"public_listener_json,omitempty"` - ListenerTracingJson string `protobuf:"bytes,11,opt,name=listener_tracing_json,json=listenerTracingJson,proto3" json:"listener_tracing_json,omitempty"` - LocalClusterJson string `protobuf:"bytes,12,opt,name=local_cluster_json,json=localClusterJson,proto3" json:"local_cluster_json,omitempty"` - // deprecated: - // local_workload_address, local_workload_port, and local_workload_socket_path - // are deprecated and are only needed for migration of existing resources. - // - // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadAddress string `protobuf:"bytes,13,opt,name=local_workload_address,json=localWorkloadAddress,proto3" json:"local_workload_address,omitempty"` - // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadPort uint32 `protobuf:"varint,14,opt,name=local_workload_port,json=localWorkloadPort,proto3" json:"local_workload_port,omitempty"` - // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadSocketPath string `protobuf:"bytes,15,opt,name=local_workload_socket_path,json=localWorkloadSocketPath,proto3" json:"local_workload_socket_path,omitempty"` -} - -func (x *DynamicConfig) Reset() { - *x = DynamicConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicConfig) ProtoMessage() {} - -func (x *DynamicConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicConfig.ProtoReflect.Descriptor instead. -func (*DynamicConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{1} -} - -func (x *DynamicConfig) GetMode() ProxyMode { - if x != nil { - return x.Mode - } - return ProxyMode_PROXY_MODE_DEFAULT -} - -func (x *DynamicConfig) GetTransparentProxy() *TransparentProxy { - if x != nil { - return x.TransparentProxy - } - return nil -} - -func (x *DynamicConfig) GetMutualTlsMode() MutualTLSMode { - if x != nil { - return x.MutualTlsMode - } - return MutualTLSMode_MUTUAL_TLS_MODE_DEFAULT -} - -func (x *DynamicConfig) GetLocalConnection() map[string]*ConnectionConfig { - if x != nil { - return x.LocalConnection - } - return nil -} - -func (x *DynamicConfig) GetInboundConnections() *InboundConnectionsConfig { - if x != nil { - return x.InboundConnections - } - return nil -} - -func (x *DynamicConfig) GetMeshGatewayMode() MeshGatewayMode { - if x != nil { - return x.MeshGatewayMode - } - return MeshGatewayMode_MESH_GATEWAY_MODE_UNSPECIFIED -} - -func (x *DynamicConfig) GetExposeConfig() *ExposeConfig { - if x != nil { - return x.ExposeConfig - } - return nil -} - -func (x *DynamicConfig) GetAccessLogs() *AccessLogsConfig { - if x != nil { - return x.AccessLogs - } - return nil -} - -func (x *DynamicConfig) GetEnvoyExtensions() []*EnvoyExtension { - if x != nil { - return x.EnvoyExtensions - } - return nil -} - -func (x *DynamicConfig) GetPublicListenerJson() string { - if x != nil { - return x.PublicListenerJson - } - return "" -} - -func (x *DynamicConfig) GetListenerTracingJson() string { - if x != nil { - return x.ListenerTracingJson - } - return "" -} - -func (x *DynamicConfig) GetLocalClusterJson() string { - if x != nil { - return x.LocalClusterJson - } - return "" -} - -// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. -func (x *DynamicConfig) GetLocalWorkloadAddress() string { - if x != nil { - return x.LocalWorkloadAddress - } - return "" -} - -// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. -func (x *DynamicConfig) GetLocalWorkloadPort() uint32 { - if x != nil { - return x.LocalWorkloadPort - } - return 0 -} - -// Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. -func (x *DynamicConfig) GetLocalWorkloadSocketPath() string { - if x != nil { - return x.LocalWorkloadSocketPath - } - return "" -} - -type TransparentProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // outbound_listener_port is the port for the proxy's outbound listener. - // This defaults to 15001. - OutboundListenerPort uint32 `protobuf:"varint,1,opt,name=outbound_listener_port,json=outboundListenerPort,proto3" json:"outbound_listener_port,omitempty"` - // dialed_directly indicates whether this proxy should be dialed using original destination IP - // in the connection rather than load balance between all endpoints. - DialedDirectly bool `protobuf:"varint,2,opt,name=dialed_directly,json=dialedDirectly,proto3" json:"dialed_directly,omitempty"` -} - -func (x *TransparentProxy) Reset() { - *x = TransparentProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransparentProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransparentProxy) ProtoMessage() {} - -func (x *TransparentProxy) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransparentProxy.ProtoReflect.Descriptor instead. -func (*TransparentProxy) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{2} -} - -func (x *TransparentProxy) GetOutboundListenerPort() uint32 { - if x != nil { - return x.OutboundListenerPort - } - return 0 -} - -func (x *TransparentProxy) GetDialedDirectly() bool { - if x != nil { - return x.DialedDirectly - } - return false -} - -// BootstrapConfig is equivalent to configuration defined -// in our docs. -type BootstrapConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StatsdUrl string `protobuf:"bytes,1,opt,name=statsd_url,json=statsdUrl,proto3" json:"statsd_url,omitempty"` - DogstatsdUrl string `protobuf:"bytes,2,opt,name=dogstatsd_url,json=dogstatsdUrl,proto3" json:"dogstatsd_url,omitempty"` - StatsTags []string `protobuf:"bytes,3,rep,name=stats_tags,json=statsTags,proto3" json:"stats_tags,omitempty"` - PrometheusBindAddr string `protobuf:"bytes,4,opt,name=prometheus_bind_addr,json=prometheusBindAddr,proto3" json:"prometheus_bind_addr,omitempty"` - StatsBindAddr string `protobuf:"bytes,5,opt,name=stats_bind_addr,json=statsBindAddr,proto3" json:"stats_bind_addr,omitempty"` - ReadyBindAddr string `protobuf:"bytes,6,opt,name=ready_bind_addr,json=readyBindAddr,proto3" json:"ready_bind_addr,omitempty"` - OverrideJsonTpl string `protobuf:"bytes,7,opt,name=override_json_tpl,json=overrideJsonTpl,proto3" json:"override_json_tpl,omitempty"` - StaticClustersJson string `protobuf:"bytes,8,opt,name=static_clusters_json,json=staticClustersJson,proto3" json:"static_clusters_json,omitempty"` - StaticListenersJson string `protobuf:"bytes,9,opt,name=static_listeners_json,json=staticListenersJson,proto3" json:"static_listeners_json,omitempty"` - StatsSinksJson string `protobuf:"bytes,10,opt,name=stats_sinks_json,json=statsSinksJson,proto3" json:"stats_sinks_json,omitempty"` - StatsConfigJson string `protobuf:"bytes,11,opt,name=stats_config_json,json=statsConfigJson,proto3" json:"stats_config_json,omitempty"` - StatsFlushInterval string `protobuf:"bytes,12,opt,name=stats_flush_interval,json=statsFlushInterval,proto3" json:"stats_flush_interval,omitempty"` - TracingConfigJson string `protobuf:"bytes,13,opt,name=tracing_config_json,json=tracingConfigJson,proto3" json:"tracing_config_json,omitempty"` -} - -func (x *BootstrapConfig) Reset() { - *x = BootstrapConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BootstrapConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BootstrapConfig) ProtoMessage() {} - -func (x *BootstrapConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BootstrapConfig.ProtoReflect.Descriptor instead. -func (*BootstrapConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{3} -} - -func (x *BootstrapConfig) GetStatsdUrl() string { - if x != nil { - return x.StatsdUrl - } - return "" -} - -func (x *BootstrapConfig) GetDogstatsdUrl() string { - if x != nil { - return x.DogstatsdUrl - } - return "" -} - -func (x *BootstrapConfig) GetStatsTags() []string { - if x != nil { - return x.StatsTags - } - return nil -} - -func (x *BootstrapConfig) GetPrometheusBindAddr() string { - if x != nil { - return x.PrometheusBindAddr - } - return "" -} - -func (x *BootstrapConfig) GetStatsBindAddr() string { - if x != nil { - return x.StatsBindAddr - } - return "" -} - -func (x *BootstrapConfig) GetReadyBindAddr() string { - if x != nil { - return x.ReadyBindAddr - } - return "" -} - -func (x *BootstrapConfig) GetOverrideJsonTpl() string { - if x != nil { - return x.OverrideJsonTpl - } - return "" -} - -func (x *BootstrapConfig) GetStaticClustersJson() string { - if x != nil { - return x.StaticClustersJson - } - return "" -} - -func (x *BootstrapConfig) GetStaticListenersJson() string { - if x != nil { - return x.StaticListenersJson - } - return "" -} - -func (x *BootstrapConfig) GetStatsSinksJson() string { - if x != nil { - return x.StatsSinksJson - } - return "" -} - -func (x *BootstrapConfig) GetStatsConfigJson() string { - if x != nil { - return x.StatsConfigJson - } - return "" -} - -func (x *BootstrapConfig) GetStatsFlushInterval() string { - if x != nil { - return x.StatsFlushInterval - } - return "" -} - -func (x *BootstrapConfig) GetTracingConfigJson() string { - if x != nil { - return x.TracingConfigJson - } - return "" -} - -// AccessLogsConfig contains the associated default settings for all Envoy -// instances within the datacenter or partition -type AccessLogsConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Enabled turns off all access logging - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // DisableListenerLogs turns off just listener logs for connections rejected by Envoy because they don't - // have a matching listener filter. - DisableListenerLogs bool `protobuf:"varint,2,opt,name=disable_listener_logs,json=disableListenerLogs,proto3" json:"disable_listener_logs,omitempty"` - // Type selects the output for logs: "file", "stderr". "stdout" - Type LogSinkType `protobuf:"varint,3,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.LogSinkType" json:"type,omitempty"` - // Path is the output file to write logs - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` - // The presence of one format string or the other implies the access log string encoding. - // Defining Both is invalid. - JsonFormat string `protobuf:"bytes,5,opt,name=json_format,json=jsonFormat,proto3" json:"json_format,omitempty"` - TextFormat string `protobuf:"bytes,6,opt,name=text_format,json=textFormat,proto3" json:"text_format,omitempty"` -} - -func (x *AccessLogsConfig) Reset() { - *x = AccessLogsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLogsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLogsConfig) ProtoMessage() {} - -func (x *AccessLogsConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLogsConfig.ProtoReflect.Descriptor instead. -func (*AccessLogsConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{4} -} - -func (x *AccessLogsConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *AccessLogsConfig) GetDisableListenerLogs() bool { - if x != nil { - return x.DisableListenerLogs - } - return false -} - -func (x *AccessLogsConfig) GetType() LogSinkType { - if x != nil { - return x.Type - } - return LogSinkType_LOG_SINK_TYPE_DEFAULT -} - -func (x *AccessLogsConfig) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *AccessLogsConfig) GetJsonFormat() string { - if x != nil { - return x.JsonFormat - } - return "" -} - -func (x *AccessLogsConfig) GetTextFormat() string { - if x != nil { - return x.TextFormat - } - return "" -} - -// EnvoyExtension has configuration for an extension that patches Envoy resources. -type EnvoyExtension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` - Arguments *structpb.Struct `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` - ConsulVersion string `protobuf:"bytes,4,opt,name=consul_version,json=consulVersion,proto3" json:"consul_version,omitempty"` - EnvoyVersion string `protobuf:"bytes,5,opt,name=envoy_version,json=envoyVersion,proto3" json:"envoy_version,omitempty"` -} - -func (x *EnvoyExtension) Reset() { - *x = EnvoyExtension{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnvoyExtension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnvoyExtension) ProtoMessage() {} - -func (x *EnvoyExtension) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnvoyExtension.ProtoReflect.Descriptor instead. -func (*EnvoyExtension) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{5} -} - -func (x *EnvoyExtension) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *EnvoyExtension) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -func (x *EnvoyExtension) GetArguments() *structpb.Struct { - if x != nil { - return x.Arguments - } - return nil -} - -func (x *EnvoyExtension) GetConsulVersion() string { - if x != nil { - return x.ConsulVersion - } - return "" -} - -func (x *EnvoyExtension) GetEnvoyVersion() string { - if x != nil { - return x.EnvoyVersion - } - return "" -} - -var File_pbmesh_v1alpha1_proxy_configuration_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x62, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x62, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x62, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x12, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, - 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x10, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x0d, 0x6f, 0x70, 0x61, 0x71, 0x75, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x61, - 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xf5, 0x09, 0x0a, 0x0d, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x55, 0x0a, 0x0f, 0x6d, 0x75, 0x74, - 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, - 0x65, 0x52, 0x0d, 0x6d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x6c, 0x73, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x6d, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x69, 0x0a, 0x13, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6d, 0x65, - 0x73, 0x68, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x78, - 0x70, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x0b, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x59, 0x0a, - 0x10, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6a, - 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2c, - 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x16, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, - 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x1a, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x74, 0x0a, 0x14, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x71, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, - 0x69, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6c, 0x79, 0x22, 0xc0, 0x04, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x67, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x64, 0x6f, 0x67, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, - 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x6d, 0x65, - 0x74, 0x68, 0x65, 0x75, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, - 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x69, 0x6e, - 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x62, - 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, - 0x11, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, - 0x70, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x70, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x5f, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, - 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x6a, - 0x73, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x53, 0x69, 0x6e, 0x6b, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, - 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0xf7, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x1f, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x56, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, - 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x58, - 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 0x2a, - 0x74, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, - 0x0a, 0x15, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, - 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, - 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x4c, - 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, - 0x4f, 0x55, 0x54, 0x10, 0x03, 0x2a, 0x68, 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, - 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, - 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, - 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x54, 0x4c, - 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x10, 0x01, 0x12, - 0x1e, 0x0a, 0x1a, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x02, 0x42, - 0x9f, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x17, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, - 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, - 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, - 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescData = file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc -) - -func file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescData -} - -var file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_pbmesh_v1alpha1_proxy_configuration_proto_goTypes = []interface{}{ - (ProxyMode)(0), // 0: hashicorp.consul.mesh.v1alpha1.ProxyMode - (LogSinkType)(0), // 1: hashicorp.consul.mesh.v1alpha1.LogSinkType - (MutualTLSMode)(0), // 2: hashicorp.consul.mesh.v1alpha1.MutualTLSMode - (*ProxyConfiguration)(nil), // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration - (*DynamicConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.DynamicConfig - (*TransparentProxy)(nil), // 5: hashicorp.consul.mesh.v1alpha1.TransparentProxy - (*BootstrapConfig)(nil), // 6: hashicorp.consul.mesh.v1alpha1.BootstrapConfig - (*AccessLogsConfig)(nil), // 7: hashicorp.consul.mesh.v1alpha1.AccessLogsConfig - (*EnvoyExtension)(nil), // 8: hashicorp.consul.mesh.v1alpha1.EnvoyExtension - nil, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry - (*v1alpha1.WorkloadSelector)(nil), // 10: hashicorp.consul.catalog.v1alpha1.WorkloadSelector - (*structpb.Struct)(nil), // 11: google.protobuf.Struct - (*InboundConnectionsConfig)(nil), // 12: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig - (MeshGatewayMode)(0), // 13: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - (*ExposeConfig)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ExposeConfig - (*ConnectionConfig)(nil), // 15: hashicorp.consul.mesh.v1alpha1.ConnectionConfig -} -var file_pbmesh_v1alpha1_proxy_configuration_proto_depIdxs = []int32{ - 10, // 0: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector - 4, // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.dynamic_config:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig - 6, // 2: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.bootstrap_config:type_name -> hashicorp.consul.mesh.v1alpha1.BootstrapConfig - 11, // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.opaque_config:type_name -> google.protobuf.Struct - 0, // 4: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mode:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyMode - 5, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.transparent_proxy:type_name -> hashicorp.consul.mesh.v1alpha1.TransparentProxy - 2, // 6: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mutual_tls_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MutualTLSMode - 9, // 7: hashicorp.consul.mesh.v1alpha1.DynamicConfig.local_connection:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry - 12, // 8: hashicorp.consul.mesh.v1alpha1.DynamicConfig.inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig - 13, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - 14, // 10: hashicorp.consul.mesh.v1alpha1.DynamicConfig.expose_config:type_name -> hashicorp.consul.mesh.v1alpha1.ExposeConfig - 7, // 11: hashicorp.consul.mesh.v1alpha1.DynamicConfig.access_logs:type_name -> hashicorp.consul.mesh.v1alpha1.AccessLogsConfig - 8, // 12: hashicorp.consul.mesh.v1alpha1.DynamicConfig.envoy_extensions:type_name -> hashicorp.consul.mesh.v1alpha1.EnvoyExtension - 1, // 13: hashicorp.consul.mesh.v1alpha1.AccessLogsConfig.type:type_name -> hashicorp.consul.mesh.v1alpha1.LogSinkType - 11, // 14: hashicorp.consul.mesh.v1alpha1.EnvoyExtension.arguments:type_name -> google.protobuf.Struct - 15, // 15: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ConnectionConfig - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_proxy_configuration_proto_init() } -func file_pbmesh_v1alpha1_proxy_configuration_proto_init() { - if File_pbmesh_v1alpha1_proxy_configuration_proto != nil { - return - } - file_pbmesh_v1alpha1_connection_proto_init() - file_pbmesh_v1alpha1_expose_proto_init() - file_pbmesh_v1alpha1_routing_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransparentProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootstrapConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLogsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnvoyExtension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc, - NumEnums: 3, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_proxy_configuration_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_proxy_configuration_proto_depIdxs, - EnumInfos: file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes, - MessageInfos: file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_proxy_configuration_proto = out.File - file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc = nil - file_pbmesh_v1alpha1_proxy_configuration_proto_goTypes = nil - file_pbmesh_v1alpha1_proxy_configuration_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/proxy_state.pb.binary.go b/proto-public/pbmesh/v1alpha1/proxy_state.pb.binary.go deleted file mode 100644 index 747ffba080448..0000000000000 --- a/proto-public/pbmesh/v1alpha1/proxy_state.pb.binary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/proxy_state.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ProxyStateTemplate) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ProxyStateTemplate) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *ProxyState) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *ProxyState) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/proxy_state.pb.go b/proto-public/pbmesh/v1alpha1/proxy_state.pb.go deleted file mode 100644 index 59337a5fffbce..0000000000000 --- a/proto-public/pbmesh/v1alpha1/proxy_state.pb.go +++ /dev/null @@ -1,563 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/proxy_state.proto - -package meshv1alpha1 - -import ( - pbproxystate "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1/pbproxystate" - pbresource "github.com/hashicorp/consul/proto-public/pbresource" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ProxyStateTemplate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proxy_state is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. - ProxyState *ProxyState `protobuf:"bytes,1,opt,name=proxy_state,json=proxyState,proto3" json:"proxy_state,omitempty"` - // required_endpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. - RequiredEndpoints map[string]*pbproxystate.EndpointRef `protobuf:"bytes,2,rep,name=required_endpoints,json=requiredEndpoints,proto3" json:"required_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // required_leaf_certificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. - RequiredLeafCertificates map[string]*pbproxystate.LeafCertificateRef `protobuf:"bytes,3,rep,name=required_leaf_certificates,json=requiredLeafCertificates,proto3" json:"required_leaf_certificates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // required_trust_bundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. - RequiredTrustBundles map[string]*pbproxystate.TrustBundleRef `protobuf:"bytes,4,rep,name=required_trust_bundles,json=requiredTrustBundles,proto3" json:"required_trust_bundles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ProxyStateTemplate) Reset() { - *x = ProxyStateTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyStateTemplate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyStateTemplate) ProtoMessage() {} - -func (x *ProxyStateTemplate) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyStateTemplate.ProtoReflect.Descriptor instead. -func (*ProxyStateTemplate) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_state_proto_rawDescGZIP(), []int{0} -} - -func (x *ProxyStateTemplate) GetProxyState() *ProxyState { - if x != nil { - return x.ProxyState - } - return nil -} - -func (x *ProxyStateTemplate) GetRequiredEndpoints() map[string]*pbproxystate.EndpointRef { - if x != nil { - return x.RequiredEndpoints - } - return nil -} - -func (x *ProxyStateTemplate) GetRequiredLeafCertificates() map[string]*pbproxystate.LeafCertificateRef { - if x != nil { - return x.RequiredLeafCertificates - } - return nil -} - -func (x *ProxyStateTemplate) GetRequiredTrustBundles() map[string]*pbproxystate.TrustBundleRef { - if x != nil { - return x.RequiredTrustBundles - } - return nil -} - -type ProxyState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // identity is a reference to the identity of the workload this proxy is for. - Identity *pbresource.Reference `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - // listeners is a list of listeners for this proxy. - Listeners []*pbproxystate.Listener `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"` - // clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. - Clusters map[string]*pbproxystate.Cluster `protobuf:"bytes,3,rep,name=clusters,proto3" json:"clusters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // routes is a map from route name to routes. The keys are referenced from listeners. - Routes map[string]*pbproxystate.Route `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // endpoints is a map from cluster name to endpoints. - Endpoints map[string]*pbproxystate.Endpoints `protobuf:"bytes,5,rep,name=endpoints,proto3" json:"endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // leaf certificates is a map from UUID to leaf certificates. - LeafCertificates map[string]*pbproxystate.LeafCertificate `protobuf:"bytes,6,rep,name=leaf_certificates,json=leafCertificates,proto3" json:"leaf_certificates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // trust bundles is a map from peer name to trust bundles. - TrustBundles map[string]*pbproxystate.TrustBundle `protobuf:"bytes,7,rep,name=trust_bundles,json=trustBundles,proto3" json:"trust_bundles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // tls has TLS configuration for this proxy. - Tls *pbproxystate.TLS `protobuf:"bytes,8,opt,name=tls,proto3" json:"tls,omitempty"` - // intention_default_allow is the default action for intentions. This determines how the Envoy RBAC filters are generated. - IntentionDefaultAllow bool `protobuf:"varint,9,opt,name=intention_default_allow,json=intentionDefaultAllow,proto3" json:"intention_default_allow,omitempty"` - // escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. - Escape *pbproxystate.EscapeHatches `protobuf:"bytes,10,opt,name=escape,proto3" json:"escape,omitempty"` - // access_logs configures access logging for this proxy. - AccessLogs *pbproxystate.AccessLogs `protobuf:"bytes,11,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs,omitempty"` -} - -func (x *ProxyState) Reset() { - *x = ProxyState{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyState) ProtoMessage() {} - -func (x *ProxyState) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyState.ProtoReflect.Descriptor instead. -func (*ProxyState) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_proxy_state_proto_rawDescGZIP(), []int{1} -} - -func (x *ProxyState) GetIdentity() *pbresource.Reference { - if x != nil { - return x.Identity - } - return nil -} - -func (x *ProxyState) GetListeners() []*pbproxystate.Listener { - if x != nil { - return x.Listeners - } - return nil -} - -func (x *ProxyState) GetClusters() map[string]*pbproxystate.Cluster { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *ProxyState) GetRoutes() map[string]*pbproxystate.Route { - if x != nil { - return x.Routes - } - return nil -} - -func (x *ProxyState) GetEndpoints() map[string]*pbproxystate.Endpoints { - if x != nil { - return x.Endpoints - } - return nil -} - -func (x *ProxyState) GetLeafCertificates() map[string]*pbproxystate.LeafCertificate { - if x != nil { - return x.LeafCertificates - } - return nil -} - -func (x *ProxyState) GetTrustBundles() map[string]*pbproxystate.TrustBundle { - if x != nil { - return x.TrustBundles - } - return nil -} - -func (x *ProxyState) GetTls() *pbproxystate.TLS { - if x != nil { - return x.Tls - } - return nil -} - -func (x *ProxyState) GetIntentionDefaultAllow() bool { - if x != nil { - return x.IntentionDefaultAllow - } - return false -} - -func (x *ProxyState) GetEscape() *pbproxystate.EscapeHatches { - if x != nil { - return x.Escape - } - return nil -} - -func (x *ProxyState) GetAccessLogs() *pbproxystate.AccessLogs { - if x != nil { - return x.AccessLogs - } - return nil -} - -var File_pbmesh_v1alpha1_proxy_state_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_proxy_state_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x70, - 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x65, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x5f, 0x68, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2b, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x70, - 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x70, 0x62, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x70, 0x62, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x07, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x12, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x54, 0x72, - 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x1a, 0x7e, 0x0a, 0x16, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8c, 0x01, 0x0a, 0x1d, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x55, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x65, 0x61, 0x66, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x84, 0x01, 0x0a, 0x19, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x51, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xf5, 0x0b, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x40, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x12, 0x53, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x06, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x09, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6d, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x65, 0x61, - 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x0d, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x12, 0x52, 0x0a, 0x06, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x48, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x52, - 0x06, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x73, 0x1a, 0x71, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6d, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x74, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x81, 0x01, 0x0a, 0x15, 0x4c, 0x65, - 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x79, 0x0a, - 0x11, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x97, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x0f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, - 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, - 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_proxy_state_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_proxy_state_proto_rawDescData = file_pbmesh_v1alpha1_proxy_state_proto_rawDesc -) - -func file_pbmesh_v1alpha1_proxy_state_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_proxy_state_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_proxy_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_proxy_state_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_proxy_state_proto_rawDescData -} - -var file_pbmesh_v1alpha1_proxy_state_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_pbmesh_v1alpha1_proxy_state_proto_goTypes = []interface{}{ - (*ProxyStateTemplate)(nil), // 0: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate - (*ProxyState)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ProxyState - nil, // 2: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredEndpointsEntry - nil, // 3: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredLeafCertificatesEntry - nil, // 4: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredTrustBundlesEntry - nil, // 5: hashicorp.consul.mesh.v1alpha1.ProxyState.ClustersEntry - nil, // 6: hashicorp.consul.mesh.v1alpha1.ProxyState.RoutesEntry - nil, // 7: hashicorp.consul.mesh.v1alpha1.ProxyState.EndpointsEntry - nil, // 8: hashicorp.consul.mesh.v1alpha1.ProxyState.LeafCertificatesEntry - nil, // 9: hashicorp.consul.mesh.v1alpha1.ProxyState.TrustBundlesEntry - (*pbresource.Reference)(nil), // 10: hashicorp.consul.resource.Reference - (*pbproxystate.Listener)(nil), // 11: hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener - (*pbproxystate.TLS)(nil), // 12: hashicorp.consul.mesh.v1alpha1.pbproxystate.TLS - (*pbproxystate.EscapeHatches)(nil), // 13: hashicorp.consul.mesh.v1alpha1.pbproxystate.EscapeHatches - (*pbproxystate.AccessLogs)(nil), // 14: hashicorp.consul.mesh.v1alpha1.pbproxystate.AccessLogs - (*pbproxystate.EndpointRef)(nil), // 15: hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointRef - (*pbproxystate.LeafCertificateRef)(nil), // 16: hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificateRef - (*pbproxystate.TrustBundleRef)(nil), // 17: hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundleRef - (*pbproxystate.Cluster)(nil), // 18: hashicorp.consul.mesh.v1alpha1.pbproxystate.Cluster - (*pbproxystate.Route)(nil), // 19: hashicorp.consul.mesh.v1alpha1.pbproxystate.Route - (*pbproxystate.Endpoints)(nil), // 20: hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoints - (*pbproxystate.LeafCertificate)(nil), // 21: hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificate - (*pbproxystate.TrustBundle)(nil), // 22: hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundle -} -var file_pbmesh_v1alpha1_proxy_state_proto_depIdxs = []int32{ - 1, // 0: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.proxy_state:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState - 2, // 1: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.required_endpoints:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredEndpointsEntry - 3, // 2: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.required_leaf_certificates:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredLeafCertificatesEntry - 4, // 3: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.required_trust_bundles:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredTrustBundlesEntry - 10, // 4: hashicorp.consul.mesh.v1alpha1.ProxyState.identity:type_name -> hashicorp.consul.resource.Reference - 11, // 5: hashicorp.consul.mesh.v1alpha1.ProxyState.listeners:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Listener - 5, // 6: hashicorp.consul.mesh.v1alpha1.ProxyState.clusters:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState.ClustersEntry - 6, // 7: hashicorp.consul.mesh.v1alpha1.ProxyState.routes:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState.RoutesEntry - 7, // 8: hashicorp.consul.mesh.v1alpha1.ProxyState.endpoints:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState.EndpointsEntry - 8, // 9: hashicorp.consul.mesh.v1alpha1.ProxyState.leaf_certificates:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState.LeafCertificatesEntry - 9, // 10: hashicorp.consul.mesh.v1alpha1.ProxyState.trust_bundles:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyState.TrustBundlesEntry - 12, // 11: hashicorp.consul.mesh.v1alpha1.ProxyState.tls:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TLS - 13, // 12: hashicorp.consul.mesh.v1alpha1.ProxyState.escape:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.EscapeHatches - 14, // 13: hashicorp.consul.mesh.v1alpha1.ProxyState.access_logs:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.AccessLogs - 15, // 14: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredEndpointsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.EndpointRef - 16, // 15: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredLeafCertificatesEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificateRef - 17, // 16: hashicorp.consul.mesh.v1alpha1.ProxyStateTemplate.RequiredTrustBundlesEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundleRef - 18, // 17: hashicorp.consul.mesh.v1alpha1.ProxyState.ClustersEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Cluster - 19, // 18: hashicorp.consul.mesh.v1alpha1.ProxyState.RoutesEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Route - 20, // 19: hashicorp.consul.mesh.v1alpha1.ProxyState.EndpointsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.Endpoints - 21, // 20: hashicorp.consul.mesh.v1alpha1.ProxyState.LeafCertificatesEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.LeafCertificate - 22, // 21: hashicorp.consul.mesh.v1alpha1.ProxyState.TrustBundlesEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.pbproxystate.TrustBundle - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_proxy_state_proto_init() } -func file_pbmesh_v1alpha1_proxy_state_proto_init() { - if File_pbmesh_v1alpha1_proxy_state_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyStateTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_proxy_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_proxy_state_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_proxy_state_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_proxy_state_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_proxy_state_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_proxy_state_proto = out.File - file_pbmesh_v1alpha1_proxy_state_proto_rawDesc = nil - file_pbmesh_v1alpha1_proxy_state_proto_goTypes = nil - file_pbmesh_v1alpha1_proxy_state_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/proxy_state.proto b/proto-public/pbmesh/v1alpha1/proxy_state.proto deleted file mode 100644 index a97b54ddc4100..0000000000000 --- a/proto-public/pbmesh/v1alpha1/proxy_state.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbmesh/v1alpha1/pbproxystate/access_logs.proto"; -import "pbmesh/v1alpha1/pbproxystate/cluster.proto"; -import "pbmesh/v1alpha1/pbproxystate/endpoints.proto"; -import "pbmesh/v1alpha1/pbproxystate/escape_hatches.proto"; -import "pbmesh/v1alpha1/pbproxystate/listener.proto"; -import "pbmesh/v1alpha1/pbproxystate/references.proto"; -import "pbmesh/v1alpha1/pbproxystate/route.proto"; -import "pbmesh/v1alpha1/pbproxystate/transport_socket.proto"; -import "pbresource/resource.proto"; - -message ProxyStateTemplate { - // proxy_state is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. - ProxyState proxy_state = 1; - - // required_endpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. - map required_endpoints = 2; - - // required_leaf_certificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. - map required_leaf_certificates = 3; - - // required_trust_bundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. - map required_trust_bundles = 4; -} - -message ProxyState { - // identity is a reference to the identity of the workload this proxy is for. - hashicorp.consul.resource.Reference identity = 1; - // listeners is a list of listeners for this proxy. - repeated pbproxystate.Listener listeners = 2; - // clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. - map clusters = 3; - // routes is a map from route name to routes. The keys are referenced from listeners. - map routes = 4; - // endpoints is a map from cluster name to endpoints. - map endpoints = 5; - // leaf certificates is a map from UUID to leaf certificates. - map leaf_certificates = 6; - // trust bundles is a map from peer name to trust bundles. - map trust_bundles = 7; - // tls has TLS configuration for this proxy. - pbproxystate.TLS tls = 8; - // intention_default_allow is the default action for intentions. This determines how the Envoy RBAC filters are generated. - bool intention_default_allow = 9; - // escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. - pbproxystate.EscapeHatches escape = 10; - // access_logs configures access logging for this proxy. - pbproxystate.AccessLogs access_logs = 11; -} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go deleted file mode 100644 index 6a7885b9ca72b..0000000000000 --- a/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/tcp_route.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TCPRoute) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TCPRoute) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TCPRouteRule) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TCPRouteRule) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TCPBackendRef) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TCPBackendRef) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.pb.go b/proto-public/pbmesh/v1alpha1/tcp_route.pb.go deleted file mode 100644 index 6a8cf5700fc4d..0000000000000 --- a/proto-public/pbmesh/v1alpha1/tcp_route.pb.go +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/tcp_route.proto - -package meshv1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.TCPRoute -// -// This is a Resource type. -type TCPRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` - // Rules are a list of TCP matchers and actions. - Rules []*TCPRouteRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *TCPRoute) Reset() { - *x = TCPRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TCPRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TCPRoute) ProtoMessage() {} - -func (x *TCPRoute) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TCPRoute.ProtoReflect.Descriptor instead. -func (*TCPRoute) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{0} -} - -func (x *TCPRoute) GetParentRefs() []*ParentReference { - if x != nil { - return x.ParentRefs - } - return nil -} - -func (x *TCPRoute) GetRules() []*TCPRouteRule { - if x != nil { - return x.Rules - } - return nil -} - -type TCPRouteRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // BackendRefs defines the backend(s) where matching requests should be sent. - // If unspecified or invalid (refers to a non-existent resource or a Service - // with no endpoints), the underlying implementation MUST actively reject - // connection attempts to this backend. Connection rejections must respect - // weight; if an invalid backend is requested to have 80% of connections, - // then 80% of connections must be rejected instead. - BackendRefs []*TCPBackendRef `protobuf:"bytes,1,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` -} - -func (x *TCPRouteRule) Reset() { - *x = TCPRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TCPRouteRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TCPRouteRule) ProtoMessage() {} - -func (x *TCPRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TCPRouteRule.ProtoReflect.Descriptor instead. -func (*TCPRouteRule) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{1} -} - -func (x *TCPRouteRule) GetBackendRefs() []*TCPBackendRef { - if x != nil { - return x.BackendRefs - } - return nil -} - -type TCPBackendRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - // If only one backend is specified and it has a weight greater than 0, 100% - // of the traffic is forwarded to that backend. If weight is set to 0, no - // traffic should be forwarded for this entry. If unspecified, weight defaults - // to 1. - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *TCPBackendRef) Reset() { - *x = TCPBackendRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TCPBackendRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TCPBackendRef) ProtoMessage() {} - -func (x *TCPBackendRef) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TCPBackendRef.ProtoReflect.Descriptor instead. -func (*TCPBackendRef) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{2} -} - -func (x *TCPBackendRef) GetBackendRef() *BackendReference { - if x != nil { - return x.BackendRef - } - return nil -} - -func (x *TCPBackendRef) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -var File_pbmesh_v1alpha1_tcp_route_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_tcp_route_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa0, 0x01, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x42, - 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, - 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, - 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x66, 0x73, 0x22, 0x7a, 0x0a, 0x0d, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x42, 0x95, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_tcp_route_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_tcp_route_proto_rawDescData = file_pbmesh_v1alpha1_tcp_route_proto_rawDesc -) - -func file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_tcp_route_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_tcp_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_tcp_route_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_tcp_route_proto_rawDescData -} - -var file_pbmesh_v1alpha1_tcp_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_pbmesh_v1alpha1_tcp_route_proto_goTypes = []interface{}{ - (*TCPRoute)(nil), // 0: hashicorp.consul.mesh.v1alpha1.TCPRoute - (*TCPRouteRule)(nil), // 1: hashicorp.consul.mesh.v1alpha1.TCPRouteRule - (*TCPBackendRef)(nil), // 2: hashicorp.consul.mesh.v1alpha1.TCPBackendRef - (*ParentReference)(nil), // 3: hashicorp.consul.mesh.v1alpha1.ParentReference - (*BackendReference)(nil), // 4: hashicorp.consul.mesh.v1alpha1.BackendReference -} -var file_pbmesh_v1alpha1_tcp_route_proto_depIdxs = []int32{ - 3, // 0: hashicorp.consul.mesh.v1alpha1.TCPRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 1, // 1: hashicorp.consul.mesh.v1alpha1.TCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.TCPRouteRule - 2, // 2: hashicorp.consul.mesh.v1alpha1.TCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.TCPBackendRef - 4, // 3: hashicorp.consul.mesh.v1alpha1.TCPBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_tcp_route_proto_init() } -func file_pbmesh_v1alpha1_tcp_route_proto_init() { - if File_pbmesh_v1alpha1_tcp_route_proto != nil { - return - } - file_pbmesh_v1alpha1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TCPRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TCPRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TCPBackendRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_tcp_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_tcp_route_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_tcp_route_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_tcp_route_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_tcp_route_proto = out.File - file_pbmesh_v1alpha1_tcp_route_proto_rawDesc = nil - file_pbmesh_v1alpha1_tcp_route_proto_goTypes = nil - file_pbmesh_v1alpha1_tcp_route_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.proto b/proto-public/pbmesh/v1alpha1/tcp_route.proto deleted file mode 100644 index 0a6c974c046b6..0000000000000 --- a/proto-public/pbmesh/v1alpha1/tcp_route.proto +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "pbmesh/v1alpha1/common.proto"; - -// NOTE: this should align to the GAMMA/gateway-api version, or at least be -// easily translatable. -// -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.TCPRoute -// -// This is a Resource type. -message TCPRoute { - // ParentRefs references the resources (usually Gateways) that a Route wants - // to be attached to. Note that the referenced parent resource needs to allow - // this for the attachment to be complete. For Gateways, that means the - // Gateway needs to allow attachment from Routes of this kind and namespace. - // - // It is invalid to reference an identical parent more than once. It is valid - // to reference multiple distinct sections within the same parent resource, - // such as 2 Listeners within a Gateway. - repeated ParentReference parent_refs = 1; - - // Rules are a list of TCP matchers and actions. - repeated TCPRouteRule rules = 2; -} - -message TCPRouteRule { - // BackendRefs defines the backend(s) where matching requests should be sent. - // If unspecified or invalid (refers to a non-existent resource or a Service - // with no endpoints), the underlying implementation MUST actively reject - // connection attempts to this backend. Connection rejections must respect - // weight; if an invalid backend is requested to have 80% of connections, - // then 80% of connections must be rejected instead. - repeated TCPBackendRef backend_refs = 1; -} - -message TCPBackendRef { - BackendReference backend_ref = 1; - - // Weight specifies the proportion of requests forwarded to the referenced - // backend. This is computed as weight/(sum of all weights in this - // BackendRefs list). For non-zero values, there may be some epsilon from the - // exact proportion defined here depending on the precision an implementation - // supports. Weight is not a percentage and the sum of weights does not need - // to equal 100. - // - //If only one backend is specified and it has a weight greater than 0, 100% - //of the traffic is forwarded to that backend. If weight is set to 0, no - //traffic should be forwarded for this entry. If unspecified, weight defaults - //to 1. - uint32 weight = 2; -} diff --git a/proto-public/pbmesh/v1alpha1/upstreams.pb.binary.go b/proto-public/pbmesh/v1alpha1/upstreams.pb.binary.go index d67b41e3a9d0e..cc8214e75a687 100644 --- a/proto-public/pbmesh/v1alpha1/upstreams.pb.binary.go +++ b/proto-public/pbmesh/v1alpha1/upstreams.pb.binary.go @@ -28,12 +28,12 @@ func (msg *Upstream) UnmarshalBinary(b []byte) error { } // MarshalBinary implements encoding.BinaryMarshaler -func (msg *IPPortAddress) MarshalBinary() ([]byte, error) { +func (msg *TCPAddress) MarshalBinary() ([]byte, error) { return proto.Marshal(msg) } // UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *IPPortAddress) UnmarshalBinary(b []byte) error { +func (msg *TCPAddress) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } @@ -56,3 +56,33 @@ func (msg *PreparedQueryUpstream) MarshalBinary() ([]byte, error) { func (msg *PreparedQueryUpstream) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *UpstreamConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *UpstreamConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *UpstreamLimits) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *UpstreamLimits) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *PassiveHealthCheck) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *PassiveHealthCheck) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/upstreams.pb.go b/proto-public/pbmesh/v1alpha1/upstreams.pb.go index e8e9e4f9cf89e..575fe43006e46 100644 --- a/proto-public/pbmesh/v1alpha1/upstreams.pb.go +++ b/proto-public/pbmesh/v1alpha1/upstreams.pb.go @@ -14,6 +14,7 @@ import ( pbresource "github.com/hashicorp/consul/proto-public/pbresource" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -32,12 +33,10 @@ type Upstreams struct { // Selection of workloads these upstreams should apply to. // These can be prefixes or specific workload names. - Workloads *v1alpha1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` - // upstreams is the list of explicit upstreams to define for the selected workloads. - Upstreams []*Upstream `protobuf:"bytes,2,rep,name=upstreams,proto3" json:"upstreams,omitempty"` - // pq_upstreams is the list of prepared query upstreams. This field is not supported directly in v2 - // and should only be used for migration reasons. - PqUpstreams []*PreparedQueryUpstream `protobuf:"bytes,3,rep,name=pq_upstreams,json=pqUpstreams,proto3" json:"pq_upstreams,omitempty"` + Workloads *v1alpha1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` + Upstreams []*Upstream `protobuf:"bytes,2,rep,name=upstreams,proto3" json:"upstreams,omitempty"` + PqUpstreams []*PreparedQueryUpstream `protobuf:"bytes,3,rep,name=pq_upstreams,json=pqUpstreams,proto3" json:"pq_upstreams,omitempty"` + UpstreamConfig *UpstreamConfig `protobuf:"bytes,4,opt,name=upstream_config,json=upstreamConfig,proto3" json:"upstream_config,omitempty"` } func (x *Upstreams) Reset() { @@ -93,26 +92,27 @@ func (x *Upstreams) GetPqUpstreams() []*PreparedQueryUpstream { return nil } +func (x *Upstreams) GetUpstreamConfig() *UpstreamConfig { + if x != nil { + return x.UpstreamConfig + } + return nil +} + type Upstream struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // destination_ref is the reference to an upstream service. This has to be pbcatalog.Service type. - DestinationRef *pbresource.Reference `protobuf:"bytes,1,opt,name=destination_ref,json=destinationRef,proto3" json:"destination_ref,omitempty"` - // destination_port is the port name of the upstream service. This should be the name - // of the service's target port. - DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // datacenter is the datacenter for where this upstream service lives. - Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // listen_addr is the address where Envoy will listen for requests to this upstream. - // It can provided either as an ip:port or as a Unix domain socket. - // + DestinationRef *pbresource.ID `protobuf:"bytes,1,opt,name=destination_ref,json=destinationRef,proto3" json:"destination_ref,omitempty"` + DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` + Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` // Types that are assignable to ListenAddr: // - // *Upstream_IpPort + // *Upstream_Tcp // *Upstream_Unix - ListenAddr isUpstream_ListenAddr `protobuf_oneof:"listen_addr"` + ListenAddr isUpstream_ListenAddr `protobuf_oneof:"listen_addr"` + UpstreamConfig *UpstreamConfig `protobuf:"bytes,7,opt,name=upstream_config,json=upstreamConfig,proto3" json:"upstream_config,omitempty"` } func (x *Upstream) Reset() { @@ -147,7 +147,7 @@ func (*Upstream) Descriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP(), []int{1} } -func (x *Upstream) GetDestinationRef() *pbresource.Reference { +func (x *Upstream) GetDestinationRef() *pbresource.ID { if x != nil { return x.DestinationRef } @@ -175,9 +175,9 @@ func (m *Upstream) GetListenAddr() isUpstream_ListenAddr { return nil } -func (x *Upstream) GetIpPort() *IPPortAddress { - if x, ok := x.GetListenAddr().(*Upstream_IpPort); ok { - return x.IpPort +func (x *Upstream) GetTcp() *TCPAddress { + if x, ok := x.GetListenAddr().(*Upstream_Tcp); ok { + return x.Tcp } return nil } @@ -189,35 +189,40 @@ func (x *Upstream) GetUnix() *UnixSocketAddress { return nil } +func (x *Upstream) GetUpstreamConfig() *UpstreamConfig { + if x != nil { + return x.UpstreamConfig + } + return nil +} + type isUpstream_ListenAddr interface { isUpstream_ListenAddr() } -type Upstream_IpPort struct { - IpPort *IPPortAddress `protobuf:"bytes,4,opt,name=ip_port,json=ipPort,proto3,oneof"` +type Upstream_Tcp struct { + Tcp *TCPAddress `protobuf:"bytes,4,opt,name=tcp,proto3,oneof"` } type Upstream_Unix struct { Unix *UnixSocketAddress `protobuf:"bytes,5,opt,name=unix,proto3,oneof"` } -func (*Upstream_IpPort) isUpstream_ListenAddr() {} +func (*Upstream_Tcp) isUpstream_ListenAddr() {} func (*Upstream_Unix) isUpstream_ListenAddr() {} -type IPPortAddress struct { +type TCPAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // ip is an IPv4 or an IPv6 address. - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` - // port is the port number. + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` } -func (x *IPPortAddress) Reset() { - *x = IPPortAddress{} +func (x *TCPAddress) Reset() { + *x = TCPAddress{} if protoimpl.UnsafeEnabled { mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -225,13 +230,13 @@ func (x *IPPortAddress) Reset() { } } -func (x *IPPortAddress) String() string { +func (x *TCPAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IPPortAddress) ProtoMessage() {} +func (*TCPAddress) ProtoMessage() {} -func (x *IPPortAddress) ProtoReflect() protoreflect.Message { +func (x *TCPAddress) ProtoReflect() protoreflect.Message { mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -243,19 +248,19 @@ func (x *IPPortAddress) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IPPortAddress.ProtoReflect.Descriptor instead. -func (*IPPortAddress) Descriptor() ([]byte, []int) { +// Deprecated: Use TCPAddress.ProtoReflect.Descriptor instead. +func (*TCPAddress) Descriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP(), []int{2} } -func (x *IPPortAddress) GetIp() string { +func (x *TCPAddress) GetIp() string { if x != nil { return x.Ip } return "" } -func (x *IPPortAddress) GetPort() uint32 { +func (x *TCPAddress) GetPort() uint32 { if x != nil { return x.Port } @@ -267,10 +272,7 @@ type UnixSocketAddress struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // path is the file system path at which to bind a Unix domain socket listener. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // mode is the Unix file mode for the socket file. It should be provided - // in the numeric notation, for example, "0600". Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"` } @@ -325,13 +327,8 @@ type PreparedQueryUpstream struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // name is the name of the prepared query to use as an upstream. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // datacenter is the datacenter for where this upstream service lives. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Datacenter string `protobuf:"bytes,2,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // listen_addr is the address where Envoy will listen for requests to this upstream. - // It can provided either as an ip:port or as a Unix domain socket. - // // Types that are assignable to ListenAddr: // // *PreparedQueryUpstream_Tcp @@ -393,7 +390,7 @@ func (m *PreparedQueryUpstream) GetListenAddr() isPreparedQueryUpstream_ListenAd return nil } -func (x *PreparedQueryUpstream) GetTcp() *IPPortAddress { +func (x *PreparedQueryUpstream) GetTcp() *TCPAddress { if x, ok := x.GetListenAddr().(*PreparedQueryUpstream_Tcp); ok { return x.Tcp } @@ -419,7 +416,7 @@ type isPreparedQueryUpstream_ListenAddr interface { } type PreparedQueryUpstream_Tcp struct { - Tcp *IPPortAddress `protobuf:"bytes,4,opt,name=tcp,proto3,oneof"` + Tcp *TCPAddress `protobuf:"bytes,4,opt,name=tcp,proto3,oneof"` } type PreparedQueryUpstream_Unix struct { @@ -430,6 +427,229 @@ func (*PreparedQueryUpstream_Tcp) isPreparedQueryUpstream_ListenAddr() {} func (*PreparedQueryUpstream_Unix) isPreparedQueryUpstream_ListenAddr() {} +type UpstreamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConnectTimeoutMs uint64 `protobuf:"varint,2,opt,name=connect_timeout_ms,json=connectTimeoutMs,proto3" json:"connect_timeout_ms,omitempty"` + Limits *UpstreamLimits `protobuf:"bytes,3,opt,name=limits,proto3" json:"limits,omitempty"` + PassiveHealthCheck *PassiveHealthCheck `protobuf:"bytes,4,opt,name=passive_health_check,json=passiveHealthCheck,proto3" json:"passive_health_check,omitempty"` + BalanceInboundConnections BalanceInboundConnections `protobuf:"varint,5,opt,name=balance_inbound_connections,json=balanceInboundConnections,proto3,enum=hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections" json:"balance_inbound_connections,omitempty"` + MeshGatewayMode MeshGatewayMode `protobuf:"varint,6,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` +} + +func (x *UpstreamConfig) Reset() { + *x = UpstreamConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamConfig) ProtoMessage() {} + +func (x *UpstreamConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamConfig.ProtoReflect.Descriptor instead. +func (*UpstreamConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP(), []int{5} +} + +func (x *UpstreamConfig) GetConnectTimeoutMs() uint64 { + if x != nil { + return x.ConnectTimeoutMs + } + return 0 +} + +func (x *UpstreamConfig) GetLimits() *UpstreamLimits { + if x != nil { + return x.Limits + } + return nil +} + +func (x *UpstreamConfig) GetPassiveHealthCheck() *PassiveHealthCheck { + if x != nil { + return x.PassiveHealthCheck + } + return nil +} + +func (x *UpstreamConfig) GetBalanceInboundConnections() BalanceInboundConnections { + if x != nil { + return x.BalanceInboundConnections + } + return BalanceInboundConnections_BALANCE_INBOUND_CONNECTIONS_DEFAULT +} + +func (x *UpstreamConfig) GetMeshGatewayMode() MeshGatewayMode { + if x != nil { + return x.MeshGatewayMode + } + return MeshGatewayMode_MESH_GATEWAY_MODE_UNSPECIFIED +} + +// UpstreamLimits describes the limits that are associated with a specific +// upstream of a service instance. +type UpstreamLimits struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MaxConnections is the maximum number of connections the local proxy can + // make to the upstream service. + MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` + // MaxPendingRequests is the maximum number of requests that will be queued + // waiting for an available connection. This is mostly applicable to HTTP/1.1 + // clusters since all HTTP/2 requests are streamed over a single + // connection. + MaxPendingRequests int32 `protobuf:"varint,2,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` + // MaxConcurrentRequests is the maximum number of in-flight requests that will be allowed + // to the upstream cluster at a point in time. This is mostly applicable to HTTP/2 + // clusters since all HTTP/1.1 requests are limited by MaxConnections. + MaxConcurrentRequests int32 `protobuf:"varint,3,opt,name=max_concurrent_requests,json=maxConcurrentRequests,proto3" json:"max_concurrent_requests,omitempty"` +} + +func (x *UpstreamLimits) Reset() { + *x = UpstreamLimits{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamLimits) ProtoMessage() {} + +func (x *UpstreamLimits) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamLimits.ProtoReflect.Descriptor instead. +func (*UpstreamLimits) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP(), []int{6} +} + +func (x *UpstreamLimits) GetMaxConnections() int32 { + if x != nil { + return x.MaxConnections + } + return 0 +} + +func (x *UpstreamLimits) GetMaxPendingRequests() int32 { + if x != nil { + return x.MaxPendingRequests + } + return 0 +} + +func (x *UpstreamLimits) GetMaxConcurrentRequests() int32 { + if x != nil { + return x.MaxConcurrentRequests + } + return 0 +} + +type PassiveHealthCheck struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Interval between health check analysis sweeps. Each sweep may remove + // hosts or return hosts to the pool. + Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + // MaxFailures is the count of consecutive failures that results in a host + // being removed from the pool. + MaxFailures uint32 `protobuf:"varint,2,opt,name=max_failures,json=maxFailures,proto3" json:"max_failures,omitempty"` + // EnforcingConsecutive5xx is the % chance that a host will be actually ejected + // when an outlier status is detected through consecutive 5xx. + // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. + EnforcingConsecutive_5Xx uint32 `protobuf:"varint,3,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` +} + +func (x *PassiveHealthCheck) Reset() { + *x = PassiveHealthCheck{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PassiveHealthCheck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PassiveHealthCheck) ProtoMessage() {} + +func (x *PassiveHealthCheck) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_upstreams_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PassiveHealthCheck.ProtoReflect.Descriptor instead. +func (*PassiveHealthCheck) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP(), []int{7} +} + +func (x *PassiveHealthCheck) GetInterval() *durationpb.Duration { + if x != nil { + return x.Interval + } + return nil +} + +func (x *PassiveHealthCheck) GetMaxFailures() uint32 { + if x != nil { + return x.MaxFailures + } + return 0 +} + +func (x *PassiveHealthCheck) GetEnforcingConsecutive_5Xx() uint32 { + if x != nil { + return x.EnforcingConsecutive_5Xx + } + return 0 +} + var File_pbmesh_v1alpha1_upstreams_proto protoreflect.FileDescriptor var file_pbmesh_v1alpha1_upstreams_proto_rawDesc = []byte{ @@ -437,95 +657,158 @@ var file_pbmesh_v1alpha1_upstreams_proto_rawDesc = []byte{ 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x1a, 0x21, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, + 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, - 0x02, 0x0a, 0x09, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x09, - 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, - 0x46, 0x0a, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x09, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x58, 0x0a, 0x0c, 0x70, 0x71, 0x5f, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x52, 0x0b, 0x70, 0x71, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x4d, - 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, 0x29, 0x0a, - 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, - 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, - 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xd9, 0x02, 0x0a, 0x09, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x51, + 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x12, 0x46, 0x0a, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x09, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x58, 0x0a, 0x0c, 0x70, 0x71, 0x5f, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x0b, 0x70, 0x71, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x12, 0x57, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8e, 0x03, 0x0a, + 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x46, 0x0a, 0x0f, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x49, + 0x44, 0x52, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x03, + 0x74, 0x63, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x50, 0x50, 0x6f, 0x72, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x06, 0x69, 0x70, 0x50, 0x6f, - 0x72, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x42, 0x0d, 0x0a, 0x0b, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0x33, 0x0a, 0x0d, 0x49, 0x50, - 0x50, 0x6f, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x47, 0x0a, 0x04, + 0x75, 0x6e, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x78, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, + 0x04, 0x75, 0x6e, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, + 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0x30, 0x0a, + 0x0a, 0x54, 0x43, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3b, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xbf, 0x02, 0x0a, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x03, 0x74, 0x63, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x03, 0x74, 0x63, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x50, 0x50, 0x6f, 0x72, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x47, 0x0a, - 0x04, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, - 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x47, 0x0a, 0x04, 0x75, 0x6e, + 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x78, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x04, 0x75, + 0x6e, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0xc4, 0x03, 0x0a, 0x0e, + 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, + 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x73, 0x12, 0x46, 0x0a, 0x06, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x12, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x79, 0x0a, 0x1b, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x0d, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x42, 0x96, - 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, - 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, + 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, + 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6d, 0x61, + 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x73, + 0x73, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x35, 0x78, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x65, 0x6e, + 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x76, 0x65, 0x35, 0x78, 0x78, 0x42, 0x96, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, + 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, + 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, + 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -540,32 +823,44 @@ func file_pbmesh_v1alpha1_upstreams_proto_rawDescGZIP() []byte { return file_pbmesh_v1alpha1_upstreams_proto_rawDescData } -var file_pbmesh_v1alpha1_upstreams_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_pbmesh_v1alpha1_upstreams_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_pbmesh_v1alpha1_upstreams_proto_goTypes = []interface{}{ (*Upstreams)(nil), // 0: hashicorp.consul.mesh.v1alpha1.Upstreams (*Upstream)(nil), // 1: hashicorp.consul.mesh.v1alpha1.Upstream - (*IPPortAddress)(nil), // 2: hashicorp.consul.mesh.v1alpha1.IPPortAddress + (*TCPAddress)(nil), // 2: hashicorp.consul.mesh.v1alpha1.TCPAddress (*UnixSocketAddress)(nil), // 3: hashicorp.consul.mesh.v1alpha1.UnixSocketAddress (*PreparedQueryUpstream)(nil), // 4: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream - (*v1alpha1.WorkloadSelector)(nil), // 5: hashicorp.consul.catalog.v1alpha1.WorkloadSelector - (*pbresource.Reference)(nil), // 6: hashicorp.consul.resource.Reference - (*UpstreamConfig)(nil), // 7: hashicorp.consul.mesh.v1alpha1.UpstreamConfig + (*UpstreamConfig)(nil), // 5: hashicorp.consul.mesh.v1alpha1.UpstreamConfig + (*UpstreamLimits)(nil), // 6: hashicorp.consul.mesh.v1alpha1.UpstreamLimits + (*PassiveHealthCheck)(nil), // 7: hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck + (*v1alpha1.WorkloadSelector)(nil), // 8: hashicorp.consul.catalog.v1alpha1.WorkloadSelector + (*pbresource.ID)(nil), // 9: hashicorp.consul.resource.ID + (BalanceInboundConnections)(0), // 10: hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections + (MeshGatewayMode)(0), // 11: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration } var file_pbmesh_v1alpha1_upstreams_proto_depIdxs = []int32{ - 5, // 0: hashicorp.consul.mesh.v1alpha1.Upstreams.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector - 1, // 1: hashicorp.consul.mesh.v1alpha1.Upstreams.upstreams:type_name -> hashicorp.consul.mesh.v1alpha1.Upstream - 4, // 2: hashicorp.consul.mesh.v1alpha1.Upstreams.pq_upstreams:type_name -> hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream - 6, // 3: hashicorp.consul.mesh.v1alpha1.Upstream.destination_ref:type_name -> hashicorp.consul.resource.Reference - 2, // 4: hashicorp.consul.mesh.v1alpha1.Upstream.ip_port:type_name -> hashicorp.consul.mesh.v1alpha1.IPPortAddress - 3, // 5: hashicorp.consul.mesh.v1alpha1.Upstream.unix:type_name -> hashicorp.consul.mesh.v1alpha1.UnixSocketAddress - 2, // 6: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.IPPortAddress - 3, // 7: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.unix:type_name -> hashicorp.consul.mesh.v1alpha1.UnixSocketAddress - 7, // 8: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.upstream_config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 8, // 0: hashicorp.consul.mesh.v1alpha1.Upstreams.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector + 1, // 1: hashicorp.consul.mesh.v1alpha1.Upstreams.upstreams:type_name -> hashicorp.consul.mesh.v1alpha1.Upstream + 4, // 2: hashicorp.consul.mesh.v1alpha1.Upstreams.pq_upstreams:type_name -> hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream + 5, // 3: hashicorp.consul.mesh.v1alpha1.Upstreams.upstream_config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig + 9, // 4: hashicorp.consul.mesh.v1alpha1.Upstream.destination_ref:type_name -> hashicorp.consul.resource.ID + 2, // 5: hashicorp.consul.mesh.v1alpha1.Upstream.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.TCPAddress + 3, // 6: hashicorp.consul.mesh.v1alpha1.Upstream.unix:type_name -> hashicorp.consul.mesh.v1alpha1.UnixSocketAddress + 5, // 7: hashicorp.consul.mesh.v1alpha1.Upstream.upstream_config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig + 2, // 8: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.TCPAddress + 3, // 9: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.unix:type_name -> hashicorp.consul.mesh.v1alpha1.UnixSocketAddress + 5, // 10: hashicorp.consul.mesh.v1alpha1.PreparedQueryUpstream.upstream_config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig + 6, // 11: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.limits:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamLimits + 7, // 12: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.passive_health_check:type_name -> hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck + 10, // 13: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.balance_inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceInboundConnections + 11, // 14: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + 12, // 15: hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck.interval:type_name -> google.protobuf.Duration + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_pbmesh_v1alpha1_upstreams_proto_init() } @@ -573,7 +868,8 @@ func file_pbmesh_v1alpha1_upstreams_proto_init() { if File_pbmesh_v1alpha1_upstreams_proto != nil { return } - file_pbmesh_v1alpha1_upstreams_configuration_proto_init() + file_pbmesh_v1alpha1_connection_proto_init() + file_pbmesh_v1alpha1_routing_proto_init() if !protoimpl.UnsafeEnabled { file_pbmesh_v1alpha1_upstreams_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Upstreams); i { @@ -600,7 +896,7 @@ func file_pbmesh_v1alpha1_upstreams_proto_init() { } } file_pbmesh_v1alpha1_upstreams_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPPortAddress); i { + switch v := v.(*TCPAddress); i { case 0: return &v.state case 1: @@ -635,9 +931,45 @@ func file_pbmesh_v1alpha1_upstreams_proto_init() { return nil } } + file_pbmesh_v1alpha1_upstreams_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_upstreams_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamLimits); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_upstreams_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PassiveHealthCheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_pbmesh_v1alpha1_upstreams_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Upstream_IpPort)(nil), + (*Upstream_Tcp)(nil), (*Upstream_Unix)(nil), } file_pbmesh_v1alpha1_upstreams_proto_msgTypes[4].OneofWrappers = []interface{}{ @@ -650,7 +982,7 @@ func file_pbmesh_v1alpha1_upstreams_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pbmesh_v1alpha1_upstreams_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/proto-public/pbmesh/v1alpha1/upstreams.proto b/proto-public/pbmesh/v1alpha1/upstreams.proto index a78d8c3f97929..9239bac774b8e 100644 --- a/proto-public/pbmesh/v1alpha1/upstreams.proto +++ b/proto-public/pbmesh/v1alpha1/upstreams.proto @@ -5,8 +5,10 @@ syntax = "proto3"; package hashicorp.consul.mesh.v1alpha1; +import "google/protobuf/duration.proto"; import "pbcatalog/v1alpha1/selector.proto"; -import "pbmesh/v1alpha1/upstreams_configuration.proto"; +import "pbmesh/v1alpha1/connection.proto"; +import "pbmesh/v1alpha1/routing.proto"; import "pbresource/resource.proto"; message Upstreams { @@ -14,63 +16,85 @@ message Upstreams { // These can be prefixes or specific workload names. hashicorp.consul.catalog.v1alpha1.WorkloadSelector workloads = 1; - // upstreams is the list of explicit upstreams to define for the selected workloads. repeated Upstream upstreams = 2; - - // pq_upstreams is the list of prepared query upstreams. This field is not supported directly in v2 - // and should only be used for migration reasons. repeated PreparedQueryUpstream pq_upstreams = 3; + + UpstreamConfig upstream_config = 4; } message Upstream { - // destination_ref is the reference to an upstream service. This has to be pbcatalog.Service type. - hashicorp.consul.resource.Reference destination_ref = 1; - - // destination_port is the port name of the upstream service. This should be the name - // of the service's target port. + hashicorp.consul.resource.ID destination_ref = 1; string destination_port = 2; - - // datacenter is the datacenter for where this upstream service lives. string datacenter = 3; - // listen_addr is the address where Envoy will listen for requests to this upstream. - // It can provided either as an ip:port or as a Unix domain socket. oneof listen_addr { - IPPortAddress ip_port = 4; + TCPAddress tcp = 4; UnixSocketAddress unix = 5; } + + UpstreamConfig upstream_config = 7; } -message IPPortAddress { - // ip is an IPv4 or an IPv6 address. +message TCPAddress { string ip = 1; - - // port is the port number. uint32 port = 2; } message UnixSocketAddress { - // path is the file system path at which to bind a Unix domain socket listener. string path = 1; - - // mode is the Unix file mode for the socket file. It should be provided - // in the numeric notation, for example, "0600". string mode = 2; } message PreparedQueryUpstream { - // name is the name of the prepared query to use as an upstream. string name = 1; - - // datacenter is the datacenter for where this upstream service lives. string datacenter = 2; - // listen_addr is the address where Envoy will listen for requests to this upstream. - // It can provided either as an ip:port or as a Unix domain socket. oneof listen_addr { - IPPortAddress tcp = 4; + TCPAddress tcp = 4; UnixSocketAddress unix = 5; } UpstreamConfig upstream_config = 6; } + +message UpstreamConfig { + uint64 connect_timeout_ms = 2; + UpstreamLimits limits = 3; + PassiveHealthCheck passive_health_check = 4; + BalanceInboundConnections balance_inbound_connections = 5; + MeshGatewayMode mesh_gateway_mode = 6; +} + +// UpstreamLimits describes the limits that are associated with a specific +// upstream of a service instance. +message UpstreamLimits { + // MaxConnections is the maximum number of connections the local proxy can + // make to the upstream service. + int32 max_connections = 1; + + // MaxPendingRequests is the maximum number of requests that will be queued + // waiting for an available connection. This is mostly applicable to HTTP/1.1 + // clusters since all HTTP/2 requests are streamed over a single + // connection. + int32 max_pending_requests = 2; + + // MaxConcurrentRequests is the maximum number of in-flight requests that will be allowed + // to the upstream cluster at a point in time. This is mostly applicable to HTTP/2 + // clusters since all HTTP/1.1 requests are limited by MaxConnections. + int32 max_concurrent_requests = 3; +} + +message PassiveHealthCheck { + // Interval between health check analysis sweeps. Each sweep may remove + // hosts or return hosts to the pool. + google.protobuf.Duration interval = 1; + + // MaxFailures is the count of consecutive failures that results in a host + // being removed from the pool. + uint32 max_failures = 2; + + // EnforcingConsecutive5xx is the % chance that a host will be actually ejected + // when an outlier status is detected through consecutive 5xx. + // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. + uint32 enforcing_consecutive_5xx = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.binary.go b/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.binary.go deleted file mode 100644 index f4a5db2813244..0000000000000 --- a/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.binary.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by protoc-gen-go-binary. DO NOT EDIT. -// source: pbmesh/v1alpha1/upstreams_configuration.proto - -package meshv1alpha1 - -import ( - "google.golang.org/protobuf/proto" -) - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamsConfiguration) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamsConfiguration) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamConfigOverrides) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamConfigOverrides) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamConfig) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamConfig) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *UpstreamLimits) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *UpstreamLimits) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *PassiveHealthCheck) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *PassiveHealthCheck) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} diff --git a/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.go b/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.go deleted file mode 100644 index 61f9709cdcd11..0000000000000 --- a/proto-public/pbmesh/v1alpha1/upstreams_configuration.pb.go +++ /dev/null @@ -1,695 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: pbmesh/v1alpha1/upstreams_configuration.proto - -package meshv1alpha1 - -import ( - v1alpha1 "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" - pbresource "github.com/hashicorp/consul/proto-public/pbresource" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UpstreamsConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selection of workloads these upstreams should apply to. - // These can be prefixes or specific workload names. - Workloads *v1alpha1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` - // default_config applies to all upstreams for the workloads selected by this resource. - DefaultConfig *UpstreamConfig `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` - // config_overrides provides per-upstream or per-upstream-port config overrides. - ConfigOverrides []*UpstreamConfigOverrides `protobuf:"bytes,3,rep,name=config_overrides,json=configOverrides,proto3" json:"config_overrides,omitempty"` -} - -func (x *UpstreamsConfiguration) Reset() { - *x = UpstreamsConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamsConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamsConfiguration) ProtoMessage() {} - -func (x *UpstreamsConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamsConfiguration.ProtoReflect.Descriptor instead. -func (*UpstreamsConfiguration) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP(), []int{0} -} - -func (x *UpstreamsConfiguration) GetWorkloads() *v1alpha1.WorkloadSelector { - if x != nil { - return x.Workloads - } - return nil -} - -func (x *UpstreamsConfiguration) GetDefaultConfig() *UpstreamConfig { - if x != nil { - return x.DefaultConfig - } - return nil -} - -func (x *UpstreamsConfiguration) GetConfigOverrides() []*UpstreamConfigOverrides { - if x != nil { - return x.ConfigOverrides - } - return nil -} - -// UpstreamConfigOverrides allow to override upstream configuration per destination_ref/port/datacenter. -// In that sense, those three fields (destination_ref, destination_port and datacenter) are treated -// sort of like map keys and config is a like a map value for that key. -type UpstreamConfigOverrides struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // destination_ref is the reference to an upstream service that this configuration applies to. - // This has to be pbcatalog.Service type. - DestinationRef *pbresource.Reference `protobuf:"bytes,1,opt,name=destination_ref,json=destinationRef,proto3" json:"destination_ref,omitempty"` - // destination_port is the port name of the upstream service. This should be the name - // of the service's target port. If not provided, this configuration will apply to all ports of an upstream. - DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // datacenter is the datacenter for where this upstream service lives. - Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // config is the configuration that should apply to this upstream. - Config *UpstreamConfig `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *UpstreamConfigOverrides) Reset() { - *x = UpstreamConfigOverrides{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamConfigOverrides) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamConfigOverrides) ProtoMessage() {} - -func (x *UpstreamConfigOverrides) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamConfigOverrides.ProtoReflect.Descriptor instead. -func (*UpstreamConfigOverrides) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP(), []int{1} -} - -func (x *UpstreamConfigOverrides) GetDestinationRef() *pbresource.Reference { - if x != nil { - return x.DestinationRef - } - return nil -} - -func (x *UpstreamConfigOverrides) GetDestinationPort() string { - if x != nil { - return x.DestinationPort - } - return "" -} - -func (x *UpstreamConfigOverrides) GetDatacenter() string { - if x != nil { - return x.Datacenter - } - return "" -} - -func (x *UpstreamConfigOverrides) GetConfig() *UpstreamConfig { - if x != nil { - return x.Config - } - return nil -} - -type UpstreamConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // protocol overrides upstream's port protocol. If no port for an upstream is specified - // or if used in the default configuration, this protocol will be used for all ports - // or for all ports of all upstreams respectively. - Protocol v1alpha1.Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=hashicorp.consul.catalog.v1alpha1.Protocol" json:"protocol,omitempty"` - // connect_timeout is the timeout used when making a new - // connection to this upstream. Defaults to 5 seconds if not set. - ConnectTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // limits are the set of limits that are applied to the proxy for a specific upstream. - Limits *UpstreamLimits `protobuf:"bytes,3,opt,name=limits,proto3" json:"limits,omitempty"` - // passive_health_check configuration determines how upstream proxy instances will - // be monitored for removal from the load balancing pool. - PassiveHealthCheck *PassiveHealthCheck `protobuf:"bytes,4,opt,name=passive_health_check,json=passiveHealthCheck,proto3" json:"passive_health_check,omitempty"` - // balance_outbound_connections indicates how the proxy should attempt to distribute - // connections across worker threads. - BalanceOutboundConnections BalanceConnections `protobuf:"varint,5,opt,name=balance_outbound_connections,json=balanceOutboundConnections,proto3,enum=hashicorp.consul.mesh.v1alpha1.BalanceConnections" json:"balance_outbound_connections,omitempty"` - // MeshGatewayMode is the Mesh Gateway routing mode. - MeshGatewayMode MeshGatewayMode `protobuf:"varint,6,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` -} - -func (x *UpstreamConfig) Reset() { - *x = UpstreamConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamConfig) ProtoMessage() {} - -func (x *UpstreamConfig) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamConfig.ProtoReflect.Descriptor instead. -func (*UpstreamConfig) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP(), []int{2} -} - -func (x *UpstreamConfig) GetProtocol() v1alpha1.Protocol { - if x != nil { - return x.Protocol - } - return v1alpha1.Protocol(0) -} - -func (x *UpstreamConfig) GetConnectTimeout() *durationpb.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *UpstreamConfig) GetLimits() *UpstreamLimits { - if x != nil { - return x.Limits - } - return nil -} - -func (x *UpstreamConfig) GetPassiveHealthCheck() *PassiveHealthCheck { - if x != nil { - return x.PassiveHealthCheck - } - return nil -} - -func (x *UpstreamConfig) GetBalanceOutboundConnections() BalanceConnections { - if x != nil { - return x.BalanceOutboundConnections - } - return BalanceConnections_BALANCE_CONNECTIONS_DEFAULT -} - -func (x *UpstreamConfig) GetMeshGatewayMode() MeshGatewayMode { - if x != nil { - return x.MeshGatewayMode - } - return MeshGatewayMode_MESH_GATEWAY_MODE_UNSPECIFIED -} - -// UpstreamLimits describes the limits that are associated with a specific -// upstream of a service instance. -type UpstreamLimits struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // max_connections is the maximum number of connections the local proxy can - // make to the upstream service. - MaxConnections *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - // max_pending_requests is the maximum number of requests that will be queued - // waiting for an available connection. This is mostly applicable to HTTP/1.1 - // clusters since all HTTP/2 requests are streamed over a single - // connection. - MaxPendingRequests *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` - // max_concurrent_requests is the maximum number of in-flight requests that will be allowed - // to the upstream cluster at a point in time. This is mostly applicable to HTTP/2 - // clusters since all HTTP/1.1 requests are limited by MaxConnections. - MaxConcurrentRequests *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_concurrent_requests,json=maxConcurrentRequests,proto3" json:"max_concurrent_requests,omitempty"` -} - -func (x *UpstreamLimits) Reset() { - *x = UpstreamLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamLimits) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamLimits) ProtoMessage() {} - -func (x *UpstreamLimits) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamLimits.ProtoReflect.Descriptor instead. -func (*UpstreamLimits) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP(), []int{3} -} - -func (x *UpstreamLimits) GetMaxConnections() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConnections - } - return nil -} - -func (x *UpstreamLimits) GetMaxPendingRequests() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxPendingRequests - } - return nil -} - -func (x *UpstreamLimits) GetMaxConcurrentRequests() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConcurrentRequests - } - return nil -} - -type PassiveHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // interval between health check analysis sweeps. Each sweep may remove - // hosts or return hosts to the pool. - Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // max_failures is the count of consecutive failures that results in a host - // being removed from the pool. - MaxFailures uint32 `protobuf:"varint,2,opt,name=max_failures,json=maxFailures,proto3" json:"max_failures,omitempty"` - // enforcing_consecutive_5xx is the % chance that a host will be actually ejected - // when an outlier status is detected through consecutive 5xx. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - EnforcingConsecutive_5Xx uint32 `protobuf:"varint,3,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` -} - -func (x *PassiveHealthCheck) Reset() { - *x = PassiveHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PassiveHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PassiveHealthCheck) ProtoMessage() {} - -func (x *PassiveHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PassiveHealthCheck.ProtoReflect.Descriptor instead. -func (*PassiveHealthCheck) Descriptor() ([]byte, []int) { - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP(), []int{4} -} - -func (x *PassiveHealthCheck) GetInterval() *durationpb.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *PassiveHealthCheck) GetMaxFailures() uint32 { - if x != nil { - return x.MaxFailures - } - return 0 -} - -func (x *PassiveHealthCheck) GetEnforcingConsecutive_5Xx() uint32 { - if x != nil { - return x.EnforcingConsecutive_5Xx - } - return 0 -} - -var File_pbmesh_v1alpha1_upstreams_configuration_proto protoreflect.FileDescriptor - -var file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa6, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x09, - 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, - 0x55, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x46, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9e, 0x04, 0x0a, 0x0e, 0x55, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x12, 0x64, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x12, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x74, 0x0a, 0x1c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x1a, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, - 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x0e, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x12, 0x50, 0x61, - 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, - 0x61, 0x78, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x6e, - 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x35, 0x78, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x42, 0xa3, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x1b, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, - 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, - 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, - 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescOnce sync.Once - file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescData = file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDesc -) - -func file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescGZIP() []byte { - file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescOnce.Do(func() { - file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescData) - }) - return file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDescData -} - -var file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_pbmesh_v1alpha1_upstreams_configuration_proto_goTypes = []interface{}{ - (*UpstreamsConfiguration)(nil), // 0: hashicorp.consul.mesh.v1alpha1.UpstreamsConfiguration - (*UpstreamConfigOverrides)(nil), // 1: hashicorp.consul.mesh.v1alpha1.UpstreamConfigOverrides - (*UpstreamConfig)(nil), // 2: hashicorp.consul.mesh.v1alpha1.UpstreamConfig - (*UpstreamLimits)(nil), // 3: hashicorp.consul.mesh.v1alpha1.UpstreamLimits - (*PassiveHealthCheck)(nil), // 4: hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck - (*v1alpha1.WorkloadSelector)(nil), // 5: hashicorp.consul.catalog.v1alpha1.WorkloadSelector - (*pbresource.Reference)(nil), // 6: hashicorp.consul.resource.Reference - (v1alpha1.Protocol)(0), // 7: hashicorp.consul.catalog.v1alpha1.Protocol - (*durationpb.Duration)(nil), // 8: google.protobuf.Duration - (BalanceConnections)(0), // 9: hashicorp.consul.mesh.v1alpha1.BalanceConnections - (MeshGatewayMode)(0), // 10: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - (*wrapperspb.UInt32Value)(nil), // 11: google.protobuf.UInt32Value -} -var file_pbmesh_v1alpha1_upstreams_configuration_proto_depIdxs = []int32{ - 5, // 0: hashicorp.consul.mesh.v1alpha1.UpstreamsConfiguration.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector - 2, // 1: hashicorp.consul.mesh.v1alpha1.UpstreamsConfiguration.default_config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig - 1, // 2: hashicorp.consul.mesh.v1alpha1.UpstreamsConfiguration.config_overrides:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfigOverrides - 6, // 3: hashicorp.consul.mesh.v1alpha1.UpstreamConfigOverrides.destination_ref:type_name -> hashicorp.consul.resource.Reference - 2, // 4: hashicorp.consul.mesh.v1alpha1.UpstreamConfigOverrides.config:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamConfig - 7, // 5: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.protocol:type_name -> hashicorp.consul.catalog.v1alpha1.Protocol - 8, // 6: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.connect_timeout:type_name -> google.protobuf.Duration - 3, // 7: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.limits:type_name -> hashicorp.consul.mesh.v1alpha1.UpstreamLimits - 4, // 8: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.passive_health_check:type_name -> hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck - 9, // 9: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.balance_outbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceConnections - 10, // 10: hashicorp.consul.mesh.v1alpha1.UpstreamConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - 11, // 11: hashicorp.consul.mesh.v1alpha1.UpstreamLimits.max_connections:type_name -> google.protobuf.UInt32Value - 11, // 12: hashicorp.consul.mesh.v1alpha1.UpstreamLimits.max_pending_requests:type_name -> google.protobuf.UInt32Value - 11, // 13: hashicorp.consul.mesh.v1alpha1.UpstreamLimits.max_concurrent_requests:type_name -> google.protobuf.UInt32Value - 8, // 14: hashicorp.consul.mesh.v1alpha1.PassiveHealthCheck.interval:type_name -> google.protobuf.Duration - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_pbmesh_v1alpha1_upstreams_configuration_proto_init() } -func file_pbmesh_v1alpha1_upstreams_configuration_proto_init() { - if File_pbmesh_v1alpha1_upstreams_configuration_proto != nil { - return - } - file_pbmesh_v1alpha1_connection_proto_init() - file_pbmesh_v1alpha1_routing_proto_init() - if !protoimpl.UnsafeEnabled { - file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamsConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamConfigOverrides); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PassiveHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pbmesh_v1alpha1_upstreams_configuration_proto_goTypes, - DependencyIndexes: file_pbmesh_v1alpha1_upstreams_configuration_proto_depIdxs, - MessageInfos: file_pbmesh_v1alpha1_upstreams_configuration_proto_msgTypes, - }.Build() - File_pbmesh_v1alpha1_upstreams_configuration_proto = out.File - file_pbmesh_v1alpha1_upstreams_configuration_proto_rawDesc = nil - file_pbmesh_v1alpha1_upstreams_configuration_proto_goTypes = nil - file_pbmesh_v1alpha1_upstreams_configuration_proto_depIdxs = nil -} diff --git a/proto-public/pbmesh/v1alpha1/upstreams_configuration.proto b/proto-public/pbmesh/v1alpha1/upstreams_configuration.proto deleted file mode 100644 index 81bbbf5f82691..0000000000000 --- a/proto-public/pbmesh/v1alpha1/upstreams_configuration.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -syntax = "proto3"; - -package hashicorp.consul.mesh.v1alpha1; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "pbcatalog/v1alpha1/protocol.proto"; -import "pbcatalog/v1alpha1/selector.proto"; -import "pbmesh/v1alpha1/connection.proto"; -import "pbmesh/v1alpha1/routing.proto"; -import "pbresource/resource.proto"; - -message UpstreamsConfiguration { - // Selection of workloads these upstreams should apply to. - // These can be prefixes or specific workload names. - hashicorp.consul.catalog.v1alpha1.WorkloadSelector workloads = 1; - - // default_config applies to all upstreams for the workloads selected by this resource. - UpstreamConfig default_config = 2; - - // config_overrides provides per-upstream or per-upstream-port config overrides. - repeated UpstreamConfigOverrides config_overrides = 3; -} - -// UpstreamConfigOverrides allow to override upstream configuration per destination_ref/port/datacenter. -// In that sense, those three fields (destination_ref, destination_port and datacenter) are treated -// sort of like map keys and config is a like a map value for that key. -message UpstreamConfigOverrides { - // destination_ref is the reference to an upstream service that this configuration applies to. - // This has to be pbcatalog.Service type. - hashicorp.consul.resource.Reference destination_ref = 1; - - // destination_port is the port name of the upstream service. This should be the name - // of the service's target port. If not provided, this configuration will apply to all ports of an upstream. - string destination_port = 2; - - // datacenter is the datacenter for where this upstream service lives. - string datacenter = 3; - - // config is the configuration that should apply to this upstream. - UpstreamConfig config = 4; -} - -message UpstreamConfig { - // protocol overrides upstream's port protocol. If no port for an upstream is specified - // or if used in the default configuration, this protocol will be used for all ports - // or for all ports of all upstreams respectively. - hashicorp.consul.catalog.v1alpha1.Protocol protocol = 1; - - // connect_timeout is the timeout used when making a new - // connection to this upstream. Defaults to 5 seconds if not set. - google.protobuf.Duration connect_timeout = 2; - - // limits are the set of limits that are applied to the proxy for a specific upstream. - UpstreamLimits limits = 3; - - // passive_health_check configuration determines how upstream proxy instances will - // be monitored for removal from the load balancing pool. - PassiveHealthCheck passive_health_check = 4; - - // balance_outbound_connections indicates how the proxy should attempt to distribute - // connections across worker threads. - BalanceConnections balance_outbound_connections = 5; - - // MeshGatewayMode is the Mesh Gateway routing mode. - MeshGatewayMode mesh_gateway_mode = 6; -} - -// UpstreamLimits describes the limits that are associated with a specific -// upstream of a service instance. -message UpstreamLimits { - // max_connections is the maximum number of connections the local proxy can - // make to the upstream service. - google.protobuf.UInt32Value max_connections = 1; - - // max_pending_requests is the maximum number of requests that will be queued - // waiting for an available connection. This is mostly applicable to HTTP/1.1 - // clusters since all HTTP/2 requests are streamed over a single - // connection. - google.protobuf.UInt32Value max_pending_requests = 2; - - // max_concurrent_requests is the maximum number of in-flight requests that will be allowed - // to the upstream cluster at a point in time. This is mostly applicable to HTTP/2 - // clusters since all HTTP/1.1 requests are limited by MaxConnections. - google.protobuf.UInt32Value max_concurrent_requests = 3; -} - -message PassiveHealthCheck { - // interval between health check analysis sweeps. Each sweep may remove - // hosts or return hosts to the pool. - google.protobuf.Duration interval = 1; - - // max_failures is the count of consecutive failures that results in a host - // being removed from the pool. - uint32 max_failures = 2; - - // enforcing_consecutive_5xx is the % chance that a host will be actually ejected - // when an outlier status is detected through consecutive 5xx. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - uint32 enforcing_consecutive_5xx = 3; -} diff --git a/proto-public/pbmesh/v1alpha1/xroute_addons.go b/proto-public/pbmesh/v1alpha1/xroute_addons.go deleted file mode 100644 index e85177d5160eb..0000000000000 --- a/proto-public/pbmesh/v1alpha1/xroute_addons.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package meshv1alpha1 - -// GetUnderlyingBackendRefs will collect BackendReferences from all rules and -// bundle them up in one slice, unwrapping the HTTP-specifics in the process. -// -// This implements an XRouteWithRefs interface in the internal/mesh package. -// -// NOTE: no deduplication occurs. -func (x *HTTPRoute) GetUnderlyingBackendRefs() []*BackendReference { - if x == nil { - return nil - } - - estimate := 0 - for _, rule := range x.Rules { - estimate += len(rule.BackendRefs) - } - - backendRefs := make([]*BackendReference, 0, estimate) - for _, rule := range x.Rules { - for _, backendRef := range rule.BackendRefs { - backendRefs = append(backendRefs, backendRef.BackendRef) - } - } - return backendRefs -} - -// GetUnderlyingBackendRefs will collect BackendReferences from all rules and -// bundle them up in one slice, unwrapping the GRPC-specifics in the process. -// -// This implements an XRouteWithRefs interface in the internal/mesh package. -// -// NOTE: no deduplication occurs. -func (x *GRPCRoute) GetUnderlyingBackendRefs() []*BackendReference { - if x == nil { - return nil - } - - estimate := 0 - for _, rule := range x.Rules { - estimate += len(rule.BackendRefs) - } - - backendRefs := make([]*BackendReference, 0, estimate) - for _, rule := range x.Rules { - for _, backendRef := range rule.BackendRefs { - backendRefs = append(backendRefs, backendRef.BackendRef) - } - } - return backendRefs -} - -// GetUnderlyingBackendRefs will collect BackendReferences from all rules and -// bundle them up in one slice, unwrapping the TCP-specifics in the process. -// -// This implements an XRouteWithRefs interface in the internal/mesh package. -// -// NOTE: no deduplication occurs. -func (x *TCPRoute) GetUnderlyingBackendRefs() []*BackendReference { - if x == nil { - return nil - } - - estimate := 0 - for _, rule := range x.Rules { - estimate += len(rule.BackendRefs) - } - - backendRefs := make([]*BackendReference, 0, estimate) - - for _, rule := range x.Rules { - for _, backendRef := range rule.BackendRefs { - backendRefs = append(backendRefs, backendRef.BackendRef) - } - } - return backendRefs -} - -// IsHashBased returns true if the policy is a hash-based policy such as maglev -// or ring hash. -func (p LoadBalancerPolicy) IsHashBased() bool { - switch p { - case LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV, - LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH: - return true - } - return false -} diff --git a/proto-public/pbmesh/v1alpha1/xroute_addons_test.go b/proto-public/pbmesh/v1alpha1/xroute_addons_test.go deleted file mode 100644 index ce15282de825d..0000000000000 --- a/proto-public/pbmesh/v1alpha1/xroute_addons_test.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package meshv1alpha1 - -import ( - "testing" - - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - - pbresource "github.com/hashicorp/consul/proto-public/pbresource" -) - -type routeWithAddons interface { - proto.Message - GetUnderlyingBackendRefs() []*BackendReference -} - -func TestXRoute_GetUnderlyingBackendRefs(t *testing.T) { - type testcase struct { - route routeWithAddons - expect []*BackendReference - } - - run := func(t *testing.T, tc testcase) { - got := tc.route.GetUnderlyingBackendRefs() - require.ElementsMatch(t, stringifyList(tc.expect), stringifyList(got)) - } - - cases := map[string]testcase{ - "http: nil": { - route: (*HTTPRoute)(nil), - }, - "grpc: nil": { - route: (*GRPCRoute)(nil), - }, - "tcp: nil": { - route: (*TCPRoute)(nil), - }, - "http: kitchen sink": { - route: &HTTPRoute{ - Rules: []*HTTPRouteRule{ - {BackendRefs: []*HTTPBackendRef{ - {BackendRef: newBackendRef("aa")}, - }}, - {BackendRefs: []*HTTPBackendRef{ - {BackendRef: newBackendRef("bb")}, - }}, - {BackendRefs: []*HTTPBackendRef{ - {BackendRef: newBackendRef("cc")}, - {BackendRef: newBackendRef("dd")}, - }}, - {BackendRefs: []*HTTPBackendRef{ - {BackendRef: newBackendRef("ee")}, - {BackendRef: newBackendRef("ff")}, - }}, - }, - }, - expect: []*BackendReference{ - newBackendRef("aa"), - newBackendRef("bb"), - newBackendRef("cc"), - newBackendRef("dd"), - newBackendRef("ee"), - newBackendRef("ff"), - }, - }, - "grpc: kitchen sink": { - route: &GRPCRoute{ - Rules: []*GRPCRouteRule{ - {BackendRefs: []*GRPCBackendRef{ - {BackendRef: newBackendRef("aa")}, - }}, - {BackendRefs: []*GRPCBackendRef{ - {BackendRef: newBackendRef("bb")}, - }}, - {BackendRefs: []*GRPCBackendRef{ - {BackendRef: newBackendRef("cc")}, - {BackendRef: newBackendRef("dd")}, - }}, - {BackendRefs: []*GRPCBackendRef{ - {BackendRef: newBackendRef("ee")}, - {BackendRef: newBackendRef("ff")}, - }}, - }, - }, - expect: []*BackendReference{ - newBackendRef("aa"), - newBackendRef("bb"), - newBackendRef("cc"), - newBackendRef("dd"), - newBackendRef("ee"), - newBackendRef("ff"), - }, - }, - "tcp: kitchen sink": { - route: &TCPRoute{ - Rules: []*TCPRouteRule{ - {BackendRefs: []*TCPBackendRef{ - {BackendRef: newBackendRef("aa")}, - }}, - {BackendRefs: []*TCPBackendRef{ - {BackendRef: newBackendRef("bb")}, - }}, - {BackendRefs: []*TCPBackendRef{ - {BackendRef: newBackendRef("cc")}, - {BackendRef: newBackendRef("dd")}, - }}, - {BackendRefs: []*TCPBackendRef{ - {BackendRef: newBackendRef("ee")}, - {BackendRef: newBackendRef("ff")}, - }}, - }, - }, - expect: []*BackendReference{ - newBackendRef("aa"), - newBackendRef("bb"), - newBackendRef("cc"), - newBackendRef("dd"), - newBackendRef("ee"), - newBackendRef("ff"), - }, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - run(t, tc) - }) - } -} - -func protoToString[V proto.Message](pb V) string { - m := protojson.MarshalOptions{ - Indent: " ", - } - gotJSON, err := m.Marshal(pb) - if err != nil { - return "" - } - return string(gotJSON) -} - -func newRouteRef(name string) *pbresource.Reference { - return &pbresource.Reference{ - Type: &pbresource.Type{ - Group: "fake", - GroupVersion: "v1alpha1", - Kind: "fake", - }, - Tenancy: &pbresource.Tenancy{ - Partition: "default", - Namespace: "default", - PeerName: "local", - }, - Name: name, - } -} - -func newBackendRef(name string) *BackendReference { - return &BackendReference{ - Ref: newRouteRef(name), - } -} - -func stringifyList[V proto.Message](list []V) []string { - out := make([]string, 0, len(list)) - for _, item := range list { - out = append(out, protoToString(item)) - } - return out -} diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index efb9703b10bae..e8a1a956ab869 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 version: v1 managed: diff --git a/proto/buf.yaml b/proto/buf.yaml index d367418c824b0..de63034c3c1be 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,9 +1,7 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 version: v1 -deps: - - buf.build/hashicorp/consul lint: use: - DEFAULT diff --git a/proto/private/pbacl/acl.go b/proto/private/pbacl/acl.go index 5c9cc6285e6c7..3d3b8de5204a3 100644 --- a/proto/private/pbacl/acl.go +++ b/proto/private/pbacl/acl.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbacl diff --git a/proto/private/pbacl/acl.pb.go b/proto/private/pbacl/acl.pb.go index f6aa5c3418cf2..e8d0719e8d6bf 100644 --- a/proto/private/pbacl/acl.pb.go +++ b/proto/private/pbacl/acl.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbacl/acl.proto b/proto/private/pbacl/acl.proto index 0fa9ecd89dc6a..4a96f2671c319 100644 --- a/proto/private/pbacl/acl.proto +++ b/proto/private/pbacl/acl.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbautoconf/auto_config.go b/proto/private/pbautoconf/auto_config.go index 39d37d1dc8b0f..e2de2f18d9cc5 100644 --- a/proto/private/pbautoconf/auto_config.go +++ b/proto/private/pbautoconf/auto_config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbautoconf diff --git a/proto/private/pbautoconf/auto_config.pb.go b/proto/private/pbautoconf/auto_config.pb.go index a9b4c2c891682..55da1b07f9720 100644 --- a/proto/private/pbautoconf/auto_config.pb.go +++ b/proto/private/pbautoconf/auto_config.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbautoconf/auto_config.proto b/proto/private/pbautoconf/auto_config.proto index a0f4440d79047..a167107655939 100644 --- a/proto/private/pbautoconf/auto_config.proto +++ b/proto/private/pbautoconf/auto_config.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbautoconf/auto_config_ce.go b/proto/private/pbautoconf/auto_config_ce.go index 032ca67ba3c79..1cab31f171c3f 100644 --- a/proto/private/pbautoconf/auto_config_ce.go +++ b/proto/private/pbautoconf/auto_config_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/proto/private/pbcommon/common.go b/proto/private/pbcommon/common.go index ecf935d75f142..e05c0a970a886 100644 --- a/proto/private/pbcommon/common.go +++ b/proto/private/pbcommon/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbcommon diff --git a/proto/private/pbcommon/common.pb.go b/proto/private/pbcommon/common.pb.go index fc6928184132d..dd6240ad85e9e 100644 --- a/proto/private/pbcommon/common.pb.go +++ b/proto/private/pbcommon/common.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbcommon/common.proto b/proto/private/pbcommon/common.proto index 2296dc69d628a..a86aa2dde53d1 100644 --- a/proto/private/pbcommon/common.proto +++ b/proto/private/pbcommon/common.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbcommon/common_ce.go b/proto/private/pbcommon/common_ce.go index 94aef583a1a23..c0ce9b27f8503 100644 --- a/proto/private/pbcommon/common_ce.go +++ b/proto/private/pbcommon/common_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/proto/private/pbcommon/convert_pbstruct.go b/proto/private/pbcommon/convert_pbstruct.go index f21d9a40ed49d..e48dce9ae6e0b 100644 --- a/proto/private/pbcommon/convert_pbstruct.go +++ b/proto/private/pbcommon/convert_pbstruct.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbcommon diff --git a/proto/private/pbcommon/convert_pbstruct_test.go b/proto/private/pbcommon/convert_pbstruct_test.go index 82f52c6992884..543129fdfd2fd 100644 --- a/proto/private/pbcommon/convert_pbstruct_test.go +++ b/proto/private/pbcommon/convert_pbstruct_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbcommon diff --git a/proto/private/pbconfig/config.pb.go b/proto/private/pbconfig/config.pb.go index ce8e43c7ce912..61c394944f7a5 100644 --- a/proto/private/pbconfig/config.pb.go +++ b/proto/private/pbconfig/config.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbconfig/config.proto b/proto/private/pbconfig/config.proto index 96a0f1cae04e5..79b4a3669e8b2 100644 --- a/proto/private/pbconfig/config.proto +++ b/proto/private/pbconfig/config.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbconfigentry/config_entry.gen.go b/proto/private/pbconfigentry/config_entry.gen.go index ed5d9fcf78feb..ca75146af425e 100644 --- a/proto/private/pbconfigentry/config_entry.gen.go +++ b/proto/private/pbconfigentry/config_entry.gen.go @@ -53,16 +53,6 @@ func APIGatewayListenerToStructs(s *APIGatewayListener, t *structs.APIGatewayLis if s.TLS != nil { APIGatewayTLSConfigurationToStructs(s.TLS, &t.TLS) } - if s.Override != nil { - var x structs.APIGatewayPolicy - APIGatewayPolicyToStructs(s.Override, &x) - t.Override = &x - } - if s.Default != nil { - var x structs.APIGatewayPolicy - APIGatewayPolicyToStructs(s.Default, &x) - t.Default = &x - } } func APIGatewayListenerFromStructs(t *structs.APIGatewayListener, s *APIGatewayListener) { if s == nil { @@ -77,28 +67,6 @@ func APIGatewayListenerFromStructs(t *structs.APIGatewayListener, s *APIGatewayL APIGatewayTLSConfigurationFromStructs(&t.TLS, &x) s.TLS = &x } - if t.Override != nil { - var x APIGatewayPolicy - APIGatewayPolicyFromStructs(t.Override, &x) - s.Override = &x - } - if t.Default != nil { - var x APIGatewayPolicy - APIGatewayPolicyFromStructs(t.Default, &x) - s.Default = &x - } -} -func APIGatewayPolicyToStructs(s *APIGatewayPolicy, t *structs.APIGatewayPolicy) { - if s == nil { - return - } - t.JWT = gwJWTRequirementToStructs(s.JWT) -} -func APIGatewayPolicyFromStructs(t *structs.APIGatewayPolicy, s *APIGatewayPolicy) { - if s == nil { - return - } - s.JWT = gwJWTRequirementFromStructs(t.JWT) } func APIGatewayTLSConfigurationToStructs(s *APIGatewayTLSConfiguration, t *structs.APIGatewayTLSConfiguration) { if s == nil { @@ -401,17 +369,6 @@ func HTTPFiltersToStructs(s *HTTPFilters, t *structs.HTTPFilters) { URLRewriteToStructs(s.URLRewrite, &x) t.URLRewrite = &x } - if s.RetryFilter != nil { - var x structs.RetryFilter - RetryFilterToStructs(s.RetryFilter, &x) - t.RetryFilter = &x - } - if s.TimeoutFilter != nil { - var x structs.TimeoutFilter - TimeoutFilterToStructs(s.TimeoutFilter, &x) - t.TimeoutFilter = &x - } - t.JWT = routeJWTFilterToStructs(s.JWT) } func HTTPFiltersFromStructs(t *structs.HTTPFilters, s *HTTPFilters) { if s == nil { @@ -432,17 +389,6 @@ func HTTPFiltersFromStructs(t *structs.HTTPFilters, s *HTTPFilters) { URLRewriteFromStructs(t.URLRewrite, &x) s.URLRewrite = &x } - if t.RetryFilter != nil { - var x RetryFilter - RetryFilterFromStructs(t.RetryFilter, &x) - s.RetryFilter = &x - } - if t.TimeoutFilter != nil { - var x TimeoutFilter - TimeoutFilterFromStructs(t.TimeoutFilter, &x) - s.TimeoutFilter = &x - } - s.JWT = routeJWTFilterFromStructs(t.JWT) } func HTTPHeaderFilterToStructs(s *HTTPHeaderFilter, t *structs.HTTPHeaderFilter) { if s == nil { @@ -1704,24 +1650,6 @@ func ResourceReferenceFromStructs(t *structs.ResourceReference, s *ResourceRefer s.SectionName = t.SectionName s.EnterpriseMeta = enterpriseMetaFromStructs(t.EnterpriseMeta) } -func RetryFilterToStructs(s *RetryFilter, t *structs.RetryFilter) { - if s == nil { - return - } - t.NumRetries = &s.NumRetries - t.RetryOn = s.RetryOn - t.RetryOnStatusCodes = s.RetryOnStatusCodes - t.RetryOnConnectFailure = &s.RetryOnConnectFailure -} -func RetryFilterFromStructs(t *structs.RetryFilter, s *RetryFilter) { - if s == nil { - return - } - s.NumRetries = *t.NumRetries - s.RetryOn = t.RetryOn - s.RetryOnStatusCodes = t.RetryOnStatusCodes - s.RetryOnConnectFailure = *t.RetryOnConnectFailure -} func RetryPolicyBackOffToStructs(s *RetryPolicyBackOff, t *structs.RetryPolicyBackOff) { if s == nil { return @@ -2296,20 +2224,6 @@ func TCPServiceFromStructs(t *structs.TCPService, s *TCPService) { s.Name = t.Name s.EnterpriseMeta = enterpriseMetaFromStructs(t.EnterpriseMeta) } -func TimeoutFilterToStructs(s *TimeoutFilter, t *structs.TimeoutFilter) { - if s == nil { - return - } - t.RequestTimeout = structs.DurationFromProto(s.RequestTimeout) - t.IdleTimeout = structs.DurationFromProto(s.IdleTimeout) -} -func TimeoutFilterFromStructs(t *structs.TimeoutFilter, s *TimeoutFilter) { - if s == nil { - return - } - s.RequestTimeout = structs.DurationToProto(t.RequestTimeout) - s.IdleTimeout = structs.DurationToProto(t.IdleTimeout) -} func TransparentProxyConfigToStructs(s *TransparentProxyConfig, t *structs.TransparentProxyConfig) { if s == nil { return diff --git a/proto/private/pbconfigentry/config_entry.go b/proto/private/pbconfigentry/config_entry.go index 8ddfde8cccfb9..705c87d0131ef 100644 --- a/proto/private/pbconfigentry/config_entry.go +++ b/proto/private/pbconfigentry/config_entry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbconfigentry diff --git a/proto/private/pbconfigentry/config_entry.pb.binary.go b/proto/private/pbconfigentry/config_entry.pb.binary.go index ee73e24eed854..bd9bac6c7e762 100644 --- a/proto/private/pbconfigentry/config_entry.pb.binary.go +++ b/proto/private/pbconfigentry/config_entry.pb.binary.go @@ -507,46 +507,6 @@ func (msg *APIGatewayTLSConfiguration) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *APIGatewayPolicy) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *APIGatewayPolicy) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *APIGatewayJWTRequirement) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *APIGatewayJWTRequirement) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *APIGatewayJWTProvider) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *APIGatewayJWTProvider) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *APIGatewayJWTClaimVerification) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *APIGatewayJWTClaimVerification) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - // MarshalBinary implements encoding.BinaryMarshaler func (msg *ResourceReference) MarshalBinary() ([]byte, error) { return proto.Marshal(msg) @@ -667,36 +627,6 @@ func (msg *URLRewrite) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RetryFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RetryFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *TimeoutFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *TimeoutFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *JWTFilter) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *JWTFilter) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - // MarshalBinary implements encoding.BinaryMarshaler func (msg *HTTPHeaderFilter) MarshalBinary() ([]byte, error) { return proto.Marshal(msg) diff --git a/proto/private/pbconfigentry/config_entry.pb.go b/proto/private/pbconfigentry/config_entry.pb.go index 8ec7635b3ad10..2977d593f824c 100644 --- a/proto/private/pbconfigentry/config_entry.pb.go +++ b/proto/private/pbconfigentry/config_entry.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -4524,8 +4524,6 @@ type APIGatewayListener struct { // mog: func-to=apiGatewayProtocolToStructs func-from=apiGatewayProtocolFromStructs Protocol APIGatewayListenerProtocol `protobuf:"varint,4,opt,name=Protocol,proto3,enum=hashicorp.consul.internal.configentry.APIGatewayListenerProtocol" json:"Protocol,omitempty"` TLS *APIGatewayTLSConfiguration `protobuf:"bytes,5,opt,name=TLS,proto3" json:"TLS,omitempty"` - Override *APIGatewayPolicy `protobuf:"bytes,6,opt,name=Override,proto3" json:"Override,omitempty"` - Default *APIGatewayPolicy `protobuf:"bytes,7,opt,name=Default,proto3" json:"Default,omitempty"` } func (x *APIGatewayListener) Reset() { @@ -4595,20 +4593,6 @@ func (x *APIGatewayListener) GetTLS() *APIGatewayTLSConfiguration { return nil } -func (x *APIGatewayListener) GetOverride() *APIGatewayPolicy { - if x != nil { - return x.Override - } - return nil -} - -func (x *APIGatewayListener) GetDefault() *APIGatewayPolicy { - if x != nil { - return x.Default - } - return nil -} - // mog annotation: // // target=github.com/hashicorp/consul/agent/structs.APIGatewayTLSConfiguration @@ -4688,216 +4672,6 @@ func (x *APIGatewayTLSConfiguration) GetCipherSuites() []string { return nil } -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.APIGatewayPolicy -// output=config_entry.gen.go -// name=Structs -type APIGatewayPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // mog: func-to=gwJWTRequirementToStructs func-from=gwJWTRequirementFromStructs - JWT *APIGatewayJWTRequirement `protobuf:"bytes,1,opt,name=JWT,proto3" json:"JWT,omitempty"` -} - -func (x *APIGatewayPolicy) Reset() { - *x = APIGatewayPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *APIGatewayPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*APIGatewayPolicy) ProtoMessage() {} - -func (x *APIGatewayPolicy) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use APIGatewayPolicy.ProtoReflect.Descriptor instead. -func (*APIGatewayPolicy) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{50} -} - -func (x *APIGatewayPolicy) GetJWT() *APIGatewayJWTRequirement { - if x != nil { - return x.JWT - } - return nil -} - -type APIGatewayJWTRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Providers []*APIGatewayJWTProvider `protobuf:"bytes,1,rep,name=Providers,proto3" json:"Providers,omitempty"` -} - -func (x *APIGatewayJWTRequirement) Reset() { - *x = APIGatewayJWTRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *APIGatewayJWTRequirement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*APIGatewayJWTRequirement) ProtoMessage() {} - -func (x *APIGatewayJWTRequirement) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use APIGatewayJWTRequirement.ProtoReflect.Descriptor instead. -func (*APIGatewayJWTRequirement) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{51} -} - -func (x *APIGatewayJWTRequirement) GetProviders() []*APIGatewayJWTProvider { - if x != nil { - return x.Providers - } - return nil -} - -type APIGatewayJWTProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - VerifyClaims []*APIGatewayJWTClaimVerification `protobuf:"bytes,2,rep,name=VerifyClaims,proto3" json:"VerifyClaims,omitempty"` -} - -func (x *APIGatewayJWTProvider) Reset() { - *x = APIGatewayJWTProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *APIGatewayJWTProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*APIGatewayJWTProvider) ProtoMessage() {} - -func (x *APIGatewayJWTProvider) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use APIGatewayJWTProvider.ProtoReflect.Descriptor instead. -func (*APIGatewayJWTProvider) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{52} -} - -func (x *APIGatewayJWTProvider) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *APIGatewayJWTProvider) GetVerifyClaims() []*APIGatewayJWTClaimVerification { - if x != nil { - return x.VerifyClaims - } - return nil -} - -type APIGatewayJWTClaimVerification struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path []string `protobuf:"bytes,1,rep,name=Path,proto3" json:"Path,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` -} - -func (x *APIGatewayJWTClaimVerification) Reset() { - *x = APIGatewayJWTClaimVerification{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *APIGatewayJWTClaimVerification) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*APIGatewayJWTClaimVerification) ProtoMessage() {} - -func (x *APIGatewayJWTClaimVerification) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use APIGatewayJWTClaimVerification.ProtoReflect.Descriptor instead. -func (*APIGatewayJWTClaimVerification) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{53} -} - -func (x *APIGatewayJWTClaimVerification) GetPath() []string { - if x != nil { - return x.Path - } - return nil -} - -func (x *APIGatewayJWTClaimVerification) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - // mog annotation: // // target=github.com/hashicorp/consul/agent/structs.ResourceReference @@ -4918,7 +4692,7 @@ type ResourceReference struct { func (x *ResourceReference) Reset() { *x = ResourceReference{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[54] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4931,7 +4705,7 @@ func (x *ResourceReference) String() string { func (*ResourceReference) ProtoMessage() {} func (x *ResourceReference) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[54] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4944,7 +4718,7 @@ func (x *ResourceReference) ProtoReflect() protoreflect.Message { // Deprecated: Use ResourceReference.ProtoReflect.Descriptor instead. func (*ResourceReference) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{54} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{50} } func (x *ResourceReference) GetKind() string { @@ -4993,7 +4767,7 @@ type BoundAPIGateway struct { func (x *BoundAPIGateway) Reset() { *x = BoundAPIGateway{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[55] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5006,7 +4780,7 @@ func (x *BoundAPIGateway) String() string { func (*BoundAPIGateway) ProtoMessage() {} func (x *BoundAPIGateway) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[55] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5019,7 +4793,7 @@ func (x *BoundAPIGateway) ProtoReflect() protoreflect.Message { // Deprecated: Use BoundAPIGateway.ProtoReflect.Descriptor instead. func (*BoundAPIGateway) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{55} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{51} } func (x *BoundAPIGateway) GetMeta() map[string]string { @@ -5054,7 +4828,7 @@ type BoundAPIGatewayListener struct { func (x *BoundAPIGatewayListener) Reset() { *x = BoundAPIGatewayListener{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[56] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5067,7 +4841,7 @@ func (x *BoundAPIGatewayListener) String() string { func (*BoundAPIGatewayListener) ProtoMessage() {} func (x *BoundAPIGatewayListener) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[56] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5080,7 +4854,7 @@ func (x *BoundAPIGatewayListener) ProtoReflect() protoreflect.Message { // Deprecated: Use BoundAPIGatewayListener.ProtoReflect.Descriptor instead. func (*BoundAPIGatewayListener) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{56} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{52} } func (x *BoundAPIGatewayListener) GetName() string { @@ -5123,7 +4897,7 @@ type InlineCertificate struct { func (x *InlineCertificate) Reset() { *x = InlineCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[57] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5136,7 +4910,7 @@ func (x *InlineCertificate) String() string { func (*InlineCertificate) ProtoMessage() {} func (x *InlineCertificate) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[57] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5149,7 +4923,7 @@ func (x *InlineCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use InlineCertificate.ProtoReflect.Descriptor instead. func (*InlineCertificate) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{57} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{53} } func (x *InlineCertificate) GetMeta() map[string]string { @@ -5194,7 +4968,7 @@ type HTTPRoute struct { func (x *HTTPRoute) Reset() { *x = HTTPRoute{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[58] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5207,7 +4981,7 @@ func (x *HTTPRoute) String() string { func (*HTTPRoute) ProtoMessage() {} func (x *HTTPRoute) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[58] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5220,7 +4994,7 @@ func (x *HTTPRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPRoute.ProtoReflect.Descriptor instead. func (*HTTPRoute) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{58} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{54} } func (x *HTTPRoute) GetMeta() map[string]string { @@ -5276,7 +5050,7 @@ type HTTPRouteRule struct { func (x *HTTPRouteRule) Reset() { *x = HTTPRouteRule{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[59] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5289,7 +5063,7 @@ func (x *HTTPRouteRule) String() string { func (*HTTPRouteRule) ProtoMessage() {} func (x *HTTPRouteRule) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[59] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5302,7 +5076,7 @@ func (x *HTTPRouteRule) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPRouteRule.ProtoReflect.Descriptor instead. func (*HTTPRouteRule) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{59} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{55} } func (x *HTTPRouteRule) GetFilters() *HTTPFilters { @@ -5346,7 +5120,7 @@ type HTTPMatch struct { func (x *HTTPMatch) Reset() { *x = HTTPMatch{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[60] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5359,7 +5133,7 @@ func (x *HTTPMatch) String() string { func (*HTTPMatch) ProtoMessage() {} func (x *HTTPMatch) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[60] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5372,7 +5146,7 @@ func (x *HTTPMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPMatch.ProtoReflect.Descriptor instead. func (*HTTPMatch) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{60} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{56} } func (x *HTTPMatch) GetHeaders() []*HTTPHeaderMatch { @@ -5422,7 +5196,7 @@ type HTTPHeaderMatch struct { func (x *HTTPHeaderMatch) Reset() { *x = HTTPHeaderMatch{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[61] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5435,7 +5209,7 @@ func (x *HTTPHeaderMatch) String() string { func (*HTTPHeaderMatch) ProtoMessage() {} func (x *HTTPHeaderMatch) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[61] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5448,7 +5222,7 @@ func (x *HTTPHeaderMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPHeaderMatch.ProtoReflect.Descriptor instead. func (*HTTPHeaderMatch) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{61} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{57} } func (x *HTTPHeaderMatch) GetMatch() HTTPHeaderMatchType { @@ -5490,7 +5264,7 @@ type HTTPPathMatch struct { func (x *HTTPPathMatch) Reset() { *x = HTTPPathMatch{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[62] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5503,7 +5277,7 @@ func (x *HTTPPathMatch) String() string { func (*HTTPPathMatch) ProtoMessage() {} func (x *HTTPPathMatch) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[62] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5516,262 +5290,56 @@ func (x *HTTPPathMatch) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPPathMatch.ProtoReflect.Descriptor instead. func (*HTTPPathMatch) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{62} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{58} } func (x *HTTPPathMatch) GetMatch() HTTPPathMatchType { if x != nil { - return x.Match - } - return HTTPPathMatchType_HTTPPathMatchExact -} - -func (x *HTTPPathMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.HTTPQueryMatch -// output=config_entry.gen.go -// name=Structs -type HTTPQueryMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // mog: func-to=httpQueryMatchToStructs func-from=httpQueryMatchFromStructs - Match HTTPQueryMatchType `protobuf:"varint,1,opt,name=Match,proto3,enum=hashicorp.consul.internal.configentry.HTTPQueryMatchType" json:"Match,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` - Value string `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"` -} - -func (x *HTTPQueryMatch) Reset() { - *x = HTTPQueryMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPQueryMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPQueryMatch) ProtoMessage() {} - -func (x *HTTPQueryMatch) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPQueryMatch.ProtoReflect.Descriptor instead. -func (*HTTPQueryMatch) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{63} -} - -func (x *HTTPQueryMatch) GetMatch() HTTPQueryMatchType { - if x != nil { - return x.Match - } - return HTTPQueryMatchType_HTTPQueryMatchExact -} - -func (x *HTTPQueryMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HTTPQueryMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.HTTPFilters -// output=config_entry.gen.go -// name=Structs -type HTTPFilters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Headers []*HTTPHeaderFilter `protobuf:"bytes,1,rep,name=Headers,proto3" json:"Headers,omitempty"` - URLRewrite *URLRewrite `protobuf:"bytes,2,opt,name=URLRewrite,proto3" json:"URLRewrite,omitempty"` - RetryFilter *RetryFilter `protobuf:"bytes,3,opt,name=RetryFilter,proto3" json:"RetryFilter,omitempty"` - TimeoutFilter *TimeoutFilter `protobuf:"bytes,4,opt,name=TimeoutFilter,proto3" json:"TimeoutFilter,omitempty"` - // mog: func-to=routeJWTFilterToStructs func-from=routeJWTFilterFromStructs - JWT *JWTFilter `protobuf:"bytes,5,opt,name=JWT,proto3" json:"JWT,omitempty"` -} - -func (x *HTTPFilters) Reset() { - *x = HTTPFilters{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPFilters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPFilters) ProtoMessage() {} - -func (x *HTTPFilters) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPFilters.ProtoReflect.Descriptor instead. -func (*HTTPFilters) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{64} -} - -func (x *HTTPFilters) GetHeaders() []*HTTPHeaderFilter { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HTTPFilters) GetURLRewrite() *URLRewrite { - if x != nil { - return x.URLRewrite - } - return nil -} - -func (x *HTTPFilters) GetRetryFilter() *RetryFilter { - if x != nil { - return x.RetryFilter - } - return nil -} - -func (x *HTTPFilters) GetTimeoutFilter() *TimeoutFilter { - if x != nil { - return x.TimeoutFilter - } - return nil -} - -func (x *HTTPFilters) GetJWT() *JWTFilter { - if x != nil { - return x.JWT - } - return nil -} - -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.URLRewrite -// output=config_entry.gen.go -// name=Structs -type URLRewrite struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"` -} - -func (x *URLRewrite) Reset() { - *x = URLRewrite{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *URLRewrite) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*URLRewrite) ProtoMessage() {} - -func (x *URLRewrite) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use URLRewrite.ProtoReflect.Descriptor instead. -func (*URLRewrite) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{65} + return x.Match + } + return HTTPPathMatchType_HTTPPathMatchExact } -func (x *URLRewrite) GetPath() string { +func (x *HTTPPathMatch) GetValue() string { if x != nil { - return x.Path + return x.Value } return "" } // mog annotation: // -// target=github.com/hashicorp/consul/agent/structs.RetryFilter +// target=github.com/hashicorp/consul/agent/structs.HTTPQueryMatch // output=config_entry.gen.go // name=Structs -type RetryFilter struct { +type HTTPQueryMatch struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NumRetries uint32 `protobuf:"varint,1,opt,name=NumRetries,proto3" json:"NumRetries,omitempty"` - RetryOn []string `protobuf:"bytes,2,rep,name=RetryOn,proto3" json:"RetryOn,omitempty"` - RetryOnStatusCodes []uint32 `protobuf:"varint,3,rep,packed,name=RetryOnStatusCodes,proto3" json:"RetryOnStatusCodes,omitempty"` - RetryOnConnectFailure bool `protobuf:"varint,4,opt,name=RetryOnConnectFailure,proto3" json:"RetryOnConnectFailure,omitempty"` + // mog: func-to=httpQueryMatchToStructs func-from=httpQueryMatchFromStructs + Match HTTPQueryMatchType `protobuf:"varint,1,opt,name=Match,proto3,enum=hashicorp.consul.internal.configentry.HTTPQueryMatchType" json:"Match,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"` } -func (x *RetryFilter) Reset() { - *x = RetryFilter{} +func (x *HTTPQueryMatch) Reset() { + *x = HTTPQueryMatch{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[66] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RetryFilter) String() string { +func (x *HTTPQueryMatch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RetryFilter) ProtoMessage() {} +func (*HTTPQueryMatch) ProtoMessage() {} -func (x *RetryFilter) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[66] +func (x *HTTPQueryMatch) ProtoReflect() protoreflect.Message { + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5782,72 +5350,63 @@ func (x *RetryFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RetryFilter.ProtoReflect.Descriptor instead. -func (*RetryFilter) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{66} -} - -func (x *RetryFilter) GetNumRetries() uint32 { - if x != nil { - return x.NumRetries - } - return 0 +// Deprecated: Use HTTPQueryMatch.ProtoReflect.Descriptor instead. +func (*HTTPQueryMatch) Descriptor() ([]byte, []int) { + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{59} } -func (x *RetryFilter) GetRetryOn() []string { +func (x *HTTPQueryMatch) GetMatch() HTTPQueryMatchType { if x != nil { - return x.RetryOn + return x.Match } - return nil + return HTTPQueryMatchType_HTTPQueryMatchExact } -func (x *RetryFilter) GetRetryOnStatusCodes() []uint32 { +func (x *HTTPQueryMatch) GetName() string { if x != nil { - return x.RetryOnStatusCodes + return x.Name } - return nil + return "" } -func (x *RetryFilter) GetRetryOnConnectFailure() bool { +func (x *HTTPQueryMatch) GetValue() string { if x != nil { - return x.RetryOnConnectFailure + return x.Value } - return false + return "" } // mog annotation: // -// target=github.com/hashicorp/consul/agent/structs.TimeoutFilter +// target=github.com/hashicorp/consul/agent/structs.HTTPFilters // output=config_entry.gen.go // name=Structs -type TimeoutFilter struct { +type HTTPFilters struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto - RequestTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=RequestTimeout,proto3" json:"RequestTimeout,omitempty"` - // mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto - IdleTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=IdleTimeout,proto3" json:"IdleTimeout,omitempty"` + Headers []*HTTPHeaderFilter `protobuf:"bytes,1,rep,name=Headers,proto3" json:"Headers,omitempty"` + URLRewrite *URLRewrite `protobuf:"bytes,2,opt,name=URLRewrite,proto3" json:"URLRewrite,omitempty"` } -func (x *TimeoutFilter) Reset() { - *x = TimeoutFilter{} +func (x *HTTPFilters) Reset() { + *x = HTTPFilters{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[67] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TimeoutFilter) String() string { +func (x *HTTPFilters) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TimeoutFilter) ProtoMessage() {} +func (*HTTPFilters) ProtoMessage() {} -func (x *TimeoutFilter) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[67] +func (x *HTTPFilters) ProtoReflect() protoreflect.Message { + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5858,50 +5417,55 @@ func (x *TimeoutFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimeoutFilter.ProtoReflect.Descriptor instead. -func (*TimeoutFilter) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{67} +// Deprecated: Use HTTPFilters.ProtoReflect.Descriptor instead. +func (*HTTPFilters) Descriptor() ([]byte, []int) { + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{60} } -func (x *TimeoutFilter) GetRequestTimeout() *durationpb.Duration { +func (x *HTTPFilters) GetHeaders() []*HTTPHeaderFilter { if x != nil { - return x.RequestTimeout + return x.Headers } return nil } -func (x *TimeoutFilter) GetIdleTimeout() *durationpb.Duration { +func (x *HTTPFilters) GetURLRewrite() *URLRewrite { if x != nil { - return x.IdleTimeout + return x.URLRewrite } return nil } -type JWTFilter struct { +// mog annotation: +// +// target=github.com/hashicorp/consul/agent/structs.URLRewrite +// output=config_entry.gen.go +// name=Structs +type URLRewrite struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Providers []*APIGatewayJWTProvider `protobuf:"bytes,1,rep,name=Providers,proto3" json:"Providers,omitempty"` + Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"` } -func (x *JWTFilter) Reset() { - *x = JWTFilter{} +func (x *URLRewrite) Reset() { + *x = URLRewrite{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[68] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *JWTFilter) String() string { +func (x *URLRewrite) String() string { return protoimpl.X.MessageStringOf(x) } -func (*JWTFilter) ProtoMessage() {} +func (*URLRewrite) ProtoMessage() {} -func (x *JWTFilter) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[68] +func (x *URLRewrite) ProtoReflect() protoreflect.Message { + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5912,16 +5476,16 @@ func (x *JWTFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use JWTFilter.ProtoReflect.Descriptor instead. -func (*JWTFilter) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{68} +// Deprecated: Use URLRewrite.ProtoReflect.Descriptor instead. +func (*URLRewrite) Descriptor() ([]byte, []int) { + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{61} } -func (x *JWTFilter) GetProviders() []*APIGatewayJWTProvider { +func (x *URLRewrite) GetPath() string { if x != nil { - return x.Providers + return x.Path } - return nil + return "" } // mog annotation: @@ -5942,7 +5506,7 @@ type HTTPHeaderFilter struct { func (x *HTTPHeaderFilter) Reset() { *x = HTTPHeaderFilter{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[69] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5955,7 +5519,7 @@ func (x *HTTPHeaderFilter) String() string { func (*HTTPHeaderFilter) ProtoMessage() {} func (x *HTTPHeaderFilter) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[69] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5968,7 +5532,7 @@ func (x *HTTPHeaderFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPHeaderFilter.ProtoReflect.Descriptor instead. func (*HTTPHeaderFilter) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{69} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{62} } func (x *HTTPHeaderFilter) GetAdd() map[string]string { @@ -6013,7 +5577,7 @@ type HTTPService struct { func (x *HTTPService) Reset() { *x = HTTPService{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[70] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6026,7 +5590,7 @@ func (x *HTTPService) String() string { func (*HTTPService) ProtoMessage() {} func (x *HTTPService) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[70] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6039,7 +5603,7 @@ func (x *HTTPService) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPService.ProtoReflect.Descriptor instead. func (*HTTPService) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{70} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{63} } func (x *HTTPService) GetName() string { @@ -6090,7 +5654,7 @@ type TCPRoute struct { func (x *TCPRoute) Reset() { *x = TCPRoute{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[71] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6103,7 +5667,7 @@ func (x *TCPRoute) String() string { func (*TCPRoute) ProtoMessage() {} func (x *TCPRoute) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[71] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6116,7 +5680,7 @@ func (x *TCPRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use TCPRoute.ProtoReflect.Descriptor instead. func (*TCPRoute) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{71} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{64} } func (x *TCPRoute) GetMeta() map[string]string { @@ -6165,7 +5729,7 @@ type TCPService struct { func (x *TCPService) Reset() { *x = TCPService{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[72] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6178,7 +5742,7 @@ func (x *TCPService) String() string { func (*TCPService) ProtoMessage() {} func (x *TCPService) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[72] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6191,7 +5755,7 @@ func (x *TCPService) ProtoReflect() protoreflect.Message { // Deprecated: Use TCPService.ProtoReflect.Descriptor instead. func (*TCPService) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{72} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{65} } func (x *TCPService) GetName() string { @@ -6231,7 +5795,7 @@ type SamenessGroup struct { func (x *SamenessGroup) Reset() { *x = SamenessGroup{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[73] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6244,7 +5808,7 @@ func (x *SamenessGroup) String() string { func (*SamenessGroup) ProtoMessage() {} func (x *SamenessGroup) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[73] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6257,7 +5821,7 @@ func (x *SamenessGroup) ProtoReflect() protoreflect.Message { // Deprecated: Use SamenessGroup.ProtoReflect.Descriptor instead. func (*SamenessGroup) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{73} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{66} } func (x *SamenessGroup) GetName() string { @@ -6319,7 +5883,7 @@ type SamenessGroupMember struct { func (x *SamenessGroupMember) Reset() { *x = SamenessGroupMember{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[74] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6332,7 +5896,7 @@ func (x *SamenessGroupMember) String() string { func (*SamenessGroupMember) ProtoMessage() {} func (x *SamenessGroupMember) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[74] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6345,7 +5909,7 @@ func (x *SamenessGroupMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SamenessGroupMember.ProtoReflect.Descriptor instead. func (*SamenessGroupMember) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{74} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{67} } func (x *SamenessGroupMember) GetPartition() string { @@ -6387,7 +5951,7 @@ type JWTProvider struct { func (x *JWTProvider) Reset() { *x = JWTProvider{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[75] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6400,7 +5964,7 @@ func (x *JWTProvider) String() string { func (*JWTProvider) ProtoMessage() {} func (x *JWTProvider) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[75] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6413,7 +5977,7 @@ func (x *JWTProvider) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTProvider.ProtoReflect.Descriptor instead. func (*JWTProvider) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{75} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{68} } func (x *JWTProvider) GetJSONWebKeySet() *JSONWebKeySet { @@ -6489,7 +6053,7 @@ type JSONWebKeySet struct { func (x *JSONWebKeySet) Reset() { *x = JSONWebKeySet{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[76] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6502,7 +6066,7 @@ func (x *JSONWebKeySet) String() string { func (*JSONWebKeySet) ProtoMessage() {} func (x *JSONWebKeySet) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[76] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6515,7 +6079,7 @@ func (x *JSONWebKeySet) ProtoReflect() protoreflect.Message { // Deprecated: Use JSONWebKeySet.ProtoReflect.Descriptor instead. func (*JSONWebKeySet) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{76} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{69} } func (x *JSONWebKeySet) GetLocal() *LocalJWKS { @@ -6549,7 +6113,7 @@ type LocalJWKS struct { func (x *LocalJWKS) Reset() { *x = LocalJWKS{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[77] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6562,7 +6126,7 @@ func (x *LocalJWKS) String() string { func (*LocalJWKS) ProtoMessage() {} func (x *LocalJWKS) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[77] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6575,7 +6139,7 @@ func (x *LocalJWKS) ProtoReflect() protoreflect.Message { // Deprecated: Use LocalJWKS.ProtoReflect.Descriptor instead. func (*LocalJWKS) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{77} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{70} } func (x *LocalJWKS) GetJWKS() string { @@ -6615,7 +6179,7 @@ type RemoteJWKS struct { func (x *RemoteJWKS) Reset() { *x = RemoteJWKS{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[78] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6628,7 +6192,7 @@ func (x *RemoteJWKS) String() string { func (*RemoteJWKS) ProtoMessage() {} func (x *RemoteJWKS) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[78] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6641,7 +6205,7 @@ func (x *RemoteJWKS) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoteJWKS.ProtoReflect.Descriptor instead. func (*RemoteJWKS) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{78} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{71} } func (x *RemoteJWKS) GetURI() string { @@ -6705,7 +6269,7 @@ type JWKSCluster struct { func (x *JWKSCluster) Reset() { *x = JWKSCluster{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[79] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6718,7 +6282,7 @@ func (x *JWKSCluster) String() string { func (*JWKSCluster) ProtoMessage() {} func (x *JWKSCluster) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[79] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6731,7 +6295,7 @@ func (x *JWKSCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use JWKSCluster.ProtoReflect.Descriptor instead. func (*JWKSCluster) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{79} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{72} } func (x *JWKSCluster) GetDiscoveryType() string { @@ -6772,7 +6336,7 @@ type JWKSTLSCertificate struct { func (x *JWKSTLSCertificate) Reset() { *x = JWKSTLSCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[80] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6785,7 +6349,7 @@ func (x *JWKSTLSCertificate) String() string { func (*JWKSTLSCertificate) ProtoMessage() {} func (x *JWKSTLSCertificate) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[80] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6798,7 +6362,7 @@ func (x *JWKSTLSCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use JWKSTLSCertificate.ProtoReflect.Descriptor instead. func (*JWKSTLSCertificate) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{80} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{73} } func (x *JWKSTLSCertificate) GetCaCertificateProviderInstance() *JWKSTLSCertProviderInstance { @@ -6832,7 +6396,7 @@ type JWKSTLSCertProviderInstance struct { func (x *JWKSTLSCertProviderInstance) Reset() { *x = JWKSTLSCertProviderInstance{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[81] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6845,7 +6409,7 @@ func (x *JWKSTLSCertProviderInstance) String() string { func (*JWKSTLSCertProviderInstance) ProtoMessage() {} func (x *JWKSTLSCertProviderInstance) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[81] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6858,7 +6422,7 @@ func (x *JWKSTLSCertProviderInstance) ProtoReflect() protoreflect.Message { // Deprecated: Use JWKSTLSCertProviderInstance.ProtoReflect.Descriptor instead. func (*JWKSTLSCertProviderInstance) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{81} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{74} } func (x *JWKSTLSCertProviderInstance) GetInstanceName() string { @@ -6894,7 +6458,7 @@ type JWKSTLSCertTrustedCA struct { func (x *JWKSTLSCertTrustedCA) Reset() { *x = JWKSTLSCertTrustedCA{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[82] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6907,7 +6471,7 @@ func (x *JWKSTLSCertTrustedCA) String() string { func (*JWKSTLSCertTrustedCA) ProtoMessage() {} func (x *JWKSTLSCertTrustedCA) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[82] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6920,7 +6484,7 @@ func (x *JWKSTLSCertTrustedCA) ProtoReflect() protoreflect.Message { // Deprecated: Use JWKSTLSCertTrustedCA.ProtoReflect.Descriptor instead. func (*JWKSTLSCertTrustedCA) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{82} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{75} } func (x *JWKSTLSCertTrustedCA) GetFilename() string { @@ -6969,7 +6533,7 @@ type JWKSRetryPolicy struct { func (x *JWKSRetryPolicy) Reset() { *x = JWKSRetryPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[83] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6982,7 +6546,7 @@ func (x *JWKSRetryPolicy) String() string { func (*JWKSRetryPolicy) ProtoMessage() {} func (x *JWKSRetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[83] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6995,7 +6559,7 @@ func (x *JWKSRetryPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use JWKSRetryPolicy.ProtoReflect.Descriptor instead. func (*JWKSRetryPolicy) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{83} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{76} } func (x *JWKSRetryPolicy) GetNumRetries() int32 { @@ -7031,7 +6595,7 @@ type RetryPolicyBackOff struct { func (x *RetryPolicyBackOff) Reset() { *x = RetryPolicyBackOff{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[84] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7044,7 +6608,7 @@ func (x *RetryPolicyBackOff) String() string { func (*RetryPolicyBackOff) ProtoMessage() {} func (x *RetryPolicyBackOff) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[84] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7057,7 +6621,7 @@ func (x *RetryPolicyBackOff) ProtoReflect() protoreflect.Message { // Deprecated: Use RetryPolicyBackOff.ProtoReflect.Descriptor instead. func (*RetryPolicyBackOff) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{84} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{77} } func (x *RetryPolicyBackOff) GetBaseInterval() *durationpb.Duration { @@ -7092,7 +6656,7 @@ type JWTLocation struct { func (x *JWTLocation) Reset() { *x = JWTLocation{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[85] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7105,7 +6669,7 @@ func (x *JWTLocation) String() string { func (*JWTLocation) ProtoMessage() {} func (x *JWTLocation) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[85] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7118,7 +6682,7 @@ func (x *JWTLocation) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTLocation.ProtoReflect.Descriptor instead. func (*JWTLocation) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{85} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{78} } func (x *JWTLocation) GetHeader() *JWTLocationHeader { @@ -7160,7 +6724,7 @@ type JWTLocationHeader struct { func (x *JWTLocationHeader) Reset() { *x = JWTLocationHeader{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[86] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7173,7 +6737,7 @@ func (x *JWTLocationHeader) String() string { func (*JWTLocationHeader) ProtoMessage() {} func (x *JWTLocationHeader) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[86] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7186,7 +6750,7 @@ func (x *JWTLocationHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTLocationHeader.ProtoReflect.Descriptor instead. func (*JWTLocationHeader) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{86} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{79} } func (x *JWTLocationHeader) GetName() string { @@ -7226,7 +6790,7 @@ type JWTLocationQueryParam struct { func (x *JWTLocationQueryParam) Reset() { *x = JWTLocationQueryParam{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[87] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7239,7 +6803,7 @@ func (x *JWTLocationQueryParam) String() string { func (*JWTLocationQueryParam) ProtoMessage() {} func (x *JWTLocationQueryParam) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[87] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7252,7 +6816,7 @@ func (x *JWTLocationQueryParam) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTLocationQueryParam.ProtoReflect.Descriptor instead. func (*JWTLocationQueryParam) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{87} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{80} } func (x *JWTLocationQueryParam) GetName() string { @@ -7278,7 +6842,7 @@ type JWTLocationCookie struct { func (x *JWTLocationCookie) Reset() { *x = JWTLocationCookie{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[88] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7291,7 +6855,7 @@ func (x *JWTLocationCookie) String() string { func (*JWTLocationCookie) ProtoMessage() {} func (x *JWTLocationCookie) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[88] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7304,7 +6868,7 @@ func (x *JWTLocationCookie) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTLocationCookie.ProtoReflect.Descriptor instead. func (*JWTLocationCookie) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{88} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{81} } func (x *JWTLocationCookie) GetName() string { @@ -7331,7 +6895,7 @@ type JWTForwardingConfig struct { func (x *JWTForwardingConfig) Reset() { *x = JWTForwardingConfig{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[89] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7344,7 +6908,7 @@ func (x *JWTForwardingConfig) String() string { func (*JWTForwardingConfig) ProtoMessage() {} func (x *JWTForwardingConfig) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[89] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7357,7 +6921,7 @@ func (x *JWTForwardingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTForwardingConfig.ProtoReflect.Descriptor instead. func (*JWTForwardingConfig) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{89} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{82} } func (x *JWTForwardingConfig) GetHeaderName() string { @@ -7391,7 +6955,7 @@ type JWTCacheConfig struct { func (x *JWTCacheConfig) Reset() { *x = JWTCacheConfig{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[90] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7404,7 +6968,7 @@ func (x *JWTCacheConfig) String() string { func (*JWTCacheConfig) ProtoMessage() {} func (x *JWTCacheConfig) ProtoReflect() protoreflect.Message { - mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[90] + mi := &file_private_pbconfigentry_config_entry_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7417,7 +6981,7 @@ func (x *JWTCacheConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use JWTCacheConfig.ProtoReflect.Descriptor instead. func (*JWTCacheConfig) Descriptor() ([]byte, []int) { - return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{90} + return file_private_pbconfigentry_config_entry_proto_rawDescGZIP(), []int{83} } func (x *JWTCacheConfig) GetSize() int32 { @@ -8314,7 +7878,7 @@ var file_private_pbconfigentry_config_entry_proto_rawDesc = []byte{ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0xb4, 0x03, 0x0a, 0x12, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, + 0x22, 0x8c, 0x02, 0x0a, 0x12, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x48, @@ -8330,646 +7894,565 @@ var file_private_pbconfigentry_config_entry_proto_rawDesc = []byte{ 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x54, 0x4c, 0x53, 0x12, - 0x53, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, - 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x07, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x1a, 0x41, 0x50, 0x49, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, - 0x69, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x69, 0x70, 0x68, - 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x10, 0x41, 0x50, 0x49, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x51, 0x0a, 0x03, - 0x4a, 0x57, 0x54, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x2e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, 0x54, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x4a, 0x57, 0x54, 0x22, - 0x76, 0x0a, 0x18, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, 0x54, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x09, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x15, 0x41, 0x50, 0x49, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, - 0x54, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x73, - 0x22, 0x4a, 0x0a, 0x1e, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, - 0x54, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb7, 0x01, 0x0a, - 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, - 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x54, 0x4c, 0x53, 0x22, + 0xde, 0x01, 0x0a, 0x1a, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x54, 0x4c, + 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, + 0x0a, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfe, 0x01, 0x0a, 0x0f, 0x42, 0x6f, 0x75, 0x6e, 0x64, - 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x54, 0x0a, 0x04, 0x4d, 0x65, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, - 0x12, 0x5c, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, - 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x52, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x1a, 0x37, - 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdd, 0x01, 0x0a, 0x17, 0x42, 0x6f, 0x75, 0x6e, - 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x56, 0x0a, - 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x99, 0x03, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4e, - 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x52, - 0x0a, 0x07, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x50, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x05, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf9, 0x01, 0x0a, - 0x0d, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4c, - 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x52, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x07, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x09, 0x48, 0x54, 0x54, - 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, - 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x48, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, - 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x04, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, - 0x8d, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x75, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x4e, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4f, 0x0a, 0x05, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, + 0x4d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, + 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, + 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x03, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, - 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x55, 0x52, 0x4c, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x0a, - 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x5a, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfe, 0x01, 0x0a, 0x0f, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x54, + 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x5c, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x03, - 0x4a, 0x57, 0x54, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdd, 0x01, 0x0a, 0x17, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x06, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x03, 0x4a, 0x57, 0x54, - 0x22, 0x20, 0x0a, 0x0a, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x50, 0x61, - 0x74, 0x68, 0x22, 0xad, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x15, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x49, 0x64, 0x6c, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x22, 0x67, 0x0a, 0x09, 0x4a, 0x57, 0x54, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x50, 0x49, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0xc2, 0x02, - 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x52, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x03, 0x41, 0x64, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x52, - 0x0a, 0x03, 0x53, 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x53, - 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x53, 0x65, - 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4c, - 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x11, + 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x56, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x52, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x58, 0x0a, 0x0e, - 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfc, 0x02, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, + 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x1a, 0x37, 0x0a, 0x09, 0x4d, + 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x03, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x54, 0x43, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x05, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x37, 0x0a, 0x09, - 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7a, 0x0a, 0x0a, 0x54, 0x43, 0x50, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x22, 0xb4, 0x03, 0x0a, 0x0d, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x12, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x46, - 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x49, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x54, 0x0a, 0x07, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, + 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xf9, 0x01, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x4a, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x08, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xc4, 0x02, 0x0a, + 0x09, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x07, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x06, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x12, 0x52, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x1a, - 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x13, 0x53, 0x61, 0x6d, 0x65, - 0x6e, 0x65, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x50, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x50, 0x65, 0x65, - 0x72, 0x22, 0xdd, 0x04, 0x0a, 0x0b, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x5a, 0x0a, 0x0d, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x53, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x52, 0x0d, - 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x48, 0x0a, 0x04, + 0x50, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, - 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, + 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x4e, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x48, + 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4f, 0x0a, + 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x0b, 0x48, 0x54, 0x54, + 0x50, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x55, + 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x0a, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x20, + 0x0a, 0x0a, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x50, 0x61, 0x74, 0x68, + 0x22, 0xc2, 0x02, 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x41, 0x64, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x12, 0x52, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x03, 0x53, 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x36, 0x0a, + 0x08, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x57, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfc, 0x02, 0x0a, 0x08, 0x54, 0x43, + 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x54, 0x43, 0x50, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, - 0x57, 0x54, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x04, 0x4d, 0x65, - 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x07, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x54, 0x43, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, - 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, 0x65, - 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xa2, 0x01, 0x0a, 0x0d, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, - 0x53, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, + 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7a, 0x0a, 0x0a, 0x54, 0x43, 0x50, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x49, 0x0a, 0x06, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x22, 0xb4, 0x03, 0x0a, 0x0d, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, + 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, + 0x6f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x54, + 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x52, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x6d, 0x65, 0x6e, + 0x65, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x13, 0x53, + 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x50, 0x65, 0x65, 0x72, 0x22, 0xdd, 0x04, 0x0a, 0x0b, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x0d, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, + 0x65, 0x79, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, + 0x74, 0x52, 0x0d, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x41, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, + 0x04, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x2a, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x43, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x6b, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4d, + 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x01, 0x0a, 0x0d, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, + 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x49, + 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x57, 0x4b, + 0x53, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x4a, 0x57, 0x4b, 0x53, 0x12, 0x12, 0x0a, 0x04, 0x4a, 0x57, 0x4b, 0x53, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4a, 0x57, 0x4b, 0x53, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, + 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, + 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xed, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x4a, 0x57, 0x4b, 0x53, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x55, 0x52, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x4d, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, + 0x6e, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x12, 0x58, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x54, 0x0a, 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, + 0x4b, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0xdb, 0x01, 0x0a, 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x0f, + 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, + 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x52, 0x0f, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x22, 0xfa, 0x01, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x1d, + 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, + 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x1d, 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, + 0x64, 0x43, 0x41, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x54, 0x72, 0x75, + 0x73, 0x74, 0x65, 0x64, 0x43, 0x41, 0x52, 0x09, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, + 0x41, 0x22, 0x6b, 0x0a, 0x1b, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, + 0x01, 0x0a, 0x14, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x54, 0x72, + 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x41, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x49, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0f, + 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x1e, 0x0a, 0x0a, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x69, 0x0a, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x61, + 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x06, - 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4a, - 0x57, 0x4b, 0x53, 0x12, 0x12, 0x0a, 0x04, 0x4a, 0x57, 0x4b, 0x53, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4a, 0x57, 0x4b, 0x53, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0xed, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x57, - 0x4b, 0x53, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x55, 0x52, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x73, - 0x12, 0x3f, 0x0a, 0x0d, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, + 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, + 0x66, 0x12, 0x3d, 0x0a, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x30, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x68, - 0x72, 0x6f, 0x6e, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x6f, 0x75, - 0x73, 0x6c, 0x79, 0x12, 0x58, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x54, 0x0a, - 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x22, 0xdb, 0x01, 0x0a, 0x0b, 0x4a, 0x57, 0x4b, 0x53, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x54, 0x4c, 0x53, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x54, - 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x54, - 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x41, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x22, 0xfa, 0x01, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x1d, 0x43, 0x61, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, - 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x1d, 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x41, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, - 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, - 0x64, 0x43, 0x41, 0x52, 0x09, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x41, 0x22, 0x6b, - 0x0a, 0x1b, 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x14, - 0x4a, 0x57, 0x4b, 0x53, 0x54, 0x4c, 0x53, 0x43, 0x65, 0x72, 0x74, 0x54, 0x72, 0x75, 0x73, 0x74, - 0x65, 0x64, 0x43, 0x41, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x30, 0x0a, 0x13, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x45, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x49, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0f, 0x4a, 0x57, 0x4b, - 0x53, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x0a, 0x0a, - 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x12, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, - 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x61, 0x63, 0x6b, - 0x4f, 0x66, 0x66, 0x52, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x3d, - 0x0a, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3b, 0x0a, - 0x0b, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x4d, - 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x8f, 0x02, 0x0a, 0x0b, 0x4a, - 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x50, 0x0a, 0x06, 0x43, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x52, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x22, 0x63, 0x0a, 0x11, - 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, - 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x22, 0x2b, 0x0a, 0x15, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x27, - 0x0a, 0x11, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6f, 0x0a, 0x13, 0x4a, 0x57, 0x54, 0x46, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, - 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, - 0x0a, 0x17, 0x50, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x17, 0x50, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x0e, 0x4a, 0x57, 0x54, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, - 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x2a, 0xa9, - 0x02, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x69, 0x6e, 0x64, 0x55, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x69, 0x6e, 0x64, - 0x4d, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, - 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x72, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x03, 0x12, 0x19, 0x0a, - 0x15, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x69, 0x6e, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x10, - 0x05, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, - 0x4b, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x07, - 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x41, 0x50, 0x49, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x4b, 0x69, 0x6e, - 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, - 0x4b, 0x69, 0x6e, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10, 0x0a, 0x12, 0x15, - 0x0a, 0x11, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x69, 0x6e, 0x64, 0x4a, 0x57, 0x54, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x10, 0x0c, 0x2a, 0x26, 0x0a, 0x0f, 0x49, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, - 0x04, 0x44, 0x65, 0x6e, 0x79, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x10, 0x01, 0x2a, 0x21, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x10, 0x00, 0x2a, 0x50, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0x02, 0x2a, 0x5f, 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x75, 0x61, - 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x75, 0x74, 0x75, - 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, - 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x69, 0x63, 0x74, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4d, - 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x10, 0x02, 0x2a, 0x7b, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x68, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, - 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x65, 0x73, 0x68, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x01, - 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, - 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x65, - 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x1a, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x17, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x54, 0x43, 0x50, 0x10, 0x01, 0x2a, 0x92, 0x02, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, - 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x6c, 0x6c, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x01, 0x12, 0x19, - 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, 0x54, - 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x47, 0x65, 0x74, 0x10, - 0x03, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x48, 0x65, 0x61, 0x64, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x54, - 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x61, 0x74, 0x63, 0x68, 0x10, 0x06, - 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, 0x54, - 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x75, 0x74, 0x10, - 0x08, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x10, 0x09, 0x2a, 0xa7, 0x01, 0x0a, 0x13, - 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x61, 0x63, 0x74, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x6f, 0x6e, 0x52, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x3b, 0x0a, 0x0b, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x8f, 0x02, + 0x0a, 0x0b, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, + 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x5c, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x52, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x50, 0x0a, + 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x52, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x22, + 0x63, 0x0a, 0x11, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x46, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x46, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x15, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x27, 0x0a, 0x11, 0x4a, 0x57, 0x54, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6f, 0x0a, 0x13, 0x4a, 0x57, + 0x54, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x38, 0x0a, 0x17, 0x50, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x50, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x0e, 0x4a, + 0x57, 0x54, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, + 0x04, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x69, 0x7a, + 0x65, 0x2a, 0xa9, 0x02, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x69, + 0x6e, 0x64, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, + 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x69, 0x6e, 0x64, + 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x03, + 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x4b, + 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x06, 0x12, + 0x12, 0x0a, 0x0e, 0x4b, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, + 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, + 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10, 0x09, 0x12, + 0x10, 0x0a, 0x0c, 0x4b, 0x69, 0x6e, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10, + 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, + 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x69, 0x6e, 0x64, + 0x4a, 0x57, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x10, 0x0c, 0x2a, 0x26, 0x0a, + 0x0f, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x08, 0x0a, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x10, 0x01, 0x2a, 0x21, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x10, 0x00, 0x2a, 0x50, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0x02, 0x2a, 0x5f, 0x0a, 0x0d, 0x4d, 0x75, + 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4d, + 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, + 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x69, 0x63, 0x74, 0x10, 0x01, 0x12, 0x1b, + 0x0a, 0x17, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x10, 0x02, 0x2a, 0x7b, 0x0a, 0x0f, 0x4d, + 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, + 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x65, + 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x6e, + 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x12, 0x19, 0x0a, + 0x15, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x1a, 0x41, 0x50, 0x49, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, + 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x43, 0x50, 0x10, 0x01, 0x2a, 0x92, 0x02, 0x0a, 0x0f, 0x48, 0x54, + 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, + 0x12, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x41, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, + 0x01, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, + 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x47, + 0x65, 0x74, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x65, 0x61, 0x64, 0x10, 0x04, 0x12, 0x1a, 0x0a, + 0x16, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, + 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x61, 0x74, 0x63, + 0x68, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, + 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, + 0x75, 0x74, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x10, 0x09, 0x2a, 0xa7, + 0x01, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x61, 0x63, 0x74, 0x10, 0x00, + 0x12, 0x19, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x48, + 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x48, 0x54, 0x54, 0x50, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, + 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x45, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x54, - 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x66, - 0x66, 0x69, 0x78, 0x10, 0x04, 0x2a, 0x68, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, - 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x61, 0x63, 0x74, - 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x48, - 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x67, 0x75, - 0x6c, 0x61, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x2a, - 0x6d, 0x0a, 0x12, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x61, 0x63, 0x74, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x48, 0x54, 0x54, - 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x67, 0x75, 0x6c, - 0x61, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x42, 0xae, - 0x02, 0x0a, 0x29, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x10, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x48, 0x43, 0x49, 0x43, - 0xaa, 0x02, 0x25, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, 0x02, 0x25, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0xe2, 0x02, 0x31, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x28, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, - 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x10, 0x04, 0x2a, 0x68, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x12, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, + 0x61, 0x63, 0x74, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x01, 0x12, 0x22, + 0x0a, 0x1e, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x10, 0x03, 0x2a, 0x6d, 0x0a, 0x12, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x61, 0x63, 0x74, 0x10, + 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, + 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x67, 0x75, 0x6c, 0x61, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, + 0x03, 0x42, 0xae, 0x02, 0x0a, 0x29, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, + 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x48, + 0x43, 0x49, 0x43, 0xaa, 0x02, 0x25, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, 0x02, 0x25, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0xe2, 0x02, 0x31, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x28, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8985,7 +8468,7 @@ func file_private_pbconfigentry_config_entry_proto_rawDescGZIP() []byte { } var file_private_pbconfigentry_config_entry_proto_enumTypes = make([]protoimpl.EnumInfo, 11) -var file_private_pbconfigentry_config_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 111) +var file_private_pbconfigentry_config_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 104) var file_private_pbconfigentry_config_entry_proto_goTypes = []interface{}{ (Kind)(0), // 0: hashicorp.consul.internal.configentry.Kind (IntentionAction)(0), // 1: hashicorp.consul.internal.configentry.IntentionAction @@ -9048,103 +8531,96 @@ var file_private_pbconfigentry_config_entry_proto_goTypes = []interface{}{ (*Condition)(nil), // 58: hashicorp.consul.internal.configentry.Condition (*APIGatewayListener)(nil), // 59: hashicorp.consul.internal.configentry.APIGatewayListener (*APIGatewayTLSConfiguration)(nil), // 60: hashicorp.consul.internal.configentry.APIGatewayTLSConfiguration - (*APIGatewayPolicy)(nil), // 61: hashicorp.consul.internal.configentry.APIGatewayPolicy - (*APIGatewayJWTRequirement)(nil), // 62: hashicorp.consul.internal.configentry.APIGatewayJWTRequirement - (*APIGatewayJWTProvider)(nil), // 63: hashicorp.consul.internal.configentry.APIGatewayJWTProvider - (*APIGatewayJWTClaimVerification)(nil), // 64: hashicorp.consul.internal.configentry.APIGatewayJWTClaimVerification - (*ResourceReference)(nil), // 65: hashicorp.consul.internal.configentry.ResourceReference - (*BoundAPIGateway)(nil), // 66: hashicorp.consul.internal.configentry.BoundAPIGateway - (*BoundAPIGatewayListener)(nil), // 67: hashicorp.consul.internal.configentry.BoundAPIGatewayListener - (*InlineCertificate)(nil), // 68: hashicorp.consul.internal.configentry.InlineCertificate - (*HTTPRoute)(nil), // 69: hashicorp.consul.internal.configentry.HTTPRoute - (*HTTPRouteRule)(nil), // 70: hashicorp.consul.internal.configentry.HTTPRouteRule - (*HTTPMatch)(nil), // 71: hashicorp.consul.internal.configentry.HTTPMatch - (*HTTPHeaderMatch)(nil), // 72: hashicorp.consul.internal.configentry.HTTPHeaderMatch - (*HTTPPathMatch)(nil), // 73: hashicorp.consul.internal.configentry.HTTPPathMatch - (*HTTPQueryMatch)(nil), // 74: hashicorp.consul.internal.configentry.HTTPQueryMatch - (*HTTPFilters)(nil), // 75: hashicorp.consul.internal.configentry.HTTPFilters - (*URLRewrite)(nil), // 76: hashicorp.consul.internal.configentry.URLRewrite - (*RetryFilter)(nil), // 77: hashicorp.consul.internal.configentry.RetryFilter - (*TimeoutFilter)(nil), // 78: hashicorp.consul.internal.configentry.TimeoutFilter - (*JWTFilter)(nil), // 79: hashicorp.consul.internal.configentry.JWTFilter - (*HTTPHeaderFilter)(nil), // 80: hashicorp.consul.internal.configentry.HTTPHeaderFilter - (*HTTPService)(nil), // 81: hashicorp.consul.internal.configentry.HTTPService - (*TCPRoute)(nil), // 82: hashicorp.consul.internal.configentry.TCPRoute - (*TCPService)(nil), // 83: hashicorp.consul.internal.configentry.TCPService - (*SamenessGroup)(nil), // 84: hashicorp.consul.internal.configentry.SamenessGroup - (*SamenessGroupMember)(nil), // 85: hashicorp.consul.internal.configentry.SamenessGroupMember - (*JWTProvider)(nil), // 86: hashicorp.consul.internal.configentry.JWTProvider - (*JSONWebKeySet)(nil), // 87: hashicorp.consul.internal.configentry.JSONWebKeySet - (*LocalJWKS)(nil), // 88: hashicorp.consul.internal.configentry.LocalJWKS - (*RemoteJWKS)(nil), // 89: hashicorp.consul.internal.configentry.RemoteJWKS - (*JWKSCluster)(nil), // 90: hashicorp.consul.internal.configentry.JWKSCluster - (*JWKSTLSCertificate)(nil), // 91: hashicorp.consul.internal.configentry.JWKSTLSCertificate - (*JWKSTLSCertProviderInstance)(nil), // 92: hashicorp.consul.internal.configentry.JWKSTLSCertProviderInstance - (*JWKSTLSCertTrustedCA)(nil), // 93: hashicorp.consul.internal.configentry.JWKSTLSCertTrustedCA - (*JWKSRetryPolicy)(nil), // 94: hashicorp.consul.internal.configentry.JWKSRetryPolicy - (*RetryPolicyBackOff)(nil), // 95: hashicorp.consul.internal.configentry.RetryPolicyBackOff - (*JWTLocation)(nil), // 96: hashicorp.consul.internal.configentry.JWTLocation - (*JWTLocationHeader)(nil), // 97: hashicorp.consul.internal.configentry.JWTLocationHeader - (*JWTLocationQueryParam)(nil), // 98: hashicorp.consul.internal.configentry.JWTLocationQueryParam - (*JWTLocationCookie)(nil), // 99: hashicorp.consul.internal.configentry.JWTLocationCookie - (*JWTForwardingConfig)(nil), // 100: hashicorp.consul.internal.configentry.JWTForwardingConfig - (*JWTCacheConfig)(nil), // 101: hashicorp.consul.internal.configentry.JWTCacheConfig - nil, // 102: hashicorp.consul.internal.configentry.MeshConfig.MetaEntry - nil, // 103: hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry - nil, // 104: hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry - nil, // 105: hashicorp.consul.internal.configentry.ServiceResolver.MetaEntry - nil, // 106: hashicorp.consul.internal.configentry.IngressGateway.MetaEntry - nil, // 107: hashicorp.consul.internal.configentry.IngressService.MetaEntry - nil, // 108: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.AddEntry - nil, // 109: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.SetEntry - nil, // 110: hashicorp.consul.internal.configentry.ServiceIntentions.MetaEntry - nil, // 111: hashicorp.consul.internal.configentry.SourceIntention.LegacyMetaEntry - nil, // 112: hashicorp.consul.internal.configentry.ServiceDefaults.MetaEntry - nil, // 113: hashicorp.consul.internal.configentry.APIGateway.MetaEntry - nil, // 114: hashicorp.consul.internal.configentry.BoundAPIGateway.MetaEntry - nil, // 115: hashicorp.consul.internal.configentry.InlineCertificate.MetaEntry - nil, // 116: hashicorp.consul.internal.configentry.HTTPRoute.MetaEntry - nil, // 117: hashicorp.consul.internal.configentry.HTTPHeaderFilter.AddEntry - nil, // 118: hashicorp.consul.internal.configentry.HTTPHeaderFilter.SetEntry - nil, // 119: hashicorp.consul.internal.configentry.TCPRoute.MetaEntry - nil, // 120: hashicorp.consul.internal.configentry.SamenessGroup.MetaEntry - nil, // 121: hashicorp.consul.internal.configentry.JWTProvider.MetaEntry - (*pbcommon.EnterpriseMeta)(nil), // 122: hashicorp.consul.internal.common.EnterpriseMeta - (*pbcommon.RaftIndex)(nil), // 123: hashicorp.consul.internal.common.RaftIndex - (*durationpb.Duration)(nil), // 124: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 125: google.protobuf.Timestamp - (*pbcommon.EnvoyExtension)(nil), // 126: hashicorp.consul.internal.common.EnvoyExtension + (*ResourceReference)(nil), // 61: hashicorp.consul.internal.configentry.ResourceReference + (*BoundAPIGateway)(nil), // 62: hashicorp.consul.internal.configentry.BoundAPIGateway + (*BoundAPIGatewayListener)(nil), // 63: hashicorp.consul.internal.configentry.BoundAPIGatewayListener + (*InlineCertificate)(nil), // 64: hashicorp.consul.internal.configentry.InlineCertificate + (*HTTPRoute)(nil), // 65: hashicorp.consul.internal.configentry.HTTPRoute + (*HTTPRouteRule)(nil), // 66: hashicorp.consul.internal.configentry.HTTPRouteRule + (*HTTPMatch)(nil), // 67: hashicorp.consul.internal.configentry.HTTPMatch + (*HTTPHeaderMatch)(nil), // 68: hashicorp.consul.internal.configentry.HTTPHeaderMatch + (*HTTPPathMatch)(nil), // 69: hashicorp.consul.internal.configentry.HTTPPathMatch + (*HTTPQueryMatch)(nil), // 70: hashicorp.consul.internal.configentry.HTTPQueryMatch + (*HTTPFilters)(nil), // 71: hashicorp.consul.internal.configentry.HTTPFilters + (*URLRewrite)(nil), // 72: hashicorp.consul.internal.configentry.URLRewrite + (*HTTPHeaderFilter)(nil), // 73: hashicorp.consul.internal.configentry.HTTPHeaderFilter + (*HTTPService)(nil), // 74: hashicorp.consul.internal.configentry.HTTPService + (*TCPRoute)(nil), // 75: hashicorp.consul.internal.configentry.TCPRoute + (*TCPService)(nil), // 76: hashicorp.consul.internal.configentry.TCPService + (*SamenessGroup)(nil), // 77: hashicorp.consul.internal.configentry.SamenessGroup + (*SamenessGroupMember)(nil), // 78: hashicorp.consul.internal.configentry.SamenessGroupMember + (*JWTProvider)(nil), // 79: hashicorp.consul.internal.configentry.JWTProvider + (*JSONWebKeySet)(nil), // 80: hashicorp.consul.internal.configentry.JSONWebKeySet + (*LocalJWKS)(nil), // 81: hashicorp.consul.internal.configentry.LocalJWKS + (*RemoteJWKS)(nil), // 82: hashicorp.consul.internal.configentry.RemoteJWKS + (*JWKSCluster)(nil), // 83: hashicorp.consul.internal.configentry.JWKSCluster + (*JWKSTLSCertificate)(nil), // 84: hashicorp.consul.internal.configentry.JWKSTLSCertificate + (*JWKSTLSCertProviderInstance)(nil), // 85: hashicorp.consul.internal.configentry.JWKSTLSCertProviderInstance + (*JWKSTLSCertTrustedCA)(nil), // 86: hashicorp.consul.internal.configentry.JWKSTLSCertTrustedCA + (*JWKSRetryPolicy)(nil), // 87: hashicorp.consul.internal.configentry.JWKSRetryPolicy + (*RetryPolicyBackOff)(nil), // 88: hashicorp.consul.internal.configentry.RetryPolicyBackOff + (*JWTLocation)(nil), // 89: hashicorp.consul.internal.configentry.JWTLocation + (*JWTLocationHeader)(nil), // 90: hashicorp.consul.internal.configentry.JWTLocationHeader + (*JWTLocationQueryParam)(nil), // 91: hashicorp.consul.internal.configentry.JWTLocationQueryParam + (*JWTLocationCookie)(nil), // 92: hashicorp.consul.internal.configentry.JWTLocationCookie + (*JWTForwardingConfig)(nil), // 93: hashicorp.consul.internal.configentry.JWTForwardingConfig + (*JWTCacheConfig)(nil), // 94: hashicorp.consul.internal.configentry.JWTCacheConfig + nil, // 95: hashicorp.consul.internal.configentry.MeshConfig.MetaEntry + nil, // 96: hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry + nil, // 97: hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry + nil, // 98: hashicorp.consul.internal.configentry.ServiceResolver.MetaEntry + nil, // 99: hashicorp.consul.internal.configentry.IngressGateway.MetaEntry + nil, // 100: hashicorp.consul.internal.configentry.IngressService.MetaEntry + nil, // 101: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.AddEntry + nil, // 102: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.SetEntry + nil, // 103: hashicorp.consul.internal.configentry.ServiceIntentions.MetaEntry + nil, // 104: hashicorp.consul.internal.configentry.SourceIntention.LegacyMetaEntry + nil, // 105: hashicorp.consul.internal.configentry.ServiceDefaults.MetaEntry + nil, // 106: hashicorp.consul.internal.configentry.APIGateway.MetaEntry + nil, // 107: hashicorp.consul.internal.configentry.BoundAPIGateway.MetaEntry + nil, // 108: hashicorp.consul.internal.configentry.InlineCertificate.MetaEntry + nil, // 109: hashicorp.consul.internal.configentry.HTTPRoute.MetaEntry + nil, // 110: hashicorp.consul.internal.configentry.HTTPHeaderFilter.AddEntry + nil, // 111: hashicorp.consul.internal.configentry.HTTPHeaderFilter.SetEntry + nil, // 112: hashicorp.consul.internal.configentry.TCPRoute.MetaEntry + nil, // 113: hashicorp.consul.internal.configentry.SamenessGroup.MetaEntry + nil, // 114: hashicorp.consul.internal.configentry.JWTProvider.MetaEntry + (*pbcommon.EnterpriseMeta)(nil), // 115: hashicorp.consul.internal.common.EnterpriseMeta + (*pbcommon.RaftIndex)(nil), // 116: hashicorp.consul.internal.common.RaftIndex + (*durationpb.Duration)(nil), // 117: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 118: google.protobuf.Timestamp + (*pbcommon.EnvoyExtension)(nil), // 119: hashicorp.consul.internal.common.EnvoyExtension } var file_private_pbconfigentry_config_entry_proto_depIdxs = []int32{ 0, // 0: hashicorp.consul.internal.configentry.ConfigEntry.Kind:type_name -> hashicorp.consul.internal.configentry.Kind - 122, // 1: hashicorp.consul.internal.configentry.ConfigEntry.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta - 123, // 2: hashicorp.consul.internal.configentry.ConfigEntry.RaftIndex:type_name -> hashicorp.consul.internal.common.RaftIndex + 115, // 1: hashicorp.consul.internal.configentry.ConfigEntry.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 116, // 2: hashicorp.consul.internal.configentry.ConfigEntry.RaftIndex:type_name -> hashicorp.consul.internal.common.RaftIndex 12, // 3: hashicorp.consul.internal.configentry.ConfigEntry.MeshConfig:type_name -> hashicorp.consul.internal.configentry.MeshConfig 18, // 4: hashicorp.consul.internal.configentry.ConfigEntry.ServiceResolver:type_name -> hashicorp.consul.internal.configentry.ServiceResolver 30, // 5: hashicorp.consul.internal.configentry.ConfigEntry.IngressGateway:type_name -> hashicorp.consul.internal.configentry.IngressGateway 38, // 6: hashicorp.consul.internal.configentry.ConfigEntry.ServiceIntentions:type_name -> hashicorp.consul.internal.configentry.ServiceIntentions 46, // 7: hashicorp.consul.internal.configentry.ConfigEntry.ServiceDefaults:type_name -> hashicorp.consul.internal.configentry.ServiceDefaults 56, // 8: hashicorp.consul.internal.configentry.ConfigEntry.APIGateway:type_name -> hashicorp.consul.internal.configentry.APIGateway - 66, // 9: hashicorp.consul.internal.configentry.ConfigEntry.BoundAPIGateway:type_name -> hashicorp.consul.internal.configentry.BoundAPIGateway - 82, // 10: hashicorp.consul.internal.configentry.ConfigEntry.TCPRoute:type_name -> hashicorp.consul.internal.configentry.TCPRoute - 69, // 11: hashicorp.consul.internal.configentry.ConfigEntry.HTTPRoute:type_name -> hashicorp.consul.internal.configentry.HTTPRoute - 68, // 12: hashicorp.consul.internal.configentry.ConfigEntry.InlineCertificate:type_name -> hashicorp.consul.internal.configentry.InlineCertificate - 84, // 13: hashicorp.consul.internal.configentry.ConfigEntry.SamenessGroup:type_name -> hashicorp.consul.internal.configentry.SamenessGroup - 86, // 14: hashicorp.consul.internal.configentry.ConfigEntry.JWTProvider:type_name -> hashicorp.consul.internal.configentry.JWTProvider + 62, // 9: hashicorp.consul.internal.configentry.ConfigEntry.BoundAPIGateway:type_name -> hashicorp.consul.internal.configentry.BoundAPIGateway + 75, // 10: hashicorp.consul.internal.configentry.ConfigEntry.TCPRoute:type_name -> hashicorp.consul.internal.configentry.TCPRoute + 65, // 11: hashicorp.consul.internal.configentry.ConfigEntry.HTTPRoute:type_name -> hashicorp.consul.internal.configentry.HTTPRoute + 64, // 12: hashicorp.consul.internal.configentry.ConfigEntry.InlineCertificate:type_name -> hashicorp.consul.internal.configentry.InlineCertificate + 77, // 13: hashicorp.consul.internal.configentry.ConfigEntry.SamenessGroup:type_name -> hashicorp.consul.internal.configentry.SamenessGroup + 79, // 14: hashicorp.consul.internal.configentry.ConfigEntry.JWTProvider:type_name -> hashicorp.consul.internal.configentry.JWTProvider 13, // 15: hashicorp.consul.internal.configentry.MeshConfig.TransparentProxy:type_name -> hashicorp.consul.internal.configentry.TransparentProxyMeshConfig 14, // 16: hashicorp.consul.internal.configentry.MeshConfig.TLS:type_name -> hashicorp.consul.internal.configentry.MeshTLSConfig 16, // 17: hashicorp.consul.internal.configentry.MeshConfig.HTTP:type_name -> hashicorp.consul.internal.configentry.MeshHTTPConfig - 102, // 18: hashicorp.consul.internal.configentry.MeshConfig.Meta:type_name -> hashicorp.consul.internal.configentry.MeshConfig.MetaEntry + 95, // 18: hashicorp.consul.internal.configentry.MeshConfig.Meta:type_name -> hashicorp.consul.internal.configentry.MeshConfig.MetaEntry 17, // 19: hashicorp.consul.internal.configentry.MeshConfig.Peering:type_name -> hashicorp.consul.internal.configentry.PeeringMeshConfig 15, // 20: hashicorp.consul.internal.configentry.MeshTLSConfig.Incoming:type_name -> hashicorp.consul.internal.configentry.MeshDirectionalTLSConfig 15, // 21: hashicorp.consul.internal.configentry.MeshTLSConfig.Outgoing:type_name -> hashicorp.consul.internal.configentry.MeshDirectionalTLSConfig - 103, // 22: hashicorp.consul.internal.configentry.ServiceResolver.Subsets:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry + 96, // 22: hashicorp.consul.internal.configentry.ServiceResolver.Subsets:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry 20, // 23: hashicorp.consul.internal.configentry.ServiceResolver.Redirect:type_name -> hashicorp.consul.internal.configentry.ServiceResolverRedirect - 104, // 24: hashicorp.consul.internal.configentry.ServiceResolver.Failover:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry - 124, // 25: hashicorp.consul.internal.configentry.ServiceResolver.ConnectTimeout:type_name -> google.protobuf.Duration + 97, // 24: hashicorp.consul.internal.configentry.ServiceResolver.Failover:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry + 117, // 25: hashicorp.consul.internal.configentry.ServiceResolver.ConnectTimeout:type_name -> google.protobuf.Duration 25, // 26: hashicorp.consul.internal.configentry.ServiceResolver.LoadBalancer:type_name -> hashicorp.consul.internal.configentry.LoadBalancer - 105, // 27: hashicorp.consul.internal.configentry.ServiceResolver.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.MetaEntry - 124, // 28: hashicorp.consul.internal.configentry.ServiceResolver.RequestTimeout:type_name -> google.protobuf.Duration + 98, // 27: hashicorp.consul.internal.configentry.ServiceResolver.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceResolver.MetaEntry + 117, // 28: hashicorp.consul.internal.configentry.ServiceResolver.RequestTimeout:type_name -> google.protobuf.Duration 23, // 29: hashicorp.consul.internal.configentry.ServiceResolver.PrioritizeByLocality:type_name -> hashicorp.consul.internal.configentry.ServiceResolverPrioritizeByLocality 24, // 30: hashicorp.consul.internal.configentry.ServiceResolverFailover.Targets:type_name -> hashicorp.consul.internal.configentry.ServiceResolverFailoverTarget 22, // 31: hashicorp.consul.internal.configentry.ServiceResolverFailover.Policy:type_name -> hashicorp.consul.internal.configentry.ServiceResolverFailoverPolicy @@ -9152,10 +8628,10 @@ var file_private_pbconfigentry_config_entry_proto_depIdxs = []int32{ 27, // 33: hashicorp.consul.internal.configentry.LoadBalancer.LeastRequestConfig:type_name -> hashicorp.consul.internal.configentry.LeastRequestConfig 28, // 34: hashicorp.consul.internal.configentry.LoadBalancer.HashPolicies:type_name -> hashicorp.consul.internal.configentry.HashPolicy 29, // 35: hashicorp.consul.internal.configentry.HashPolicy.CookieConfig:type_name -> hashicorp.consul.internal.configentry.CookieConfig - 124, // 36: hashicorp.consul.internal.configentry.CookieConfig.TTL:type_name -> google.protobuf.Duration + 117, // 36: hashicorp.consul.internal.configentry.CookieConfig.TTL:type_name -> google.protobuf.Duration 32, // 37: hashicorp.consul.internal.configentry.IngressGateway.TLS:type_name -> hashicorp.consul.internal.configentry.GatewayTLSConfig 34, // 38: hashicorp.consul.internal.configentry.IngressGateway.Listeners:type_name -> hashicorp.consul.internal.configentry.IngressListener - 106, // 39: hashicorp.consul.internal.configentry.IngressGateway.Meta:type_name -> hashicorp.consul.internal.configentry.IngressGateway.MetaEntry + 99, // 39: hashicorp.consul.internal.configentry.IngressGateway.Meta:type_name -> hashicorp.consul.internal.configentry.IngressGateway.MetaEntry 31, // 40: hashicorp.consul.internal.configentry.IngressGateway.Defaults:type_name -> hashicorp.consul.internal.configentry.IngressServiceConfig 54, // 41: hashicorp.consul.internal.configentry.IngressServiceConfig.PassiveHealthCheck:type_name -> hashicorp.consul.internal.configentry.PassiveHealthCheck 33, // 42: hashicorp.consul.internal.configentry.GatewayTLSConfig.SDS:type_name -> hashicorp.consul.internal.configentry.GatewayTLSSDSConfig @@ -9164,24 +8640,24 @@ var file_private_pbconfigentry_config_entry_proto_depIdxs = []int32{ 36, // 45: hashicorp.consul.internal.configentry.IngressService.TLS:type_name -> hashicorp.consul.internal.configentry.GatewayServiceTLSConfig 37, // 46: hashicorp.consul.internal.configentry.IngressService.RequestHeaders:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers 37, // 47: hashicorp.consul.internal.configentry.IngressService.ResponseHeaders:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers - 107, // 48: hashicorp.consul.internal.configentry.IngressService.Meta:type_name -> hashicorp.consul.internal.configentry.IngressService.MetaEntry - 122, // 49: hashicorp.consul.internal.configentry.IngressService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 100, // 48: hashicorp.consul.internal.configentry.IngressService.Meta:type_name -> hashicorp.consul.internal.configentry.IngressService.MetaEntry + 115, // 49: hashicorp.consul.internal.configentry.IngressService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta 54, // 50: hashicorp.consul.internal.configentry.IngressService.PassiveHealthCheck:type_name -> hashicorp.consul.internal.configentry.PassiveHealthCheck 33, // 51: hashicorp.consul.internal.configentry.GatewayServiceTLSConfig.SDS:type_name -> hashicorp.consul.internal.configentry.GatewayTLSSDSConfig - 108, // 52: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.Add:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers.AddEntry - 109, // 53: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.Set:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers.SetEntry + 101, // 52: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.Add:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers.AddEntry + 102, // 53: hashicorp.consul.internal.configentry.HTTPHeaderModifiers.Set:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderModifiers.SetEntry 42, // 54: hashicorp.consul.internal.configentry.ServiceIntentions.Sources:type_name -> hashicorp.consul.internal.configentry.SourceIntention - 110, // 55: hashicorp.consul.internal.configentry.ServiceIntentions.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceIntentions.MetaEntry + 103, // 55: hashicorp.consul.internal.configentry.ServiceIntentions.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceIntentions.MetaEntry 39, // 56: hashicorp.consul.internal.configentry.ServiceIntentions.JWT:type_name -> hashicorp.consul.internal.configentry.IntentionJWTRequirement 40, // 57: hashicorp.consul.internal.configentry.IntentionJWTRequirement.Providers:type_name -> hashicorp.consul.internal.configentry.IntentionJWTProvider 41, // 58: hashicorp.consul.internal.configentry.IntentionJWTProvider.VerifyClaims:type_name -> hashicorp.consul.internal.configentry.IntentionJWTClaimVerification 1, // 59: hashicorp.consul.internal.configentry.SourceIntention.Action:type_name -> hashicorp.consul.internal.configentry.IntentionAction 43, // 60: hashicorp.consul.internal.configentry.SourceIntention.Permissions:type_name -> hashicorp.consul.internal.configentry.IntentionPermission 2, // 61: hashicorp.consul.internal.configentry.SourceIntention.Type:type_name -> hashicorp.consul.internal.configentry.IntentionSourceType - 111, // 62: hashicorp.consul.internal.configentry.SourceIntention.LegacyMeta:type_name -> hashicorp.consul.internal.configentry.SourceIntention.LegacyMetaEntry - 125, // 63: hashicorp.consul.internal.configentry.SourceIntention.LegacyCreateTime:type_name -> google.protobuf.Timestamp - 125, // 64: hashicorp.consul.internal.configentry.SourceIntention.LegacyUpdateTime:type_name -> google.protobuf.Timestamp - 122, // 65: hashicorp.consul.internal.configentry.SourceIntention.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 104, // 62: hashicorp.consul.internal.configentry.SourceIntention.LegacyMeta:type_name -> hashicorp.consul.internal.configentry.SourceIntention.LegacyMetaEntry + 118, // 63: hashicorp.consul.internal.configentry.SourceIntention.LegacyCreateTime:type_name -> google.protobuf.Timestamp + 118, // 64: hashicorp.consul.internal.configentry.SourceIntention.LegacyUpdateTime:type_name -> google.protobuf.Timestamp + 115, // 65: hashicorp.consul.internal.configentry.SourceIntention.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta 1, // 66: hashicorp.consul.internal.configentry.IntentionPermission.Action:type_name -> hashicorp.consul.internal.configentry.IntentionAction 44, // 67: hashicorp.consul.internal.configentry.IntentionPermission.HTTP:type_name -> hashicorp.consul.internal.configentry.IntentionHTTPPermission 39, // 68: hashicorp.consul.internal.configentry.IntentionPermission.JWT:type_name -> hashicorp.consul.internal.configentry.IntentionJWTRequirement @@ -9192,100 +8668,89 @@ var file_private_pbconfigentry_config_entry_proto_depIdxs = []int32{ 49, // 73: hashicorp.consul.internal.configentry.ServiceDefaults.Expose:type_name -> hashicorp.consul.internal.configentry.ExposeConfig 51, // 74: hashicorp.consul.internal.configentry.ServiceDefaults.UpstreamConfig:type_name -> hashicorp.consul.internal.configentry.UpstreamConfiguration 55, // 75: hashicorp.consul.internal.configentry.ServiceDefaults.Destination:type_name -> hashicorp.consul.internal.configentry.DestinationConfig - 112, // 76: hashicorp.consul.internal.configentry.ServiceDefaults.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceDefaults.MetaEntry - 126, // 77: hashicorp.consul.internal.configentry.ServiceDefaults.EnvoyExtensions:type_name -> hashicorp.consul.internal.common.EnvoyExtension + 105, // 76: hashicorp.consul.internal.configentry.ServiceDefaults.Meta:type_name -> hashicorp.consul.internal.configentry.ServiceDefaults.MetaEntry + 119, // 77: hashicorp.consul.internal.configentry.ServiceDefaults.EnvoyExtensions:type_name -> hashicorp.consul.internal.common.EnvoyExtension 4, // 78: hashicorp.consul.internal.configentry.ServiceDefaults.MutualTLSMode:type_name -> hashicorp.consul.internal.configentry.MutualTLSMode 5, // 79: hashicorp.consul.internal.configentry.MeshGatewayConfig.Mode:type_name -> hashicorp.consul.internal.configentry.MeshGatewayMode 50, // 80: hashicorp.consul.internal.configentry.ExposeConfig.Paths:type_name -> hashicorp.consul.internal.configentry.ExposePath 52, // 81: hashicorp.consul.internal.configentry.UpstreamConfiguration.Overrides:type_name -> hashicorp.consul.internal.configentry.UpstreamConfig 52, // 82: hashicorp.consul.internal.configentry.UpstreamConfiguration.Defaults:type_name -> hashicorp.consul.internal.configentry.UpstreamConfig - 122, // 83: hashicorp.consul.internal.configentry.UpstreamConfig.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 115, // 83: hashicorp.consul.internal.configentry.UpstreamConfig.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta 53, // 84: hashicorp.consul.internal.configentry.UpstreamConfig.Limits:type_name -> hashicorp.consul.internal.configentry.UpstreamLimits 54, // 85: hashicorp.consul.internal.configentry.UpstreamConfig.PassiveHealthCheck:type_name -> hashicorp.consul.internal.configentry.PassiveHealthCheck 48, // 86: hashicorp.consul.internal.configentry.UpstreamConfig.MeshGateway:type_name -> hashicorp.consul.internal.configentry.MeshGatewayConfig - 124, // 87: hashicorp.consul.internal.configentry.PassiveHealthCheck.Interval:type_name -> google.protobuf.Duration - 124, // 88: hashicorp.consul.internal.configentry.PassiveHealthCheck.BaseEjectionTime:type_name -> google.protobuf.Duration - 113, // 89: hashicorp.consul.internal.configentry.APIGateway.Meta:type_name -> hashicorp.consul.internal.configentry.APIGateway.MetaEntry + 117, // 87: hashicorp.consul.internal.configentry.PassiveHealthCheck.Interval:type_name -> google.protobuf.Duration + 117, // 88: hashicorp.consul.internal.configentry.PassiveHealthCheck.BaseEjectionTime:type_name -> google.protobuf.Duration + 106, // 89: hashicorp.consul.internal.configentry.APIGateway.Meta:type_name -> hashicorp.consul.internal.configentry.APIGateway.MetaEntry 59, // 90: hashicorp.consul.internal.configentry.APIGateway.Listeners:type_name -> hashicorp.consul.internal.configentry.APIGatewayListener 57, // 91: hashicorp.consul.internal.configentry.APIGateway.Status:type_name -> hashicorp.consul.internal.configentry.Status 58, // 92: hashicorp.consul.internal.configentry.Status.Conditions:type_name -> hashicorp.consul.internal.configentry.Condition - 65, // 93: hashicorp.consul.internal.configentry.Condition.Resource:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 125, // 94: hashicorp.consul.internal.configentry.Condition.LastTransitionTime:type_name -> google.protobuf.Timestamp + 61, // 93: hashicorp.consul.internal.configentry.Condition.Resource:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 118, // 94: hashicorp.consul.internal.configentry.Condition.LastTransitionTime:type_name -> google.protobuf.Timestamp 6, // 95: hashicorp.consul.internal.configentry.APIGatewayListener.Protocol:type_name -> hashicorp.consul.internal.configentry.APIGatewayListenerProtocol 60, // 96: hashicorp.consul.internal.configentry.APIGatewayListener.TLS:type_name -> hashicorp.consul.internal.configentry.APIGatewayTLSConfiguration - 61, // 97: hashicorp.consul.internal.configentry.APIGatewayListener.Override:type_name -> hashicorp.consul.internal.configentry.APIGatewayPolicy - 61, // 98: hashicorp.consul.internal.configentry.APIGatewayListener.Default:type_name -> hashicorp.consul.internal.configentry.APIGatewayPolicy - 65, // 99: hashicorp.consul.internal.configentry.APIGatewayTLSConfiguration.Certificates:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 62, // 100: hashicorp.consul.internal.configentry.APIGatewayPolicy.JWT:type_name -> hashicorp.consul.internal.configentry.APIGatewayJWTRequirement - 63, // 101: hashicorp.consul.internal.configentry.APIGatewayJWTRequirement.Providers:type_name -> hashicorp.consul.internal.configentry.APIGatewayJWTProvider - 64, // 102: hashicorp.consul.internal.configentry.APIGatewayJWTProvider.VerifyClaims:type_name -> hashicorp.consul.internal.configentry.APIGatewayJWTClaimVerification - 122, // 103: hashicorp.consul.internal.configentry.ResourceReference.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta - 114, // 104: hashicorp.consul.internal.configentry.BoundAPIGateway.Meta:type_name -> hashicorp.consul.internal.configentry.BoundAPIGateway.MetaEntry - 67, // 105: hashicorp.consul.internal.configentry.BoundAPIGateway.Listeners:type_name -> hashicorp.consul.internal.configentry.BoundAPIGatewayListener - 65, // 106: hashicorp.consul.internal.configentry.BoundAPIGatewayListener.Certificates:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 65, // 107: hashicorp.consul.internal.configentry.BoundAPIGatewayListener.Routes:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 115, // 108: hashicorp.consul.internal.configentry.InlineCertificate.Meta:type_name -> hashicorp.consul.internal.configentry.InlineCertificate.MetaEntry - 116, // 109: hashicorp.consul.internal.configentry.HTTPRoute.Meta:type_name -> hashicorp.consul.internal.configentry.HTTPRoute.MetaEntry - 65, // 110: hashicorp.consul.internal.configentry.HTTPRoute.Parents:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 70, // 111: hashicorp.consul.internal.configentry.HTTPRoute.Rules:type_name -> hashicorp.consul.internal.configentry.HTTPRouteRule - 57, // 112: hashicorp.consul.internal.configentry.HTTPRoute.Status:type_name -> hashicorp.consul.internal.configentry.Status - 75, // 113: hashicorp.consul.internal.configentry.HTTPRouteRule.Filters:type_name -> hashicorp.consul.internal.configentry.HTTPFilters - 71, // 114: hashicorp.consul.internal.configentry.HTTPRouteRule.Matches:type_name -> hashicorp.consul.internal.configentry.HTTPMatch - 81, // 115: hashicorp.consul.internal.configentry.HTTPRouteRule.Services:type_name -> hashicorp.consul.internal.configentry.HTTPService - 72, // 116: hashicorp.consul.internal.configentry.HTTPMatch.Headers:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderMatch - 7, // 117: hashicorp.consul.internal.configentry.HTTPMatch.Method:type_name -> hashicorp.consul.internal.configentry.HTTPMatchMethod - 73, // 118: hashicorp.consul.internal.configentry.HTTPMatch.Path:type_name -> hashicorp.consul.internal.configentry.HTTPPathMatch - 74, // 119: hashicorp.consul.internal.configentry.HTTPMatch.Query:type_name -> hashicorp.consul.internal.configentry.HTTPQueryMatch - 8, // 120: hashicorp.consul.internal.configentry.HTTPHeaderMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderMatchType - 9, // 121: hashicorp.consul.internal.configentry.HTTPPathMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPPathMatchType - 10, // 122: hashicorp.consul.internal.configentry.HTTPQueryMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPQueryMatchType - 80, // 123: hashicorp.consul.internal.configentry.HTTPFilters.Headers:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter - 76, // 124: hashicorp.consul.internal.configentry.HTTPFilters.URLRewrite:type_name -> hashicorp.consul.internal.configentry.URLRewrite - 77, // 125: hashicorp.consul.internal.configentry.HTTPFilters.RetryFilter:type_name -> hashicorp.consul.internal.configentry.RetryFilter - 78, // 126: hashicorp.consul.internal.configentry.HTTPFilters.TimeoutFilter:type_name -> hashicorp.consul.internal.configentry.TimeoutFilter - 79, // 127: hashicorp.consul.internal.configentry.HTTPFilters.JWT:type_name -> hashicorp.consul.internal.configentry.JWTFilter - 124, // 128: hashicorp.consul.internal.configentry.TimeoutFilter.RequestTimeout:type_name -> google.protobuf.Duration - 124, // 129: hashicorp.consul.internal.configentry.TimeoutFilter.IdleTimeout:type_name -> google.protobuf.Duration - 63, // 130: hashicorp.consul.internal.configentry.JWTFilter.Providers:type_name -> hashicorp.consul.internal.configentry.APIGatewayJWTProvider - 117, // 131: hashicorp.consul.internal.configentry.HTTPHeaderFilter.Add:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter.AddEntry - 118, // 132: hashicorp.consul.internal.configentry.HTTPHeaderFilter.Set:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter.SetEntry - 75, // 133: hashicorp.consul.internal.configentry.HTTPService.Filters:type_name -> hashicorp.consul.internal.configentry.HTTPFilters - 122, // 134: hashicorp.consul.internal.configentry.HTTPService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta - 119, // 135: hashicorp.consul.internal.configentry.TCPRoute.Meta:type_name -> hashicorp.consul.internal.configentry.TCPRoute.MetaEntry - 65, // 136: hashicorp.consul.internal.configentry.TCPRoute.Parents:type_name -> hashicorp.consul.internal.configentry.ResourceReference - 83, // 137: hashicorp.consul.internal.configentry.TCPRoute.Services:type_name -> hashicorp.consul.internal.configentry.TCPService - 57, // 138: hashicorp.consul.internal.configentry.TCPRoute.Status:type_name -> hashicorp.consul.internal.configentry.Status - 122, // 139: hashicorp.consul.internal.configentry.TCPService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta - 85, // 140: hashicorp.consul.internal.configentry.SamenessGroup.Members:type_name -> hashicorp.consul.internal.configentry.SamenessGroupMember - 120, // 141: hashicorp.consul.internal.configentry.SamenessGroup.Meta:type_name -> hashicorp.consul.internal.configentry.SamenessGroup.MetaEntry - 122, // 142: hashicorp.consul.internal.configentry.SamenessGroup.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta - 87, // 143: hashicorp.consul.internal.configentry.JWTProvider.JSONWebKeySet:type_name -> hashicorp.consul.internal.configentry.JSONWebKeySet - 96, // 144: hashicorp.consul.internal.configentry.JWTProvider.Locations:type_name -> hashicorp.consul.internal.configentry.JWTLocation - 100, // 145: hashicorp.consul.internal.configentry.JWTProvider.Forwarding:type_name -> hashicorp.consul.internal.configentry.JWTForwardingConfig - 101, // 146: hashicorp.consul.internal.configentry.JWTProvider.CacheConfig:type_name -> hashicorp.consul.internal.configentry.JWTCacheConfig - 121, // 147: hashicorp.consul.internal.configentry.JWTProvider.Meta:type_name -> hashicorp.consul.internal.configentry.JWTProvider.MetaEntry - 88, // 148: hashicorp.consul.internal.configentry.JSONWebKeySet.Local:type_name -> hashicorp.consul.internal.configentry.LocalJWKS - 89, // 149: hashicorp.consul.internal.configentry.JSONWebKeySet.Remote:type_name -> hashicorp.consul.internal.configentry.RemoteJWKS - 124, // 150: hashicorp.consul.internal.configentry.RemoteJWKS.CacheDuration:type_name -> google.protobuf.Duration - 94, // 151: hashicorp.consul.internal.configentry.RemoteJWKS.RetryPolicy:type_name -> hashicorp.consul.internal.configentry.JWKSRetryPolicy - 90, // 152: hashicorp.consul.internal.configentry.RemoteJWKS.JWKSCluster:type_name -> hashicorp.consul.internal.configentry.JWKSCluster - 91, // 153: hashicorp.consul.internal.configentry.JWKSCluster.TLSCertificates:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertificate - 124, // 154: hashicorp.consul.internal.configentry.JWKSCluster.ConnectTimeout:type_name -> google.protobuf.Duration - 92, // 155: hashicorp.consul.internal.configentry.JWKSTLSCertificate.CaCertificateProviderInstance:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertProviderInstance - 93, // 156: hashicorp.consul.internal.configentry.JWKSTLSCertificate.TrustedCA:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertTrustedCA - 95, // 157: hashicorp.consul.internal.configentry.JWKSRetryPolicy.RetryPolicyBackOff:type_name -> hashicorp.consul.internal.configentry.RetryPolicyBackOff - 124, // 158: hashicorp.consul.internal.configentry.RetryPolicyBackOff.BaseInterval:type_name -> google.protobuf.Duration - 124, // 159: hashicorp.consul.internal.configentry.RetryPolicyBackOff.MaxInterval:type_name -> google.protobuf.Duration - 97, // 160: hashicorp.consul.internal.configentry.JWTLocation.Header:type_name -> hashicorp.consul.internal.configentry.JWTLocationHeader - 98, // 161: hashicorp.consul.internal.configentry.JWTLocation.QueryParam:type_name -> hashicorp.consul.internal.configentry.JWTLocationQueryParam - 99, // 162: hashicorp.consul.internal.configentry.JWTLocation.Cookie:type_name -> hashicorp.consul.internal.configentry.JWTLocationCookie - 19, // 163: hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry.value:type_name -> hashicorp.consul.internal.configentry.ServiceResolverSubset - 21, // 164: hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry.value:type_name -> hashicorp.consul.internal.configentry.ServiceResolverFailover - 165, // [165:165] is the sub-list for method output_type - 165, // [165:165] is the sub-list for method input_type - 165, // [165:165] is the sub-list for extension type_name - 165, // [165:165] is the sub-list for extension extendee - 0, // [0:165] is the sub-list for field type_name + 61, // 97: hashicorp.consul.internal.configentry.APIGatewayTLSConfiguration.Certificates:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 115, // 98: hashicorp.consul.internal.configentry.ResourceReference.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 107, // 99: hashicorp.consul.internal.configentry.BoundAPIGateway.Meta:type_name -> hashicorp.consul.internal.configentry.BoundAPIGateway.MetaEntry + 63, // 100: hashicorp.consul.internal.configentry.BoundAPIGateway.Listeners:type_name -> hashicorp.consul.internal.configentry.BoundAPIGatewayListener + 61, // 101: hashicorp.consul.internal.configentry.BoundAPIGatewayListener.Certificates:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 61, // 102: hashicorp.consul.internal.configentry.BoundAPIGatewayListener.Routes:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 108, // 103: hashicorp.consul.internal.configentry.InlineCertificate.Meta:type_name -> hashicorp.consul.internal.configentry.InlineCertificate.MetaEntry + 109, // 104: hashicorp.consul.internal.configentry.HTTPRoute.Meta:type_name -> hashicorp.consul.internal.configentry.HTTPRoute.MetaEntry + 61, // 105: hashicorp.consul.internal.configentry.HTTPRoute.Parents:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 66, // 106: hashicorp.consul.internal.configentry.HTTPRoute.Rules:type_name -> hashicorp.consul.internal.configentry.HTTPRouteRule + 57, // 107: hashicorp.consul.internal.configentry.HTTPRoute.Status:type_name -> hashicorp.consul.internal.configentry.Status + 71, // 108: hashicorp.consul.internal.configentry.HTTPRouteRule.Filters:type_name -> hashicorp.consul.internal.configentry.HTTPFilters + 67, // 109: hashicorp.consul.internal.configentry.HTTPRouteRule.Matches:type_name -> hashicorp.consul.internal.configentry.HTTPMatch + 74, // 110: hashicorp.consul.internal.configentry.HTTPRouteRule.Services:type_name -> hashicorp.consul.internal.configentry.HTTPService + 68, // 111: hashicorp.consul.internal.configentry.HTTPMatch.Headers:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderMatch + 7, // 112: hashicorp.consul.internal.configentry.HTTPMatch.Method:type_name -> hashicorp.consul.internal.configentry.HTTPMatchMethod + 69, // 113: hashicorp.consul.internal.configentry.HTTPMatch.Path:type_name -> hashicorp.consul.internal.configentry.HTTPPathMatch + 70, // 114: hashicorp.consul.internal.configentry.HTTPMatch.Query:type_name -> hashicorp.consul.internal.configentry.HTTPQueryMatch + 8, // 115: hashicorp.consul.internal.configentry.HTTPHeaderMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderMatchType + 9, // 116: hashicorp.consul.internal.configentry.HTTPPathMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPPathMatchType + 10, // 117: hashicorp.consul.internal.configentry.HTTPQueryMatch.Match:type_name -> hashicorp.consul.internal.configentry.HTTPQueryMatchType + 73, // 118: hashicorp.consul.internal.configentry.HTTPFilters.Headers:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter + 72, // 119: hashicorp.consul.internal.configentry.HTTPFilters.URLRewrite:type_name -> hashicorp.consul.internal.configentry.URLRewrite + 110, // 120: hashicorp.consul.internal.configentry.HTTPHeaderFilter.Add:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter.AddEntry + 111, // 121: hashicorp.consul.internal.configentry.HTTPHeaderFilter.Set:type_name -> hashicorp.consul.internal.configentry.HTTPHeaderFilter.SetEntry + 71, // 122: hashicorp.consul.internal.configentry.HTTPService.Filters:type_name -> hashicorp.consul.internal.configentry.HTTPFilters + 115, // 123: hashicorp.consul.internal.configentry.HTTPService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 112, // 124: hashicorp.consul.internal.configentry.TCPRoute.Meta:type_name -> hashicorp.consul.internal.configentry.TCPRoute.MetaEntry + 61, // 125: hashicorp.consul.internal.configentry.TCPRoute.Parents:type_name -> hashicorp.consul.internal.configentry.ResourceReference + 76, // 126: hashicorp.consul.internal.configentry.TCPRoute.Services:type_name -> hashicorp.consul.internal.configentry.TCPService + 57, // 127: hashicorp.consul.internal.configentry.TCPRoute.Status:type_name -> hashicorp.consul.internal.configentry.Status + 115, // 128: hashicorp.consul.internal.configentry.TCPService.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 78, // 129: hashicorp.consul.internal.configentry.SamenessGroup.Members:type_name -> hashicorp.consul.internal.configentry.SamenessGroupMember + 113, // 130: hashicorp.consul.internal.configentry.SamenessGroup.Meta:type_name -> hashicorp.consul.internal.configentry.SamenessGroup.MetaEntry + 115, // 131: hashicorp.consul.internal.configentry.SamenessGroup.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta + 80, // 132: hashicorp.consul.internal.configentry.JWTProvider.JSONWebKeySet:type_name -> hashicorp.consul.internal.configentry.JSONWebKeySet + 89, // 133: hashicorp.consul.internal.configentry.JWTProvider.Locations:type_name -> hashicorp.consul.internal.configentry.JWTLocation + 93, // 134: hashicorp.consul.internal.configentry.JWTProvider.Forwarding:type_name -> hashicorp.consul.internal.configentry.JWTForwardingConfig + 94, // 135: hashicorp.consul.internal.configentry.JWTProvider.CacheConfig:type_name -> hashicorp.consul.internal.configentry.JWTCacheConfig + 114, // 136: hashicorp.consul.internal.configentry.JWTProvider.Meta:type_name -> hashicorp.consul.internal.configentry.JWTProvider.MetaEntry + 81, // 137: hashicorp.consul.internal.configentry.JSONWebKeySet.Local:type_name -> hashicorp.consul.internal.configentry.LocalJWKS + 82, // 138: hashicorp.consul.internal.configentry.JSONWebKeySet.Remote:type_name -> hashicorp.consul.internal.configentry.RemoteJWKS + 117, // 139: hashicorp.consul.internal.configentry.RemoteJWKS.CacheDuration:type_name -> google.protobuf.Duration + 87, // 140: hashicorp.consul.internal.configentry.RemoteJWKS.RetryPolicy:type_name -> hashicorp.consul.internal.configentry.JWKSRetryPolicy + 83, // 141: hashicorp.consul.internal.configentry.RemoteJWKS.JWKSCluster:type_name -> hashicorp.consul.internal.configentry.JWKSCluster + 84, // 142: hashicorp.consul.internal.configentry.JWKSCluster.TLSCertificates:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertificate + 117, // 143: hashicorp.consul.internal.configentry.JWKSCluster.ConnectTimeout:type_name -> google.protobuf.Duration + 85, // 144: hashicorp.consul.internal.configentry.JWKSTLSCertificate.CaCertificateProviderInstance:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertProviderInstance + 86, // 145: hashicorp.consul.internal.configentry.JWKSTLSCertificate.TrustedCA:type_name -> hashicorp.consul.internal.configentry.JWKSTLSCertTrustedCA + 88, // 146: hashicorp.consul.internal.configentry.JWKSRetryPolicy.RetryPolicyBackOff:type_name -> hashicorp.consul.internal.configentry.RetryPolicyBackOff + 117, // 147: hashicorp.consul.internal.configentry.RetryPolicyBackOff.BaseInterval:type_name -> google.protobuf.Duration + 117, // 148: hashicorp.consul.internal.configentry.RetryPolicyBackOff.MaxInterval:type_name -> google.protobuf.Duration + 90, // 149: hashicorp.consul.internal.configentry.JWTLocation.Header:type_name -> hashicorp.consul.internal.configentry.JWTLocationHeader + 91, // 150: hashicorp.consul.internal.configentry.JWTLocation.QueryParam:type_name -> hashicorp.consul.internal.configentry.JWTLocationQueryParam + 92, // 151: hashicorp.consul.internal.configentry.JWTLocation.Cookie:type_name -> hashicorp.consul.internal.configentry.JWTLocationCookie + 19, // 152: hashicorp.consul.internal.configentry.ServiceResolver.SubsetsEntry.value:type_name -> hashicorp.consul.internal.configentry.ServiceResolverSubset + 21, // 153: hashicorp.consul.internal.configentry.ServiceResolver.FailoverEntry.value:type_name -> hashicorp.consul.internal.configentry.ServiceResolverFailover + 154, // [154:154] is the sub-list for method output_type + 154, // [154:154] is the sub-list for method input_type + 154, // [154:154] is the sub-list for extension type_name + 154, // [154:154] is the sub-list for extension extendee + 0, // [0:154] is the sub-list for field type_name } func init() { file_private_pbconfigentry_config_entry_proto_init() } @@ -9895,54 +9360,6 @@ func file_private_pbconfigentry_config_entry_proto_init() { } } file_private_pbconfigentry_config_entry_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*APIGatewayPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*APIGatewayJWTRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*APIGatewayJWTProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*APIGatewayJWTClaimVerification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResourceReference); i { case 0: return &v.state @@ -9954,7 +9371,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoundAPIGateway); i { case 0: return &v.state @@ -9966,7 +9383,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoundAPIGatewayListener); i { case 0: return &v.state @@ -9978,7 +9395,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InlineCertificate); i { case 0: return &v.state @@ -9990,7 +9407,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPRoute); i { case 0: return &v.state @@ -10002,7 +9419,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPRouteRule); i { case 0: return &v.state @@ -10014,7 +9431,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPMatch); i { case 0: return &v.state @@ -10026,7 +9443,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPHeaderMatch); i { case 0: return &v.state @@ -10038,7 +9455,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPPathMatch); i { case 0: return &v.state @@ -10050,7 +9467,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPQueryMatch); i { case 0: return &v.state @@ -10062,7 +9479,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPFilters); i { case 0: return &v.state @@ -10074,7 +9491,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLRewrite); i { case 0: return &v.state @@ -10086,43 +9503,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeoutFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JWTFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbconfigentry_config_entry_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPHeaderFilter); i { case 0: return &v.state @@ -10134,7 +9515,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPService); i { case 0: return &v.state @@ -10146,7 +9527,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TCPRoute); i { case 0: return &v.state @@ -10158,7 +9539,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TCPService); i { case 0: return &v.state @@ -10170,7 +9551,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SamenessGroup); i { case 0: return &v.state @@ -10182,7 +9563,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SamenessGroupMember); i { case 0: return &v.state @@ -10194,7 +9575,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTProvider); i { case 0: return &v.state @@ -10206,7 +9587,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JSONWebKeySet); i { case 0: return &v.state @@ -10218,7 +9599,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LocalJWKS); i { case 0: return &v.state @@ -10230,7 +9611,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoteJWKS); i { case 0: return &v.state @@ -10242,7 +9623,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWKSCluster); i { case 0: return &v.state @@ -10254,7 +9635,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWKSTLSCertificate); i { case 0: return &v.state @@ -10266,7 +9647,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWKSTLSCertProviderInstance); i { case 0: return &v.state @@ -10278,7 +9659,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWKSTLSCertTrustedCA); i { case 0: return &v.state @@ -10290,7 +9671,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWKSRetryPolicy); i { case 0: return &v.state @@ -10302,7 +9683,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicyBackOff); i { case 0: return &v.state @@ -10314,7 +9695,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTLocation); i { case 0: return &v.state @@ -10326,7 +9707,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTLocationHeader); i { case 0: return &v.state @@ -10338,7 +9719,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTLocationQueryParam); i { case 0: return &v.state @@ -10350,7 +9731,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTLocationCookie); i { case 0: return &v.state @@ -10362,7 +9743,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTForwardingConfig); i { case 0: return &v.state @@ -10374,7 +9755,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { return nil } } - file_private_pbconfigentry_config_entry_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + file_private_pbconfigentry_config_entry_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWTCacheConfig); i { case 0: return &v.state @@ -10407,7 +9788,7 @@ func file_private_pbconfigentry_config_entry_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_private_pbconfigentry_config_entry_proto_rawDesc, NumEnums: 11, - NumMessages: 111, + NumMessages: 104, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/private/pbconfigentry/config_entry.proto b/proto/private/pbconfigentry/config_entry.proto index 3c698aab37a3d..5c675ec16c0cc 100644 --- a/proto/private/pbconfigentry/config_entry.proto +++ b/proto/private/pbconfigentry/config_entry.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; @@ -706,8 +706,6 @@ message APIGatewayListener { // mog: func-to=apiGatewayProtocolToStructs func-from=apiGatewayProtocolFromStructs APIGatewayListenerProtocol Protocol = 4; APIGatewayTLSConfiguration TLS = 5; - APIGatewayPolicy Override = 6; - APIGatewayPolicy Default = 7; } // mog annotation: @@ -725,30 +723,6 @@ message APIGatewayTLSConfiguration { repeated string CipherSuites = 4; } -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.APIGatewayPolicy -// output=config_entry.gen.go -// name=Structs -message APIGatewayPolicy { - // mog: func-to=gwJWTRequirementToStructs func-from=gwJWTRequirementFromStructs - APIGatewayJWTRequirement JWT = 1; -} - -message APIGatewayJWTRequirement { - repeated APIGatewayJWTProvider Providers = 1; -} - -message APIGatewayJWTProvider { - string Name = 1; - repeated APIGatewayJWTClaimVerification VerifyClaims = 2; -} - -message APIGatewayJWTClaimVerification { - repeated string Path = 1; - string Value = 2; -} - // mog annotation: // // target=github.com/hashicorp/consul/agent/structs.ResourceReference @@ -910,10 +884,6 @@ message HTTPQueryMatch { message HTTPFilters { repeated HTTPHeaderFilter Headers = 1; URLRewrite URLRewrite = 2; - RetryFilter RetryFilter = 3; - TimeoutFilter TimeoutFilter = 4; - // mog: func-to=routeJWTFilterToStructs func-from=routeJWTFilterFromStructs - JWTFilter JWT = 5; } // mog annotation: @@ -925,34 +895,6 @@ message URLRewrite { string Path = 1; } -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.RetryFilter -// output=config_entry.gen.go -// name=Structs -message RetryFilter { - uint32 NumRetries = 1; - repeated string RetryOn = 2; - repeated uint32 RetryOnStatusCodes = 3; - bool RetryOnConnectFailure = 4; -} - -// mog annotation: -// -// target=github.com/hashicorp/consul/agent/structs.TimeoutFilter -// output=config_entry.gen.go -// name=Structs -message TimeoutFilter { - // mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto - google.protobuf.Duration RequestTimeout = 1; - // mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto - google.protobuf.Duration IdleTimeout = 2; -} - -message JWTFilter { - repeated APIGatewayJWTProvider Providers = 1; -} - // mog annotation: // // target=github.com/hashicorp/consul/agent/structs.HTTPHeaderFilter diff --git a/proto/private/pbconfigentry/config_entry_ce.go b/proto/private/pbconfigentry/config_entry_ce.go deleted file mode 100644 index b81e07686136d..0000000000000 --- a/proto/private/pbconfigentry/config_entry_ce.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build !consulent -// +build !consulent - -package pbconfigentry - -import "github.com/hashicorp/consul/agent/structs" - -func gwJWTRequirementToStructs(m *APIGatewayJWTRequirement) *structs.APIGatewayJWTRequirement { - return &structs.APIGatewayJWTRequirement{} -} - -func gwJWTRequirementFromStructs(*structs.APIGatewayJWTRequirement) *APIGatewayJWTRequirement { - return &APIGatewayJWTRequirement{} -} - -func routeJWTFilterToStructs(m *JWTFilter) *structs.JWTFilter { - return &structs.JWTFilter{} -} - -func routeJWTFilterFromStructs(*structs.JWTFilter) *JWTFilter { - return &JWTFilter{} -} diff --git a/proto/private/pbconnect/connect.go b/proto/private/pbconnect/connect.go index 9c3ed9d7355e0..85f8a35b7d37b 100644 --- a/proto/private/pbconnect/connect.go +++ b/proto/private/pbconnect/connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbconnect diff --git a/proto/private/pbconnect/connect.pb.go b/proto/private/pbconnect/connect.pb.go index 18942ff7dea54..278114b3b4aa9 100644 --- a/proto/private/pbconnect/connect.pb.go +++ b/proto/private/pbconnect/connect.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbconnect/connect.proto b/proto/private/pbconnect/connect.proto index f829dd22629a8..afd1a4e1a4dd6 100644 --- a/proto/private/pbconnect/connect.proto +++ b/proto/private/pbconnect/connect.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbdemo/v1/demo.pb.binary.go b/proto/private/pbdemo/v1/demo.pb.binary.go index b52d5f33496eb..45a3c34e5536e 100644 --- a/proto/private/pbdemo/v1/demo.pb.binary.go +++ b/proto/private/pbdemo/v1/demo.pb.binary.go @@ -7,16 +7,6 @@ import ( "google.golang.org/protobuf/proto" ) -// MarshalBinary implements encoding.BinaryMarshaler -func (msg *RecordLabel) MarshalBinary() ([]byte, error) { - return proto.Marshal(msg) -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler -func (msg *RecordLabel) UnmarshalBinary(b []byte) error { - return proto.Unmarshal(b, msg) -} - // MarshalBinary implements encoding.BinaryMarshaler func (msg *Artist) MarshalBinary() ([]byte, error) { return proto.Marshal(msg) diff --git a/proto/private/pbdemo/v1/demo.pb.go b/proto/private/pbdemo/v1/demo.pb.go index ebc5bc3700ae8..9ee119d76f54d 100644 --- a/proto/private/pbdemo/v1/demo.pb.go +++ b/proto/private/pbdemo/v1/demo.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -105,61 +105,6 @@ func (Genre) EnumDescriptor() ([]byte, []int) { return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{0} } -type RecordLabel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *RecordLabel) Reset() { - *x = RecordLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RecordLabel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordLabel) ProtoMessage() {} - -func (x *RecordLabel) ProtoReflect() protoreflect.Message { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordLabel.ProtoReflect.Descriptor instead. -func (*RecordLabel) Descriptor() ([]byte, []int) { - return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{0} -} - -func (x *RecordLabel) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RecordLabel) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - type Artist struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -174,7 +119,7 @@ type Artist struct { func (x *Artist) Reset() { *x = Artist{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[1] + mi := &file_private_pbdemo_v1_demo_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -187,7 +132,7 @@ func (x *Artist) String() string { func (*Artist) ProtoMessage() {} func (x *Artist) ProtoReflect() protoreflect.Message { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[1] + mi := &file_private_pbdemo_v1_demo_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -200,7 +145,7 @@ func (x *Artist) ProtoReflect() protoreflect.Message { // Deprecated: Use Artist.ProtoReflect.Descriptor instead. func (*Artist) Descriptor() ([]byte, []int) { - return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{1} + return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{0} } func (x *Artist) GetName() string { @@ -245,7 +190,7 @@ type Album struct { func (x *Album) Reset() { *x = Album{} if protoimpl.UnsafeEnabled { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[2] + mi := &file_private_pbdemo_v1_demo_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -258,7 +203,7 @@ func (x *Album) String() string { func (*Album) ProtoMessage() {} func (x *Album) ProtoReflect() protoreflect.Message { - mi := &file_private_pbdemo_v1_demo_proto_msgTypes[2] + mi := &file_private_pbdemo_v1_demo_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -271,7 +216,7 @@ func (x *Album) ProtoReflect() protoreflect.Message { // Deprecated: Use Album.ProtoReflect.Descriptor instead. func (*Album) Descriptor() ([]byte, []int) { - return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{2} + return file_private_pbdemo_v1_demo_proto_rawDescGZIP(), []int{1} } func (x *Album) GetName() string { @@ -309,63 +254,59 @@ var file_private_pbdemo_v1_demo_proto_rawDesc = []byte{ 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x76, - 0x31, 0x22, 0x43, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x06, 0x41, 0x72, 0x74, 0x69, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x72, 0x65, - 0x52, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x01, 0x0a, - 0x05, 0x41, 0x6c, 0x62, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x79, 0x65, - 0x61, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x79, 0x65, 0x61, 0x72, 0x4f, 0x66, 0x52, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, - 0x5f, 0x61, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x2a, 0xe9, 0x01, 0x0a, 0x05, - 0x47, 0x65, 0x6e, 0x72, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x4a, 0x41, 0x5a, 0x5a, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x46, 0x4f, 0x4c, 0x4b, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, - 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x50, 0x4f, 0x50, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x47, - 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, - 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x50, 0x55, 0x4e, 0x4b, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, - 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x42, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x06, 0x12, 0x11, 0x0a, - 0x0d, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x52, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x42, 0x10, 0x07, - 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x52, - 0x59, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x53, - 0x43, 0x4f, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x53, 0x4b, - 0x41, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x48, 0x49, 0x50, - 0x5f, 0x48, 0x4f, 0x50, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, - 0x49, 0x4e, 0x44, 0x49, 0x45, 0x10, 0x0c, 0x42, 0x97, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x76, - 0x31, 0x42, 0x09, 0x44, 0x65, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x64, 0x65, 0x6d, 0x6f, - 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, 0x6d, 0x6f, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x48, 0x43, 0x49, - 0x44, 0xaa, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x44, 0x65, - 0x6d, 0x6f, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5c, 0x44, 0x65, 0x6d, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x44, 0x65, 0x6d, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x25, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3a, 0x3a, 0x44, 0x65, 0x6d, 0x6f, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x22, 0xa3, 0x01, 0x0a, 0x06, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x64, 0x65, + 0x6d, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x72, 0x65, 0x52, 0x05, 0x67, 0x65, 0x6e, + 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x05, 0x41, 0x6c, 0x62, 0x75, + 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x79, 0x65, 0x61, 0x72, 0x5f, 0x6f, 0x66, + 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x79, 0x65, 0x61, 0x72, 0x4f, 0x66, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x13, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x61, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x72, 0x69, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x2a, 0xe9, 0x01, 0x0a, 0x05, 0x47, 0x65, 0x6e, 0x72, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x45, 0x4e, 0x52, 0x45, + 0x5f, 0x4a, 0x41, 0x5a, 0x5a, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x45, 0x4e, 0x52, 0x45, + 0x5f, 0x46, 0x4f, 0x4c, 0x4b, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x45, 0x4e, 0x52, 0x45, + 0x5f, 0x50, 0x4f, 0x50, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, + 0x4d, 0x45, 0x54, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x45, 0x4e, 0x52, 0x45, + 0x5f, 0x50, 0x55, 0x4e, 0x4b, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, + 0x5f, 0x42, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x52, + 0x45, 0x5f, 0x52, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x42, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x47, + 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x08, 0x12, 0x0f, + 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x09, 0x12, + 0x0d, 0x0a, 0x09, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x53, 0x4b, 0x41, 0x10, 0x0a, 0x12, 0x11, + 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x48, 0x49, 0x50, 0x5f, 0x48, 0x4f, 0x50, 0x10, + 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x4e, 0x52, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x49, 0x45, + 0x10, 0x0c, 0x42, 0x97, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x44, 0x65, + 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x64, + 0x65, 0x6d, 0x6f, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x48, 0x43, 0x49, 0x44, 0xaa, 0x02, 0x21, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5c, 0x44, 0x65, 0x6d, + 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5c, 0x44, 0x65, 0x6d, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x25, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x3a, 0x3a, 0x44, 0x65, 0x6d, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -381,12 +322,11 @@ func file_private_pbdemo_v1_demo_proto_rawDescGZIP() []byte { } var file_private_pbdemo_v1_demo_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_private_pbdemo_v1_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_private_pbdemo_v1_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_private_pbdemo_v1_demo_proto_goTypes = []interface{}{ - (Genre)(0), // 0: hashicorp.consul.internal.demo.v1.Genre - (*RecordLabel)(nil), // 1: hashicorp.consul.internal.demo.v1.RecordLabel - (*Artist)(nil), // 2: hashicorp.consul.internal.demo.v1.Artist - (*Album)(nil), // 3: hashicorp.consul.internal.demo.v1.Album + (Genre)(0), // 0: hashicorp.consul.internal.demo.v1.Genre + (*Artist)(nil), // 1: hashicorp.consul.internal.demo.v1.Artist + (*Album)(nil), // 2: hashicorp.consul.internal.demo.v1.Album } var file_private_pbdemo_v1_demo_proto_depIdxs = []int32{ 0, // 0: hashicorp.consul.internal.demo.v1.Artist.genre:type_name -> hashicorp.consul.internal.demo.v1.Genre @@ -404,18 +344,6 @@ func file_private_pbdemo_v1_demo_proto_init() { } if !protoimpl.UnsafeEnabled { file_private_pbdemo_v1_demo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecordLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_private_pbdemo_v1_demo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Artist); i { case 0: return &v.state @@ -427,7 +355,7 @@ func file_private_pbdemo_v1_demo_proto_init() { return nil } } - file_private_pbdemo_v1_demo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_private_pbdemo_v1_demo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Album); i { case 0: return &v.state @@ -446,7 +374,7 @@ func file_private_pbdemo_v1_demo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_private_pbdemo_v1_demo_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/private/pbdemo/v1/demo.proto b/proto/private/pbdemo/v1/demo.proto index a0498cbd4fe30..60ce1d0a4f507 100644 --- a/proto/private/pbdemo/v1/demo.proto +++ b/proto/private/pbdemo/v1/demo.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; @@ -7,11 +7,6 @@ syntax = "proto3"; // Consul's generic storage APIs. package hashicorp.consul.internal.demo.v1; -message RecordLabel { - string name = 1; - string description = 2; -} - message Artist { string name = 1; string description = 2; diff --git a/proto/private/pbdemo/v2/demo.pb.go b/proto/private/pbdemo/v2/demo.pb.go index a4c52a99d6a6c..2ffed20dcc6f5 100644 --- a/proto/private/pbdemo/v2/demo.pb.go +++ b/proto/private/pbdemo/v2/demo.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbdemo/v2/demo.proto b/proto/private/pbdemo/v2/demo.proto index 546cfe6972611..b208324801c12 100644 --- a/proto/private/pbdemo/v2/demo.proto +++ b/proto/private/pbdemo/v2/demo.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pboperator/operator.pb.go b/proto/private/pboperator/operator.pb.go index e7e457bc7389e..5f264c53937af 100644 --- a/proto/private/pboperator/operator.pb.go +++ b/proto/private/pboperator/operator.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pboperator/operator.proto b/proto/private/pboperator/operator.proto index 8669f03041fd9..4f8b99358d4e9 100644 --- a/proto/private/pboperator/operator.proto +++ b/proto/private/pboperator/operator.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbpeering/peering.go b/proto/private/pbpeering/peering.go index 5759061afce24..0fec964c46b1a 100644 --- a/proto/private/pbpeering/peering.go +++ b/proto/private/pbpeering/peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbpeering diff --git a/proto/private/pbpeering/peering.pb.go b/proto/private/pbpeering/peering.pb.go index a0c7bd21676d2..65a75ada268f5 100644 --- a/proto/private/pbpeering/peering.pb.go +++ b/proto/private/pbpeering/peering.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -324,7 +324,7 @@ type Peering struct { PeerCAPems []string `protobuf:"bytes,8,rep,name=PeerCAPems,proto3" json:"PeerCAPems,omitempty"` // PeerServerName is the name of the remote server as it relates to TLS. PeerServerName string `protobuf:"bytes,9,opt,name=PeerServerName,proto3" json:"PeerServerName,omitempty"` - // PeerServerAddresses contains all the connection addresses for the remote peer. + // PeerServerAddresses contains all the the connection addresses for the remote peer. PeerServerAddresses []string `protobuf:"bytes,10,rep,name=PeerServerAddresses,proto3" json:"PeerServerAddresses,omitempty"` // StreamStatus contains information computed on read based on the state of the stream. // diff --git a/proto/private/pbpeering/peering.proto b/proto/private/pbpeering/peering.proto index 02fddbf17fea4..098c8f6387d56 100644 --- a/proto/private/pbpeering/peering.proto +++ b/proto/private/pbpeering/peering.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; @@ -229,7 +229,7 @@ message Peering { // PeerServerName is the name of the remote server as it relates to TLS. string PeerServerName = 9; - // PeerServerAddresses contains all the connection addresses for the remote peer. + // PeerServerAddresses contains all the the connection addresses for the remote peer. repeated string PeerServerAddresses = 10; // StreamStatus contains information computed on read based on the state of the stream. diff --git a/proto/private/pbpeering/peering_ce.go b/proto/private/pbpeering/peering_ce.go index 4c4dd959e8a73..04d1107d02c83 100644 --- a/proto/private/pbpeering/peering_ce.go +++ b/proto/private/pbpeering/peering_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/proto/private/pbpeerstream/convert.go b/proto/private/pbpeerstream/convert.go index d71dc5d3b15ff..27848e0e399e4 100644 --- a/proto/private/pbpeerstream/convert.go +++ b/proto/private/pbpeerstream/convert.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbpeerstream diff --git a/proto/private/pbpeerstream/peerstream.go b/proto/private/pbpeerstream/peerstream.go index 3dc6aa6093d83..85d44785d04e8 100644 --- a/proto/private/pbpeerstream/peerstream.go +++ b/proto/private/pbpeerstream/peerstream.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbpeerstream diff --git a/proto/private/pbpeerstream/peerstream.pb.go b/proto/private/pbpeerstream/peerstream.pb.go index aeb1bdb22082f..f20496642d30f 100644 --- a/proto/private/pbpeerstream/peerstream.pb.go +++ b/proto/private/pbpeerstream/peerstream.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbpeerstream/peerstream.proto b/proto/private/pbpeerstream/peerstream.proto index b46fcf2270dba..a66e823e049e1 100644 --- a/proto/private/pbpeerstream/peerstream.proto +++ b/proto/private/pbpeerstream/peerstream.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbpeerstream/types.go b/proto/private/pbpeerstream/types.go index bf2250c64dd9c..6b55bfb425665 100644 --- a/proto/private/pbpeerstream/types.go +++ b/proto/private/pbpeerstream/types.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbpeerstream diff --git a/proto/private/pbservice/convert.go b/proto/private/pbservice/convert.go index 8396ff7c649f2..973369f03dcde 100644 --- a/proto/private/pbservice/convert.go +++ b/proto/private/pbservice/convert.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbservice diff --git a/proto/private/pbservice/convert_ce.go b/proto/private/pbservice/convert_ce.go index 482a2640c74a2..938495b96b772 100644 --- a/proto/private/pbservice/convert_ce.go +++ b/proto/private/pbservice/convert_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/proto/private/pbservice/convert_ce_test.go b/proto/private/pbservice/convert_ce_test.go index 59a29c6ca7620..2367f3e73aeba 100644 --- a/proto/private/pbservice/convert_ce_test.go +++ b/proto/private/pbservice/convert_ce_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/proto/private/pbservice/convert_test.go b/proto/private/pbservice/convert_test.go index 5b3c97680ef6d..0093a76dd9fb9 100644 --- a/proto/private/pbservice/convert_test.go +++ b/proto/private/pbservice/convert_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbservice diff --git a/proto/private/pbservice/healthcheck.pb.go b/proto/private/pbservice/healthcheck.pb.go index ba0edbde9d648..aa7a4c73253a0 100644 --- a/proto/private/pbservice/healthcheck.pb.go +++ b/proto/private/pbservice/healthcheck.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbservice/healthcheck.proto b/proto/private/pbservice/healthcheck.proto index b3cbf050448b0..5800a04191d2c 100644 --- a/proto/private/pbservice/healthcheck.proto +++ b/proto/private/pbservice/healthcheck.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbservice/ids.go b/proto/private/pbservice/ids.go index bac74d6f7e805..8ab248c3e8d5b 100644 --- a/proto/private/pbservice/ids.go +++ b/proto/private/pbservice/ids.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbservice diff --git a/proto/private/pbservice/ids_test.go b/proto/private/pbservice/ids_test.go index 9477bb8d9bb72..9a56604ee8c1e 100644 --- a/proto/private/pbservice/ids_test.go +++ b/proto/private/pbservice/ids_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbservice diff --git a/proto/private/pbservice/node.pb.go b/proto/private/pbservice/node.pb.go index 3d562fe31f716..7b8fa6a3345b7 100644 --- a/proto/private/pbservice/node.pb.go +++ b/proto/private/pbservice/node.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbservice/node.proto b/proto/private/pbservice/node.proto index 6b81f0b6c06d3..85e82de7082ec 100644 --- a/proto/private/pbservice/node.proto +++ b/proto/private/pbservice/node.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbservice/service.pb.go b/proto/private/pbservice/service.pb.go index 871b6a04118cd..13826aa752eaa 100644 --- a/proto/private/pbservice/service.pb.go +++ b/proto/private/pbservice/service.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbservice/service.proto b/proto/private/pbservice/service.proto index b89f1717b17c1..4573a920a6eb8 100644 --- a/proto/private/pbservice/service.proto +++ b/proto/private/pbservice/service.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbstorage/raft.pb.go b/proto/private/pbstorage/raft.pb.go index 6efa5c8f8fb10..8ae22a6aba912 100644 --- a/proto/private/pbstorage/raft.pb.go +++ b/proto/private/pbstorage/raft.pb.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbstorage/raft.proto b/proto/private/pbstorage/raft.proto index ed7954a8690e5..1dbae409e28a3 100644 --- a/proto/private/pbstorage/raft.proto +++ b/proto/private/pbstorage/raft.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 syntax = "proto3"; diff --git a/proto/private/pbsubscribe/subscribe.go b/proto/private/pbsubscribe/subscribe.go index 918c3d298078b..53b7081245364 100644 --- a/proto/private/pbsubscribe/subscribe.go +++ b/proto/private/pbsubscribe/subscribe.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package pbsubscribe diff --git a/proto/private/pbsubscribe/subscribe.pb.go b/proto/private/pbsubscribe/subscribe.pb.go index 93dcf9c21c230..f71a855107c59 100644 --- a/proto/private/pbsubscribe/subscribe.pb.go +++ b/proto/private/pbsubscribe/subscribe.pb.go @@ -1,8 +1,8 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // -//Package event provides a service for subscribing to state change events. +// Package event provides a service for subscribing to state change events. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/proto/private/pbsubscribe/subscribe.proto b/proto/private/pbsubscribe/subscribe.proto index c327c92c7f024..37124b5d02770 100644 --- a/proto/private/pbsubscribe/subscribe.proto +++ b/proto/private/pbsubscribe/subscribe.proto @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 /* Package event provides a service for subscribing to state change events. diff --git a/proto/private/prototest/testing.go b/proto/private/prototest/testing.go index 6b6e81a4a1743..28341012afa6d 100644 --- a/proto/private/prototest/testing.go +++ b/proto/private/prototest/testing.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package prototest @@ -32,7 +32,6 @@ func AssertDeepEqual(t TestingT, x, y interface{}, opts ...cmp.Option) { func AssertElementsMatch[V any]( t TestingT, listX, listY []V, opts ...cmp.Option, ) { - t.Helper() diff := diffElements(listX, listY, opts...) if diff != "" { t.Fatalf("assertion failed: slices do not have matching elements\n--- expected\n+++ actual\n%v", diff) @@ -101,5 +100,5 @@ func AssertContainsElement[V any](t TestingT, list []V, element V, opts ...cmp.O } } - t.Fatalf("assertion failed: list does not contain element\n--- list\n%+v\n--- element: %+v", list, element) + t.Fatalf("assertion failed: list does not contain element\n--- list\n%#v\n--- element: %#v", list, element) } diff --git a/proto/private/prototest/testing_test.go b/proto/private/prototest/testing_test.go index 2ee383baa1da3..22c1848821ddc 100644 --- a/proto/private/prototest/testing_test.go +++ b/proto/private/prototest/testing_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package prototest import ( diff --git a/sdk/LICENSE b/sdk/LICENSE deleted file mode 100644 index 7c5baa45e1c29..0000000000000 --- a/sdk/LICENSE +++ /dev/null @@ -1,365 +0,0 @@ -Copyright (c) 2020 HashiCorp, Inc. - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/sdk/iptables/iptables.go b/sdk/iptables/iptables.go index 32f089a6c9a82..5b965a6322ac1 100644 --- a/sdk/iptables/iptables.go +++ b/sdk/iptables/iptables.go @@ -149,7 +149,7 @@ func Setup(cfg Config) error { // Redirect remaining outbound traffic to Envoy. cfg.IptablesProvider.AddRule("iptables", "-t", "nat", "-A", ProxyOutputChain, "-j", ProxyOutputRedirectChain) - // We are using "insert" (-I) instead of "append" (-A) so the provided rules take precedence over default ones. + // We are using "insert" (-I) instead of "append" (-A) so the the provided rules take precedence over default ones. for _, outboundPort := range cfg.ExcludeOutboundPorts { cfg.IptablesProvider.AddRule("iptables", "-t", "nat", "-I", ProxyOutputChain, "-p", "tcp", "--dport", outboundPort, "-j", "RETURN") } diff --git a/sdk/testutil/context.go b/sdk/testutil/context.go index 47ff794c96c6d..257f205aa298e 100644 --- a/sdk/testutil/context.go +++ b/sdk/testutil/context.go @@ -5,14 +5,10 @@ package testutil import ( "context" + "testing" ) -type CleanerT interface { - Helper() - Cleanup(func()) -} - -func TestContext(t CleanerT) context.Context { +func TestContext(t *testing.T) context.Context { t.Helper() ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) diff --git a/sdk/testutil/retry/counter.go b/sdk/testutil/retry/counter.go deleted file mode 100644 index 96a37ab9d2fcf..0000000000000 --- a/sdk/testutil/retry/counter.go +++ /dev/null @@ -1,23 +0,0 @@ -package retry - -import "time" - -// Counter repeats an operation a given number of -// times and waits between subsequent operations. -type Counter struct { - Count int - Wait time.Duration - - count int -} - -func (r *Counter) Continue() bool { - if r.count == r.Count { - return false - } - if r.count > 0 { - time.Sleep(r.Wait) - } - r.count++ - return true -} diff --git a/sdk/testutil/retry/retry.go b/sdk/testutil/retry/retry.go index af468460d592a..ce0e4b6ecd2d6 100644 --- a/sdk/testutil/retry/retry.go +++ b/sdk/testutil/retry/retry.go @@ -53,8 +53,6 @@ type R struct { // and triggers t.FailNow() done bool output []string - - cleanups []func() } func (r *R) Logf(format string, args ...interface{}) { @@ -67,41 +65,6 @@ func (r *R) Log(args ...interface{}) { func (r *R) Helper() {} -// Cleanup register a function to be run to cleanup resources that -// were allocated during the retry attempt. These functions are executed -// after a retry attempt. If they panic, it will not stop further retry -// attempts but will be cause for the overall test failure. -func (r *R) Cleanup(fn func()) { - r.cleanups = append(r.cleanups, fn) -} - -func (r *R) runCleanup() { - - // Make sure that if a cleanup function panics, - // we still run the remaining cleanup functions. - defer func() { - err := recover() - if err != nil { - r.Stop(fmt.Errorf("error when performing test cleanup: %v", err)) - } - if len(r.cleanups) > 0 { - r.runCleanup() - } - }() - - for len(r.cleanups) > 0 { - var cleanup func() - if len(r.cleanups) > 0 { - last := len(r.cleanups) - 1 - cleanup = r.cleanups[last] - r.cleanups = r.cleanups[:last] - } - if cleanup != nil { - cleanup() - } - } -} - // runFailed is a sentinel value to indicate that the func itself // didn't panic, rather that `FailNow` was called. type runFailed struct{} @@ -227,7 +190,6 @@ func run(r Retryer, t Failer, f func(r *R)) { // run f(rr), but if recover yields a runFailed value, we know // FailNow was called. func() { - defer rr.runCleanup() defer func() { if p := recover(); p != nil && p != (runFailed{}) { panic(p) @@ -254,6 +216,22 @@ func DefaultFailer() *Timer { return &Timer{Timeout: 7 * time.Second, Wait: 25 * time.Millisecond} } +// ThirtySeconds repeats an operation for thirty seconds and waits 500ms in between. +// Best for known slower operations like waiting on eventually consistent state. +func ThirtySeconds() *Timer { + return &Timer{Timeout: 30 * time.Second, Wait: 500 * time.Millisecond} +} + +// TwoSeconds repeats an operation for two seconds and waits 25ms in between. +func TwoSeconds() *Timer { + return &Timer{Timeout: 2 * time.Second, Wait: 25 * time.Millisecond} +} + +// ThreeTimes repeats an operation three times and waits 25ms in between. +func ThreeTimes() *Counter { + return &Counter{Count: 3, Wait: 25 * time.Millisecond} +} + // Retryer provides an interface for repeating operations // until they succeed or an exit condition is met. type Retryer interface { @@ -261,3 +239,47 @@ type Retryer interface { // returns false to indicate retrying should stop. Continue() bool } + +// Counter repeats an operation a given number of +// times and waits between subsequent operations. +type Counter struct { + Count int + Wait time.Duration + + count int +} + +func (r *Counter) Continue() bool { + if r.count == r.Count { + return false + } + if r.count > 0 { + time.Sleep(r.Wait) + } + r.count++ + return true +} + +// Timer repeats an operation for a given amount +// of time and waits between subsequent operations. +type Timer struct { + Timeout time.Duration + Wait time.Duration + + // stop is the timeout deadline. + // TODO: Next()? + // Set on the first invocation of Next(). + stop time.Time +} + +func (r *Timer) Continue() bool { + if r.stop.IsZero() { + r.stop = time.Now().Add(r.Timeout) + return true + } + if time.Now().After(r.stop) { + return false + } + time.Sleep(r.Wait) + return true +} diff --git a/sdk/testutil/retry/retry_test.go b/sdk/testutil/retry/retry_test.go index 77bc2d4d9f96b..1f7eda7b31338 100644 --- a/sdk/testutil/retry/retry_test.go +++ b/sdk/testutil/retry/retry_test.go @@ -128,69 +128,6 @@ func TestRunWith(t *testing.T) { }) } -func TestCleanup(t *testing.T) { - t.Run("basic", func(t *testing.T) { - ft := &fakeT{} - cleanupsExecuted := 0 - RunWith(&Counter{Count: 2, Wait: time.Millisecond}, ft, func(r *R) { - r.Cleanup(func() { - cleanupsExecuted += 1 - }) - }) - - require.Equal(t, 0, ft.fails) - require.Equal(t, 1, cleanupsExecuted) - }) - t.Run("cleanup-panic-recovery", func(t *testing.T) { - ft := &fakeT{} - cleanupsExecuted := 0 - RunWith(&Counter{Count: 2, Wait: time.Millisecond}, ft, func(r *R) { - r.Cleanup(func() { - cleanupsExecuted += 1 - }) - - r.Cleanup(func() { - cleanupsExecuted += 1 - panic(fmt.Errorf("fake test error")) - }) - - r.Cleanup(func() { - cleanupsExecuted += 1 - }) - - // test is successful but should fail due to the cleanup panicing - }) - - require.Equal(t, 3, cleanupsExecuted) - require.Equal(t, 1, ft.fails) - require.Contains(t, ft.out[0], "fake test error") - }) - - t.Run("cleanup-per-retry", func(t *testing.T) { - ft := &fakeT{} - iter := 0 - cleanupsExecuted := 0 - RunWith(&Counter{Count: 3, Wait: time.Millisecond}, ft, func(r *R) { - if cleanupsExecuted != iter { - r.Stop(fmt.Errorf("cleanups not executed between retries")) - return - } - iter += 1 - - r.Cleanup(func() { - cleanupsExecuted += 1 - }) - - r.FailNow() - }) - - require.Equal(t, 3, cleanupsExecuted) - // ensure that r.Stop hadn't been called. If it was then we would - // have log output - require.Len(t, ft.out, 0) - }) -} - type fakeT struct { fails int out []string diff --git a/sdk/testutil/retry/timer.go b/sdk/testutil/retry/timer.go deleted file mode 100644 index 16433e9ec7b02..0000000000000 --- a/sdk/testutil/retry/timer.go +++ /dev/null @@ -1,43 +0,0 @@ -package retry - -import "time" - -// ThirtySeconds repeats an operation for thirty seconds and waits 500ms in between. -// Best for known slower operations like waiting on eventually consistent state. -func ThirtySeconds() *Timer { - return &Timer{Timeout: 30 * time.Second, Wait: 500 * time.Millisecond} -} - -// TwoSeconds repeats an operation for two seconds and waits 25ms in between. -func TwoSeconds() *Timer { - return &Timer{Timeout: 2 * time.Second, Wait: 25 * time.Millisecond} -} - -// ThreeTimes repeats an operation three times and waits 25ms in between. -func ThreeTimes() *Counter { - return &Counter{Count: 3, Wait: 25 * time.Millisecond} -} - -// Timer repeats an operation for a given amount -// of time and waits between subsequent operations. -type Timer struct { - Timeout time.Duration - Wait time.Duration - - // stop is the timeout deadline. - // TODO: Next()? - // Set on the first invocation of Next(). - stop time.Time -} - -func (r *Timer) Continue() bool { - if r.stop.IsZero() { - r.stop = time.Now().Add(r.Timeout) - return true - } - if time.Now().After(r.stop) { - return false - } - time.Sleep(r.Wait) - return true -} diff --git a/sdk/testutil/server.go b/sdk/testutil/server.go index 148fb03d6a956..a20f95123aaba 100644 --- a/sdk/testutil/server.go +++ b/sdk/testutil/server.go @@ -131,7 +131,6 @@ type TestServerConfig struct { ReturnPorts func() `json:"-"` Audit *TestAuditConfig `json:"audit,omitempty"` Version string `json:"version,omitempty"` - Experiments []string `json:"experiments,omitempty"` } type TestACLs struct { diff --git a/sentinel/evaluator.go b/sentinel/evaluator.go index fd609fff90097..d37a82704e616 100644 --- a/sentinel/evaluator.go +++ b/sentinel/evaluator.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package sentinel diff --git a/sentinel/scope.go b/sentinel/scope.go index 4a6a87e146ab3..7f2fb5d721ef5 100644 --- a/sentinel/scope.go +++ b/sentinel/scope.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package sentinel diff --git a/sentinel/sentinel_ce.go b/sentinel/sentinel_ce.go index 9b21607c431b4..fc688bcb933ec 100644 --- a/sentinel/sentinel_ce.go +++ b/sentinel/sentinel_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/service_os/service.go b/service_os/service.go index 8a23c093475ae..cba71b23acf92 100644 --- a/service_os/service.go +++ b/service_os/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service_os diff --git a/service_os/service_windows.go b/service_os/service_windows.go index 6a9ca4386a683..0ff9f2e7c9688 100644 --- a/service_os/service_windows.go +++ b/service_os/service_windows.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build windows // +build windows diff --git a/snapshot/archive.go b/snapshot/archive.go index 38aad441bf0ab..3560e0ac2319e 100644 --- a/snapshot/archive.go +++ b/snapshot/archive.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // The archive utilities manage the internal format of a snapshot, which is a // tar file with the following contents: diff --git a/snapshot/archive_test.go b/snapshot/archive_test.go index 74148b84e8f60..d7568edb80ce8 100644 --- a/snapshot/archive_test.go +++ b/snapshot/archive_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package snapshot diff --git a/snapshot/snapshot.go b/snapshot/snapshot.go index f09f8870e3253..a1deee9153dc4 100644 --- a/snapshot/snapshot.go +++ b/snapshot/snapshot.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 // snapshot manages the interactions between Consul and Raft in order to take // and restore snapshots for disaster recovery. The internal format of a diff --git a/snapshot/snapshot_test.go b/snapshot/snapshot_test.go index 4e9701360dfa9..d59061e9eab61 100644 --- a/snapshot/snapshot_test.go +++ b/snapshot/snapshot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package snapshot diff --git a/test-integ/README.md b/test-integ/README.md deleted file mode 100644 index ebc611efa2bc0..0000000000000 --- a/test-integ/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# test-integ - -Go integration tests for consul. `/test/integration` also holds integration tests; they need migrating. \ No newline at end of file diff --git a/test-integ/go.mod b/test-integ/go.mod deleted file mode 100644 index df38ac3f2f1ba..0000000000000 --- a/test-integ/go.mod +++ /dev/null @@ -1,245 +0,0 @@ -module github.com/hashicorp/consul/test-integ - -go 1.20 - -require ( - github.com/hashicorp/consul/api v1.24.0 - github.com/hashicorp/consul/sdk v0.14.1 - github.com/hashicorp/consul/test/integration/consul-container v0.0.0-20230628201853-bdf4fad7c5a5 - github.com/hashicorp/consul/testing/deployer v0.0.0-00010101000000-000000000000 - github.com/hashicorp/go-cleanhttp v0.5.2 - github.com/itchyny/gojq v0.12.13 - github.com/mitchellh/copystructure v1.2.0 - github.com/stretchr/testify v1.8.4 -) - -require ( - cloud.google.com/go/compute v1.20.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.1 // indirect - dario.cat/mergo v1.0.0 // indirect - fortio.org/dflag v1.5.2 // indirect - fortio.org/fortio v1.54.0 // indirect - fortio.org/log v1.3.0 // indirect - fortio.org/sets v1.0.2 // indirect - fortio.org/version v1.0.2 // indirect - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/DataDog/datadog-go v4.8.2+incompatible // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/agext/levenshtein v1.2.1 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.62.156 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/armon/go-radix v1.0.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/avast/retry-go v3.0.0+incompatible // indirect - github.com/aws/aws-sdk-go v1.44.289 // indirect - github.com/benbjohnson/immutable v0.4.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/boltdb/bolt v1.3.1 // indirect - github.com/cenkalti/backoff/v3 v3.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible // indirect - github.com/circonus-labs/circonusllhist v0.1.3 // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/containerd/containerd v1.7.3 // indirect - github.com/coreos/etcd v3.3.27+incompatible // indirect - github.com/coreos/go-oidc v2.1.0+incompatible // indirect - github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect - github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf // indirect - github.com/cpuguy83/dockercfg v0.3.1 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.5+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect - github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f // indirect - github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fatih/color v1.14.1 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/runtime v0.25.0 // indirect - github.com/go-openapi/spec v0.20.8 // indirect - github.com/go-openapi/strfmt v0.21.3 // indirect - github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-openapi/validate v0.22.1 // indirect - github.com/go-ozzo/ozzo-validation v3.6.0+incompatible // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect - github.com/hashicorp/consul v0.0.0-00010101000000-000000000000 // indirect - github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706 // indirect - github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69 // indirect - github.com/hashicorp/consul/envoyextensions v0.4.1 // indirect - github.com/hashicorp/consul/proto-public v0.4.1 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-bexpr v0.1.2 // indirect - github.com/hashicorp/go-connlimit v0.3.0 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-memdb v1.3.4 // indirect - github.com/hashicorp/go-msgpack v1.1.5 // indirect - github.com/hashicorp/go-msgpack/v2 v2.0.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.5 // indirect - github.com/hashicorp/go-raftchunking v0.7.0 // indirect - github.com/hashicorp/go-retryablehttp v0.6.7 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect - github.com/hashicorp/go-syslog v1.0.0 // indirect - github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.2.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.16.2 // indirect - github.com/hashicorp/hcp-scada-provider v0.2.3 // indirect - github.com/hashicorp/hcp-sdk-go v0.55.0 // indirect - github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 // indirect - github.com/hashicorp/memberlist v0.5.0 // indirect - github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 // indirect - github.com/hashicorp/raft v1.5.0 // indirect - github.com/hashicorp/raft-autopilot v0.1.6 // indirect - github.com/hashicorp/raft-boltdb/v2 v2.2.2 // indirect - github.com/hashicorp/raft-wal v0.3.0 // indirect - github.com/hashicorp/serf v0.10.1 // indirect - github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0 // indirect - github.com/hashicorp/vault/api v1.8.3 // indirect - github.com/hashicorp/vault/api/auth/gcp v0.3.0 // indirect - github.com/hashicorp/vault/sdk v0.7.0 // indirect - github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect - github.com/imdario/mergo v0.3.15 // indirect - github.com/itchyny/timefmt-go v0.1.5 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.50 // indirect - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-testing-interface v1.14.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect - github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 // indirect - github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/pointerstructure v1.2.1 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/patternmatcher v0.5.0 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/term v0.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/morikuni/aec v1.0.0 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/oklog/run v1.0.0 // indirect - github.com/oklog/ulid v1.3.1 // indirect - github.com/oklog/ulid/v2 v2.1.0 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc4 // indirect - github.com/opencontainers/runc v1.1.8 // indirect - github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect - github.com/otiai10/copy v1.10.0 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pierrec/lz4 v2.5.2+incompatible // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/rboyer/safeio v0.2.3 // indirect - github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect - github.com/segmentio/fasthash v1.0.3 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 // indirect - github.com/testcontainers/testcontainers-go v0.22.0 // indirect - github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect - github.com/zclconf/go-cty v1.12.1 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - go.mongodb.org/mongo-driver v1.11.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/sdk v1.16.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.1 // indirect - google.golang.org/api v0.126.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/grpc v1.57.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.66.2 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.26.2 // indirect - k8s.io/apimachinery v0.26.2 // indirect - k8s.io/client-go v0.26.2 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect -) - -replace ( - github.com/hashicorp/consul => ../ - github.com/hashicorp/consul/api => ../api - github.com/hashicorp/consul/envoyextensions => ../envoyextensions - github.com/hashicorp/consul/proto-public => ../proto-public - github.com/hashicorp/consul/sdk => ../sdk - github.com/hashicorp/consul/test/integration/consul-container => ../test/integration/consul-container - github.com/hashicorp/consul/testing/deployer => ../testing/deployer -) diff --git a/test-integ/go.sum b/test-integ/go.sum deleted file mode 100644 index 015660056dd59..0000000000000 --- a/test-integ/go.sum +++ /dev/null @@ -1,1334 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -fortio.org/assert v1.1.4 h1:Za1RaG+OjsTMpQS3J3UCvTF6wc4+IOHCz+jAOU37Y4o= -fortio.org/dflag v1.5.2 h1:F9XVRj4Qr2IbJP7BMj7XZc9wB0Q/RZ61Ool+4YPVad8= -fortio.org/dflag v1.5.2/go.mod h1:ppb/A8u+KKg+qUUYZNYuvRnXuVb8IsdHb/XGzsmjkN8= -fortio.org/fortio v1.54.0 h1:2jn8yTd6hcIEoKY4CjI0lI6XxTWVxsMYF2bMiWOmv+Y= -fortio.org/fortio v1.54.0/go.mod h1:SRaZbikL31UoAkw0On2hwpvHrQ0rRVnsAz3UGVNvMRw= -fortio.org/log v1.3.0 h1:bESPvuQGKejw7rrx41Sg3GoF+tsrB7oC08PxBs5/AM0= -fortio.org/log v1.3.0/go.mod h1:u/8/2lyczXq52aT5Nw6reD+3cR6m/EbS2jBiIYhgiTU= -fortio.org/sets v1.0.2 h1:gSWZFg9rgzl1zJfI/93lDJKBFw8WZ3Uxe3oQ5uDM4T4= -fortio.org/sets v1.0.2/go.mod h1:xVjulHr0FhlmReSymI+AhDtQ4FgjiazQ3JmuNpYFMs8= -fortio.org/version v1.0.2 h1:8NwxdX58aoeKx7T5xAPO0xlUu1Hpk42nRz5s6e6eKZ0= -fortio.org/version v1.0.2/go.mod h1:2JQp9Ax+tm6QKiGuzR5nJY63kFeANcgrZ0osoQFDVm0= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go v4.8.2+incompatible h1:qbcKSx29aBLD+5QLvlQZlGmRMF/FfGqFLFev/1TDzRo= -github.com/DataDog/datadog-go v4.8.2+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.156 h1:K4N91T1+RlSlx+t2dujeDviy4ehSGVjEltluDgmeHS4= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.156/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= -github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= -github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.44.289 h1:5CVEjiHFvdiVlKPBzv0rjG4zH/21W/onT18R5AH/qx0= -github.com/aws/aws-sdk-go v1.44.289/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/immutable v0.4.0 h1:CTqXbEerYso8YzVPxmWxh2gnoRQbbB9X1quUC8+vGZA= -github.com/benbjohnson/immutable v0.4.0/go.mod h1:iAr8OjJGLnLmVUr9MZ/rz4PWUy6Ouc2JLYuMArmvAJM= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o= -github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8= -github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA= -github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf h1:GOPo6vn/vTN+3IwZBvXX0y5doJfSC7My0cdzelyOCsQ= -github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= -github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= -github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f h1:7T++XKzy4xg7PKy+bM+Sa9/oe1OC88yz2hXQUISoXfA= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= -github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= -github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= -github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= -github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 h1:AtvtonGEH/fZK0XPNNBdB6swgy7Iudfx88wzyIpwqJ8= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706 h1:1ZEjnveDe20yFa6lSkfdQZm5BR/b271n0MsB5R2L3us= -github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706/go.mod h1:1Cs8FlmD1BfSQXJGcFLSV5FuIx1AbJP+EJGdxosoS2g= -github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69 h1:wzWurXrxfSyG1PHskIZlfuXlTSCj1Tsyatp9DtaasuY= -github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69/go.mod h1:svUZZDvotY8zTODknUePc6mZ9pX8nN0ViGwWcUSOBEA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.2 h1:ijMXI4qERbzxbCnkxmfUtwMyjrrk3y+Vt0MxojNCbBs= -github.com/hashicorp/go-bexpr v0.1.2/go.mod h1:ANbpTX1oAql27TZkKVeW8p1w8NTdnyzPe/0qqPCKohU= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-connlimit v0.3.0 h1:oAojHGjFxUTTTA8c5XXnDqWJ2HLuWbDiBPTpWvNzvqM= -github.com/hashicorp/go-connlimit v0.3.0/go.mod h1:OUj9FGL1tPIhl/2RCfzYHrIiWj+VVPGNyVPnUX8AqS0= -github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk= -github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= -github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= -github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= -github.com/hashicorp/go-msgpack/v2 v2.0.0 h1:c1fiLq1LNghmLOry1ipGhvLDi+/zEoaEP2JrE1oFJ9s= -github.com/hashicorp/go-msgpack/v2 v2.0.0/go.mod h1:JIxYkkFJRDDRSoWQBSh7s9QAVThq+82iWmUpmE4jKak= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-raftchunking v0.7.0 h1:APNMnCXmTOhumkFv/GpJIbq7HteWF7EnGZ3875lRN0Y= -github.com/hashicorp/go-raftchunking v0.7.0/go.mod h1:Dg/eBOaJzE0jYKNwNLs5IA5j0OSmL5HoCUiMy3mDmrI= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.6.7 h1:8/CAEZt/+F7kR7GevNHulKkUjLht3CPmn7egmhieNKo= -github.com/hashicorp/go-retryablehttp v0.6.7/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6 h1:W9WN8p6moV1fjKLkeqEgkAMu5rauy9QeYDAmIaPuuiA= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6/go.mod h1:MpCPSPGLDILGb4JMm94/mMi3YysIqsXzGCzkEZjcjXg= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= -github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= -github.com/hashicorp/hcp-scada-provider v0.2.3 h1:AarYR+/Pcv+cMvPdAlb92uOBmZfEH6ny4+DT+4NY2VQ= -github.com/hashicorp/hcp-scada-provider v0.2.3/go.mod h1:ZFTgGwkzNv99PLQjTsulzaCplCzOTBh0IUQsPKzrQFo= -github.com/hashicorp/hcp-sdk-go v0.55.0 h1:T4sQtgQfQJOD0uucT4hS+GZI1FmoHAQMADj277W++xw= -github.com/hashicorp/hcp-sdk-go v0.55.0/go.mod h1:hZqky4HEzsKwvLOt4QJlZUrjeQmb4UCZUhDP2HyQFfc= -github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 h1:n9J0rwVWXDpNd5iZnwY7w4WZyq53/rROeI7OVvLW8Ok= -github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 h1:kBpVVl1sl3MaSrs97e0+pDQhSrqJv9gVbSUrPpVfl1w= -github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0/go.mod h1:6pdNz0vo0mF0GvhwDG56O3N18qBrAz/XRIcfINfTbwo= -github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= -github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= -github.com/hashicorp/raft v1.3.11/go.mod h1:J8naEwc6XaaCfts7+28whSeRvCqTd6e20BlCU3LtEO4= -github.com/hashicorp/raft v1.5.0 h1:uNs9EfJ4FwiArZRxxfd/dQ5d33nV31/CdCHArH89hT8= -github.com/hashicorp/raft v1.5.0/go.mod h1:pKHB2mf/Y25u3AHNSXVRv+yT+WAnmeTX0BwVppVQV+M= -github.com/hashicorp/raft-autopilot v0.1.6 h1:C1q3RNF2FfXNZfHWbvVAu0QixaQK8K5pX4O5lh+9z4I= -github.com/hashicorp/raft-autopilot v0.1.6/go.mod h1:Af4jZBwaNOI+tXfIqIdbcAnh/UyyqIMj/pOISIfhArw= -github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= -github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea/go.mod h1:qRd6nFJYYS6Iqnc/8HcUmko2/2Gw8qTFEmxDLii6W5I= -github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0 h1:CO8dBMLH6dvE1jTn/30ZZw3iuPsNfajshWoJTnVc5cc= -github.com/hashicorp/raft-boltdb/v2 v2.2.2 h1:rlkPtOllgIcKLxVT4nutqlTH2NRFn+tO1wwZk/4Dxqw= -github.com/hashicorp/raft-boltdb/v2 v2.2.2/go.mod h1:N8YgaZgNJLpZC+h+by7vDu5rzsRgONThTEeUS3zWbfY= -github.com/hashicorp/raft-wal v0.3.0 h1:Mi6RPoRbsxIIYZryI+bSTXHD97Ua6rIYO51ibYV9bkY= -github.com/hashicorp/raft-wal v0.3.0/go.mod h1:A6vP5o8hGOs1LHfC1Okh9xPwWDcmb6Vvuz/QyqUXlOE= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0 h1:O6tNk0s/arubLUbLeCyaRs5xGo9VwmbQazISY/BfPK4= -github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0/go.mod h1:We3fJplmALwK1VpjwrLuXr/4QCQHYMdnXLHmLUU6Ntg= -github.com/hashicorp/vault/api v1.8.0/go.mod h1:uJrw6D3y9Rv7hhmS17JQC50jbPDAZdjZoTtrCCxxs7E= -github.com/hashicorp/vault/api v1.8.3 h1:cHQOLcMhBR+aVI0HzhPxO62w2+gJhIrKguQNONPzu6o= -github.com/hashicorp/vault/api v1.8.3/go.mod h1:4g/9lj9lmuJQMtT6CmVMHC5FW1yENaVv+Nv4ZfG8fAg= -github.com/hashicorp/vault/api/auth/gcp v0.3.0 h1:taum+3pCmOXnNgEKHlQbmgXmKw5daWHk7YJrLPP/w8g= -github.com/hashicorp/vault/api/auth/gcp v0.3.0/go.mod h1:gnNBFOASYUaFunedTHOzdir7vKcHL3skWBUzEn263bo= -github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= -github.com/hashicorp/vault/sdk v0.7.0 h1:2pQRO40R1etpKkia5fb4kjrdYMx3BHklPxl1pxpxDHg= -github.com/hashicorp/vault/sdk v0.7.0/go.mod h1:KyfArJkhooyba7gYCKSq8v66QdqJmnbAxtV/OX1+JTs= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/itchyny/gojq v0.12.13 h1:IxyYlHYIlspQHHTE0f3cJF0NKDMfajxViuhBLnHd/QU= -github.com/itchyny/gojq v0.12.13/go.mod h1:JzwzAqenfhrPUuwbmEz3nu3JQmFLlQTQMUcOdnu/Sf4= -github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE= -github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= -github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.14.0 h1:/x0XQ6h+3U3nAyk1yx+bHPURrKa9sVVvYbuqZ7pIAtI= -github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= -github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= -github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= -github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= -github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= -github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.8 h1:zICRlc+C1XzivLc3nzE+cbJV4LIi8tib6YG0MqC6OqA= -github.com/opencontainers/runc v1.1.8/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= -github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= -github.com/otiai10/copy v1.10.0 h1:znyI7l134wNg/wDktoVQPxPkgvhDfGCYUasey+h0rDQ= -github.com/otiai10/copy v1.10.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/rboyer/safeio v0.2.3 h1:gUybicx1kp8nuM4vO0GA5xTBX58/OBd8MQuErBfDxP8= -github.com/rboyer/safeio v0.2.3/go.mod h1:d7RMmt7utQBJZ4B7f0H/cU/EdZibQAU1Y8NWepK2dS8= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 h1:xzABM9let0HLLqFypcxvLmlvEciCHL7+Lv+4vwZqecI= -github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569/go.mod h1:2Ly+NIftZN4de9zRmENdYbvPQeaVIYKWpLFStLFEBgI= -github.com/testcontainers/testcontainers-go v0.22.0 h1:hOK4NzNu82VZcKEB1aP9LO1xYssVFMvlfeuDW9JMmV0= -github.com/testcontainers/testcontainers-go v0.22.0/go.mod h1:k0YiPa26xJCRUbUkYqy5rY6NGvSbVCeUBXCvucscBR4= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= -github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= -go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= -go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= -golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e h1:xIXmWJ303kJCuogpj0bHq+dcjcZHU+XFyc1I0Yl9cRg= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 h1:XVeBY8d/FaK4848myy41HBqnDwvxeV3zMZhwN1TvAMU= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 h1:eSaPbMR4T7WfH9FvABk36NBMacoTUKdWCvV0dx+KfOg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= -k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= -k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= -k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= -k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/test-integ/peering_commontopo/README.md b/test-integ/peering_commontopo/README.md deleted file mode 100644 index 96466bb29b86f..0000000000000 --- a/test-integ/peering_commontopo/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# CONSUL PEERING COMMON TOPOLOGY TESTS - -These peering tests all use a `commonTopo` (read: "common topology") to enable sharing a deployment of a Consul. Sharing a deployment of Consul cuts down on setup time. - -To run these tests, you will need to have docker installed. Next, make sure that you have all the required consul containers built: - -``` -make test-compat-integ-setup -``` - -## Non-Shared CommonTopo Tests - -The tests in question are designed in a manner that modifies the topology. As a result, it is not possible to share the testing environment across these tests. - -## Shared CommonTopo Tests - -The tests in question are designed in a manner that does not modify the topology in any way that would interfere with other tests. As a result, it is possible to share the testing environment across these tests. - -To run all consul peering tests with no shared topology, run the following command: - -``` -cd /path/to/peering_commontopo -go test -timeout=10m -v -no-share-topo . -``` - -To run all peering tests with shared topology only: - -``` -cd /path/to/peering_commontopo -go test -timeout=10m -run '^TestSuitesOnSharedTopo' -v . -``` - -To run individual peering topology tests: - -``` -cd /path/to/peering_commontopo -go test -timeout=10m -run '^TestSuiteExample' -v -no-share-topo . -``` - -## Local Development and Testing - -If writing tests for peering with no shared topology, this recommendation does not apply. The following methods below not necessarily need to be implmented. For shared topology tests, all the methods in the `sharedTopoSuite` interface must be implemented. - -- `testName()` prepends the test suite name to each test in the test suite. -- `setup()` phase must ensure that any resources added to the topology cannot interfere with other tests. Principally by prefixing. -- `test()` phase must be "passive" and not mutate the topology in any way that would interfere with other tests. - -Common topology peering tests are defined in the [test-integ/peering_commontopo/](/test-integ/peering_commontopo/) directory and new peering integration tests should always be added to this location. Adding integration tests that does not modify the topology should always start by invoking - -```go -runShareableSuites(t, testSuiteExample) -``` - -else - -```go -func TestSuiteExample(t *testing.T) { - ct := NewCommonTopo(t) - s := &testSuiteExample{} - s.setup(t, ct) - ct.Launch(t) - s.test(t, ct) -} -``` - -Some of these tests *do* mutate in their `test()` phase, and while they use `commonTopo` for the purpose of code sharing, they are not included in the "shared topo" tests in `sharedtopology_test.go`. diff --git a/test-integ/peering_commontopo/ac1_basic_test.go b/test-integ/peering_commontopo/ac1_basic_test.go deleted file mode 100644 index 85aaee4e6b55b..0000000000000 --- a/test-integ/peering_commontopo/ac1_basic_test.go +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "testing" - - "github.com/hashicorp/consul/testing/deployer/topology" - - "github.com/hashicorp/consul/api" -) - -type ac1BasicSuite struct { - // inputs - DC string - Peer string - - // test points - sidServerHTTP topology.ServiceID - sidServerTCP topology.ServiceID - nodeServerHTTP topology.NodeID - nodeServerTCP topology.NodeID - - // 1.1 - sidClientTCP topology.ServiceID - nodeClientTCP topology.NodeID - - // 1.2 - sidClientHTTP topology.ServiceID - nodeClientHTTP topology.NodeID - - upstreamHTTP *topology.Upstream - upstreamTCP *topology.Upstream -} - -var ac1BasicSuites []sharedTopoSuite = []sharedTopoSuite{ - &ac1BasicSuite{DC: "dc1", Peer: "dc2"}, - &ac1BasicSuite{DC: "dc2", Peer: "dc1"}, -} - -func TestAC1Basic(t *testing.T) { - runShareableSuites(t, ac1BasicSuites) -} - -func (s *ac1BasicSuite) testName() string { - return fmt.Sprintf("ac1 basic %s->%s", s.DC, s.Peer) -} - -// creates clients in s.DC and servers in s.Peer -func (s *ac1BasicSuite) setup(t *testing.T, ct *commonTopo) { - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - - partition := "default" - peer := LocalPeerName(peerClu, "default") - cluPeerName := LocalPeerName(clu, "default") - const prefix = "ac1-" - - tcpServerSID := topology.ServiceID{ - Name: prefix + "server-tcp", - Partition: partition, - } - httpServerSID := topology.ServiceID{ - Name: prefix + "server-http", - Partition: partition, - } - upstreamHTTP := &topology.Upstream{ - ID: topology.ServiceID{ - Name: httpServerSID.Name, - Partition: partition, - }, - LocalPort: 5001, - Peer: peer, - } - upstreamTCP := &topology.Upstream{ - ID: topology.ServiceID{ - Name: tcpServerSID.Name, - Partition: partition, - }, - LocalPort: 5000, - Peer: peer, - } - - // Make clients which have server upstreams - setupClientServiceAndConfigs := func(protocol string) (serviceExt, *topology.Node) { - sid := topology.ServiceID{ - Name: prefix + "client-" + protocol, - Partition: partition, - } - svc := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - sid, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstreamTCP, - upstreamHTTP, - } - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: sid.Name, - Partition: ConfigEntryPartition(sid.Partition), - Protocol: protocol, - UpstreamConfig: &api.UpstreamConfiguration{ - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - } - - node := ct.AddServiceNode(clu, svc) - - return svc, node - } - tcpClient, tcpClientNode := setupClientServiceAndConfigs("tcp") - httpClient, httpClientNode := setupClientServiceAndConfigs("http") - - httpServer := serviceExt{ - Service: NewFortioServiceWithDefaults( - peerClu.Datacenter, - httpServerSID, - nil, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: httpServerSID.Name, - Partition: ConfigEntryPartition(httpServerSID.Partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: httpServerSID.Name, - Partition: ConfigEntryPartition(httpServerSID.Partition), - Sources: []*api.SourceIntention{ - { - Name: tcpClient.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - { - Name: httpClient.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - } - tcpServer := serviceExt{ - Service: NewFortioServiceWithDefaults( - peerClu.Datacenter, - tcpServerSID, - nil, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: tcpServerSID.Name, - Partition: ConfigEntryPartition(tcpServerSID.Partition), - Protocol: "tcp", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: tcpServerSID.Name, - Partition: ConfigEntryPartition(tcpServerSID.Partition), - Sources: []*api.SourceIntention{ - { - Name: tcpClient.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - { - Name: httpClient.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - } - - httpServerNode := ct.AddServiceNode(peerClu, httpServer) - tcpServerNode := ct.AddServiceNode(peerClu, tcpServer) - - s.sidClientHTTP = httpClient.ID - s.nodeClientHTTP = httpClientNode.ID() - s.sidClientTCP = tcpClient.ID - s.nodeClientTCP = tcpClientNode.ID() - s.upstreamHTTP = upstreamHTTP - s.upstreamTCP = upstreamTCP - - // these are references in Peer - s.sidServerHTTP = httpServerSID - s.nodeServerHTTP = httpServerNode.ID() - s.sidServerTCP = tcpServerSID - s.nodeServerTCP = tcpServerNode.ID() -} - -// implements https://docs.google.com/document/d/1Fs3gNMhCqE4zVNMFcbzf02ZrB0kxxtJpI2h905oKhrs/edit#heading=h.wtzvyryyb56v -func (s *ac1BasicSuite) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - ac := s - - // refresh this from Topology - svcClientTCP := dc.ServiceByID( - ac.nodeClientTCP, - ac.sidClientTCP, - ) - svcClientHTTP := dc.ServiceByID( - ac.nodeClientHTTP, - ac.sidClientHTTP, - ) - // our ac has the node/sid for server in the peer DC - svcServerHTTP := peer.ServiceByID( - ac.nodeServerHTTP, - ac.sidServerHTTP, - ) - svcServerTCP := peer.ServiceByID( - ac.nodeServerTCP, - ac.sidServerTCP, - ) - - // preconditions - // these could be done parallel with each other, but complexity - // probably not worth the speed boost - ct.Assert.HealthyWithPeer(t, dc.Name, svcServerHTTP.ID, LocalPeerName(peer, "default")) - ct.Assert.HealthyWithPeer(t, dc.Name, svcServerTCP.ID, LocalPeerName(peer, "default")) - ct.Assert.UpstreamEndpointHealthy(t, svcClientTCP, ac.upstreamTCP) - ct.Assert.UpstreamEndpointHealthy(t, svcClientTCP, ac.upstreamHTTP) - - tcs := []struct { - acSub int - proto string - svc *topology.Service - }{ - {1, "tcp", svcClientTCP}, - {2, "http", svcClientHTTP}, - } - for _, tc := range tcs { - tc := tc - t.Run(fmt.Sprintf("1.%d. %s in A can call HTTP upstream", tc.acSub, tc.proto), func(t *testing.T) { - t.Parallel() - ct.Assert.FortioFetch2HeaderEcho(t, tc.svc, ac.upstreamHTTP) - }) - t.Run(fmt.Sprintf("1.%d. %s in A can call TCP upstream", tc.acSub, tc.proto), func(t *testing.T) { - t.Parallel() - ct.Assert.FortioFetch2HeaderEcho(t, tc.svc, ac.upstreamTCP) - }) - t.Run(fmt.Sprintf("1.%d. via %s in A, FORTIO_NAME of HTTP upstream", tc.acSub, tc.proto), func(t *testing.T) { - t.Parallel() - ct.Assert.FortioFetch2FortioName(t, - tc.svc, - ac.upstreamHTTP, - peer.Name, - svcServerHTTP.ID, - ) - }) - t.Run(fmt.Sprintf("1.%d. via %s in A, FORTIO_NAME of TCP upstream", tc.acSub, tc.proto), func(t *testing.T) { - t.Parallel() - ct.Assert.FortioFetch2FortioName(t, - tc.svc, - ac.upstreamTCP, - peer.Name, - svcServerTCP.ID, - ) - }) - } -} diff --git a/test-integ/peering_commontopo/ac2_disco_chain_test.go b/test-integ/peering_commontopo/ac2_disco_chain_test.go deleted file mode 100644 index 448ab2840bfea..0000000000000 --- a/test-integ/peering_commontopo/ac2_disco_chain_test.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "testing" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" -) - -type ac2DiscoChainSuite struct { - DC string - Peer string - - clientSID topology.ServiceID -} - -var ac2DiscoChainSuites []sharedTopoSuite = []sharedTopoSuite{ - &ac2DiscoChainSuite{DC: "dc1", Peer: "dc2"}, - &ac2DiscoChainSuite{DC: "dc2", Peer: "dc1"}, -} - -func TestAC2DiscoChain(t *testing.T) { - runShareableSuites(t, ac2DiscoChainSuites) -} - -func (s *ac2DiscoChainSuite) testName() string { - return fmt.Sprintf("ac2 disco chain %s->%s", s.DC, s.Peer) -} - -func (s *ac2DiscoChainSuite) setup(t *testing.T, ct *commonTopo) { - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - partition := "default" - peer := LocalPeerName(peerClu, "default") - - // Make an HTTP server with discovery chain config entries - server := NewFortioServiceWithDefaults( - clu.Datacenter, - topology.ServiceID{ - Name: "ac2-disco-chain-svc", - Partition: partition, - }, - nil, - ) - ct.ExportService(clu, partition, - api.ExportedService{ - Name: server.ID.Name, - Consumers: []api.ServiceConsumer{ - { - Peer: peer, - }, - }, - }, - ) - - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - &api.ServiceSplitterConfigEntry{ - Kind: api.ServiceSplitter, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Splits: []api.ServiceSplit{ - { - Weight: 100.0, - ResponseHeaders: &api.HTTPHeaderModifiers{ - Add: map[string]string{ - "X-Split": "test", - }, - }, - }, - }, - }, - ) - ct.AddServiceNode(clu, serviceExt{Service: server}) - - // Define server as upstream for client - upstream := &topology.Upstream{ - ID: topology.ServiceID{ - Name: server.ID.Name, - Partition: partition, // TODO: iterate over all possible partitions - }, - // TODO: we need to expose this on 0.0.0.0 so we can check it - // through our forward proxy. not realistic IMO - LocalAddress: "0.0.0.0", - LocalPort: 5000, - Peer: peer, - } - - // Make client which will dial server - clientSID := topology.ServiceID{ - Name: "ac2-client", - Partition: partition, - } - client := NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstream, - } - }, - ) - ct.ExportService(clu, partition, - api.ExportedService{ - Name: client.ID.Name, - Consumers: []api.ServiceConsumer{ - { - Peer: peer, - }, - }, - }, - ) - ct.AddServiceNode(clu, serviceExt{Service: client}) - - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: client.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - UpstreamConfig: &api.UpstreamConfiguration{ - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - ) - - // Add intention allowing client to call server - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Sources: []*api.SourceIntention{ - { - Name: client.ID.Name, - Peer: peer, - Action: api.IntentionActionAllow, - }, - }, - }, - ) - - s.clientSID = clientSID -} - -func (s *ac2DiscoChainSuite) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - - svcs := dc.ServicesByID(s.clientSID) - require.Len(t, svcs, 1, "expected exactly one client in datacenter") - - client := svcs[0] - require.Len(t, client.Upstreams, 1, "expected exactly one upstream for client") - u := client.Upstreams[0] - - t.Run("peered upstream exists in catalog", func(t *testing.T) { - t.Parallel() - ct.Assert.CatalogServiceExists(t, s.DC, u.ID.Name, &api.QueryOptions{ - Peer: u.Peer, - }) - }) - - t.Run("peered upstream endpoint status is healthy", func(t *testing.T) { - t.Parallel() - ct.Assert.UpstreamEndpointStatus(t, client, peerClusterPrefix(u), "HEALTHY", 1) - }) - - t.Run("response contains header injected by splitter", func(t *testing.T) { - t.Parallel() - // TODO: not sure we should call u.LocalPort? it's not realistic from a security - // standpoint. prefer the fortio fetch2 stuff myself - ct.Assert.HTTPServiceEchoesResHeader(t, client, u.LocalPort, "", - map[string]string{ - "X-Split": "test", - }, - ) - }) -} - -// For reference see consul/xds/clusters.go: -// -// func (s *ResourceGenerator) getTargetClusterName -// -// and connect/sni.go -func peerClusterPrefix(u *topology.Upstream) string { - if u.Peer == "" { - panic("upstream is not from a peer") - } - u.ID.Normalize() - return u.ID.Name + "." + u.ID.Namespace + "." + u.Peer + ".external" -} diff --git a/test-integ/peering_commontopo/ac3_service_defaults_upstream_test.go b/test-integ/peering_commontopo/ac3_service_defaults_upstream_test.go deleted file mode 100644 index 586103c111272..0000000000000 --- a/test-integ/peering_commontopo/ac3_service_defaults_upstream_test.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - "testing" - "time" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/go-cleanhttp" - "github.com/itchyny/gojq" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" -) - -var ac3SvcDefaultsSuites []sharedTopoSuite = []sharedTopoSuite{ - &ac3SvcDefaultsSuite{DC: "dc1", Peer: "dc2"}, - &ac3SvcDefaultsSuite{DC: "dc2", Peer: "dc1"}, -} - -func TestAC3SvcDefaults(t *testing.T) { - runShareableSuites(t, ac3SvcDefaultsSuites) -} - -type ac3SvcDefaultsSuite struct { - // inputs - DC string - Peer string - - // test points - sidServer topology.ServiceID - nodeServer topology.NodeID - sidClient topology.ServiceID - nodeClient topology.NodeID - - upstream *topology.Upstream -} - -func (s *ac3SvcDefaultsSuite) testName() string { - return fmt.Sprintf("ac3 service defaults upstreams %s->%s", s.DC, s.Peer) -} - -// creates clients in s.DC and servers in s.Peer -func (s *ac3SvcDefaultsSuite) setup(t *testing.T, ct *commonTopo) { - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - - partition := "default" - peer := LocalPeerName(peerClu, "default") - cluPeerName := LocalPeerName(clu, "default") - - serverSID := topology.ServiceID{ - Name: "ac3-server", - Partition: partition, - } - upstream := &topology.Upstream{ - ID: topology.ServiceID{ - Name: serverSID.Name, - Partition: partition, - }, - LocalPort: 5001, - Peer: peer, - } - - sid := topology.ServiceID{ - Name: "ac3-client", - Partition: partition, - } - client := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - sid, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstream, - } - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: sid.Name, - Partition: ConfigEntryPartition(sid.Partition), - Protocol: "http", - UpstreamConfig: &api.UpstreamConfiguration{ - Overrides: []*api.UpstreamConfig{ - { - Name: upstream.ID.Name, - Namespace: upstream.ID.Namespace, - Peer: peer, - PassiveHealthCheck: &api.PassiveHealthCheck{ - MaxFailures: 1, - Interval: 10 * time.Minute, - }, - }, - }, - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - } - - clientNode := ct.AddServiceNode(clu, client) - - server := serviceExt{ - Service: NewFortioServiceWithDefaults( - peerClu.Datacenter, - serverSID, - nil, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: serverSID.Name, - Partition: ConfigEntryPartition(serverSID.Partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: serverSID.Name, - Partition: ConfigEntryPartition(serverSID.Partition), - Sources: []*api.SourceIntention{ - { - Name: client.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - } - - serverNode := ct.AddServiceNode(peerClu, server) - - s.sidClient = client.ID - s.nodeClient = clientNode.ID() - s.upstream = upstream - - // these are references in Peer - s.sidServer = serverSID - s.nodeServer = serverNode.ID() -} - -// make two requests to upstream via client's fetch2 with status= -// the first time, it should return nonceStatus -// the second time, we expect the upstream to have been removed from the envoy cluster, -// and thereby get some other 5xx -func (s *ac3SvcDefaultsSuite) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - - // refresh this from Topology - svcClient := dc.ServiceByID( - s.nodeClient, - s.sidClient, - ) - // our ac has the node/sid for server in the peer DC - svcServer := peer.ServiceByID( - s.nodeServer, - s.sidServer, - ) - - // preconditions - // these could be done parallel with each other, but complexity - // probably not worth the speed boost - ct.Assert.HealthyWithPeer(t, dc.Name, svcServer.ID, LocalPeerName(peer, "default")) - ct.Assert.UpstreamEndpointHealthy(t, svcClient, s.upstream) - // TODO: we need to let the upstream start serving properly before we do this. if it - // isn't ready and returns a 5xx (which it will do if it's not up yet!), it will stick - // in a down state for PassiveHealthCheck.Interval - time.Sleep(30 * time.Second) - ct.Assert.FortioFetch2HeaderEcho(t, svcClient, s.upstream) - - // TODO: use proxied HTTP client - client := cleanhttp.DefaultClient() - // TODO: what is default? namespace? partition? - clusterName := fmt.Sprintf("%s.default.%s.external", s.upstream.ID.Name, s.upstream.Peer) - nonceStatus := http.StatusInsufficientStorage - url507 := fmt.Sprintf("http://localhost:%d/fortio/fetch2?url=%s", svcClient.ExposedPort, - url.QueryEscape(fmt.Sprintf("http://localhost:%d/?status=%d", s.upstream.LocalPort, nonceStatus)), - ) - - // we only make this call once - req, err := http.NewRequest(http.MethodGet, url507, nil) - require.NoError(t, err) - res, err := client.Do(req) - require.NoError(t, err) - defer res.Body.Close() - require.Equal(t, nonceStatus, res.StatusCode) - - // this is a modified version of assertEnvoyUpstreamHealthy - envoyAddr := fmt.Sprintf("localhost:%d", svcClient.ExposedEnvoyAdminPort) - retry.RunWith(&retry.Timer{Timeout: 30 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - // BOOKMARK: avoid libassert, but we need to resurrect this method in asserter first - clusters, statusCode, err := libassert.GetEnvoyOutputWithClient(client, envoyAddr, "clusters", map[string]string{"format": "json"}) - if err != nil { - r.Fatal("could not fetch envoy clusters") - } - require.Equal(r, 200, statusCode) - - filter := fmt.Sprintf( - `.cluster_statuses[] - | select(.name|contains("%s")) - | [.host_statuses[].health_status.failed_outlier_check] - |.[0]`, - clusterName) - result, err := jqOne(clusters, filter) - require.NoErrorf(r, err, "could not found cluster name %q: %v \n%s", clusterName, err, clusters) - - resultAsBool, ok := result.(bool) - require.True(r, ok) - require.True(r, resultAsBool) - }) - - url200 := fmt.Sprintf("http://localhost:%d/fortio/fetch2?url=%s", svcClient.ExposedPort, - url.QueryEscape(fmt.Sprintf("http://localhost:%d/", s.upstream.LocalPort)), - ) - retry.RunWith(&retry.Timer{Timeout: time.Minute * 1, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - req, err := http.NewRequest(http.MethodGet, url200, nil) - require.NoError(r, err) - res, err := client.Do(req) - require.NoError(r, err) - defer res.Body.Close() - require.True(r, res.StatusCode >= 500 && res.StatusCode < 600 && res.StatusCode != nonceStatus) - }) -} - -// Executes the JQ filter against the given JSON string. -// Iff there is one result, return that. -func jqOne(config, filter string) (interface{}, error) { - query, err := gojq.Parse(filter) - if err != nil { - return nil, err - } - - var m interface{} - err = json.Unmarshal([]byte(config), &m) - if err != nil { - return nil, err - } - - iter := query.Run(m) - result := []interface{}{} - for { - v, ok := iter.Next() - if !ok { - break - } - if err, ok := v.(error); ok { - return nil, err - } - result = append(result, v) - } - if len(result) != 1 { - return nil, fmt.Errorf("required result of len 1, but is %d: %v", len(result), result) - } - return result[0], nil -} diff --git a/test-integ/peering_commontopo/ac4_proxy_defaults_test.go b/test-integ/peering_commontopo/ac4_proxy_defaults_test.go deleted file mode 100644 index c413820c6f2b7..0000000000000 --- a/test-integ/peering_commontopo/ac4_proxy_defaults_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "net/http" - "net/url" - "testing" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/go-cleanhttp" - "github.com/stretchr/testify/require" -) - -type ac4ProxyDefaultsSuite struct { - DC string - Peer string - - nodeClient topology.NodeID - nodeServer topology.NodeID - - serverSID topology.ServiceID - clientSID topology.ServiceID - upstream *topology.Upstream -} - -var ac4ProxyDefaultsSuites []sharedTopoSuite = []sharedTopoSuite{ - &ac4ProxyDefaultsSuite{DC: "dc1", Peer: "dc2"}, - &ac4ProxyDefaultsSuite{DC: "dc2", Peer: "dc1"}, -} - -func TestAC4ProxyDefaults(t *testing.T) { - runShareableSuites(t, ac4ProxyDefaultsSuites) -} - -func (s *ac4ProxyDefaultsSuite) testName() string { - return fmt.Sprintf("ac4 proxy defaults %s->%s", s.DC, s.Peer) -} - -// creates clients in s.DC and servers in s.Peer -func (s *ac4ProxyDefaultsSuite) setup(t *testing.T, ct *commonTopo) { - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - - partition := "default" - peer := LocalPeerName(peerClu, "default") - cluPeerName := LocalPeerName(clu, "default") - - serverSID := topology.ServiceID{ - Name: "ac4-server-http", - Partition: partition, - } - // Define server as upstream for client - upstream := &topology.Upstream{ - ID: serverSID, - LocalPort: 5000, - Peer: peer, - } - - // Make client which will dial server - clientSID := topology.ServiceID{ - Name: "ac4-http-client", - Partition: partition, - } - client := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstream, - } - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: clientSID.Name, - Partition: ConfigEntryPartition(clientSID.Partition), - Protocol: "http", - UpstreamConfig: &api.UpstreamConfiguration{ - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - } - clientNode := ct.AddServiceNode(clu, client) - - server := serviceExt{ - Service: NewFortioServiceWithDefaults( - peerClu.Datacenter, - serverSID, - nil, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: serverSID.Name, - Partition: ConfigEntryPartition(serverSID.Partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: serverSID.Name, - Partition: ConfigEntryPartition(serverSID.Partition), - Sources: []*api.SourceIntention{ - { - Name: client.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - } - - peerClu.InitialConfigEntries = append(peerClu.InitialConfigEntries, - &api.ProxyConfigEntry{ - Kind: api.ProxyDefaults, - Name: api.ProxyConfigGlobal, - Partition: ConfigEntryPartition(server.ID.Partition), - Config: map[string]interface{}{ - "protocol": "http", - "local_request_timeout_ms": 500, - }, - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - ) - - serverNode := ct.AddServiceNode(peerClu, server) - - s.clientSID = clientSID - s.serverSID = serverSID - s.nodeServer = serverNode.ID() - s.nodeClient = clientNode.ID() - s.upstream = upstream -} - -func (s *ac4ProxyDefaultsSuite) test(t *testing.T, ct *commonTopo) { - var client *topology.Service - - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - - clientSVC := dc.ServiceByID( - s.nodeClient, - s.clientSID, - ) - serverSVC := peer.ServiceByID( - s.nodeServer, - s.serverSID, - ) - - // preconditions check - ct.Assert.HealthyWithPeer(t, dc.Name, serverSVC.ID, LocalPeerName(peer, "default")) - ct.Assert.UpstreamEndpointHealthy(t, clientSVC, s.upstream) - ct.Assert.FortioFetch2HeaderEcho(t, clientSVC, s.upstream) - - t.Run("Validate services exist in catalog", func(t *testing.T) { - dcSvcs := dc.ServicesByID(s.clientSID) - require.Len(t, dcSvcs, 1, "expected exactly one client") - client = dcSvcs[0] - require.Len(t, client.Upstreams, 1, "expected exactly one upstream for client") - - server := dc.ServicesByID(s.serverSID) - require.Len(t, server, 1, "expected exactly one server") - require.Len(t, server[0].Upstreams, 0, "expected no upstream for server") - }) - - t.Run("peered upstream exists in catalog", func(t *testing.T) { - ct.Assert.CatalogServiceExists(t, s.DC, s.upstream.ID.Name, &api.QueryOptions{ - Peer: s.upstream.Peer, - }) - }) - - t.Run("HTTP service fails due to connection timeout", func(t *testing.T) { - url504 := fmt.Sprintf("http://localhost:%d/fortio/fetch2?url=%s", client.ExposedPort, - url.QueryEscape(fmt.Sprintf("http://localhost:%d/?delay=1000ms", s.upstream.LocalPort)), - ) - - url200 := fmt.Sprintf("http://localhost:%d/fortio/fetch2?url=%s", client.ExposedPort, - url.QueryEscape(fmt.Sprintf("http://localhost:%d/", s.upstream.LocalPort)), - ) - - // validate request timeout error where service has 1000ms response delay and - // proxy default is set to local_request_timeout_ms: 500ms - // return 504 - httpClient := cleanhttp.DefaultClient() - req, err := http.NewRequest(http.MethodGet, url504, nil) - require.NoError(t, err) - - res, err := httpClient.Do(req) - require.NoError(t, err) - - defer res.Body.Close() - require.Equal(t, http.StatusGatewayTimeout, res.StatusCode) - - // validate successful GET request where service has no response delay and - // proxy default is set to local_request_timeout_ms: 500ms - // return 200 - req, err = http.NewRequest(http.MethodGet, url200, nil) - require.NoError(t, err) - - res, err = httpClient.Do(req) - require.NoError(t, err) - - defer res.Body.Close() - require.Equal(t, http.StatusOK, res.StatusCode) - }) -} diff --git a/test-integ/peering_commontopo/ac5_1_no_svc_mesh_test.go b/test-integ/peering_commontopo/ac5_1_no_svc_mesh_test.go deleted file mode 100644 index 9706eba63ca99..0000000000000 --- a/test-integ/peering_commontopo/ac5_1_no_svc_mesh_test.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - - "testing" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/require" -) - -type ac5_1NoSvcMeshSuite struct { - DC string - Peer string - - serverSID topology.ServiceID - clientSID topology.ServiceID -} - -var ( - ac5_1NoSvcMeshSuites []sharedTopoSuite = []sharedTopoSuite{ - &ac5_1NoSvcMeshSuite{DC: "dc1", Peer: "dc2"}, - &ac5_1NoSvcMeshSuite{DC: "dc2", Peer: "dc1"}, - } -) - -func TestAC5ServiceMeshDisabledSuite(t *testing.T) { - runShareableSuites(t, ac5_1NoSvcMeshSuites) -} - -func (s *ac5_1NoSvcMeshSuite) testName() string { - return fmt.Sprintf("ac5.1 no service mesh %s->%s", s.DC, s.Peer) -} - -// creates clients in s.DC and servers in s.Peer -func (s *ac5_1NoSvcMeshSuite) setup(t *testing.T, ct *commonTopo) { - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - - // TODO: handle all partitions - partition := "default" - peer := LocalPeerName(peerClu, partition) - - serverSID := topology.ServiceID{ - Name: "ac5-server-http", - Partition: partition, - } - - // Make client which will dial server - clientSID := topology.ServiceID{ - Name: "ac5-http-client", - Partition: partition, - } - - // disable service mesh for client in s.DC - client := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - s.EnvoyAdminPort = 0 - s.DisableServiceMesh = true - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: clientSID.Name, - Partition: ConfigEntryPartition(clientSID.Partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: peer}}, - } - ct.AddServiceNode(clu, client) - - server := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - serverSID, - nil, - ), - Exports: []api.ServiceConsumer{{Peer: peer}}, - } - - ct.AddServiceNode(clu, server) - - s.clientSID = clientSID - s.serverSID = serverSID -} - -func (s *ac5_1NoSvcMeshSuite) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - cl := ct.APIClientForCluster(t, dc) - peerName := LocalPeerName(peer, "default") - - s.testServiceHealthInCatalog(t, ct, cl, peerName) - s.testProxyDisabledInDC2(t, cl, peerName) -} - -func (s *ac5_1NoSvcMeshSuite) testServiceHealthInCatalog(t *testing.T, ct *commonTopo, cl *api.Client, peer string) { - t.Run("validate service health in catalog", func(t *testing.T) { - libassert.CatalogServiceExists(t, cl, s.clientSID.Name, &api.QueryOptions{ - Peer: peer, - }) - require.NotEqual(t, s.serverSID.Name, s.Peer) - assertServiceHealth(t, cl, s.serverSID.Name, 1) - }) -} - -func (s *ac5_1NoSvcMeshSuite) testProxyDisabledInDC2(t *testing.T, cl *api.Client, peer string) { - t.Run("service mesh is disabled", func(t *testing.T) { - var ( - services map[string][]string - err error - expected = fmt.Sprintf("%s-sidecar-proxy", s.clientSID.Name) - ) - retry.Run(t, func(r *retry.R) { - services, _, err = cl.Catalog().Services(&api.QueryOptions{ - Peer: peer, - }) - require.NoError(r, err, "error reading service data") - require.Greater(r, len(services), 0, "did not find service(s) in catalog") - }) - require.NotContains(t, services, expected, fmt.Sprintf("error: should not create proxy for service: %s", services)) - }) -} diff --git a/test-integ/peering_commontopo/ac5_2_pq_failover_test.go b/test-integ/peering_commontopo/ac5_2_pq_failover_test.go deleted file mode 100644 index 94930647408ff..0000000000000 --- a/test-integ/peering_commontopo/ac5_2_pq_failover_test.go +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "time" - - "testing" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/require" -) - -// 1. Setup: put health service instances in each of the 3 clusters and create the PQ in one of them -// 2. Execute the PQ: Validate that failover count == 0 and that the pq results come from the local cluster -// 3. Register a failing TTL health check with the agent managing the service instance in the local cluster -// 4. Execute the PQ: Validate that failover count == 1 and that the pq results come from the first failover target peer -// 5. Register a failing TTL health check with the agent managing the service instance in the first failover peer -// 6. Execute the PQ: Validate that failover count == 2 and that the pq results come from the second failover target -// 7. Delete failing health check from step 5 -// 8. Repeat step 4 -// 9. Delete failing health check from step 3 -// 10. Repeat step 2 -type ac5_2PQFailoverSuite struct { - clientSID topology.ServiceID - serverSID topology.ServiceID - nodeServer topology.NodeID -} - -var ac5_2Context = make(map[nodeKey]ac5_2PQFailoverSuite) - -func TestAC5PreparedQueryFailover(t *testing.T) { - ct := NewCommonTopo(t) - s := &ac5_2PQFailoverSuite{} - s.setup(t, ct) - ct.Launch(t) - s.test(t, ct) -} - -func (s *ac5_2PQFailoverSuite) setup(t *testing.T, ct *commonTopo) { - s.setupDC(ct, ct.DC1, ct.DC2) - s.setupDC(ct, ct.DC2, ct.DC1) - s.setupDC3(ct, ct.DC3, ct.DC1, ct.DC2) -} - -func (s *ac5_2PQFailoverSuite) setupDC(ct *commonTopo, clu, peerClu *topology.Cluster) { - // TODO: handle all partitions - partition := "default" - peer := LocalPeerName(peerClu, partition) - - serverSID := topology.ServiceID{ - Name: "ac5-server-http", - Partition: partition, - } - - clientSID := topology.ServiceID{ - Name: "ac5-client-http", - Partition: partition, - } - - client := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - s.EnvoyAdminPort = 0 - s.DisableServiceMesh = true - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: clientSID.Name, - Partition: ConfigEntryPartition(clientSID.Partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: peer}}, - } - - ct.AddServiceNode(clu, client) - - server := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - serverSID, - nil, - ), - Exports: []api.ServiceConsumer{{Peer: peer}}, - } - serverNode := ct.AddServiceNode(clu, server) - - ac5_2Context[nodeKey{clu.Datacenter, partition}] = ac5_2PQFailoverSuite{ - clientSID: clientSID, - serverSID: serverSID, - nodeServer: serverNode.ID(), - } -} - -func (s *ac5_2PQFailoverSuite) setupDC3(ct *commonTopo, clu, peer1, peer2 *topology.Cluster) { - var ( - peers []string - partition = "default" - ) - peers = append(peers, LocalPeerName(peer1, partition), LocalPeerName(peer2, partition)) - - serverSID := topology.ServiceID{ - Name: "ac5-server-http", - Partition: partition, - } - - clientSID := topology.ServiceID{ - Name: "ac5-client-http", - Partition: partition, - } - - // disable service mesh for client in DC3 - client := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - s.EnvoyAdminPort = 0 - s.DisableServiceMesh = true - }, - ), - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: clientSID.Name, - Partition: ConfigEntryPartition(clientSID.Partition), - Protocol: "http", - }, - Exports: func() []api.ServiceConsumer { - var consumers []api.ServiceConsumer - for _, peer := range peers { - consumers = append(consumers, api.ServiceConsumer{ - Peer: peer, - }) - } - return consumers - }(), - } - - ct.AddServiceNode(clu, client) - - server := serviceExt{ - Service: NewFortioServiceWithDefaults( - clu.Datacenter, - serverSID, - nil, - ), - Exports: func() []api.ServiceConsumer { - var consumers []api.ServiceConsumer - for _, peer := range peers { - consumers = append(consumers, api.ServiceConsumer{ - Peer: peer, - }) - } - return consumers - }(), - } - - serverNode := ct.AddServiceNode(clu, server) - - ac5_2Context[nodeKey{clu.Datacenter, partition}] = ac5_2PQFailoverSuite{ - clientSID: clientSID, - serverSID: serverSID, - nodeServer: serverNode.ID(), - } -} - -func (s *ac5_2PQFailoverSuite) createPreparedQuery(t *testing.T, ct *commonTopo, c *api.Client, serviceName, partition string) (*api.PreparedQueryDefinition, *api.PreparedQuery) { - var ( - peers []string - err error - ) - peers = append(peers, LocalPeerName(ct.DC2, partition), LocalPeerName(ct.DC3, partition)) - - def := &api.PreparedQueryDefinition{ - Name: "ac5-prepared-query", - Service: api.ServiceQuery{ - Service: serviceName, - Partition: ConfigEntryPartition(partition), - OnlyPassing: true, - Failover: api.QueryFailoverOptions{ - Targets: func() []api.QueryFailoverTarget { - var queryFailoverTargets []api.QueryFailoverTarget - for _, peer := range peers { - queryFailoverTargets = append(queryFailoverTargets, api.QueryFailoverTarget{ - Peer: peer, - }) - } - return queryFailoverTargets - }(), - }, - }, - } - - query := c.PreparedQuery() - def.ID, _, err = query.Create(def, nil) - require.NoError(t, err, "error creating prepared query in cluster") - - return def, query -} - -func (s *ac5_2PQFailoverSuite) test(t *testing.T, ct *commonTopo) { - partition := "default" - dc1 := ct.Sprawl.Topology().Clusters[ct.DC1.Name] - dc2 := ct.Sprawl.Topology().Clusters[ct.DC2.Name] - dc3 := ct.Sprawl.Topology().Clusters[ct.DC3.Name] - - type testcase struct { - cluster *topology.Cluster - peer *topology.Cluster - targetCluster *topology.Cluster - } - tcs := []testcase{ - { - cluster: dc1, - peer: dc2, - targetCluster: dc3, - }, - } - for _, tc := range tcs { - client := ct.APIClientForCluster(t, tc.cluster) - - t.Run(fmt.Sprintf("%#v", tc), func(t *testing.T) { - svc := ac5_2Context[nodeKey{tc.cluster.Name, partition}] - require.NotNil(t, svc.serverSID.Name, "expected service name to not be nil") - require.NotNil(t, svc.nodeServer, "expected node server to not be nil") - - assertServiceHealth(t, client, svc.serverSID.Name, 1) - def, _ := s.createPreparedQuery(t, ct, client, svc.serverSID.Name, partition) - s.testPreparedQueryZeroFailover(t, client, def, tc.cluster) - s.testPreparedQuerySingleFailover(t, ct, client, def, tc.cluster, tc.peer, partition) - s.testPreparedQueryTwoFailovers(t, ct, client, def, tc.cluster, tc.peer, tc.targetCluster, partition) - - // delete failing health check in peer cluster & validate single failover - s.testPQSingleFailover(t, ct, client, def, tc.cluster, tc.peer, partition) - // delete failing health check in cluster & validate zero failover - s.testPQZeroFailover(t, ct, client, def, tc.cluster, tc.peer, partition) - }) - } -} - -func (s *ac5_2PQFailoverSuite) testPreparedQueryZeroFailover(t *testing.T, cl *api.Client, def *api.PreparedQueryDefinition, cluster *topology.Cluster) { - t.Run(fmt.Sprintf("prepared query should not failover %s", cluster.Name), func(t *testing.T) { - - // Validate prepared query exists in cluster - queryDef, _, err := cl.PreparedQuery().Get(def.ID, nil) - require.NoError(t, err) - require.Len(t, queryDef, 1, "expected 1 prepared query") - require.Equal(t, 2, len(queryDef[0].Service.Failover.Targets), "expected 2 prepared query failover targets to dc2 and dc3") - - retry.RunWith(&retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - queryResult, _, err := cl.PreparedQuery().Execute(def.ID, nil) - require.NoError(r, err) - - // expected outcome should show 0 failover - require.Equal(r, 0, queryResult.Failovers, "expected 0 prepared query failover") - require.Equal(r, cluster.Name, queryResult.Nodes[0].Node.Datacenter, "pq results should come from the local cluster") - }) - }) -} - -func (s *ac5_2PQFailoverSuite) testPreparedQuerySingleFailover(t *testing.T, ct *commonTopo, cl *api.Client, def *api.PreparedQueryDefinition, cluster, peerClu *topology.Cluster, partition string) { - t.Run(fmt.Sprintf("prepared query with single failover %s", cluster.Name), func(t *testing.T) { - cfg := ct.Sprawl.Config() - svc := ac5_2Context[nodeKey{cluster.Name, partition}] - - nodeCfg := DisableNode(t, cfg, cluster.Name, svc.nodeServer) - require.NoError(t, ct.Sprawl.Relaunch(nodeCfg)) - - // assert server health status - assertServiceHealth(t, cl, svc.serverSID.Name, 0) - - // Validate prepared query exists in cluster - queryDef, _, err := cl.PreparedQuery().Get(def.ID, nil) - require.NoError(t, err) - require.Len(t, queryDef, 1, "expected 1 prepared query") - - pqFailoverTargets := queryDef[0].Service.Failover.Targets - require.Len(t, pqFailoverTargets, 2, "expected 2 prepared query failover targets to dc2 and dc3") - - retry.RunWith(&retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - queryResult, _, err := cl.PreparedQuery().Execute(def.ID, nil) - require.NoError(r, err) - - require.Equal(r, 1, queryResult.Failovers, "expected 1 prepared query failover") - require.Equal(r, peerClu.Name, queryResult.Nodes[0].Node.Datacenter, fmt.Sprintf("the pq results should originate from peer clu %s", peerClu.Name)) - require.Equal(r, pqFailoverTargets[0].Peer, queryResult.Nodes[0].Checks[0].PeerName, - fmt.Sprintf("pq results should come from the first failover target peer %s", pqFailoverTargets[0].Peer)) - }) - }) -} - -func (s *ac5_2PQFailoverSuite) testPreparedQueryTwoFailovers(t *testing.T, ct *commonTopo, cl *api.Client, def *api.PreparedQueryDefinition, cluster, peerClu, targetCluster *topology.Cluster, partition string) { - t.Run(fmt.Sprintf("prepared query with two failovers %s", cluster.Name), func(t *testing.T) { - cfg := ct.Sprawl.Config() - - svc := ac5_2Context[nodeKey{peerClu.Name, partition}] - - cfg = DisableNode(t, cfg, peerClu.Name, svc.nodeServer) - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - - // assert server health status - assertServiceHealth(t, cl, ac5_2Context[nodeKey{cluster.Name, partition}].serverSID.Name, 0) // cluster: failing - assertServiceHealth(t, cl, svc.serverSID.Name, 0) // peer cluster: failing - - queryDef, _, err := cl.PreparedQuery().Get(def.ID, nil) - require.NoError(t, err) - require.Len(t, queryDef, 1, "expected 1 prepared query") - - pqFailoverTargets := queryDef[0].Service.Failover.Targets - require.Len(t, pqFailoverTargets, 2, "expected 2 prepared query failover targets to dc2 and dc3") - - retry.RunWith(&retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - queryResult, _, err := cl.PreparedQuery().Execute(def.ID, nil) - require.NoError(r, err) - require.Equal(r, 2, queryResult.Failovers, "expected 2 prepared query failover") - - require.Equal(r, targetCluster.Name, queryResult.Nodes[0].Node.Datacenter, fmt.Sprintf("the pq results should originate from cluster %s", targetCluster.Name)) - require.Equal(r, pqFailoverTargets[1].Peer, queryResult.Nodes[0].Checks[0].PeerName, - fmt.Sprintf("pq results should come from the second failover target peer %s", pqFailoverTargets[1].Peer)) - }) - }) -} - -func (s *ac5_2PQFailoverSuite) testPQSingleFailover(t *testing.T, ct *commonTopo, cl *api.Client, def *api.PreparedQueryDefinition, cluster, peerClu *topology.Cluster, partition string) { - t.Run(fmt.Sprintf("delete failing health check in %s and validate single failover %s", peerClu.Name, cluster.Name), func(t *testing.T) { - cfg := ct.Sprawl.Config() - - svc := ac5_2Context[nodeKey{peerClu.Name, partition}] - - cfg = EnableNode(t, cfg, peerClu.Name, svc.nodeServer) - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - - queryDef, _, err := cl.PreparedQuery().Get(def.ID, nil) - require.NoError(t, err) - - pqFailoverTargets := queryDef[0].Service.Failover.Targets - require.Len(t, pqFailoverTargets, 2, "expected 2 prepared query failover targets to dc2 and dc3") - - retry.RunWith(&retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - queryResult, _, err := cl.PreparedQuery().Execute(def.ID, nil) - require.NoError(r, err) - require.Equal(r, 1, queryResult.Failovers, "expected 1 prepared query failover") - - require.Equal(r, peerClu.Name, queryResult.Nodes[0].Node.Datacenter, fmt.Sprintf("the pq results should originate from cluster %s", peerClu.Name)) - require.Equal(r, pqFailoverTargets[0].Peer, queryResult.Nodes[0].Checks[0].PeerName, - fmt.Sprintf("pq results should come from the second failover target peer %s", pqFailoverTargets[0].Peer)) - }) - }) -} - -func (s *ac5_2PQFailoverSuite) testPQZeroFailover(t *testing.T, ct *commonTopo, cl *api.Client, def *api.PreparedQueryDefinition, cluster, peerClu *topology.Cluster, partition string) { - t.Run(fmt.Sprintf("delete failing health check in %s and validate zero failover %s", cluster.Name, cluster.Name), func(t *testing.T) { - cfg := ct.Sprawl.Config() - - svc := ac5_2Context[nodeKey{cluster.Name, partition}] - - cfg = EnableNode(t, cfg, cluster.Name, svc.nodeServer) - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - - // assert server health status - assertServiceHealth(t, cl, ac5_2Context[nodeKey{cluster.Name, partition}].serverSID.Name, 1) // cluster: passing - assertServiceHealth(t, cl, svc.serverSID.Name, 1) // peer cluster: passing - - queryDef, _, err := cl.PreparedQuery().Get(def.ID, nil) - require.NoError(t, err) - - pqFailoverTargets := queryDef[0].Service.Failover.Targets - require.Len(t, pqFailoverTargets, 2, "expected 2 prepared query failover targets to dc2 and dc3") - - retry.RunWith(&retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - queryResult, _, err := cl.PreparedQuery().Execute(def.ID, nil) - require.NoError(r, err) - // expected outcome should show 0 failover - require.Equal(r, 0, queryResult.Failovers, "expected 0 prepared query failover") - require.Equal(r, cluster.Name, queryResult.Nodes[0].Node.Datacenter, "pq results should come from the local cluster") - }) - }) -} - -// assertServiceHealth checks that a service health status before running tests -func assertServiceHealth(t *testing.T, cl *api.Client, serverSVC string, count int) { - t.Helper() - t.Log("validate service health in catalog") - retry.RunWith(&retry.Timer{Timeout: time.Second * 20, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - svcs, _, err := cl.Health().Service( - serverSVC, - "", - true, - nil, - ) - require.NoError(r, err) - require.Equal(r, count, len(svcs)) - }) -} diff --git a/test-integ/peering_commontopo/ac6_failovers_test.go b/test-integ/peering_commontopo/ac6_failovers_test.go deleted file mode 100644 index fe3cd181b2032..0000000000000 --- a/test-integ/peering_commontopo/ac6_failovers_test.go +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "testing" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" -) - -// note: unlike other *Suite structs that are per-peering direction, -// this one is special and does all directions itself, because the -// setup is not exactly symmetrical -type ac6FailoversSuite struct { - ac6 map[nodeKey]ac6FailoversContext -} -type ac6FailoversContext struct { - clientSID topology.ServiceID - serverSID topology.ServiceID - - // used to remove the node and trigger failover - serverNode topology.NodeID -} -type nodeKey struct { - dc string - partition string -} - -// Note: this test cannot share topo -func TestAC6Failovers(t *testing.T) { - ct := NewCommonTopo(t) - s := &ac6FailoversSuite{} - s.setup(t, ct) - ct.Launch(t) - s.test(t, ct) -} - -func (s *ac6FailoversSuite) setup(t *testing.T, ct *commonTopo) { - // TODO: update setups to loop through a cluster's partitions+namespaces internally - s.setupAC6Failovers(ct, ct.DC1, ct.DC2) - s.setupAC6Failovers(ct, ct.DC2, ct.DC1) - s.setupAC6FailoversDC3(ct, ct.DC3, ct.DC1, ct.DC2) -} - -// dc1 is peered with dc2 and dc3. -// dc1 has an ac6-client in "default" and "part1" partitions (only default in CE). -// ac6-client has a single upstream ac6-failover-svc in its respective partition^. -// -// ac6-failover-svc has the following failovers: -// - peer-dc2-default -// - peer-dc2-part1 (not in CE) -// - peer-dc3-default -// -// This setup is mirrored from dc2->dc1 as well -// (both dcs have dc3 as the last failover target) -// -// ^NOTE: There are no cross-partition upstreams because MeshGatewayMode = local -// and failover information gets stripped out by the mesh gateways so we -// can't test failovers. -func (s *ac6FailoversSuite) setupAC6Failovers(ct *commonTopo, clu, peerClu *topology.Cluster) { - for _, part := range clu.Partitions { - partition := part.Name - - // There is a peering per partition in the peered cluster - var peers []string - for _, peerPart := range peerClu.Partitions { - peers = append(peers, LocalPeerName(peerClu, peerPart.Name)) - } - - // Make an HTTP server with various failover targets - serverSID := topology.ServiceID{ - Name: "ac6-failover-svc", - Partition: partition, - } - server := NewFortioServiceWithDefaults( - clu.Datacenter, - serverSID, - nil, - ) - // Export to all known peers - ct.ExportService(clu, partition, - api.ExportedService{ - Name: server.ID.Name, - Consumers: func() []api.ServiceConsumer { - var consumers []api.ServiceConsumer - for _, peer := range peers { - consumers = append(consumers, api.ServiceConsumer{ - Peer: peer, - }) - } - return consumers - }(), - }, - ) - serverNode := ct.AddServiceNode(clu, serviceExt{Service: server}) - - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - &api.ServiceResolverConfigEntry{ - Kind: api.ServiceResolver, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Failover: map[string]api.ServiceResolverFailover{ - "*": { - Targets: func() []api.ServiceResolverFailoverTarget { - // Make a failover target for every partition in the peer cluster - var targets []api.ServiceResolverFailoverTarget - for _, peer := range peers { - targets = append(targets, api.ServiceResolverFailoverTarget{ - Peer: peer, - }) - } - // Just hard code default partition for dc3, since the exhaustive - // testing will be done against dc2. - targets = append(targets, api.ServiceResolverFailoverTarget{ - Peer: "peer-dc3-default", - }) - return targets - }(), - }, - }, - }, - ) - - // Make client which will dial server - clientSID := topology.ServiceID{ - Name: "ac6-client", - Partition: partition, - } - client := NewFortioServiceWithDefaults( - clu.Datacenter, - clientSID, - func(s *topology.Service) { - // Upstream per partition - s.Upstreams = []*topology.Upstream{ - { - ID: topology.ServiceID{ - Name: server.ID.Name, - Partition: part.Name, - }, - LocalPort: 5000, - // exposed so we can hit it directly - // TODO: we shouldn't do this; it's not realistic - LocalAddress: "0.0.0.0", - }, - } - }, - ) - ct.ExportService(clu, partition, - api.ExportedService{ - Name: client.ID.Name, - Consumers: func() []api.ServiceConsumer { - var consumers []api.ServiceConsumer - // Export to each peer - for _, peer := range peers { - consumers = append(consumers, api.ServiceConsumer{ - Peer: peer, - }) - } - return consumers - }(), - }, - ) - ct.AddServiceNode(clu, serviceExt{Service: client}) - - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: client.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - ) - - // Add intention allowing local and peered clients to call server - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - // SourceIntention for local client and peered clients - Sources: func() []*api.SourceIntention { - ixns := []*api.SourceIntention{ - { - Name: client.ID.Name, - Partition: ConfigEntryPartition(part.Name), - Action: api.IntentionActionAllow, - }, - } - for _, peer := range peers { - ixns = append(ixns, &api.SourceIntention{ - Name: client.ID.Name, - Peer: peer, - Action: api.IntentionActionAllow, - }) - } - return ixns - }(), - }, - ) - if s.ac6 == nil { - s.ac6 = map[nodeKey]ac6FailoversContext{} - } - s.ac6[nodeKey{clu.Datacenter, partition}] = struct { - clientSID topology.ServiceID - serverSID topology.ServiceID - serverNode topology.NodeID - }{ - clientSID: clientSID, - serverSID: serverSID, - serverNode: serverNode.ID(), - } - } -} - -func (s *ac6FailoversSuite) setupAC6FailoversDC3(ct *commonTopo, clu, peer1, peer2 *topology.Cluster) { - var peers []string - for _, part := range peer1.Partitions { - peers = append(peers, LocalPeerName(peer1, part.Name)) - } - for _, part := range peer2.Partitions { - peers = append(peers, LocalPeerName(peer2, part.Name)) - } - - partition := "default" - - // Make an HTTP server - server := NewFortioServiceWithDefaults( - clu.Datacenter, - topology.ServiceID{ - Name: "ac6-failover-svc", - Partition: partition, - }, - nil, - ) - - ct.AddServiceNode(clu, serviceExt{ - Service: server, - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Sources: func() []*api.SourceIntention { - var ixns []*api.SourceIntention - for _, peer := range peers { - ixns = append(ixns, &api.SourceIntention{ - Name: "ac6-client", - Peer: peer, - Action: api.IntentionActionAllow, - }) - } - return ixns - }(), - }, - Exports: func() []api.ServiceConsumer { - var consumers []api.ServiceConsumer - for _, peer := range peers { - consumers = append(consumers, api.ServiceConsumer{ - Peer: peer, - }) - } - return consumers - }(), - }) -} - -func (s *ac6FailoversSuite) test(t *testing.T, ct *commonTopo) { - dc1 := ct.Sprawl.Topology().Clusters["dc1"] - dc2 := ct.Sprawl.Topology().Clusters["dc2"] - - type testcase struct { - name string - cluster *topology.Cluster - peer *topology.Cluster - partition string - } - tcs := []testcase{ - { - name: "dc1 default partition failovers", - cluster: dc1, - peer: dc2, // dc3 is hardcoded - partition: "default", - }, - { - name: "dc1 part1 partition failovers", - cluster: dc1, - peer: dc2, // dc3 is hardcoded - partition: "part1", - }, - { - name: "dc2 default partition failovers", - cluster: dc2, - peer: dc1, // dc3 is hardcoded - partition: "default", - }, - { - name: "dc2 part1 partition failovers", - cluster: dc2, - peer: dc1, // dc3 is hardcoded - partition: "part1", - }, - } - for _, tc := range tcs { - t.Run(tc.name, func(t *testing.T) { - // NOTE: *not parallel* because we mutate resources that are shared - // between test cases (disable/enable nodes) - if !utils.IsEnterprise() && tc.partition != "default" { - t.Skip("skipping enterprise test") - } - partition := tc.partition - clu := tc.cluster - peerClu := tc.peer - - svcs := clu.ServicesByID(s.ac6[nodeKey{clu.Datacenter, partition}].clientSID) - require.Len(t, svcs, 1, "expected exactly one client in datacenter") - - serverSID := s.ac6[nodeKey{clu.Datacenter, partition}].serverSID - serverSID.Normalize() - - client := svcs[0] - require.Len(t, client.Upstreams, 1, "expected one upstream for client") - - u := client.Upstreams[0] - ct.Assert.CatalogServiceExists(t, clu.Name, u.ID.Name, utils.CompatQueryOpts(&api.QueryOptions{ - Partition: u.ID.Partition, - })) - - t.Cleanup(func() { - cfg := ct.Sprawl.Config() - for _, part := range clu.Partitions { - EnableNode(t, cfg, clu.Name, s.ac6[nodeKey{clu.Datacenter, part.Name}].serverNode) - } - for _, part := range peerClu.Partitions { - EnableNode(t, cfg, peerClu.Name, s.ac6[nodeKey{peerClu.Datacenter, part.Name}].serverNode) - } - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - }) - - fmt.Println("### preconditions") - // TODO: deduce this number, instead of hard-coding - nFailoverTargets := 4 - // in CE, we don't have failover targets for non-default partitions - if !utils.IsEnterprise() { - nFailoverTargets = 3 - } - for i := 0; i < nFailoverTargets; i++ { - ct.Assert.UpstreamEndpointStatus(t, client, fmt.Sprintf("failover-target~%d~%s", i, clusterPrefix(u, clu.Datacenter)), "HEALTHY", 1) - } - - ct.Assert.FortioFetch2FortioName(t, client, u, clu.Name, serverSID) - - if t.Failed() { - t.Fatalf("failed preconditions") - } - - fmt.Println("### Failover to peer target") - cfg := ct.Sprawl.Config() - DisableNode(t, cfg, clu.Name, s.ac6[nodeKey{clu.Datacenter, partition}].serverNode) - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - // Clusters for imported services rely on outlier detection for - // failovers, NOT eds_health_status. This means that killing the - // node above does not actually make the envoy cluster UNHEALTHY - // so we do not assert for it. - expectUID := topology.ServiceID{ - Name: u.ID.Name, - Partition: "default", - } - expectUID.Normalize() - ct.Assert.FortioFetch2FortioName(t, client, u, peerClu.Name, expectUID) - - if utils.IsEnterprise() { - fmt.Println("### Failover to peer target in non-default partition") - cfg = ct.Sprawl.Config() - DisableNode(t, cfg, clu.Name, s.ac6[nodeKey{clu.Datacenter, partition}].serverNode) - DisableNode(t, cfg, peerClu.Name, s.ac6[nodeKey{peerClu.Datacenter, "default"}].serverNode) - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - // Retry until outlier_detection deems the cluster - // unhealthy and fails over to peer part1. - expectUID = topology.ServiceID{ - Name: u.ID.Name, - Partition: "part1", - } - expectUID.Normalize() - ct.Assert.FortioFetch2FortioName(t, client, u, peerClu.Name, expectUID) - } - - fmt.Println("### Failover to dc3 peer target") - cfg = ct.Sprawl.Config() - DisableNode(t, cfg, clu.Name, s.ac6[nodeKey{clu.Datacenter, partition}].serverNode) - // Disable all partitions for peer - for _, part := range peerClu.Partitions { - DisableNode(t, cfg, peerClu.Name, s.ac6[nodeKey{peerClu.Datacenter, part.Name}].serverNode) - } - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - // This will retry until outlier_detection deems the cluster - // unhealthy and fails over to dc3. - expectUID = topology.ServiceID{ - Name: u.ID.Name, - Partition: "default", - } - expectUID.Normalize() - ct.Assert.FortioFetch2FortioName(t, client, u, "dc3", expectUID) - }) - } -} - -func clusterPrefix(u *topology.Upstream, dc string) string { - u.ID.Normalize() - switch u.ID.Partition { - case "default": - return fmt.Sprintf("%s.%s.%s.internal", u.ID.Name, u.ID.Namespace, dc) - default: - return fmt.Sprintf("%s.%s.%s.%s.internal-v1", u.ID.Name, u.ID.Namespace, u.ID.Partition, dc) - } -} diff --git a/test-integ/peering_commontopo/ac7_1_rotate_gw_test.go b/test-integ/peering_commontopo/ac7_1_rotate_gw_test.go deleted file mode 100644 index b8da4e34bf99f..0000000000000 --- a/test-integ/peering_commontopo/ac7_1_rotate_gw_test.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "strings" - "testing" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" -) - -// TestRotateGW ensures that peered services continue to be able to talk to their -// upstreams during a mesh gateway rotation -// NOTE: because suiteRotateGW needs to mutate the topo, we actually *DO NOT* share a topo - -type suiteRotateGW struct { - DC string - Peer string - - sidServer topology.ServiceID - nodeServer topology.NodeID - - sidClient topology.ServiceID - nodeClient topology.NodeID - - upstream *topology.Upstream - - newMGWNodeName string -} - -func TestRotateGW(t *testing.T) { - suites := []*suiteRotateGW{ - {DC: "dc1", Peer: "dc2"}, - {DC: "dc2", Peer: "dc1"}, - } - ct := NewCommonTopo(t) - for _, s := range suites { - s.setup(t, ct) - } - ct.Launch(t) - for _, s := range suites { - s := s - t.Run(fmt.Sprintf("%s->%s", s.DC, s.Peer), func(t *testing.T) { - // no t.Parallel() due to Relaunch - s.test(t, ct) - }) - } -} - -func (s *suiteRotateGW) setup(t *testing.T, ct *commonTopo) { - const prefix = "ac7-1-" - - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - partition := "default" - peer := LocalPeerName(peerClu, "default") - cluPeerName := LocalPeerName(clu, "default") - - server := NewFortioServiceWithDefaults( - peerClu.Datacenter, - topology.ServiceID{ - Name: prefix + "server-http", - Partition: partition, - }, - nil, - ) - - // Make clients which have server upstreams - upstream := &topology.Upstream{ - ID: topology.ServiceID{ - Name: server.ID.Name, - Partition: partition, - }, - // TODO: we shouldn't need this, need to investigate - LocalAddress: "0.0.0.0", - LocalPort: 5001, - Peer: peer, - } - // create client in us - client := NewFortioServiceWithDefaults( - clu.Datacenter, - topology.ServiceID{ - Name: prefix + "client", - Partition: partition, - }, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstream, - } - }, - ) - clientNode := ct.AddServiceNode(clu, serviceExt{Service: client, - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: client.ID.Name, - Partition: ConfigEntryPartition(client.ID.Partition), - Protocol: "http", - UpstreamConfig: &api.UpstreamConfiguration{ - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - }) - // actually to be used by the other pairing - serverNode := ct.AddServiceNode(peerClu, serviceExt{ - Service: server, - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Sources: []*api.SourceIntention{ - { - Name: client.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - }) - - s.sidClient = client.ID - s.nodeClient = clientNode.ID() - s.upstream = upstream - s.sidServer = server.ID - s.nodeServer = serverNode.ID() - - // add a second mesh gateway "new" - s.newMGWNodeName = fmt.Sprintf("new-%s-default-mgw", clu.Name) - clu.Nodes = append(clu.Nodes, newTopologyMeshGatewaySet( - topology.NodeKindClient, - "default", - s.newMGWNodeName, - 1, - []string{clu.Datacenter, "wan"}, - func(i int, node *topology.Node) { - node.Disabled = true - }, - )...) -} - -func (s *suiteRotateGW) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - - svcHTTPServer := peer.ServiceByID( - s.nodeServer, - s.sidServer, - ) - svcHTTPClient := dc.ServiceByID( - s.nodeClient, - s.sidClient, - ) - ct.Assert.HealthyWithPeer(t, dc.Name, svcHTTPServer.ID, LocalPeerName(peer, "default")) - - ct.Assert.FortioFetch2HeaderEcho(t, svcHTTPClient, s.upstream) - - t.Log("relaunching with new gateways") - cfg := ct.Sprawl.Config() - for _, n := range dc.Nodes { - if strings.HasPrefix(n.Name, s.newMGWNodeName) { - n.Disabled = false - } - } - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - ct.Assert.FortioFetch2HeaderEcho(t, svcHTTPClient, s.upstream) - - t.Log("relaunching without old gateways") - cfg = ct.Sprawl.Config() - for _, n := range dc.Nodes { - if strings.HasPrefix(n.Name, fmt.Sprintf("%s-default-mgw", dc.Name)) { - n.Disabled = true - } - } - require.NoError(t, ct.Sprawl.Relaunch(cfg)) - ct.Assert.FortioFetch2HeaderEcho(t, svcHTTPClient, s.upstream) -} diff --git a/test-integ/peering_commontopo/ac7_2_rotate_leader_test.go b/test-integ/peering_commontopo/ac7_2_rotate_leader_test.go deleted file mode 100644 index 986e015a02445..0000000000000 --- a/test-integ/peering_commontopo/ac7_2_rotate_leader_test.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "testing" - "time" - - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/mitchellh/copystructure" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" -) - -// TestAC7_2RotateLeader ensures that after a leader rotation, information continues to replicate to peers -// NOTE: because suiteRotateLeader needs to mutate the topo, we actually *DO NOT* share a topo -type ac7_2RotateLeaderSuite struct { - DC string - Peer string - - sidServer topology.ServiceID - nodeServer topology.NodeID - - sidClient topology.ServiceID - nodeClient topology.NodeID - - upstream *topology.Upstream -} - -func TestAC7_2RotateLeader(t *testing.T) { - suites := []*ac7_2RotateLeaderSuite{ - {DC: "dc1", Peer: "dc2"}, - {DC: "dc2", Peer: "dc1"}, - } - ct := NewCommonTopo(t) - for _, s := range suites { - s.setup(t, ct) - } - ct.Launch(t) - for _, s := range suites { - s := s - t.Run(fmt.Sprintf("%s->%s", s.DC, s.Peer), func(t *testing.T) { - // no t.Parallel() due to Relaunch - s.test(t, ct) - }) - } -} - -// makes client in clu, server in peerClu -func (s *ac7_2RotateLeaderSuite) setup(t *testing.T, ct *commonTopo) { - const prefix = "ac7-2-" - - clu := ct.ClusterByDatacenter(t, s.DC) - peerClu := ct.ClusterByDatacenter(t, s.Peer) - partition := "default" - peer := LocalPeerName(peerClu, "default") - cluPeerName := LocalPeerName(clu, "default") - - server := NewFortioServiceWithDefaults( - peerClu.Datacenter, - topology.ServiceID{ - Name: prefix + "server-http", - Partition: partition, - }, - nil, - ) - - // Make clients which have server upstreams - upstream := &topology.Upstream{ - ID: topology.ServiceID{ - Name: server.ID.Name, - Partition: partition, - }, - LocalPort: 5001, - Peer: peer, - } - // create client in us - client := NewFortioServiceWithDefaults( - clu.Datacenter, - topology.ServiceID{ - Name: prefix + "client", - Partition: partition, - }, - func(s *topology.Service) { - s.Upstreams = []*topology.Upstream{ - upstream, - } - }, - ) - clientNode := ct.AddServiceNode(clu, serviceExt{Service: client, - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: client.ID.Name, - Partition: ConfigEntryPartition(client.ID.Partition), - Protocol: "http", - UpstreamConfig: &api.UpstreamConfiguration{ - Defaults: &api.UpstreamConfig{ - MeshGateway: api.MeshGatewayConfig{ - Mode: api.MeshGatewayModeLocal, - }, - }, - }, - }, - }) - // actually to be used by the other pairing - serverNode := ct.AddServiceNode(peerClu, serviceExt{ - Service: server, - Config: &api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Protocol: "http", - }, - Exports: []api.ServiceConsumer{{Peer: cluPeerName}}, - Intentions: &api.ServiceIntentionsConfigEntry{ - Kind: api.ServiceIntentions, - Name: server.ID.Name, - Partition: ConfigEntryPartition(partition), - Sources: []*api.SourceIntention{ - { - Name: client.ID.Name, - Peer: cluPeerName, - Action: api.IntentionActionAllow, - }, - }, - }, - }) - - s.sidClient = client.ID - s.nodeClient = clientNode.ID() - s.upstream = upstream - s.sidServer = server.ID - s.nodeServer = serverNode.ID() -} - -func (s *ac7_2RotateLeaderSuite) test(t *testing.T, ct *commonTopo) { - dc := ct.Sprawl.Topology().Clusters[s.DC] - peer := ct.Sprawl.Topology().Clusters[s.Peer] - clDC := ct.APIClientForCluster(t, dc) - clPeer := ct.APIClientForCluster(t, peer) - - svcServer := peer.ServiceByID(s.nodeServer, s.sidServer) - svcClient := dc.ServiceByID(s.nodeClient, s.sidClient) - ct.Assert.HealthyWithPeer(t, dc.Name, svcServer.ID, LocalPeerName(peer, "default")) - - ct.Assert.FortioFetch2HeaderEcho(t, svcClient, s.upstream) - - // force leader election - rotateLeader(t, clDC) - rotateLeader(t, clPeer) - - // unexport httpServer - ce, _, err := clPeer.ConfigEntries().Get(api.ExportedServices, s.sidServer.Partition, nil) - require.NoError(t, err) - // ceAsES = config entry as ExportedServicesConfigEntry - ceAsES := ce.(*api.ExportedServicesConfigEntry) - origCE, err := copystructure.Copy(ceAsES) - require.NoError(t, err) - found := 0 - foundI := 0 - for i, svc := range ceAsES.Services { - if svc.Name == s.sidServer.Name && svc.Namespace == utils.DefaultToEmpty(s.sidServer.Namespace) { - found += 1 - foundI = i - } - } - require.Equal(t, found, 1) - // remove found entry - ceAsES.Services = append(ceAsES.Services[:foundI], ceAsES.Services[foundI+1:]...) - _, _, err = clPeer.ConfigEntries().Set(ceAsES, nil) - require.NoError(t, err) - t.Cleanup(func() { - //restore for next pairing - _, _, err = clPeer.ConfigEntries().Set(origCE.(*api.ExportedServicesConfigEntry), nil) - require.NoError(t, err) - }) - - // expect health entry in for peer to disappear - retry.RunWith(&retry.Timer{Timeout: time.Minute, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - svcs, _, err := clDC.Health().Service(s.sidServer.Name, "", true, utils.CompatQueryOpts(&api.QueryOptions{ - Partition: s.sidServer.Partition, - Namespace: s.sidServer.Namespace, - Peer: LocalPeerName(peer, "default"), - })) - require.NoError(r, err) - assert.Equal(r, len(svcs), 0, "health entry for imported service gone") - }) -} - -func rotateLeader(t *testing.T, cl *api.Client) { - t.Helper() - oldLeader := findLeader(t, cl) - cl.Operator().RaftLeaderTransfer(nil) - retry.RunWith(&retry.Timer{Timeout: 30 * time.Second, Wait: time.Second}, t, func(r *retry.R) { - newLeader := findLeader(r, cl) - require.NotEqual(r, oldLeader.ID, newLeader.ID) - }) -} - -func findLeader(t require.TestingT, cl *api.Client) *api.RaftServer { - raftConfig, err := cl.Operator().RaftGetConfiguration(nil) - require.NoError(t, err) - var leader *api.RaftServer - for _, svr := range raftConfig.Servers { - if svr.Leader { - leader = svr - } - } - require.NotNil(t, leader) - return leader -} diff --git a/test-integ/peering_commontopo/asserter.go b/test-integ/peering_commontopo/asserter.go deleted file mode 100644 index 1fa1b81ef1f43..0000000000000 --- a/test-integ/peering_commontopo/asserter.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "fmt" - "io" - "net/http" - "net/url" - "regexp" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/testing/deployer/topology" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" -) - -// asserter is a utility to help in reducing boilerplate in invoking test -// assertions against consul-topology Sprawl components. -// -// The methods should largely take in *topology.Service instances in lieu of -// ip/ports if there is only one port that makes sense for the assertion (such -// as use of the envoy admin port 19000). -// -// If it's up to the test (like picking an upstream) leave port as an argument -// but still take the service and use that to grab the local ip from the -// topology.Node. -type asserter struct { - sp sprawlLite -} - -// *sprawl.Sprawl satisfies this. We don't need anything else. -type sprawlLite interface { - HTTPClientForCluster(clusterName string) (*http.Client, error) - APIClientForNode(clusterName string, nid topology.NodeID, token string) (*api.Client, error) - Topology() *topology.Topology -} - -// newAsserter creates a new assertion helper for the provided sprawl. -func newAsserter(sp sprawlLite) *asserter { - return &asserter{ - sp: sp, - } -} - -func (a *asserter) mustGetHTTPClient(t *testing.T, cluster string) *http.Client { - client, err := a.httpClientFor(cluster) - require.NoError(t, err) - return client -} - -func (a *asserter) mustGetAPIClient(t *testing.T, cluster string) *api.Client { - cl, err := a.apiClientFor(cluster) - require.NoError(t, err) - return cl -} - -func (a *asserter) apiClientFor(cluster string) (*api.Client, error) { - clu := a.sp.Topology().Clusters[cluster] - // TODO: this always goes to the first client, but we might want to balance this - cl, err := a.sp.APIClientForNode(cluster, clu.FirstClient().ID(), "") - return cl, err -} - -// httpClientFor returns a pre-configured http.Client that proxies requests -// through the embedded squid instance in each LAN. -// -// Use this in methods below to magically pick the right proxied http client -// given the home of each node being checked. -func (a *asserter) httpClientFor(cluster string) (*http.Client, error) { - client, err := a.sp.HTTPClientForCluster(cluster) - if err != nil { - return nil, err - } - return client, nil -} - -// UpstreamEndpointStatus validates that proxy was configured with provided clusterName in the healthStatus -// -// Exposes libassert.UpstreamEndpointStatus for use against a Sprawl. -// -// NOTE: this doesn't take a port b/c you always want to use the envoy admin port. -func (a *asserter) UpstreamEndpointStatus( - t *testing.T, - service *topology.Service, - clusterName string, - healthStatus string, - count int, -) { - t.Helper() - node := service.Node - ip := node.LocalAddress() - port := service.EnvoyAdminPort - addr := fmt.Sprintf("%s:%d", ip, port) - - client := a.mustGetHTTPClient(t, node.Cluster) - libassert.AssertUpstreamEndpointStatusWithClient(t, client, addr, clusterName, healthStatus, count) -} - -// HTTPServiceEchoes verifies that a post to the given ip/port combination -// returns the data in the response body. Optional path can be provided to -// differentiate requests. -// -// Exposes libassert.HTTPServiceEchoes for use against a Sprawl. -// -// NOTE: this takes a port b/c you may want to reach this via your choice of upstream. -func (a *asserter) HTTPServiceEchoes( - t *testing.T, - service *topology.Service, - port int, - path string, -) { - t.Helper() - require.True(t, port > 0) - - node := service.Node - ip := node.LocalAddress() - addr := fmt.Sprintf("%s:%d", ip, port) - - client := a.mustGetHTTPClient(t, node.Cluster) - libassert.HTTPServiceEchoesWithClient(t, client, addr, path) -} - -// HTTPServiceEchoesResHeader verifies that a post to the given ip/port combination -// returns the data in the response body with expected response headers. -// Optional path can be provided to differentiate requests. -// -// Exposes libassert.HTTPServiceEchoes for use against a Sprawl. -// -// NOTE: this takes a port b/c you may want to reach this via your choice of upstream. -func (a *asserter) HTTPServiceEchoesResHeader( - t *testing.T, - service *topology.Service, - port int, - path string, - expectedResHeader map[string]string, -) { - t.Helper() - require.True(t, port > 0) - - node := service.Node - ip := node.LocalAddress() - addr := fmt.Sprintf("%s:%d", ip, port) - - client := a.mustGetHTTPClient(t, node.Cluster) - libassert.HTTPServiceEchoesResHeaderWithClient(t, client, addr, path, expectedResHeader) -} - -func (a *asserter) HTTPStatus( - t *testing.T, - service *topology.Service, - port int, - status int, -) { - t.Helper() - require.True(t, port > 0) - - node := service.Node - ip := node.LocalAddress() - addr := fmt.Sprintf("%s:%d", ip, port) - - client := a.mustGetHTTPClient(t, node.Cluster) - - url := "http://" + addr - - retry.RunWith(&retry.Timer{Timeout: 30 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - resp, err := client.Get(url) - if err != nil { - r.Fatalf("could not make request to %q: %v", url, err) - } - defer resp.Body.Close() - if resp.StatusCode != status { - r.Fatalf("expected status %d, got %d", status, resp.StatusCode) - } - }) -} - -// asserts that the service sid in cluster and exported by peer localPeerName is passing health checks, -func (a *asserter) HealthyWithPeer(t *testing.T, cluster string, sid topology.ServiceID, peerName string) { - t.Helper() - cl := a.mustGetAPIClient(t, cluster) - retry.RunWith(&retry.Timer{Timeout: time.Minute * 1, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - svcs, _, err := cl.Health().Service( - sid.Name, - "", - true, - utils.CompatQueryOpts(&api.QueryOptions{ - Partition: sid.Partition, - Namespace: sid.Namespace, - Peer: peerName, - }), - ) - require.NoError(r, err) - assert.GreaterOrEqual(r, len(svcs), 1) - }) -} - -func (a *asserter) UpstreamEndpointHealthy(t *testing.T, svc *topology.Service, upstream *topology.Upstream) { - t.Helper() - node := svc.Node - ip := node.LocalAddress() - port := svc.EnvoyAdminPort - addr := fmt.Sprintf("%s:%d", ip, port) - - client := a.mustGetHTTPClient(t, node.Cluster) - libassert.AssertUpstreamEndpointStatusWithClient(t, - client, - addr, - // TODO: what is default? namespace? partition? - fmt.Sprintf("%s.default.%s.external", upstream.ID.Name, upstream.Peer), - "HEALTHY", - 1, - ) -} - -// does a fortio /fetch2 to the given fortio service, targetting the given upstream. Returns -// the body, and response with response.Body already Closed. -// -// We treat 400, 503, and 504s as retryable errors -func (a *asserter) fortioFetch2Upstream(t *testing.T, fortioSvc *topology.Service, upstream *topology.Upstream, path string) (body []byte, res *http.Response) { - t.Helper() - - // TODO: fortioSvc.ID.Normalize()? or should that be up to the caller? - - node := fortioSvc.Node - client := a.mustGetHTTPClient(t, node.Cluster) - urlbase := fmt.Sprintf("%s:%d", node.LocalAddress(), fortioSvc.Port) - - url := fmt.Sprintf("http://%s/fortio/fetch2?url=%s", urlbase, - url.QueryEscape(fmt.Sprintf("http://localhost:%d/%s", upstream.LocalPort, path)), - ) - - req, err := http.NewRequest(http.MethodPost, url, nil) - require.NoError(t, err) - retry.RunWith(&retry.Timer{Timeout: 60 * time.Second, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - res, err = client.Do(req) - require.NoError(r, err) - defer res.Body.Close() - // not sure when these happen, suspect it's when the mesh gateway in the peer is not yet ready - require.NotEqual(r, http.StatusServiceUnavailable, res.StatusCode) - require.NotEqual(r, http.StatusGatewayTimeout, res.StatusCode) - // not sure when this happens, suspect it's when envoy hasn't configured the local upstream yet - require.NotEqual(r, http.StatusBadRequest, res.StatusCode) - body, err = io.ReadAll(res.Body) - require.NoError(r, err) - }) - - return body, res -} - -// uses the /fortio/fetch2 endpoint to do a header echo check against an -// upstream fortio -func (a *asserter) FortioFetch2HeaderEcho(t *testing.T, fortioSvc *topology.Service, upstream *topology.Upstream) { - const kPassphrase = "x-passphrase" - const passphrase = "hello" - path := (fmt.Sprintf("/?header=%s:%s", kPassphrase, passphrase)) - - retry.RunWith(&retry.Timer{Timeout: 60 * time.Second, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - _, res := a.fortioFetch2Upstream(t, fortioSvc, upstream, path) - require.Equal(t, http.StatusOK, res.StatusCode) - v := res.Header.Get(kPassphrase) - require.Equal(t, passphrase, v) - }) -} - -// similar to libassert.AssertFortioName, -// uses the /fortio/fetch2 endpoint to hit the debug endpoint on the upstream, -// and assert that the FORTIO_NAME == name -func (a *asserter) FortioFetch2FortioName(t *testing.T, fortioSvc *topology.Service, upstream *topology.Upstream, clusterName string, sid topology.ServiceID) { - t.Helper() - - var fortioNameRE = regexp.MustCompile(("\nFORTIO_NAME=(.+)\n")) - path := "/debug?env=dump" - - retry.RunWith(&retry.Timer{Timeout: 60 * time.Second, Wait: time.Millisecond * 500}, t, func(r *retry.R) { - body, res := a.fortioFetch2Upstream(t, fortioSvc, upstream, path) - require.Equal(t, http.StatusOK, res.StatusCode) - - // TODO: not sure we should retry these? - m := fortioNameRE.FindStringSubmatch(string(body)) - require.GreaterOrEqual(r, len(m), 2) - // TODO: dedupe from NewFortioService - require.Equal(r, fmt.Sprintf("%s::%s", clusterName, sid.String()), m[1]) - }) -} - -// CatalogServiceExists is the same as libassert.CatalogServiceExists, except that it uses -// a proxied API client -func (a *asserter) CatalogServiceExists(t *testing.T, cluster string, svc string, opts *api.QueryOptions) { - t.Helper() - cl := a.mustGetAPIClient(t, cluster) - libassert.CatalogServiceExists(t, cl, svc, opts) -} diff --git a/test-integ/peering_commontopo/commontopo.go b/test-integ/peering_commontopo/commontopo.go deleted file mode 100644 index d0e2c8e55dcbf..0000000000000 --- a/test-integ/peering_commontopo/commontopo.go +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "bytes" - "context" - "fmt" - "strconv" - "testing" - "text/tabwriter" - "time" - - "github.com/hashicorp/consul/testing/deployer/sprawl" - "github.com/hashicorp/consul/testing/deployer/sprawl/sprawltest" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" -) - -// commonTopo helps create a shareable topology configured to represent -// the common denominator between tests. -// -// Use NewCommonTopo to create. -// -// Compatible suites should implement sharedTopoSuite. -// -// Style: -// - avoid referencing components using strings, prefer IDs like Service ID, etc. -// - avoid passing addresses and ports, etc. Instead, look up components in sprawl.Topology -// by ID to find a concrete type, then pass that to helper functions that know which port to use -// - minimize the surface area of information passed between setup and test code (via members) -// to those that are strictly necessary -type commonTopo struct { - // - Cfg *topology.Config - // shortcuts to corresponding entry in Cfg - DC1 *topology.Cluster - DC2 *topology.Cluster - DC3 *topology.Cluster - - // set after Launch. Should be considered read-only - Sprawl *sprawl.Sprawl - Assert *asserter - - // track per-DC services to prevent duplicates - services map[string]map[topology.ServiceID]struct{} -} - -func NewCommonTopo(t *testing.T) *commonTopo { - t.Helper() - - ct := commonTopo{} - - // Make 3-server clusters in dc1 and dc2 - // For simplicity, the Name and Datacenter of the clusters are the same. - // dc1 and dc2 should be symmetric. - dc1 := clusterWithJustServers("dc1", 3) - ct.DC1 = dc1 - dc2 := clusterWithJustServers("dc2", 3) - ct.DC2 = dc2 - // dc3 is a failover cluster for both dc1 and dc2 - dc3 := clusterWithJustServers("dc3", 1) - // dc3 is only used for certain failover scenarios and does not need tenancies - dc3.Partitions = []*topology.Partition{{Name: "default"}} - ct.DC3 = dc3 - - injectTenancies(dc1) - injectTenancies(dc2) - // dc3 is only used for certain failover scenarios and does not need tenancies - dc3.Partitions = []*topology.Partition{{Name: "default"}} - - ct.services = map[string]map[topology.ServiceID]struct{}{} - for _, dc := range []*topology.Cluster{dc1, dc2, dc3} { - ct.services[dc.Datacenter] = map[topology.ServiceID]struct{}{} - } - - peerings := addPeerings(dc1, dc2) - peerings = append(peerings, addPeerings(dc1, dc3)...) - peerings = append(peerings, addPeerings(dc2, dc3)...) - - addMeshGateways(dc1, topology.NodeKindClient) - addMeshGateways(dc2, topology.NodeKindClient) - addMeshGateways(dc3, topology.NodeKindClient) - // TODO: consul-topology doesn't support this yet - // addMeshGateways(dc2, topology.NodeKindDataplane) - - setupGlobals(dc1) - setupGlobals(dc2) - setupGlobals(dc3) - - // Build final configuration - ct.Cfg = &topology.Config{ - Images: utils.TargetImages(), - Networks: []*topology.Network{ - {Name: dc1.Datacenter}, // "dc1" LAN - {Name: dc2.Datacenter}, // "dc2" LAN - {Name: dc3.Datacenter}, // "dc3" LAN - {Name: "wan", Type: "wan"}, - }, - Clusters: []*topology.Cluster{ - dc1, - dc2, - dc3, - }, - Peerings: peerings, - } - return &ct -} - -// calls sprawltest.Launch followed by s.postLaunchChecks -func (ct *commonTopo) Launch(t *testing.T) { - if ct.Sprawl != nil { - t.Fatalf("Launch must only be called once") - } - ct.Sprawl = sprawltest.Launch(t, ct.Cfg) - - ct.Assert = newAsserter(ct.Sprawl) - ct.postLaunchChecks(t) -} - -// tests that use Relaunch might want to call this again afterwards -func (ct *commonTopo) postLaunchChecks(t *testing.T) { - t.Logf("TESTING RELATIONSHIPS: \n%s", - renderRelationships(computeRelationships(ct.Sprawl.Topology())), - ) - - // check that exports line up as expected - for _, clu := range ct.Sprawl.Config().Clusters { - // expected exports per peer - type key struct { - peer string - partition string - namespace string - } - eepp := map[key]int{} - for _, e := range clu.InitialConfigEntries { - if e.GetKind() == api.ExportedServices { - asExport := e.(*api.ExportedServicesConfigEntry) - // do we care about the partition? - for _, svc := range asExport.Services { - for _, con := range svc.Consumers { - // do we care about con.Partition? - // TODO: surely there is code to normalize this - partition := asExport.Partition - if partition == "" { - partition = "default" - } - namespace := svc.Namespace - if namespace == "" { - namespace = "default" - } - eepp[key{peer: con.Peer, partition: partition, namespace: namespace}] += 1 - } - } - } - } - cl := ct.APIClientForCluster(t, clu) - // TODO: these could probably be done in parallel - for k, v := range eepp { - retry.RunWith(&retry.Timer{Timeout: 30 * time.Second, Wait: 500 * time.Millisecond}, t, func(r *retry.R) { - peering, _, err := cl.Peerings().Read(context.Background(), k.peer, utils.CompatQueryOpts(&api.QueryOptions{ - Partition: k.partition, - Namespace: k.namespace, - })) - require.Nil(r, err, "reading peering data") - require.NotNilf(r, peering, "peering not found %q", k.peer) - assert.Len(r, peering.StreamStatus.ExportedServices, v, "peering exported services") - }) - } - } - - if t.Failed() { - t.Fatal("failing fast: post-Launch assertions failed") - } -} - -// PeerName is how you'd address a remote dc+partition locally -// as your peer name. -func LocalPeerName(clu *topology.Cluster, partition string) string { - return fmt.Sprintf("peer-%s-%s", clu.Datacenter, partition) -} - -// TODO: move these to topology -// TODO: alternatively, delete it: we only use it in one place, to bundle up args -type serviceExt struct { - *topology.Service - - // default NodeKindClient - NodeKind topology.NodeKind - - Exports []api.ServiceConsumer - Config *api.ServiceConfigEntry - Intentions *api.ServiceIntentionsConfigEntry -} - -func (ct *commonTopo) AddServiceNode(clu *topology.Cluster, svc serviceExt) *topology.Node { - clusterName := clu.Name - if _, ok := ct.services[clusterName][svc.ID]; ok { - panic(fmt.Sprintf("duplicate service %q in cluster %q", svc.ID, clusterName)) - } - ct.services[clusterName][svc.ID] = struct{}{} - - // TODO: inline - serviceHostnameString := func(dc string, id topology.ServiceID) string { - n := id.Name - // prepend - and - if they are not default/empty - // avoids hostname limit of 63 chars in most cases - // TODO: this obviously isn't scalable - if id.Namespace != "default" && id.Namespace != "" { - n = id.Namespace + "-" + n - } - if id.Partition != "default" && id.Partition != "" { - n = id.Partition + "-" + n - } - n = dc + "-" + n - // TODO: experimentally, when this is larger than 63, docker can't start - // the host. confirmed by internet rumor https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27763 - if len(n) > 63 { - panic(fmt.Sprintf("docker hostname must not be longer than 63 chars: %q", n)) - } - return n - } - - node := &topology.Node{ - Kind: topology.NodeKindClient, - Name: serviceHostnameString(clu.Datacenter, svc.ID), - Partition: svc.ID.Partition, - Addresses: []*topology.Address{ - {Network: clu.Datacenter}, - }, - Services: []*topology.Service{ - svc.Service, - }, - Cluster: clusterName, - } - if svc.NodeKind != "" { - node.Kind = svc.NodeKind - } - clu.Nodes = append(clu.Nodes, node) - - // Export if necessary - if len(svc.Exports) > 0 { - ct.ExportService(clu, svc.ID.Partition, api.ExportedService{ - Name: svc.ID.Name, - Namespace: svc.ID.Namespace, - Consumers: svc.Exports, - }) - } - - // Add any config entries - if svc.Config != nil { - clu.InitialConfigEntries = append(clu.InitialConfigEntries, svc.Config) - } - if svc.Intentions != nil { - clu.InitialConfigEntries = append(clu.InitialConfigEntries, svc.Intentions) - } - - return node -} - -func (ct *commonTopo) APIClientForCluster(t *testing.T, clu *topology.Cluster) *api.Client { - cl, err := ct.Sprawl.APIClientForNode(clu.Name, clu.FirstClient().ID(), "") - require.NoError(t, err) - return cl -} - -// ExportService looks for an existing ExportedServicesConfigEntry for the given partition -// and inserts svcs. If none is found, it inserts a new ExportedServicesConfigEntry. -func (ct *commonTopo) ExportService(clu *topology.Cluster, partition string, svcs ...api.ExportedService) { - var found bool - for _, ce := range clu.InitialConfigEntries { - // We check Name because it must be "default" in CE whereas Partition will be "". - if ce.GetKind() == api.ExportedServices && ce.GetName() == partition { - found = true - e := ce.(*api.ExportedServicesConfigEntry) - e.Services = append(e.Services, svcs...) - } - } - if !found { - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ExportedServicesConfigEntry{ - Name: partition, // this NEEDs to be "default" in CE - Partition: ConfigEntryPartition(partition), - Services: svcs, - }, - ) - } -} - -func (ct *commonTopo) ClusterByDatacenter(t *testing.T, name string) *topology.Cluster { - t.Helper() - - for _, clu := range ct.Cfg.Clusters { - if clu.Datacenter == name { - return clu - } - } - t.Fatalf("cluster %q not found", name) - return nil -} - -// Since CE config entries do not contain the partition field, -// this func converts default partition to empty string. -func ConfigEntryPartition(p string) string { - if p == "default" { - return "" // make this CE friendly - } - return p -} - -// disableNode is a no-op if the node is already disabled. -func DisableNode(t *testing.T, cfg *topology.Config, clusterName string, nid topology.NodeID) *topology.Config { - nodes := cfg.Cluster(clusterName).Nodes - var found bool - for _, n := range nodes { - if n.ID() == nid { - found = true - if n.Disabled { - return cfg - } - t.Logf("disabling node %s in cluster %s", nid.String(), clusterName) - n.Disabled = true - break - } - } - require.True(t, found, "expected to find nodeID %q in cluster %q", nid.String(), clusterName) - return cfg -} - -// enableNode is a no-op if the node is already enabled. -func EnableNode(t *testing.T, cfg *topology.Config, clusterName string, nid topology.NodeID) *topology.Config { - nodes := cfg.Cluster(clusterName).Nodes - var found bool - for _, n := range nodes { - if n.ID() == nid { - found = true - if !n.Disabled { - return cfg - } - t.Logf("enabling node %s in cluster %s", nid.String(), clusterName) - n.Disabled = false - break - } - } - require.True(t, found, "expected to find nodeID %q in cluster %q", nid.String(), clusterName) - return cfg -} - -func setupGlobals(clu *topology.Cluster) { - for _, part := range clu.Partitions { - clu.InitialConfigEntries = append(clu.InitialConfigEntries, - &api.ProxyConfigEntry{ - Name: api.ProxyConfigGlobal, - Kind: api.ProxyDefaults, - Partition: ConfigEntryPartition(part.Name), - MeshGateway: api.MeshGatewayConfig{ - // Although we define service-defaults for most upstreams in - // this test suite, failover tests require a global mode - // because the default for peered targets is MeshGatewayModeRemote. - Mode: api.MeshGatewayModeLocal, - }, - }, - ) - } -} - -// addMeshGateways adds a mesh gateway for every partition in the cluster. -// Assumes that the LAN network name is equal to datacenter name. -func addMeshGateways(c *topology.Cluster, kind topology.NodeKind) { - for _, p := range c.Partitions { - c.Nodes = topology.MergeSlices(c.Nodes, newTopologyMeshGatewaySet( - kind, - p.Name, - fmt.Sprintf("%s-%s-mgw", c.Name, p.Name), - 1, - []string{c.Datacenter, "wan"}, - nil, - )) - } -} - -func clusterWithJustServers(name string, numServers int) *topology.Cluster { - return &topology.Cluster{ - Enterprise: utils.IsEnterprise(), - Name: name, - Datacenter: name, - Nodes: newTopologyServerSet( - name+"-server", - numServers, - []string{name, "wan"}, - nil, - ), - } -} - -func addPeerings(acc *topology.Cluster, dial *topology.Cluster) []*topology.Peering { - peerings := []*topology.Peering{} - for _, accPart := range acc.Partitions { - for _, dialPart := range dial.Partitions { - peerings = append(peerings, &topology.Peering{ - Accepting: topology.PeerCluster{ - Name: acc.Datacenter, - Partition: accPart.Name, - PeerName: LocalPeerName(dial, dialPart.Name), - }, - Dialing: topology.PeerCluster{ - Name: dial.Datacenter, - Partition: dialPart.Name, - PeerName: LocalPeerName(acc, accPart.Name), - }, - }) - } - } - return peerings -} - -func injectTenancies(clu *topology.Cluster) { - if !utils.IsEnterprise() { - clu.Partitions = []*topology.Partition{ - { - Name: "default", - Namespaces: []string{ - "default", - }, - }, - } - return - } - - for _, part := range []string{"default", "part1"} { - clu.Partitions = append(clu.Partitions, - &topology.Partition{ - Name: part, - Namespaces: []string{ - "default", - "ns1", - }, - }, - ) - } -} - -func newTopologyServerSet( - namePrefix string, - num int, - networks []string, - mutateFn func(i int, node *topology.Node), -) []*topology.Node { - var out []*topology.Node - for i := 1; i <= num; i++ { - name := namePrefix + strconv.Itoa(i) - - node := &topology.Node{ - Kind: topology.NodeKindServer, - Name: name, - } - for _, net := range networks { - node.Addresses = append(node.Addresses, &topology.Address{Network: net}) - } - - if mutateFn != nil { - mutateFn(i, node) - } - - out = append(out, node) - } - return out -} - -func newTopologyMeshGatewaySet( - nodeKind topology.NodeKind, - partition string, - namePrefix string, - num int, - networks []string, - mutateFn func(i int, node *topology.Node), -) []*topology.Node { - var out []*topology.Node - for i := 1; i <= num; i++ { - name := namePrefix + strconv.Itoa(i) - - node := &topology.Node{ - Kind: nodeKind, - Partition: partition, - Name: name, - Services: []*topology.Service{{ - ID: topology.ServiceID{Name: "mesh-gateway"}, - Port: 8443, - EnvoyAdminPort: 19000, - IsMeshGateway: true, - }}, - } - for _, net := range networks { - node.Addresses = append(node.Addresses, &topology.Address{Network: net}) - } - - if mutateFn != nil { - mutateFn(i, node) - } - - out = append(out, node) - } - return out -} - -const HashicorpDockerProxy = "docker.mirror.hashicorp.services" - -func NewFortioServiceWithDefaults( - cluster string, - sid topology.ServiceID, - mut func(s *topology.Service), -) *topology.Service { - const ( - httpPort = 8080 - grpcPort = 8079 - adminPort = 19000 - ) - sid.Normalize() - - svc := &topology.Service{ - ID: sid, - Image: HashicorpDockerProxy + "/fortio/fortio", - Port: httpPort, - EnvoyAdminPort: adminPort, - CheckTCP: "127.0.0.1:" + strconv.Itoa(httpPort), - Env: []string{ - "FORTIO_NAME=" + cluster + "::" + sid.String(), - }, - Command: []string{ - "server", - "-http-port", strconv.Itoa(httpPort), - "-grpc-port", strconv.Itoa(grpcPort), - "-redirect-port", "-disabled", - }, - } - if mut != nil { - mut(svc) - } - return svc -} - -// computeRelationships will analyze a full topology and generate all of the -// downstream/upstream information for all of them. -func computeRelationships(topo *topology.Topology) []Relationship { - var out []Relationship - for _, cluster := range topo.Clusters { - for _, n := range cluster.Nodes { - for _, s := range n.Services { - for _, u := range s.Upstreams { - out = append(out, Relationship{ - Caller: s, - Upstream: u, - }) - } - } - } - } - return out -} - -// renderRelationships will take the output of ComputeRelationships and display -// it in tabular form. -func renderRelationships(ships []Relationship) string { - var buf bytes.Buffer - w := tabwriter.NewWriter(&buf, 0, 0, 3, ' ', tabwriter.Debug) - fmt.Fprintf(w, "DOWN\tnode\tservice\tport\tUP\tservice\t\n") - for _, r := range ships { - fmt.Fprintf(w, - "%s\t%s\t%s\t%d\t%s\t%s\t\n", - r.downCluster(), - r.Caller.Node.ID().String(), - r.Caller.ID.String(), - r.Upstream.LocalPort, - r.upCluster(), - r.Upstream.ID.String(), - ) - } - fmt.Fprintf(w, "\t\t\t\t\t\t\n") - - w.Flush() - return buf.String() -} - -type Relationship struct { - Caller *topology.Service - Upstream *topology.Upstream -} - -func (r Relationship) String() string { - return fmt.Sprintf( - "%s on %s in %s via :%d => %s in %s", - r.Caller.ID.String(), - r.Caller.Node.ID().String(), - r.downCluster(), - r.Upstream.LocalPort, - r.Upstream.ID.String(), - r.upCluster(), - ) -} - -func (r Relationship) downCluster() string { - return r.Caller.Node.Cluster -} - -func (r Relationship) upCluster() string { - return r.Upstream.Cluster -} diff --git a/test-integ/peering_commontopo/sharedtopology_test.go b/test-integ/peering_commontopo/sharedtopology_test.go deleted file mode 100644 index f51b05e41ef78..0000000000000 --- a/test-integ/peering_commontopo/sharedtopology_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package peering - -import ( - "flag" - "testing" -) - -// Tests that use commonTopo should implement sharedTopoSuite. -// -// Tests that use commonTopo are either cooperative or non-cooperative. Non-cooperative -// uses of commonTopo include is anything that may interfere with other tests, namely -// mutations, such as: -// - any calls to commonTopo.Relaunch; this is generally disruptive to other tests -// - stopping or disabling nodes -// - ... -// -// Cooperative tests should just call testFuncMayReuseCommonTopo() to ensure they -// are run in the correct `sharetopo` mode. They should also ensure they are included -// in the commonTopoSuites slice in TestSuitesOnSharedTopo. -type sharedTopoSuite interface { - testName() string - setup(*testing.T, *commonTopo) - test(*testing.T, *commonTopo) -} - -var flagNoShareTopo = flag.Bool("no-share-topo", false, "do not share topology; run each test in its own isolated topology") - -func runShareableSuites(t *testing.T, suites []sharedTopoSuite) { - t.Helper() - if !*flagNoShareTopo { - names := []string{} - for _, s := range suites { - names = append(names, s.testName()) - } - t.Skipf(`Will run as part of "TestSuitesOnSharedTopo": %v`, names) - } - ct := NewCommonTopo(t) - for _, s := range suites { - s.setup(t, ct) - } - ct.Launch(t) - for _, s := range suites { - s := s - t.Run(s.testName(), func(t *testing.T) { - t.Parallel() - s.test(t, ct) - }) - } -} - -// Tests that can share topo must implement sharedTopoSuite and be appended to the sharedTopoSuites -// slice inside -func TestSuitesOnSharedTopo(t *testing.T) { - if *flagNoShareTopo { - t.Skip(`shared topo suites disabled by -no-share-topo`) - } - ct := NewCommonTopo(t) - - sharedTopoSuites := []sharedTopoSuite{} - sharedTopoSuites = append(sharedTopoSuites, ac1BasicSuites...) - sharedTopoSuites = append(sharedTopoSuites, ac2DiscoChainSuites...) - sharedTopoSuites = append(sharedTopoSuites, ac3SvcDefaultsSuites...) - sharedTopoSuites = append(sharedTopoSuites, ac4ProxyDefaultsSuites...) - sharedTopoSuites = append(sharedTopoSuites, ac5_1NoSvcMeshSuites...) - - for _, s := range sharedTopoSuites { - s.setup(t, ct) - } - ct.Launch(t) - for _, s := range sharedTopoSuites { - s := s - t.Run(s.testName(), func(t *testing.T) { - t.Parallel() - s.test(t, ct) - }) - } -} - -func TestCommonTopologySetup(t *testing.T) { - ct := NewCommonTopo(t) - ct.Launch(t) -} diff --git a/test/bin/cluster.bash b/test/bin/cluster.bash index a6bc7d336f11f..8b856c4a2c9a9 100755 --- a/test/bin/cluster.bash +++ b/test/bin/cluster.bash @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # # Script for bringing up an N node consul cluster diff --git a/test/ca/generate.sh b/test/ca/generate.sh index 7159431f4c490..897071dda8a0b 100755 --- a/test/ca/generate.sh +++ b/test/ca/generate.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -e diff --git a/test/client_certs/generate.sh b/test/client_certs/generate.sh index f5c645d7bbb76..e93f568dcb126 100755 --- a/test/client_certs/generate.sh +++ b/test/client_certs/generate.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/hostname/generate.sh b/test/hostname/generate.sh index 8e43dbee4e8a5..61febd2a36751 100755 --- a/test/hostname/generate.sh +++ b/test/hostname/generate.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/Dockerfile-consul-envoy-windows b/test/integration/connect/envoy/Dockerfile-consul-envoy-windows deleted file mode 100644 index b760fd5754f7d..0000000000000 --- a/test/integration/connect/envoy/Dockerfile-consul-envoy-windows +++ /dev/null @@ -1,12 +0,0 @@ -# From Consul Version 1.13.3 / 1.12.6 / 1.11.11 -ARG VERSION=1.16.0-dev -# From Envoy version 1.23.1 / 1.21.5 / 1.20.7 -ARG ENVOY_VERSION - -FROM docker.mirror.hashicorp.services/windows/envoy-windows:v${ENVOY_VERSION} as envoy -FROM windows/consul:${VERSION} - -# Copy envoy.exe from FROM windows/envoy-windows:${ENVOY_VERSION} -COPY --from=envoy ["C:/Program Files/envoy/", "C:/envoy/"] - -RUN SETX /M path "%PATH%;C:\envoy;" \ No newline at end of file diff --git a/test/integration/connect/envoy/Dockerfile-tcpdump-windows b/test/integration/connect/envoy/Dockerfile-tcpdump-windows deleted file mode 100644 index cbf5041630b99..0000000000000 --- a/test/integration/connect/envoy/Dockerfile-tcpdump-windows +++ /dev/null @@ -1,7 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2019 - -COPY ["tcpdump.exe", "C:/Program Files/"] - -ENTRYPOINT ["C:/Program Files/tcpdump.exe"] - -# docker.exe build -t envoy-tcpdump -f Dockerfile-tcpdump-windows . diff --git a/test/integration/connect/envoy/Dockerfile-test-sds-server-windows b/test/integration/connect/envoy/Dockerfile-test-sds-server-windows deleted file mode 100644 index fc5e45b88d355..0000000000000 --- a/test/integration/connect/envoy/Dockerfile-test-sds-server-windows +++ /dev/null @@ -1,8 +0,0 @@ -FROM docker.mirror.hashicorp.services/windows/golang:1809 - -WORKDIR /go/src -COPY ./ . - -RUN go build -v -o test-sds-server.exe sds.go - -CMD ["test-sds-server.exe"] diff --git a/test/integration/connect/envoy/WINDOWS-TEST.md b/test/integration/connect/envoy/WINDOWS-TEST.md deleted file mode 100644 index d9217f7a385a9..0000000000000 --- a/test/integration/connect/envoy/WINDOWS-TEST.md +++ /dev/null @@ -1,40 +0,0 @@ -# Envoy Integration Tests on Windows - -## Index - -- [About](#about) -- [Pre-built core images](#pre-built-core-images) -- [Test images](#integration-test-images) -- [Run Tests](#run-tests) - -## About - -This file is the entrypoint to understand how to execute Envoy integration tests on Windows as well as to understand the differences between Linux tests and Windows tests. Below you can find a list of relevant documentation that has been written while working on supporting the Envoy integration tests on Windows. - -- [Windows Testing Architecture](test/integration/connect/envoy/docs/windows-testing-architecture.md): On this file you will find why the testing architecture on Windows differs from Linux's. -- [Build Images](build-support-windows/BUILD-IMAGES.md): Here you will find how to build the images required for executing the tests. -- [Windows Troubleshooting](test/integration/connect/envoy/WindowsTroubleshooting.md): This file lists, among other things everything we needed to change/adapt for the existing tests to run in Windows containers. - -## Pre-built core images - -Before running the integration tests, you must pre-build the core images that the tests require to be ran on the Windows environment. Make sure to check out the `BUILD-IMAGES` file [here](build-support-windows/BUILD-IMAGES.md) for this purpose. - -## Integration test images - -During the execution of the integration tests, several images are built based-on the pre-built core images. To get more information about these and how to run them independently, please check out the `docker.windows` file [here](test/integration/connect/envoy/docker.windows.md). - -## Run tests - -To run all the integration tests, you need to execute next command - -```shell -go test -v -timeout=30s -tags integration ./test/integration/connect/envoy -run="TestEnvoy" -win=true -``` - -To run a single test case, the name should be specified. For instance, to run the `case-badauthz` test, you need to execute next command - -```shell -go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/case-badauthz" -win=true -``` - -> :warning: Note that the flag `-win=true` must be specified as shown in the above commands. This flag is very important because the same allows to indicate that the tests will be executed on the Windows environment. When executing the Envoy integration tests the **End of Line Sequence** of every related file and or script will be automatically changed from **LF to CRLF**. diff --git a/test/integration/connect/envoy/case-api-gateway-http-hostnames/capture.sh b/test/integration/connect/envoy/case-api-gateway-http-hostnames/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-hostnames/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-hostnames/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-http-hostnames/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-http-hostnames/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-hostnames/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-http-hostnames/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-http-hostnames/setup.sh b/test/integration/connect/envoy/case-api-gateway-http-hostnames/setup.sh index 3b3db83268911..754e461f847ed 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-hostnames/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-hostnames/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-http-hostnames/vars.sh b/test/integration/connect/envoy/case-api-gateway-http-hostnames/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-hostnames/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-hostnames/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-http-simple/capture.sh b/test/integration/connect/envoy/case-api-gateway-http-simple/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-simple/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-simple/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-http-simple/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-http-simple/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-simple/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-http-simple/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-http-simple/setup.sh b/test/integration/connect/envoy/case-api-gateway-http-simple/setup.sh index e25e92ba0011c..350eea0c5fde1 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-simple/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-simple/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-http-simple/vars.sh b/test/integration/connect/envoy/case-api-gateway-http-simple/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-simple/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-simple/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/capture.sh b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_s3.hcl b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_s3.hcl index b41ec0349862a..3b11b245d4fde 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_s3.hcl +++ b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3" diff --git a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/setup.sh b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/setup.sh index 622df90c297a7..da74ff07c1237 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/vars.sh b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-splitter-targets/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/capture.sh b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/setup.sh b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/setup.sh index 23076cd00e281..bb058d96fd75a 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/vars.sh b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-http-tls-overlapping-hosts/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/capture.sh b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh index a4529b6772edc..35d01c8bb9318 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/vars.sh b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-simple/capture.sh b/test/integration/connect/envoy/case-api-gateway-tcp-simple/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-simple/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-simple/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-simple/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-tcp-simple/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-simple/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-tcp-simple/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-simple/setup.sh b/test/integration/connect/envoy/case-api-gateway-tcp-simple/setup.sh index 152e0772104e5..82504d09f5093 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-simple/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-simple/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-simple/vars.sh b/test/integration/connect/envoy/case-api-gateway-tcp-simple/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-simple/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-simple/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/capture.sh b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/capture.sh index 92123f3f4c077..13eb01ba5f824 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/capture.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 api-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/service_gateway.hcl b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/service_gateway.hcl index 1d0d5fffe26bf..c0af862f92e32 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/service_gateway.hcl +++ b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "api-gateway" diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/setup.sh b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/setup.sh index ca9568e348846..a4be961ebb5bb 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/vars.sh b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/vars.sh index 1456b6a5ad024..87f668072e221 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/vars.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-tls-overlapping-hosts/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" diff --git a/test/integration/connect/envoy/case-badauthz/capture.sh b/test/integration/connect/envoy/case-badauthz/capture.sh index c6b9e36ed1df1..94c0278ce256c 100644 --- a/test/integration/connect/envoy/case-badauthz/capture.sh +++ b/test/integration/connect/envoy/case-badauthz/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 || true diff --git a/test/integration/connect/envoy/case-badauthz/setup.sh b/test/integration/connect/envoy/case-badauthz/setup.sh index 1aa0962cf6fb1..6bd91b1f4e66f 100644 --- a/test/integration/connect/envoy/case-badauthz/setup.sh +++ b/test/integration/connect/envoy/case-badauthz/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-basic/capture.sh b/test/integration/connect/envoy/case-basic/capture.sh index 14dc00afc65b8..5268305f8ff6c 100644 --- a/test/integration/connect/envoy/case-basic/capture.sh +++ b/test/integration/connect/envoy/case-basic/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-basic/setup.sh b/test/integration/connect/envoy/case-basic/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-basic/setup.sh +++ b/test/integration/connect/envoy/case-basic/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-centralconf/capture.sh b/test/integration/connect/envoy/case-centralconf/capture.sh index 8bc4413d09f9e..21ebba78787be 100644 --- a/test/integration/connect/envoy/case-centralconf/capture.sh +++ b/test/integration/connect/envoy/case-centralconf/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-centralconf/service_s1.hcl b/test/integration/connect/envoy/case-centralconf/service_s1.hcl index 54c6ac6501b40..6eaca129855b9 100644 --- a/test/integration/connect/envoy/case-centralconf/service_s1.hcl +++ b/test/integration/connect/envoy/case-centralconf/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-centralconf/service_s2.hcl b/test/integration/connect/envoy/case-centralconf/service_s2.hcl index 1a89f855944da..dfb92edce6368 100644 --- a/test/integration/connect/envoy/case-centralconf/service_s2.hcl +++ b/test/integration/connect/envoy/case-centralconf/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-centralconf/setup.sh b/test/integration/connect/envoy/case-centralconf/setup.sh index 934ea006fddbb..10038488c8c23 100644 --- a/test/integration/connect/envoy/case-centralconf/setup.sh +++ b/test/integration/connect/envoy/case-centralconf/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/base.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/setup.sh index af71eccb8e188..917d0ba6c125f 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/bind.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/bind.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/capture.sh b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/capture.sh index 0921d3c32a0e9..e1b411ab95176 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/capture.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/base.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/base.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s1.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s1.hcl index 63dfc2994f3de..c9da404077ffe 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s2.hcl b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/setup.sh index d84fe0a869918..830ecb23b73cd 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/vars.sh index 41b95915331d4..9d1f5c977a9bc 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-cluster-peering-failover/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy s2-alpha s2-sidecar-proxy-alpha gateway-alpha tcpdump-primary tcpdump-alpha" diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/bind.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/bind.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/capture.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/capture.sh index 0ee4884a15215..93352a5228b92 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/capture.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/setup.sh index 8b24664564cb7..e9a9055ab6a55 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/join.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/join.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_gateway.hcl index 4f91a740182af..8c2315b9ae360 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_s1.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_s1.hcl index 8b4d4a83a42d4..06af757cd68e7 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # we don't want an s1 service in the secondary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/setup.sh index ed13954a1f5e6..1af35392b9c26 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/vars.sh index 11e14176e3892..e33bd22ca6184 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/bind.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/bind.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/capture.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/capture.sh index 0ee4884a15215..93352a5228b92 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/capture.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/setup.sh index 25a7c173f08bb..33a1a035c53ac 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/join.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/join.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_gateway.hcl index 4f91a740182af..8c2315b9ae360 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_s1.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_s1.hcl index 8b4d4a83a42d4..06af757cd68e7 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # we don't want an s1 service in the secondary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/setup.sh index ed13954a1f5e6..1af35392b9c26 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/vars.sh index 11e14176e3892..e33bd22ca6184 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v1.hcl b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v1.hcl index b96b473cf4fbf..9dd3cb782fd3f 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v2.hcl b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v2.hcl index d642e71fa31b1..451f835e86881 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/service_s2-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/setup.sh index 043dd7f7fc66b..20dd92172327f 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/vars.sh index 358c95541fda3..50c5f8f67f9b0 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/capture.sh b/test/integration/connect/envoy/case-cfg-resolver-features/capture.sh index b1782df01e27c..39878041c3672 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/capture.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-features/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v1.hcl b/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v1.hcl index b96b473cf4fbf..9dd3cb782fd3f 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v2.hcl b/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v2.hcl index d642e71fa31b1..451f835e86881 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-features/service_s2-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-features/setup.sh index 2e3078edc872c..c3f2fa3a1d4f5 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-features/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-features/vars.sh index 358c95541fda3..50c5f8f67f9b0 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-features/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/service_s2-v1.hcl b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/service_s2-v1.hcl index d45b1462723f4..551db8a322a9a 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/setup.sh index 606cadd8f1fb3..229247da4f512 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/vars.sh index aab3c8c39ea5b..9f9b54a8e9ebd 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v1.hcl b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v1.hcl index d9a050a16f653..af20754d254de 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3-v1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v2.hcl b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v2.hcl index 19e2c7cac1506..22a40609e19e8 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3-v2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3.hcl b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3.hcl index 973e69b01c89a..82db490a879b9 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/setup.sh index 7d02158a6325c..e1fb33c3dca3e 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/vars.sh index a9a2bcd57188d..f76eb49ceb2db 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-redirect/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v1.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v1.hcl index d9a050a16f653..af20754d254de 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3-v1" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v2.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v2.hcl index 19e2c7cac1506..22a40609e19e8 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3-v2" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3.hcl index 973e69b01c89a..82db490a879b9 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/setup.sh index eae9bd4feaf13..b4472fd8a207c 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/vars.sh index a9a2bcd57188d..f76eb49ceb2db 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/service_s3.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/service_s3.hcl index 94e31c3df895d..59209aab121c1 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/service_s3.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/setup.sh index 097f1fa756663..640e1519ea473 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/vars.sh index 63c854f959c9e..bbc811fa66db5 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES s3 s3-sidecar-proxy" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/service_s3.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/service_s3.hcl index 94e31c3df895d..59209aab121c1 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/service_s3.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/setup.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/setup.sh index fd106032bf2e9..9ce5a82f75468 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/setup.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/vars.sh b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/vars.sh index 63c854f959c9e..bbc811fa66db5 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/vars.sh +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES s3 s3-sidecar-proxy" diff --git a/test/integration/connect/envoy/case-cfg-router-features/capture.sh b/test/integration/connect/envoy/case-cfg-router-features/capture.sh index b1782df01e27c..39878041c3672 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/capture.sh +++ b/test/integration/connect/envoy/case-cfg-router-features/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-router-features/service_s2-v1.hcl b/test/integration/connect/envoy/case-cfg-router-features/service_s2-v1.hcl index b96b473cf4fbf..9dd3cb782fd3f 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-router-features/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-cfg-router-features/service_s2-v2.hcl b/test/integration/connect/envoy/case-cfg-router-features/service_s2-v2.hcl index d642e71fa31b1..451f835e86881 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/service_s2-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-router-features/service_s2-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v2" diff --git a/test/integration/connect/envoy/case-cfg-router-features/setup.sh b/test/integration/connect/envoy/case-cfg-router-features/setup.sh index 577b3512b4fe3..247bc00c33beb 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/setup.sh +++ b/test/integration/connect/envoy/case-cfg-router-features/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-router-features/vars.sh b/test/integration/connect/envoy/case-cfg-router-features/vars.sh index 358c95541fda3..50c5f8f67f9b0 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/vars.sh +++ b/test/integration/connect/envoy/case-cfg-router-features/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/base.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s2.hcl index 26b5f481f377a..6666a63ba257e 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/setup.sh b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/setup.sh index 99c4eb46f2186..5aabbbbee0e5d 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/bind.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/bind.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/capture.sh b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/capture.sh index 0921d3c32a0e9..e1b411ab95176 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/capture.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/base.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/base.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s1.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s1.hcl index d50d8cb04979c..70caaaebc900b 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s2.hcl b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s2.hcl index 26b5f481f377a..6666a63ba257e 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/setup.sh b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/setup.sh index 9b274b375f874..8bc36b6d02299 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/vars.sh b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/vars.sh index 7c231bcfad68f..17f98153dd14d 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/vars.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-cluster-peering/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy s2-alpha s2-sidecar-proxy-alpha gateway-alpha" diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/capture.sh b/test/integration/connect/envoy/case-cfg-splitter-features/capture.sh index b1782df01e27c..39878041c3672 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/capture.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-features/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v1.hcl b/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v1.hcl index b96b473cf4fbf..9dd3cb782fd3f 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v2.hcl b/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v2.hcl index d642e71fa31b1..451f835e86881 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v2.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-features/service_s2-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v2" diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/setup.sh b/test/integration/connect/envoy/case-cfg-splitter-features/setup.sh index 311799fccfbc1..68c8ac0a6cb4f 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/setup.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-features/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/vars.sh b/test/integration/connect/envoy/case-cfg-splitter-features/vars.sh index 358c95541fda3..50c5f8f67f9b0 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/vars.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-features/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES=" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/base.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s1.hcl index ca196db64f0f4..976e0e993d4d5 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s2.hcl index 26b5f481f377a..6666a63ba257e 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/setup.sh b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/setup.sh index 47127ab03d482..8c24708aebe2b 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/bind.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/bind.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/capture.sh b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/capture.sh index 965f136de6822..a3dd69ed05b86 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/capture.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/base.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/base.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/service_ingress.hcl b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/service_ingress.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/service_ingress.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/service_ingress.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/setup.sh b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/setup.sh index ed0da099d6527..d69a26f1d89c6 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/setup.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/vars.sh b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/vars.sh index e5b080741aa26..2a2aa6fb1e9c6 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/vars.sh +++ b/test/integration/connect/envoy/case-cfg-splitter-peering-ingress-gateways/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s1-alpha s1-sidecar-proxy-alpha s2-alpha s2-sidecar-proxy-alpha gateway-alpha ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-consul-exec/setup.sh b/test/integration/connect/envoy/case-consul-exec/setup.sh index 7e869b53f17ad..fe3505623b54e 100644 --- a/test/integration/connect/envoy/case-consul-exec/setup.sh +++ b/test/integration/connect/envoy/case-consul-exec/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-consul-exec/vars.sh b/test/integration/connect/envoy/case-consul-exec/vars.sh index 81ee777414571..4af0cb775d386 100644 --- a/test/integration/connect/envoy/case-consul-exec/vars.sh +++ b/test/integration/connect/envoy/case-consul-exec/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # Bring up s1 and it's proxy as well because the check that it has a cert causes diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/base.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/setup.sh b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/setup.sh index ca05659843d7c..a7fb502a28159 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/bind.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/bind.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/capture.sh b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/capture.sh index b4316246f3ab6..8168b3de6416e 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/capture.sh +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19001 mesh-gateway primary || true diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/base.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/base.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_gateway.hcl index a6b33968ad020..9ea00427e9e7d 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s1.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s1.hcl index b3230f6dcfa1f..b8bd0f20be465 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s2.hcl b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/setup.sh b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/setup.sh index d107c44ea6f39..cf57a59db8739 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/setup.sh +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/vars.sh b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/vars.sh index 93ac3281f1286..475b7f2312782 100644 --- a/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/vars.sh +++ b/test/integration/connect/envoy/case-cross-peer-control-plane-mgw/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-alpha s2-sidecar-proxy-alpha gateway-alpha" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/base.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s3.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s3.hcl index 94e31c3df895d..59209aab121c1 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s3.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/setup.sh b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/setup.sh index 00ab68e36144c..e852ef7d3d26c 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-http-router/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/bind.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/bind.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/capture.sh b/test/integration/connect/envoy/case-cross-peers-http-router/capture.sh index be4068fd193b2..bcea1e921c6d1 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/capture.sh +++ b/test/integration/connect/envoy/case-cross-peers-http-router/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/primary/base.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/primary/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_gateway.hcl index a6b33968ad020..9ea00427e9e7d 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s1.hcl index ec6c29b8e158c..026636c814f75 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http-router/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/primary/setup.sh b/test/integration/connect/envoy/case-cross-peers-http-router/primary/setup.sh index 47c9eff11432a..2a06124a7d60c 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/primary/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-http-router/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-http-router/vars.sh b/test/integration/connect/envoy/case-cross-peers-http-router/vars.sh index b11c21c524075..44ed49bb79619 100644 --- a/test/integration/connect/envoy/case-cross-peers-http-router/vars.sh +++ b/test/integration/connect/envoy/case-cross-peers-http-router/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-alpha s2-sidecar-proxy-alpha s3-alpha s3-sidecar-proxy-alpha gateway-alpha tcpdump-primary tcpdump-alpha" diff --git a/test/integration/connect/envoy/case-cross-peers-http/alpha/base.hcl b/test/integration/connect/envoy/case-cross-peers-http/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cross-peers-http/alpha/setup.sh b/test/integration/connect/envoy/case-cross-peers-http/alpha/setup.sh index 267d9403dba71..f7ac96c41a7ad 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-http/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-http/bind.hcl b/test/integration/connect/envoy/case-cross-peers-http/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/bind.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-http/capture.sh b/test/integration/connect/envoy/case-cross-peers-http/capture.sh index 3e81bd44657f4..62c8c60d702c1 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/capture.sh +++ b/test/integration/connect/envoy/case-cross-peers-http/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cross-peers-http/primary/base.hcl b/test/integration/connect/envoy/case-cross-peers-http/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/primary/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cross-peers-http/primary/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-http/primary/service_gateway.hcl index a6b33968ad020..9ea00427e9e7d 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-http/primary/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-http/primary/service_s1.hcl index ec6c29b8e158c..026636c814f75 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cross-peers-http/primary/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-http/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-http/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-http/primary/setup.sh b/test/integration/connect/envoy/case-cross-peers-http/primary/setup.sh index 7c5ac5fdb8ba9..997bb504f62d4 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/primary/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-http/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-http/vars.sh b/test/integration/connect/envoy/case-cross-peers-http/vars.sh index d999e45dd263e..0c1c07b28b9c3 100644 --- a/test/integration/connect/envoy/case-cross-peers-http/vars.sh +++ b/test/integration/connect/envoy/case-cross-peers-http/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-alpha s2-sidecar-proxy-alpha gateway-alpha tcpdump-primary tcpdump-alpha" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/base.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s3.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s3.hcl index 94e31c3df895d..59209aab121c1 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s3.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/setup.sh b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/setup.sh index 3cc1a2eb2de8d..6574ecf873a6f 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/bind.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/bind.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/capture.sh b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/capture.sh index be4068fd193b2..bcea1e921c6d1 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/capture.sh +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/base.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_gateway.hcl index a6b33968ad020..9ea00427e9e7d 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s1.hcl index ec6c29b8e158c..026636c814f75 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/setup.sh b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/setup.sh index d72b0798f5d8f..ad70bad80a866 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/vars.sh b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/vars.sh index b11c21c524075..44ed49bb79619 100644 --- a/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/vars.sh +++ b/test/integration/connect/envoy/case-cross-peers-resolver-redirect-tcp/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-alpha s2-sidecar-proxy-alpha s3-alpha s3-sidecar-proxy-alpha gateway-alpha tcpdump-primary tcpdump-alpha" diff --git a/test/integration/connect/envoy/case-cross-peers/alpha/base.hcl b/test/integration/connect/envoy/case-cross-peers/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-cross-peers/alpha/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-cross-peers/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-cross-peers/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers/alpha/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-cross-peers/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-cross-peers/alpha/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers/alpha/service_s2.hcl index 90d2315f4d2c9..42252eb82f686 100644 --- a/test/integration/connect/envoy/case-cross-peers/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-cross-peers/alpha/setup.sh b/test/integration/connect/envoy/case-cross-peers/alpha/setup.sh index f5fd3d003aa68..afaa580684a7a 100644 --- a/test/integration/connect/envoy/case-cross-peers/alpha/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers/bind.hcl b/test/integration/connect/envoy/case-cross-peers/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-cross-peers/bind.hcl +++ b/test/integration/connect/envoy/case-cross-peers/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers/capture.sh b/test/integration/connect/envoy/case-cross-peers/capture.sh index 3e81bd44657f4..62c8c60d702c1 100644 --- a/test/integration/connect/envoy/case-cross-peers/capture.sh +++ b/test/integration/connect/envoy/case-cross-peers/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-cross-peers/primary/base.hcl b/test/integration/connect/envoy/case-cross-peers/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-cross-peers/primary/base.hcl +++ b/test/integration/connect/envoy/case-cross-peers/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-cross-peers/primary/service_gateway.hcl b/test/integration/connect/envoy/case-cross-peers/primary/service_gateway.hcl index a6b33968ad020..9ea00427e9e7d 100644 --- a/test/integration/connect/envoy/case-cross-peers/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-cross-peers/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-cross-peers/primary/service_s1.hcl b/test/integration/connect/envoy/case-cross-peers/primary/service_s1.hcl index b3230f6dcfa1f..b8bd0f20be465 100644 --- a/test/integration/connect/envoy/case-cross-peers/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-cross-peers/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-cross-peers/primary/service_s2.hcl b/test/integration/connect/envoy/case-cross-peers/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-cross-peers/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-cross-peers/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-cross-peers/primary/setup.sh b/test/integration/connect/envoy/case-cross-peers/primary/setup.sh index d72b0798f5d8f..ad70bad80a866 100644 --- a/test/integration/connect/envoy/case-cross-peers/primary/setup.sh +++ b/test/integration/connect/envoy/case-cross-peers/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-cross-peers/vars.sh b/test/integration/connect/envoy/case-cross-peers/vars.sh index d999e45dd263e..0c1c07b28b9c3 100644 --- a/test/integration/connect/envoy/case-cross-peers/vars.sh +++ b/test/integration/connect/envoy/case-cross-peers/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-alpha s2-sidecar-proxy-alpha gateway-alpha tcpdump-primary tcpdump-alpha" diff --git a/test/integration/connect/envoy/case-dogstatsd-udp/service_s1.hcl b/test/integration/connect/envoy/case-dogstatsd-udp/service_s1.hcl index a4e91f3aa41b4..a75675751d525 100644 --- a/test/integration/connect/envoy/case-dogstatsd-udp/service_s1.hcl +++ b/test/integration/connect/envoy/case-dogstatsd-udp/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-dogstatsd-udp/setup.sh b/test/integration/connect/envoy/case-dogstatsd-udp/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-dogstatsd-udp/setup.sh +++ b/test/integration/connect/envoy/case-dogstatsd-udp/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-dogstatsd-udp/vars.sh b/test/integration/connect/envoy/case-dogstatsd-udp/vars.sh index 7fa5a238ce933..c599f12e8232d 100644 --- a/test/integration/connect/envoy/case-dogstatsd-udp/vars.sh +++ b/test/integration/connect/envoy/case-dogstatsd-udp/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES fake-statsd" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-dogstatsd-udp/verify.bats b/test/integration/connect/envoy/case-dogstatsd-udp/verify.bats index dfc238ad6d9de..55b0ad76849c3 100644 --- a/test/integration/connect/envoy/case-dogstatsd-udp/verify.bats +++ b/test/integration/connect/envoy/case-dogstatsd-udp/verify.bats @@ -24,11 +24,14 @@ load helpers } @test "s1 proxy should be sending metrics to statsd" { - run retry_default must_match_in_statsd_logs '^envoy\.' primary + run retry_default cat /workdir/primary/statsd/statsd.log - echo "METRICS: $output" + echo "METRICS:" + echo "$output" + echo "COUNT: $(echo "$output" | grep -Ec '^envoy\.')" - [ "$status" == 0 ] + [ "$status" == 0 ] + [ $(echo $output | grep -Ec '^envoy\.') -gt "0" ] } @test "s1 proxy should be sending dogstatsd tagged metrics" { diff --git a/test/integration/connect/envoy/case-expose-checks/capture.sh b/test/integration/connect/envoy/case-expose-checks/capture.sh index c6b9e36ed1df1..94c0278ce256c 100644 --- a/test/integration/connect/envoy/case-expose-checks/capture.sh +++ b/test/integration/connect/envoy/case-expose-checks/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 || true diff --git a/test/integration/connect/envoy/case-expose-checks/service_s1.hcl b/test/integration/connect/envoy/case-expose-checks/service_s1.hcl index b2b685c08abec..9a883739e4fa3 100644 --- a/test/integration/connect/envoy/case-expose-checks/service_s1.hcl +++ b/test/integration/connect/envoy/case-expose-checks/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-expose-checks/service_s2.hcl b/test/integration/connect/envoy/case-expose-checks/service_s2.hcl index f5cb3fb0374c4..b09d152fc5f0f 100644 --- a/test/integration/connect/envoy/case-expose-checks/service_s2.hcl +++ b/test/integration/connect/envoy/case-expose-checks/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-expose-checks/setup.sh b/test/integration/connect/envoy/case-expose-checks/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-expose-checks/setup.sh +++ b/test/integration/connect/envoy/case-expose-checks/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-gateway-without-services/bind.hcl b/test/integration/connect/envoy/case-gateway-without-services/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/bind.hcl +++ b/test/integration/connect/envoy/case-gateway-without-services/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateway-without-services/capture.sh b/test/integration/connect/envoy/case-gateway-without-services/capture.sh index ad74026c7ace2..fc5238fb6d6b2 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/capture.sh +++ b/test/integration/connect/envoy/case-gateway-without-services/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 mesh-gateway primary || true diff --git a/test/integration/connect/envoy/case-gateway-without-services/service_gateway.hcl b/test/integration/connect/envoy/case-gateway-without-services/service_gateway.hcl index 2026fb2a94b84..446a2698e595b 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/service_gateway.hcl +++ b/test/integration/connect/envoy/case-gateway-without-services/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-gateway-without-services/service_s1.hcl b/test/integration/connect/envoy/case-gateway-without-services/service_s1.hcl index 0891eebceb9c9..f74a67a5aef0c 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/service_s1.hcl +++ b/test/integration/connect/envoy/case-gateway-without-services/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service diff --git a/test/integration/connect/envoy/case-gateway-without-services/service_s2.hcl b/test/integration/connect/envoy/case-gateway-without-services/service_s2.hcl index ca644bb3ffa22..1f3f2edd47893 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/service_s2.hcl +++ b/test/integration/connect/envoy/case-gateway-without-services/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service diff --git a/test/integration/connect/envoy/case-gateway-without-services/setup.sh b/test/integration/connect/envoy/case-gateway-without-services/setup.sh index 6e4f5d8ee9bf9..002ef312bc34b 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/setup.sh +++ b/test/integration/connect/envoy/case-gateway-without-services/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-gateway-without-services/vars.sh b/test/integration/connect/envoy/case-gateway-without-services/vars.sh index 21ab024ab5375..2d42d0baf5d3d 100644 --- a/test/integration/connect/envoy/case-gateway-without-services/vars.sh +++ b/test/integration/connect/envoy/case-gateway-without-services/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="gateway-primary" diff --git a/test/integration/connect/envoy/case-gateways-local/bind.hcl b/test/integration/connect/envoy/case-gateways-local/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-gateways-local/bind.hcl +++ b/test/integration/connect/envoy/case-gateways-local/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-local/capture.sh b/test/integration/connect/envoy/case-gateways-local/capture.sh index f4727b52c72ad..f7ca8e9586481 100644 --- a/test/integration/connect/envoy/case-gateways-local/capture.sh +++ b/test/integration/connect/envoy/case-gateways-local/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-gateways-local/primary/service_gateway.hcl b/test/integration/connect/envoy/case-gateways-local/primary/service_gateway.hcl index 2026fb2a94b84..446a2698e595b 100644 --- a/test/integration/connect/envoy/case-gateways-local/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-gateways-local/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-gateways-local/primary/service_s1.hcl b/test/integration/connect/envoy/case-gateways-local/primary/service_s1.hcl index 75fa1acc0e7e3..a759b590b07c2 100644 --- a/test/integration/connect/envoy/case-gateways-local/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-gateways-local/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-gateways-local/primary/service_s2.hcl b/test/integration/connect/envoy/case-gateways-local/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-gateways-local/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-gateways-local/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-local/primary/setup.sh b/test/integration/connect/envoy/case-gateways-local/primary/setup.sh index 29720753ba515..a8bfb7c9ffe5d 100644 --- a/test/integration/connect/envoy/case-gateways-local/primary/setup.sh +++ b/test/integration/connect/envoy/case-gateways-local/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-gateways-local/secondary/join.hcl b/test/integration/connect/envoy/case-gateways-local/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-gateways-local/secondary/join.hcl +++ b/test/integration/connect/envoy/case-gateways-local/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-gateways-local/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-gateways-local/secondary/service_gateway.hcl index 4f91a740182af..8c2315b9ae360 100644 --- a/test/integration/connect/envoy/case-gateways-local/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-gateways-local/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-gateways-local/secondary/service_s1.hcl b/test/integration/connect/envoy/case-gateways-local/secondary/service_s1.hcl index 8b4d4a83a42d4..06af757cd68e7 100644 --- a/test/integration/connect/envoy/case-gateways-local/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-gateways-local/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # we don't want an s1 service in the secondary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-local/secondary/setup.sh b/test/integration/connect/envoy/case-gateways-local/secondary/setup.sh index ede2b4c4b9f70..938135c9f4ff3 100644 --- a/test/integration/connect/envoy/case-gateways-local/secondary/setup.sh +++ b/test/integration/connect/envoy/case-gateways-local/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail @@ -9,4 +9,4 @@ register_services secondary gen_envoy_bootstrap s2 19001 secondary gen_envoy_bootstrap mesh-gateway 19003 secondary true -retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" > /dev/null +retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null diff --git a/test/integration/connect/envoy/case-gateways-local/vars.sh b/test/integration/connect/envoy/case-gateways-local/vars.sh index d9a319933f8da..c5ab45789beba 100644 --- a/test/integration/connect/envoy/case-gateways-local/vars.sh +++ b/test/integration/connect/envoy/case-gateways-local/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-secondary s2-sidecar-proxy-secondary gateway-secondary" diff --git a/test/integration/connect/envoy/case-gateways-remote/bind.hcl b/test/integration/connect/envoy/case-gateways-remote/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-gateways-remote/bind.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-remote/capture.sh b/test/integration/connect/envoy/case-gateways-remote/capture.sh index f4727b52c72ad..f7ca8e9586481 100644 --- a/test/integration/connect/envoy/case-gateways-remote/capture.sh +++ b/test/integration/connect/envoy/case-gateways-remote/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-gateways-remote/primary/service_s1.hcl b/test/integration/connect/envoy/case-gateways-remote/primary/service_s1.hcl index 4cb4fbc41d1e3..789717ee52297 100644 --- a/test/integration/connect/envoy/case-gateways-remote/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-gateways-remote/primary/service_s2.hcl b/test/integration/connect/envoy/case-gateways-remote/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-gateways-remote/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-remote/primary/setup.sh b/test/integration/connect/envoy/case-gateways-remote/primary/setup.sh index 6dd0f0622bd36..f79f346477e47 100644 --- a/test/integration/connect/envoy/case-gateways-remote/primary/setup.sh +++ b/test/integration/connect/envoy/case-gateways-remote/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-gateways-remote/secondary/join.hcl b/test/integration/connect/envoy/case-gateways-remote/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-gateways-remote/secondary/join.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-gateways-remote/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-gateways-remote/secondary/service_gateway.hcl index 4f91a740182af..8c2315b9ae360 100644 --- a/test/integration/connect/envoy/case-gateways-remote/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-gateways-remote/secondary/service_s1.hcl b/test/integration/connect/envoy/case-gateways-remote/secondary/service_s1.hcl index 8b4d4a83a42d4..06af757cd68e7 100644 --- a/test/integration/connect/envoy/case-gateways-remote/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-gateways-remote/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # we don't want an s1 service in the secondary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-gateways-remote/secondary/setup.sh b/test/integration/connect/envoy/case-gateways-remote/secondary/setup.sh index 43a4c713cee91..938135c9f4ff3 100644 --- a/test/integration/connect/envoy/case-gateways-remote/secondary/setup.sh +++ b/test/integration/connect/envoy/case-gateways-remote/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-gateways-remote/vars.sh b/test/integration/connect/envoy/case-gateways-remote/vars.sh index d9a319933f8da..c5ab45789beba 100644 --- a/test/integration/connect/envoy/case-gateways-remote/vars.sh +++ b/test/integration/connect/envoy/case-gateways-remote/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy gateway-primary s2-secondary s2-sidecar-proxy-secondary gateway-secondary" diff --git a/test/integration/connect/envoy/case-grpc/service_s1.hcl b/test/integration/connect/envoy/case-grpc/service_s1.hcl index 7d7814800c4d7..b22ba221fa1df 100644 --- a/test/integration/connect/envoy/case-grpc/service_s1.hcl +++ b/test/integration/connect/envoy/case-grpc/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" @@ -20,7 +20,7 @@ services { protocol = "grpc" envoy_dogstatsd_url = "udp://127.0.0.1:8125" envoy_stats_tags = ["foo=bar"] - envoy_stats_flush_interval = "5s" + envoy_stats_flush_interval = "1s" } } } diff --git a/test/integration/connect/envoy/case-grpc/service_s2.hcl b/test/integration/connect/envoy/case-grpc/service_s2.hcl index aaebecf627320..f7d7a267343d3 100644 --- a/test/integration/connect/envoy/case-grpc/service_s2.hcl +++ b/test/integration/connect/envoy/case-grpc/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-grpc/setup.sh b/test/integration/connect/envoy/case-grpc/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-grpc/setup.sh +++ b/test/integration/connect/envoy/case-grpc/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-grpc/vars.sh b/test/integration/connect/envoy/case-grpc/vars.sh index 7fa5a238ce933..c599f12e8232d 100644 --- a/test/integration/connect/envoy/case-grpc/vars.sh +++ b/test/integration/connect/envoy/case-grpc/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES fake-statsd" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-grpc/verify.bats b/test/integration/connect/envoy/case-grpc/verify.bats index fc7ca15b5b94a..422258a0c0ef7 100644 --- a/test/integration/connect/envoy/case-grpc/verify.bats +++ b/test/integration/connect/envoy/case-grpc/verify.bats @@ -43,7 +43,7 @@ load helpers metrics_query='envoy.cluster.grpc.PingServer.total.*[#,]local_cluster:s1(,|$)' fi - run retry_long must_match_in_statsd_logs "${metrics_query}" + run retry_default must_match_in_statsd_logs "${metrics_query}" echo "OUTPUT: $output" [ "$status" == 0 ] diff --git a/test/integration/connect/envoy/case-http-badauthz/capture.sh b/test/integration/connect/envoy/case-http-badauthz/capture.sh index c6b9e36ed1df1..94c0278ce256c 100644 --- a/test/integration/connect/envoy/case-http-badauthz/capture.sh +++ b/test/integration/connect/envoy/case-http-badauthz/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 || true diff --git a/test/integration/connect/envoy/case-http-badauthz/service_s1.hcl b/test/integration/connect/envoy/case-http-badauthz/service_s1.hcl index 25d2c1e380f26..96f67dcf40999 100644 --- a/test/integration/connect/envoy/case-http-badauthz/service_s1.hcl +++ b/test/integration/connect/envoy/case-http-badauthz/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-http-badauthz/service_s2.hcl b/test/integration/connect/envoy/case-http-badauthz/service_s2.hcl index fb857d005ee91..4b6632beb8365 100644 --- a/test/integration/connect/envoy/case-http-badauthz/service_s2.hcl +++ b/test/integration/connect/envoy/case-http-badauthz/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-http-badauthz/setup.sh b/test/integration/connect/envoy/case-http-badauthz/setup.sh index d15f836e65847..6bd91b1f4e66f 100644 --- a/test/integration/connect/envoy/case-http-badauthz/setup.sh +++ b/test/integration/connect/envoy/case-http-badauthz/setup.sh @@ -1,14 +1,14 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail -register_services primary - # Setup deny intention setup_upsert_l4_intention s1 s2 deny +register_services primary + gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s2 19001 primary diff --git a/test/integration/connect/envoy/case-http/capture.sh b/test/integration/connect/envoy/case-http/capture.sh index 14dc00afc65b8..5268305f8ff6c 100644 --- a/test/integration/connect/envoy/case-http/capture.sh +++ b/test/integration/connect/envoy/case-http/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-http/service_s1.hcl b/test/integration/connect/envoy/case-http/service_s1.hcl index 42a62acfb9f68..0c3f594fbc7d1 100644 --- a/test/integration/connect/envoy/case-http/service_s1.hcl +++ b/test/integration/connect/envoy/case-http/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-http/service_s2.hcl b/test/integration/connect/envoy/case-http/service_s2.hcl index fb857d005ee91..4b6632beb8365 100644 --- a/test/integration/connect/envoy/case-http/service_s2.hcl +++ b/test/integration/connect/envoy/case-http/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-http/setup.sh b/test/integration/connect/envoy/case-http/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-http/setup.sh +++ b/test/integration/connect/envoy/case-http/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-grpc/capture.sh index 4214ba8274aaa..1c244823aba8b 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-grpc/service_gateway.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/service_s1.hcl b/test/integration/connect/envoy/case-ingress-gateway-grpc/service_s1.hcl index f525d48868ced..ff23e6fea3a0d 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/service_s1.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-grpc/setup.sh index 387d079e3bd2a..40e2802f02ccf 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-grpc/vars.sh index 8b34fe36ef2a3..32dc504c49ce0 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-http/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-http/capture.sh index c2b55d229a591..ab02875e61359 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-http/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-http/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-http/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-http/service_gateway.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-http/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-http/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-http/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-http/setup.sh index 33d06b516c725..03f2184e6d067 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-http/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-http/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-http/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-http/vars.sh index 8b34fe36ef2a3..32dc504c49ce0 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-http/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-http/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/capture.sh index c2b55d229a591..ab02875e61359 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/service_gateway.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/setup.sh index 858d2f9ce53a2..f80e42cb73325 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/vars.sh index 8b34fe36ef2a3..32dc504c49ce0 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/base.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/base.hcl index 8cd6db14878a7..899e81705a4cf 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/base.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "alpha" log_level = "trace" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_gateway.hcl index 640b9b6ce753f..82ddd559eb3a5 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s1.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s1.hcl index b065abc9055e2..11acde14f4270 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s1.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in this peer diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s2.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s2.hcl index 26b5f481f377a..6666a63ba257e 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s2.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/setup.sh index 99c4eb46f2186..5aabbbbee0e5d 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/alpha/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/bind.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/bind.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/capture.sh index ca10f2773107a..20ad858ecdb60 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/base.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/base.hcl index 55c268b37e784..189b8e0ccf722 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/base.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 peering { enabled = true diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_ingress.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_ingress.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_ingress.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_ingress.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s1.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s1.hcl index 18be60cdbf96a..85f8da9740029 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't need an s1 because requests go through the gateway and not a sidecar. \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s2.hcl b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s2.hcl index 26b5f481f377a..6666a63ba257e 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/setup.sh index b4a8dd736feec..58f12866948f2 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/vars.sh index 8f9ac12cb1e3d..08bfe96a9d3b3 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-peering-failover/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-peering-failover/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s2 s2-sidecar-proxy s2-alpha s2-sidecar-proxy-alpha gateway-alpha ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-sds/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-sds/capture.sh index c2b55d229a591..ab02875e61359 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-sds/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-sds/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-sds/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-sds/service_gateway.hcl index 1ffa476e6ff98..176a66f1afef1 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-sds/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-sds/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-sds/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-sds/setup.sh index fbef09b014cf2..fb98b05aad30a 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-sds/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-sds/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-sds/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-sds/vars.sh index 6bbbcfd6fe52d..0c98c8fe04507 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-sds/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-sds/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary test-sds-server" diff --git a/test/integration/connect/envoy/case-ingress-gateway-simple/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-simple/capture.sh index c2b55d229a591..ab02875e61359 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-simple/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-simple/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-simple/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-simple/service_gateway.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-simple/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-simple/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-simple/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-simple/setup.sh index aaaa4d91cb4de..8bcd42aa5075f 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-simple/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-simple/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-simple/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-simple/vars.sh index 8b34fe36ef2a3..32dc504c49ce0 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-simple/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-simple/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/capture.sh b/test/integration/connect/envoy/case-ingress-gateway-tls/capture.sh index c2b55d229a591..ab02875e61359 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/capture.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-gateway-tls/service_gateway.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/setup.sh b/test/integration/connect/envoy/case-ingress-gateway-tls/setup.sh index a485eeaa5b29f..accafeb7353ee 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/setup.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/vars.sh b/test/integration/connect/envoy/case-ingress-gateway-tls/vars.sh index 8b34fe36ef2a3..32dc504c49ce0 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/vars.sh +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/verify.bats b/test/integration/connect/envoy/case-ingress-gateway-tls/verify.bats index 92a158e51b6a5..61eaaf97ccdf8 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/verify.bats +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/verify.bats @@ -19,7 +19,7 @@ load helpers } @test "ingress-gateway should have healthy endpoints for s1" { - assert_upstream_has_endpoints_in_status 127.0.0.1:20000 s1 HEALTHY 1 + assert_upstream_has_endpoints_in_status 127.0.0.1:20000 s1 HEALTHY 1 } @test "should be able to connect to s1 through the TLS-enabled ingress port" { @@ -29,8 +29,8 @@ load helpers run retry_default curl --cacert <(get_ca_root) -s -f -d hello \ --resolve s1.ingress.consul:9998:127.0.0.1 \ https://s1.ingress.consul:9998 - [ "$status" -eq 0 ] - [[ "$output" == *"hello"* ]] + [ "$status" -eq 0 ] + [[ "$output" == *"hello"* ]] } @test "should be able to connect to s1 through the TLS-enabled ingress port using the custom host" { @@ -38,6 +38,6 @@ load helpers run retry_default curl --cacert <(get_ca_root) -s -f -d hello \ --resolve test.example.com:9999:127.0.0.1 \ https://test.example.com:9999 - [ "$status" -eq 0 ] - [[ "$output" == *"hello"* ]] + [ "$status" -eq 0 ] + [[ "$output" == *"hello"* ]] } diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/bind.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/bind.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/capture.sh b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/capture.sh index 3bbc13144aa27..556a296756f0a 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/capture.sh +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 ingress-gateway primary || true diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_gateway.hcl index 2026fb2a94b84..446a2698e595b 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_ingress.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_ingress.hcl index a1324f7f83799..fbb1d402f9869 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_ingress.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_ingress.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "ingress-gateway" diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s1.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s1.hcl index e6f778e5c811d..b9772c7da8627 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service in the primary dc diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s2.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/setup.sh b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/setup.sh index f7e31ac0db5a4..72025d4f8efed 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/setup.sh +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/join.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/join.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/service_gateway.hcl index 4f91a740182af..8c2315b9ae360 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/setup.sh b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/setup.sh index 59f303a5eafde..a012c03b9e969 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/setup.sh +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/vars.sh b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/vars.sh index 85c791704a871..8d492ea3af8dc 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/vars.sh +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="gateway-primary s1-secondary s1-sidecar-proxy-secondary s2-secondary s2-sidecar-proxy-secondary gateway-secondary ingress-gateway-primary" diff --git a/test/integration/connect/envoy/case-l7-intentions/acl.hcl b/test/integration/connect/envoy/case-l7-intentions/acl.hcl index 3d80d4f69420b..41e2b1995359c 100644 --- a/test/integration/connect/envoy/case-l7-intentions/acl.hcl +++ b/test/integration/connect/envoy/case-l7-intentions/acl.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 acl { default_policy = "deny" diff --git a/test/integration/connect/envoy/case-l7-intentions/capture.sh b/test/integration/connect/envoy/case-l7-intentions/capture.sh index d588be9381ea0..c93e4c6cea95e 100644 --- a/test/integration/connect/envoy/case-l7-intentions/capture.sh +++ b/test/integration/connect/envoy/case-l7-intentions/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-l7-intentions/setup.sh b/test/integration/connect/envoy/case-l7-intentions/setup.sh index 6946ce3263a9a..705eac06255be 100644 --- a/test/integration/connect/envoy/case-l7-intentions/setup.sh +++ b/test/integration/connect/envoy/case-l7-intentions/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-lua/capture.sh b/test/integration/connect/envoy/case-lua/capture.sh index 14dc00afc65b8..5268305f8ff6c 100644 --- a/test/integration/connect/envoy/case-lua/capture.sh +++ b/test/integration/connect/envoy/case-lua/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-lua/service_s1.hcl b/test/integration/connect/envoy/case-lua/service_s1.hcl index 54c6ac6501b40..6eaca129855b9 100644 --- a/test/integration/connect/envoy/case-lua/service_s1.hcl +++ b/test/integration/connect/envoy/case-lua/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-lua/service_s2.hcl b/test/integration/connect/envoy/case-lua/service_s2.hcl index a167379776625..c01f4b2fefe59 100644 --- a/test/integration/connect/envoy/case-lua/service_s2.hcl +++ b/test/integration/connect/envoy/case-lua/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-lua/setup.sh b/test/integration/connect/envoy/case-lua/setup.sh index 56a668c0ac061..e6b7e3eca3dd2 100644 --- a/test/integration/connect/envoy/case-lua/setup.sh +++ b/test/integration/connect/envoy/case-lua/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-lua/vars.sh b/test/integration/connect/envoy/case-lua/vars.sh index ac0664606f93b..091a358e13dfd 100644 --- a/test/integration/connect/envoy/case-lua/vars.sh +++ b/test/integration/connect/envoy/case-lua/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy" diff --git a/test/integration/connect/envoy/case-mesh-to-lambda/capture.sh b/test/integration/connect/envoy/case-mesh-to-lambda/capture.sh index b64ad4d05a9c1..3c3c6a928a0ca 100644 --- a/test/integration/connect/envoy/case-mesh-to-lambda/capture.sh +++ b/test/integration/connect/envoy/case-mesh-to-lambda/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-mesh-to-lambda/service_gateway.hcl b/test/integration/connect/envoy/case-mesh-to-lambda/service_gateway.hcl index 63c212da3ace6..e1b3ea8a8fdeb 100644 --- a/test/integration/connect/envoy/case-mesh-to-lambda/service_gateway.hcl +++ b/test/integration/connect/envoy/case-mesh-to-lambda/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-mesh-to-lambda/service_s1.hcl b/test/integration/connect/envoy/case-mesh-to-lambda/service_s1.hcl index 11e8328a82fac..9bc567caa0a9c 100644 --- a/test/integration/connect/envoy/case-mesh-to-lambda/service_s1.hcl +++ b/test/integration/connect/envoy/case-mesh-to-lambda/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-mesh-to-lambda/setup.sh b/test/integration/connect/envoy/case-mesh-to-lambda/setup.sh index 406914e3cf5a9..359fbd863fc47 100644 --- a/test/integration/connect/envoy/case-mesh-to-lambda/setup.sh +++ b/test/integration/connect/envoy/case-mesh-to-lambda/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-mesh-to-lambda/vars.sh b/test/integration/connect/envoy/case-mesh-to-lambda/vars.sh index 8643eead0d266..fbe042a40b479 100644 --- a/test/integration/connect/envoy/case-mesh-to-lambda/vars.sh +++ b/test/integration/connect/envoy/case-mesh-to-lambda/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # Ensure that the environment variables required to configure and invoke the Lambda function are present, otherwise skip. diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/bind.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/bind.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/ca_config.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/ca_config.hcl index 0f8d98ac6be52..e5db7ec1b8855 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/ca_config.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/ca_config.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 connect { enabled = true diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/capture.sh b/test/integration/connect/envoy/case-multidc-rsa-ca/capture.sh index daf25ad574959..170c0e3cdfb66 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/capture.sh +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s1.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s1.hcl index b4eb4b1f04fd7..e4f73b127142f 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s2.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s2.hcl index d0f6294f72802..acd65faf3d612 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service in the primary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/setup.sh b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/setup.sh index de07522f12f73..efbac1091d621 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/primary/setup.sh +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/join.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/join.hcl index f0bd3fbd4ac7e..0f63220d549fe 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/join.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/join.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 retry_join_wan = ["consul-primary-server"] diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/service_s1.hcl b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/service_s1.hcl index 8b4d4a83a42d4..06af757cd68e7 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # we don't want an s1 service in the secondary dc \ No newline at end of file diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/setup.sh b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/setup.sh index 712cdd5e79456..17d9cecd2a027 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/setup.sh +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-multidc-rsa-ca/vars.sh b/test/integration/connect/envoy/case-multidc-rsa-ca/vars.sh index 7bf4a264a204f..f49887ddcdfa5 100644 --- a/test/integration/connect/envoy/case-multidc-rsa-ca/vars.sh +++ b/test/integration/connect/envoy/case-multidc-rsa-ca/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2-secondary s2-sidecar-proxy-secondary" diff --git a/test/integration/connect/envoy/case-prometheus/capture.sh b/test/integration/connect/envoy/case-prometheus/capture.sh index 8bc4413d09f9e..21ebba78787be 100644 --- a/test/integration/connect/envoy/case-prometheus/capture.sh +++ b/test/integration/connect/envoy/case-prometheus/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-prometheus/service_s1.hcl b/test/integration/connect/envoy/case-prometheus/service_s1.hcl index 4ac588d9a2a09..d318f786c1079 100644 --- a/test/integration/connect/envoy/case-prometheus/service_s1.hcl +++ b/test/integration/connect/envoy/case-prometheus/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-prometheus/service_s2.hcl b/test/integration/connect/envoy/case-prometheus/service_s2.hcl index fb857d005ee91..4b6632beb8365 100644 --- a/test/integration/connect/envoy/case-prometheus/service_s2.hcl +++ b/test/integration/connect/envoy/case-prometheus/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-prometheus/setup.sh b/test/integration/connect/envoy/case-prometheus/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-prometheus/setup.sh +++ b/test/integration/connect/envoy/case-prometheus/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-property-override/capture.sh b/test/integration/connect/envoy/case-property-override/capture.sh index bc1ac2dcf172e..88f1dd6465f25 100644 --- a/test/integration/connect/envoy/case-property-override/capture.sh +++ b/test/integration/connect/envoy/case-property-override/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-property-override/service_s1.hcl b/test/integration/connect/envoy/case-property-override/service_s1.hcl index a1f811b527429..6bacecf916171 100644 --- a/test/integration/connect/envoy/case-property-override/service_s1.hcl +++ b/test/integration/connect/envoy/case-property-override/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-property-override/service_s2.hcl b/test/integration/connect/envoy/case-property-override/service_s2.hcl index a167379776625..c01f4b2fefe59 100644 --- a/test/integration/connect/envoy/case-property-override/service_s2.hcl +++ b/test/integration/connect/envoy/case-property-override/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-property-override/service_s3.hcl b/test/integration/connect/envoy/case-property-override/service_s3.hcl index 4e5c7cb78e03a..d616906e4c678 100644 --- a/test/integration/connect/envoy/case-property-override/service_s3.hcl +++ b/test/integration/connect/envoy/case-property-override/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s3" diff --git a/test/integration/connect/envoy/case-property-override/setup.sh b/test/integration/connect/envoy/case-property-override/setup.sh index dd82af3487d8e..744055f94966f 100644 --- a/test/integration/connect/envoy/case-property-override/setup.sh +++ b/test/integration/connect/envoy/case-property-override/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-property-override/vars.sh b/test/integration/connect/envoy/case-property-override/vars.sh index 172824ba73d10..358866872a137 100644 --- a/test/integration/connect/envoy/case-property-override/vars.sh +++ b/test/integration/connect/envoy/case-property-override/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy s3 s3-sidecar-proxy" diff --git a/test/integration/connect/envoy/case-stats-proxy/service_s1.hcl b/test/integration/connect/envoy/case-stats-proxy/service_s1.hcl index 3be3803cb4882..25d959520cfe5 100644 --- a/test/integration/connect/envoy/case-stats-proxy/service_s1.hcl +++ b/test/integration/connect/envoy/case-stats-proxy/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-stats-proxy/service_s2.hcl b/test/integration/connect/envoy/case-stats-proxy/service_s2.hcl index fb857d005ee91..4b6632beb8365 100644 --- a/test/integration/connect/envoy/case-stats-proxy/service_s2.hcl +++ b/test/integration/connect/envoy/case-stats-proxy/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-stats-proxy/setup.sh b/test/integration/connect/envoy/case-stats-proxy/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-stats-proxy/setup.sh +++ b/test/integration/connect/envoy/case-stats-proxy/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-stats-proxy/verify.bats b/test/integration/connect/envoy/case-stats-proxy/verify.bats index a200a5a313671..2d02010dc1851 100644 --- a/test/integration/connect/envoy/case-stats-proxy/verify.bats +++ b/test/integration/connect/envoy/case-stats-proxy/verify.bats @@ -40,7 +40,7 @@ load helpers must_match_in_stats_proxy_response localhost:1239 \ 'stats' '^http.envoy_metrics.downstream_rq_active' - # Response should include the local cluster request. + # Response should include the the local cluster request. retry_default \ must_match_in_stats_proxy_response localhost:1239 \ 'stats' 'cluster.local_agent.upstream_rq_active' diff --git a/test/integration/connect/envoy/case-statsd-udp/service_s1.hcl b/test/integration/connect/envoy/case-statsd-udp/service_s1.hcl index a416ce25a0ce0..2748dc59b0843 100644 --- a/test/integration/connect/envoy/case-statsd-udp/service_s1.hcl +++ b/test/integration/connect/envoy/case-statsd-udp/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-statsd-udp/setup.sh b/test/integration/connect/envoy/case-statsd-udp/setup.sh index 883c78e1eb7f5..66e5af830037c 100644 --- a/test/integration/connect/envoy/case-statsd-udp/setup.sh +++ b/test/integration/connect/envoy/case-statsd-udp/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-statsd-udp/vars.sh b/test/integration/connect/envoy/case-statsd-udp/vars.sh index 7fa5a238ce933..c599f12e8232d 100644 --- a/test/integration/connect/envoy/case-statsd-udp/vars.sh +++ b/test/integration/connect/envoy/case-statsd-udp/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES fake-statsd" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/capture.sh b/test/integration/connect/envoy/case-terminating-gateway-hostnames/capture.sh index f5515165d799d..fbfd74951abf1 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/capture.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 terminating-gateway primary || true diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_gateway.hcl b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_gateway.hcl index 63c212da3ace6..e1b3ea8a8fdeb 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_gateway.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s1.hcl b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s1.hcl index da98b2729cbf1..a0f80d75676c5 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s1.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s4.hcl b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s4.hcl index 3fba0f792ebd8..ce8a7bbcf67ae 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s4.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/service_s4.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s4" diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/setup.sh b/test/integration/connect/envoy/case-terminating-gateway-hostnames/setup.sh index 919f9cfd1e9a2..bca191d6d11df 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/setup.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/vars.sh b/test/integration/connect/envoy/case-terminating-gateway-hostnames/vars.sh index a86dca2e7e31a..e4e3560ceea56 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/vars.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # There is no sidecar proxy for s2, since the terminating gateway acts as the proxy diff --git a/test/integration/connect/envoy/case-terminating-gateway-simple/service_gateway.hcl b/test/integration/connect/envoy/case-terminating-gateway-simple/service_gateway.hcl index 63c212da3ace6..e1b3ea8a8fdeb 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-simple/service_gateway.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-simple/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-terminating-gateway-simple/setup.sh b/test/integration/connect/envoy/case-terminating-gateway-simple/setup.sh index f8638925a4a17..c4d33d8fe1df8 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-simple/setup.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-simple/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-terminating-gateway-simple/vars.sh b/test/integration/connect/envoy/case-terminating-gateway-simple/vars.sh index 02ed45703c1e2..12cb3aa9ae1f9 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-simple/vars.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-simple/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # There is no sidecar proxy for s2, since the terminating gateway acts as the proxy diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/capture.sh b/test/integration/connect/envoy/case-terminating-gateway-subsets/capture.sh index 8a28a10f3a6df..30d597a96aa5c 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/capture.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:20000 terminating-gateway primary || true diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_gateway.hcl b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_gateway.hcl index f294b64e6966a..b9af6a07093d4 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_gateway.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v1.hcl b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v1.hcl index 2191385000f66..4812ba8db3907 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v1.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v1" diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v2.hcl b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v2.hcl index cc7df98777ebd..aa8f453a17e62 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v2.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s2-v2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s2-v2" diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s3.hcl b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s3.hcl index 3269b33a8117f..30b3f9e6658b0 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s3.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/service_s3.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { id = "s3" diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/setup.sh b/test/integration/connect/envoy/case-terminating-gateway-subsets/setup.sh index ec38097fd2735..63e0708aca594 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/setup.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/case-terminating-gateway-subsets/vars.sh b/test/integration/connect/envoy/case-terminating-gateway-subsets/vars.sh index e6d96721e4c50..0dd7176570f20 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-subsets/vars.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-subsets/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # There is no sidecar proxy for s2-v1, since the terminating gateway acts as the proxy diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/bind.hcl b/test/integration/connect/envoy/case-terminating-gateway-without-services/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/bind.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_gateway.hcl b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_gateway.hcl index fee3bb25b00b0..4f784aab291b4 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_gateway.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s1.hcl b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s1.hcl index 0891eebceb9c9..f74a67a5aef0c 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s1.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s2.hcl b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s2.hcl index ca644bb3ffa22..1f3f2edd47893 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s2.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/setup.sh b/test/integration/connect/envoy/case-terminating-gateway-without-services/setup.sh index 91f82633b3d51..4192820bd514c 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/setup.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-terminating-gateway-without-services/vars.sh b/test/integration/connect/envoy/case-terminating-gateway-without-services/vars.sh index a8d23fead535d..d6e7573ffff2c 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-without-services/vars.sh +++ b/test/integration/connect/envoy/case-terminating-gateway-without-services/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="terminating-gateway-primary" diff --git a/test/integration/connect/envoy/case-upstream-config/service_s1.hcl b/test/integration/connect/envoy/case-upstream-config/service_s1.hcl index 3bfcb906db70f..6d3da674ed968 100644 --- a/test/integration/connect/envoy/case-upstream-config/service_s1.hcl +++ b/test/integration/connect/envoy/case-upstream-config/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-upstream-config/service_s2.hcl b/test/integration/connect/envoy/case-upstream-config/service_s2.hcl index a167379776625..c01f4b2fefe59 100644 --- a/test/integration/connect/envoy/case-upstream-config/service_s2.hcl +++ b/test/integration/connect/envoy/case-upstream-config/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-upstream-config/setup.sh b/test/integration/connect/envoy/case-upstream-config/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-upstream-config/setup.sh +++ b/test/integration/connect/envoy/case-upstream-config/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-wanfed-gw/bind.hcl b/test/integration/connect/envoy/case-wanfed-gw/bind.hcl index e54caa47a4922..057e0e727f66a 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/bind.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/bind.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 bind_addr = "0.0.0.0" advertise_addr = "{{ GetInterfaceIP \"eth0\" }}" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-wanfed-gw/capture.sh b/test/integration/connect/envoy/case-wanfed-gw/capture.sh index 5c24811d11722..17a53a4320405 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/capture.sh +++ b/test/integration/connect/envoy/case-wanfed-gw/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 mesh-gateway primary || true diff --git a/test/integration/connect/envoy/case-wanfed-gw/global-setup-windows.sh b/test/integration/connect/envoy/case-wanfed-gw/global-setup-windows.sh deleted file mode 100644 index 080d5abf94f1d..0000000000000 --- a/test/integration/connect/envoy/case-wanfed-gw/global-setup-windows.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -# initialize the outputs for each dc -for dc in primary secondary; do - rm -rf "workdir/${dc}/tls" - mkdir -p "workdir/${dc}/tls" -done - -container="consul-envoy-integ-tls-init--${CASE_NAME}" - -scriptlet=" -mkdir /out ; -cd /out ; -consul tls ca create ; -consul tls cert create -dc=primary -server -node=pri ; -consul tls cert create -dc=secondary -server -node=sec ; -" - -docker.exe rm -f "$container" &>/dev/null || true -docker.exe run -i --net=none --name="$container" windows/consul:local bash -c "${scriptlet}" - -# primary -for f in \ - consul-agent-ca.pem \ - primary-server-consul-0-key.pem \ - primary-server-consul-0.pem \ - ; do - docker.exe cp "${container}:C:\\Program Files\\Git\\out\\$f" workdir/primary/tls -done - -# secondary -for f in \ - consul-agent-ca.pem \ - secondary-server-consul-0-key.pem \ - secondary-server-consul-0.pem \ - ; do - docker.exe cp "${container}:C:\\Program Files\\Git\\out\\$f" workdir/secondary/tls -done - -# Private keys have 600 perms but tests are run as another user -chmod 666 workdir/primary/tls/primary-server-consul-0-key.pem -chmod 666 workdir/secondary/tls/secondary-server-consul-0-key.pem - -docker.exe rm -f "$container" >/dev/null || true \ No newline at end of file diff --git a/test/integration/connect/envoy/case-wanfed-gw/global-setup.sh b/test/integration/connect/envoy/case-wanfed-gw/global-setup.sh index 0e21aef6893ad..50625daf07878 100755 --- a/test/integration/connect/envoy/case-wanfed-gw/global-setup.sh +++ b/test/integration/connect/envoy/case-wanfed-gw/global-setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # initialize the outputs for each dc diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/common.hcl b/test/integration/connect/envoy/case-wanfed-gw/primary/common.hcl index 06ad70b29aaf7..d30c465429cca 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/common.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/common.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 tls { internal_rpc { diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/server.hcl b/test/integration/connect/envoy/case-wanfed-gw/primary/server.hcl index e694d94c441eb..ee2d77e48637d 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/server.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/server.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 node_name = "pri" connect { diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/service_gateway.hcl b/test/integration/connect/envoy/case-wanfed-gw/primary/service_gateway.hcl index 0a33536b9c8dd..31c8747b9308c 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/service_s1.hcl b/test/integration/connect/envoy/case-wanfed-gw/primary/service_s1.hcl index 0891eebceb9c9..f74a67a5aef0c 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/service_s1.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/service_s2.hcl b/test/integration/connect/envoy/case-wanfed-gw/primary/service_s2.hcl index ca644bb3ffa22..1f3f2edd47893 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/service_s2.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service diff --git a/test/integration/connect/envoy/case-wanfed-gw/primary/setup.sh b/test/integration/connect/envoy/case-wanfed-gw/primary/setup.sh index 11d5abf14d595..f39cf66dd0097 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/primary/setup.sh +++ b/test/integration/connect/envoy/case-wanfed-gw/primary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/common.hcl b/test/integration/connect/envoy/case-wanfed-gw/secondary/common.hcl index 6b76d377d8210..570fa9d0594e0 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/common.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/common.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 tls { internal_rpc { diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/server.hcl b/test/integration/connect/envoy/case-wanfed-gw/secondary/server.hcl index 027174bf632d7..6265b917445e7 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/server.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/server.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 node_name = "sec" connect { diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_gateway.hcl b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_gateway.hcl index bba04fd97146f..c010c4d4e4a25 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_gateway.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_gateway.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "mesh-gateway" diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s1.hcl b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s1.hcl index 0891eebceb9c9..f74a67a5aef0c 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s1.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s1.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s1 service diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s2.hcl b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s2.hcl index ca644bb3ffa22..1f3f2edd47893 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s2.hcl +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/service_s2.hcl @@ -1,4 +1,4 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # We don't want an s2 service diff --git a/test/integration/connect/envoy/case-wanfed-gw/secondary/setup.sh b/test/integration/connect/envoy/case-wanfed-gw/secondary/setup.sh index 0f4313108c8ce..ef5032115a59d 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/secondary/setup.sh +++ b/test/integration/connect/envoy/case-wanfed-gw/secondary/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-wanfed-gw/vars.sh b/test/integration/connect/envoy/case-wanfed-gw/vars.sh index 4de3b552dcf83..79007fcfe8d27 100644 --- a/test/integration/connect/envoy/case-wanfed-gw/vars.sh +++ b/test/integration/connect/envoy/case-wanfed-gw/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="gateway-primary gateway-secondary" diff --git a/test/integration/connect/envoy/case-wasm/capture.sh b/test/integration/connect/envoy/case-wasm/capture.sh index 14dc00afc65b8..5268305f8ff6c 100644 --- a/test/integration/connect/envoy/case-wasm/capture.sh +++ b/test/integration/connect/envoy/case-wasm/capture.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-wasm/service_s1.hcl b/test/integration/connect/envoy/case-wasm/service_s1.hcl index 54c6ac6501b40..6eaca129855b9 100644 --- a/test/integration/connect/envoy/case-wasm/service_s1.hcl +++ b/test/integration/connect/envoy/case-wasm/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-wasm/service_s2.hcl b/test/integration/connect/envoy/case-wasm/service_s2.hcl index a167379776625..c01f4b2fefe59 100644 --- a/test/integration/connect/envoy/case-wasm/service_s2.hcl +++ b/test/integration/connect/envoy/case-wasm/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-wasm/setup.sh b/test/integration/connect/envoy/case-wasm/setup.sh index 54ab4d4c72ce4..d491aa92fc1db 100644 --- a/test/integration/connect/envoy/case-wasm/setup.sh +++ b/test/integration/connect/envoy/case-wasm/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-wasm/vars.sh b/test/integration/connect/envoy/case-wasm/vars.sh index ac0664606f93b..091a358e13dfd 100644 --- a/test/integration/connect/envoy/case-wasm/vars.sh +++ b/test/integration/connect/envoy/case-wasm/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy" diff --git a/test/integration/connect/envoy/case-zipkin/service_s1.hcl b/test/integration/connect/envoy/case-zipkin/service_s1.hcl index 5f6935fedfbfe..7adcedd7db9e0 100644 --- a/test/integration/connect/envoy/case-zipkin/service_s1.hcl +++ b/test/integration/connect/envoy/case-zipkin/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/case-zipkin/service_s2.hcl b/test/integration/connect/envoy/case-zipkin/service_s2.hcl index 21b8f859b8f23..a537840dff690 100644 --- a/test/integration/connect/envoy/case-zipkin/service_s2.hcl +++ b/test/integration/connect/envoy/case-zipkin/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/case-zipkin/setup.sh b/test/integration/connect/envoy/case-zipkin/setup.sh index 3fb3ade6c5fbb..b88cc90129682 100644 --- a/test/integration/connect/envoy/case-zipkin/setup.sh +++ b/test/integration/connect/envoy/case-zipkin/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/case-zipkin/vars.sh b/test/integration/connect/envoy/case-zipkin/vars.sh index 7f4fb54ac6d79..c4221f8b1aca8 100644 --- a/test/integration/connect/envoy/case-zipkin/vars.sh +++ b/test/integration/connect/envoy/case-zipkin/vars.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES jaeger" \ No newline at end of file diff --git a/test/integration/connect/envoy/case-zipkin/verify.bats b/test/integration/connect/envoy/case-zipkin/verify.bats index 509345689069c..d771d523639a4 100644 --- a/test/integration/connect/envoy/case-zipkin/verify.bats +++ b/test/integration/connect/envoy/case-zipkin/verify.bats @@ -35,17 +35,14 @@ load helpers # Send traced request through upstream. Debug echoes headers back which we can # use to get the traceID generated (no way to force one I can find with Envoy # currently?) - # Fixed from /Debug -> /debug. Reason: /Debug return null - run curl -s -f -H 'x-client-trace-id:test-sentinel' localhost:5000/debug -m 5 + run curl -s -f -H 'x-client-trace-id:test-sentinel' localhost:5000/Debug echo "OUTPUT $output" [ "$status" == "0" ] # Get the traceID from the output - # Replaced grep by jq to filter the TraceId. - # Reason: Grep did not filter and return the entire raw string and the test was failing - TRACEID=$(echo $output | jq -rR 'split("X-B3-Traceid: ") | last' | cut -c -16) + TRACEID=$(echo $output | grep 'X-B3-Traceid:' | cut -c 15-) # Get the trace from Jaeger. Won't bother parsing it just seeing it show up # there is enough to know that the tracing config worked. diff --git a/test/integration/connect/envoy/consul-base-cfg/base.hcl b/test/integration/connect/envoy/consul-base-cfg/base.hcl index 941f68aa26f6a..49116ea6e9b0e 100644 --- a/test/integration/connect/envoy/consul-base-cfg/base.hcl +++ b/test/integration/connect/envoy/consul-base-cfg/base.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 primary_datacenter = "primary" log_level = "trace" \ No newline at end of file diff --git a/test/integration/connect/envoy/consul-base-cfg/service_s1.hcl b/test/integration/connect/envoy/consul-base-cfg/service_s1.hcl index b2b685c08abec..9a883739e4fa3 100644 --- a/test/integration/connect/envoy/consul-base-cfg/service_s1.hcl +++ b/test/integration/connect/envoy/consul-base-cfg/service_s1.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s1" diff --git a/test/integration/connect/envoy/consul-base-cfg/service_s2.hcl b/test/integration/connect/envoy/consul-base-cfg/service_s2.hcl index 73d7798297812..0869e74f24068 100644 --- a/test/integration/connect/envoy/consul-base-cfg/service_s2.hcl +++ b/test/integration/connect/envoy/consul-base-cfg/service_s2.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 services { name = "s2" diff --git a/test/integration/connect/envoy/defaults.sh b/test/integration/connect/envoy/defaults.sh index f92c2cfb1fa9f..ad428e49eaf5f 100644 --- a/test/integration/connect/envoy/defaults.sh +++ b/test/integration/connect/envoy/defaults.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 export DEFAULT_REQUIRED_SERVICES="s1 s1-sidecar-proxy s2 s2-sidecar-proxy" diff --git a/test/integration/connect/envoy/docker-windows.md b/test/integration/connect/envoy/docker-windows.md deleted file mode 100644 index a9f2bbcaca1ca..0000000000000 --- a/test/integration/connect/envoy/docker-windows.md +++ /dev/null @@ -1,42 +0,0 @@ -# Docker Files for Windows Integration Tests - -## Index - -- [About](#about-this-file) -- [Pre-requisites](#pre-requisites) -- [Dockerfile-test-sds-server-windows](#dockerfile-test-sds-server-windows) - -## About this File - -In this file you will find which Dockerfiles are needed to run the Envoy integration tests on Windows, as well as information on how to run each of these files individually for testing purposes. - -## Pre-requisites - -After building and running the images and containers, you need to have pre-built the base images used by these Dockerfiles. See [pre-built images required in Windows](../../../../build-support-windows/BUILD-IMAGES.md) - -## Dockerfile-test-sds-server-windows - -This file sole purpose is to build the test-sds-server executable using Go. To do so, we use an official [golang image](https://hub.docker.com/_/golang/) provided in docker hub with Windows nano server. -To build this image you need to run the following command on your terminal: - -```shell -docker build -t test-sds-server -f Dockerfile-test-sds-server-windows test-sds-server -``` - -This is the same command used in run-tests.sh - -You can test the built file by running the following command: - -```shell -docker run --rm -p 1234:1234 --name test-sds-server test-sds-server -``` - -If everything works properly you should get the following output: - -```shell -20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] Loaded cert from file: name=ca-root -20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] Loaded cert from file: name=foo.example.com -20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] Loaded cert from file: name=wildcard.ingress.consul -20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] Loaded cert from file: name=www.example.com -20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] ==> SDS listening: addr=0.0.0.0:1234 -``` diff --git a/test/integration/connect/envoy/docs/img/linux-arch.png b/test/integration/connect/envoy/docs/img/linux-arch.png deleted file mode 100644 index 710b83b24570b..0000000000000 Binary files a/test/integration/connect/envoy/docs/img/linux-arch.png and /dev/null differ diff --git a/test/integration/connect/envoy/docs/img/windows-arch-singlecontainer.png b/test/integration/connect/envoy/docs/img/windows-arch-singlecontainer.png deleted file mode 100644 index 1ad5f4aabbcaf..0000000000000 Binary files a/test/integration/connect/envoy/docs/img/windows-arch-singlecontainer.png and /dev/null differ diff --git a/test/integration/connect/envoy/docs/img/windows-linux-arch.png b/test/integration/connect/envoy/docs/img/windows-linux-arch.png deleted file mode 100644 index d1c05533e51f2..0000000000000 Binary files a/test/integration/connect/envoy/docs/img/windows-linux-arch.png and /dev/null differ diff --git a/test/integration/connect/envoy/docs/windows-testing-architecture.md b/test/integration/connect/envoy/docs/windows-testing-architecture.md deleted file mode 100644 index 73a29e4f17bf9..0000000000000 --- a/test/integration/connect/envoy/docs/windows-testing-architecture.md +++ /dev/null @@ -1,106 +0,0 @@ -# Windows Testing Architecture - -## Index - -- [About](#about) -- [Testing Architectures](#testing-architectures) - - [Linux Test Architecture](#linux-test-architecture) - - [Replicating the Linux Test Architecture on Windows](#replicating-the-linux-test-architecture-on-windows) - - [Single Container Test Architecture](#single-container-test-architecture) - - [Docker Image Components](#docker-image-components) - - Main Components: - - [Bats](#bats) - - [Fortio](#fortio) - - [Jaegertracing](#jaegertracing) - - [Openzipkin](#openzipkin) - - [Socat](#socat) - - Additional tools: - - [Git Bash](#git-bash) - - [JQ](#jq) - - [Netcat](#netcat) - - [Openssl](#openssl) - -## About - -The purpose of this document is not only to explain why the testing architecture is different on Windows but also to describe how the Single Container test architecture is composed. - -## Testing Architectures - -### Linux Test Architecture - -On Linux, tests take advantage of the Host network feature (only available for Linux containers). This means that every container within the network shares the host’s networking namespace. The network stack for every container that uses this network mode won’t be isolated from the Docker host and won’t get their own IP address. - -![linux-architecture](./img/linux-arch.png) - -Every time a test is run, a directory called workdir is created, here all the required files to run the tests are copied. Then this same directory is mounted as a **named volume**, a container with a Kubernetes pause image tagged as *envoy_workdir_1* is run to keep the volume accessible as other containers start while running the tests. Linux containers allow file system operations on runtime unlike Windows containers. - -### Replicating the Linux Test Architecture on Windows - -As we previously mentioned, on Windows there is no Host networking feature, so we went with NAT network instead. The main consequences of this is that now each container has their own networking stack (IP address) separated from each other, they can communicate among themselves using Docker's DNS feature (using the containers name) but no longer through localhost. -Another problem we are facing while sticking to this architecture, is that configuration files assume that every service (services run by fortio and Envoy's sidecar proxy service) are running in localhost. Though we had some partial success on modifying those files on runtime still we are finding issues related to this. -Test's assertions are composed of either function calls or curl executions, we managed this by mapping those calls to the corresponding container name. - -![windows-linux-architecture](./img/windows-linux-arch.png) - -Above, the failing connections are depicted. We kept the same architecture as on Linux and worked around trying to solve those connectivity issues. -Finally, after serveral tries, it was decided that instead of replicating the Linux architecture on Windows, it was more straightforward just to have a single container with all the required components to run the tests. This **single container** test architecture is the approach that works best on Windows. - -## Single Container Test Architecture - -As mentioned above, the single container approach, means building a Windows Docker image not only with Consul and Envoy, but also with all the tools required to execute the existing Envoy integration tests. - -![windows-linux-singlecontainer](./img/windows-singlecontainer.png) - -Below you can find a list and a brief description of those components. - -### Docker Image Components - -The Docker image used for the Consul - Envoy integration tests has several components needed to run those tests. - -- Main Components: - - [Bats](#bats) - - [Fortio](#fortio) - - [Jaegertracing](#jaegertracing) - - [Openzipkin](#openzipkin) - - [Socat](#socat) -- Additional tools: - - [Git Bash](#git-bash) - - [JQ](#jq) - - [Netcat](#netcat) - - [Openssl](#openssl) - -#### Bats - -BATS stands for Bash Automated Testing System and is the one in charge of executing the tests. - -#### Fortio - -Fortio is a microservices (http, grpc) load testing library, command line tool, advanced echo server, and web UI. It is used to run the services registered into Consul during the integration tests. - -#### Jaegertracing - -Jaeger is open source software for tracing transactions between distributed services. It's used for monitoring and troubleshooting complex microservices environments. It is used along with Openzipkin in some test cases. - -#### Openzipkin - -Zipkin is also a tracing software. - -#### Socat - -Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them. On this integration tests it is used to redirect Envoy's stats. There is no official Windows version. We are using this unofficial release available [here](https://github.com/tech128/socat-1.7.3.0-windows). - -#### Git Bash - -This tool is only used in Windows tests, it was added to the Docker image to be able to use some Linux commands during test execution. - -#### JQ - -Jq is a lightweight and flexible command-line JSON processor. It is used in several tests to modify and filter JSON outputs. - -#### Netcat - -Netcat is a simple program that reads and writes data across networks, much the same way that cat reads and writes data to files. - -#### Openssl - -Open SSL is an all-around cryptography library that offers open-source application of the TLS protocol. It is used to verify that the correct tls certificates are being provisioned during tests. diff --git a/test/integration/connect/envoy/down.sh b/test/integration/connect/envoy/down.sh index 28b159358d1e4..d9b27bd4aedb8 100755 --- a/test/integration/connect/envoy/down.sh +++ b/test/integration/connect/envoy/down.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -euo pipefail diff --git a/test/integration/connect/envoy/helpers.bash b/test/integration/connect/envoy/helpers.bash index 01e59b6c28468..009c88cd90d86 100755 --- a/test/integration/connect/envoy/helpers.bash +++ b/test/integration/connect/envoy/helpers.bash @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # retry based on @@ -210,7 +210,7 @@ function assert_envoy_expose_checks_listener_count { RANGES=$(echo "$BODY" | jq '.active_state.listener.filter_chains[0].filter_chain_match.source_prefix_ranges | length') echo "RANGES = $RANGES (expect 3)" # note: if IPv6 is not supported in the kernel per - # agent/xds/platform:SupportsIPv6() then this will only be 2 + # agent/xds:kernelSupportsIPv6() then this will only be 2 [ "${RANGES:-0}" -eq 3 ] HCM=$(echo "$BODY" | jq '.active_state.listener.filter_chains[0].filters[0]') diff --git a/test/integration/connect/envoy/helpers.windows.bash b/test/integration/connect/envoy/helpers.windows.bash deleted file mode 100644 index 5b6969ca85577..0000000000000 --- a/test/integration/connect/envoy/helpers.windows.bash +++ /dev/null @@ -1,1195 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -CONSUL_HOSTNAME="" -MOD_ARG="" - -function split_hostport { - local HOSTPORT="$@" - - if [[ $HOSTPORT == *":"* ]]; then - MOD_ARG=$( <<< $HOSTPORT sed 's/:/ /' ) - fi -} - -function get_consul_hostname { - local DC=${1:-primary} - - [[ $XDS_TARGET = "client" ]] && CONSUL_HOSTNAME="consul-$DC-client" || CONSUL_HOSTNAME="consul-$DC" -} - -# retry based on -# https://github.com/fernandoacorreia/azure-docker-registry/blob/master/tools/scripts/create-registry-server -# under MIT license. -function retry { - local n=1 - local max=$1 - shift - local delay=$1 - shift - - local errtrace=0 - if grep -q "errtrace" <<<"$SHELLOPTS" - then - errtrace=1 - set +E - fi - - if [[ $1 == "curl" ]]; then - set -- "${@}" -m 10 - elif [[ $1 == "nc" ]] - then - split_hostport $3 - set -- "${@:1:2}" $MOD_ARG "${@:4}" - fi - - # This if block, was added to check if curl is being executed directly on a test, - # if so, we replace the url parameter with the correct one. - - for ((i=1;i<=$max;i++)) - do - if "$@" - then - if test $errtrace -eq 1 - then - set -E - fi - return 0 - else - echo "Command failed. Attempt $i/$max:" - sleep $delay - fi - done - - if test $errtrace -eq 1; then - set -E - fi - return 1 -} - -function retry_default { - local DEFAULT_TOTAL_RETRIES=5 - set +E - ret=0 - retry $DEFAULT_TOTAL_RETRIES 1 "$@" || ret=1 - set -E - return $ret -} - -function retry_long { - retry 30 1 "$@" -} - -function is_set { - # Arguments: - # $1 - string value to check its truthiness - # - # Return: - # 0 - is truthy (backwards I know but allows syntax like `if is_set ` to work) - # 1 - is not truthy - - local val=$(tr '[:upper:]' '[:lower:]' <<<"$1") - case $val in - 1 | t | true | y | yes) - return 0 - ;; - *) - return 1 - ;; - esac -} - -function get_cert { - local HOSTPORT=$1 - local SERVER_NAME=$2 - local CA_FILE=$3 - local SNI_FLAG="" - if [ -n "$SERVER_NAME" ]; then - SNI_FLAG="-servername $SERVER_NAME" - fi - CERT=$(openssl s_client -connect $HOSTPORT $SNI_FLAG -showcerts /dev/null) - - echo "WANT CN: ${CN} (SNI: ${SERVER_NAME})" - echo "GOT CERT:" - echo "$CERT" - - echo "$CERT" | grep "CN = ${CN}" -} - -function get_upstream_endpoint { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - run curl -s -f "http://${HOSTPORT}/clusters?format=json" - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output " -.cluster_statuses[] -| select(.name|startswith(\"${CLUSTER_NAME}\"))" -} - -function assert_upstream_missing_once { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - - run get_upstream_endpoint $HOSTPORT $CLUSTER_NAME - [ "$status" -eq 0 ] - echo "$output" - [ "" == "$output" ] -} - -function assert_upstream_missing { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - run retry_long assert_upstream_missing_once $HOSTPORT $CLUSTER_NAME - echo "OUTPUT: $output $status" - - [ "$status" -eq 0 ] -} - -function assert_envoy_version { - local ADMINPORT=$1 - run retry_default curl -f -s localhost:$ADMINPORT/server_info - [ "$status" -eq 0 ] - # Envoy 1.8.0 returns a plain text line like - # envoy 5d25f466c3410c0dfa735d7d4358beb76b2da507/1.8.0/Clean/DEBUG live 3 3 0 - # Later versions return JSON. - if (echo $output | grep '^envoy'); then - VERSION=$(echo $output | cut -d ' ' -f 2) - else - VERSION=$(echo $output | jq -r '.version') - fi - echo "Status=$status" - echo "Output=$output" - echo "---" - echo "Got version=$VERSION" - echo "Want version=$ENVOY_VERSION" - - # 1.20.2, 1.19.3 and 1.18.6 are special snowflakes in that the version for - # the release is reported with a '-dev' suffix (eg 1.20.2-dev). - if [ "$ENVOY_VERSION" = "1.20.2" ]; then - ENVOY_VERSION="1.20.2-dev" - elif [ "$ENVOY_VERSION" = "1.19.3" ]; then - ENVOY_VERSION="1.19.3-dev" - elif [ "$ENVOY_VERSION" = "1.18.6" ]; then - ENVOY_VERSION="1.18.6-dev" - fi - - echo $VERSION | grep "/$ENVOY_VERSION/" -} - -function assert_envoy_expose_checks_listener_count { - local HOSTPORT=$1 - local EXPECT_PATH=$2 - - # scrape this once - BODY=$(get_envoy_expose_checks_listener_once $HOSTPORT) - echo "BODY = $BODY" - - CHAINS=$(echo "$BODY" | jq '.active_state.listener.filter_chains | length') - echo "CHAINS = $CHAINS (expect 1)" - [ "${CHAINS:-0}" -eq 1 ] - - RANGES=$(echo "$BODY" | jq '.active_state.listener.filter_chains[0].filter_chain_match.source_prefix_ranges | length') - echo "RANGES = $RANGES (expect 3)" - # note: if IPv6 is not supported in the kernel per - # agent/xds/platform:SupportsIPv6() then this will only be 2 - [ "${RANGES:-0}" -eq 3 ] - - HCM=$(echo "$BODY" | jq '.active_state.listener.filter_chains[0].filters[0]') - HCM_NAME=$(echo "$HCM" | jq -r '.name') - HCM_PATH=$(echo "$HCM" | jq -r '.typed_config.route_config.virtual_hosts[0].routes[0].match.path') - echo "HCM = $HCM" - [ "${HCM_NAME:-}" == "envoy.filters.network.http_connection_manager" ] - [ "${HCM_PATH:-}" == "${EXPECT_PATH}" ] -} - -function get_envoy_expose_checks_listener_once { - local HOSTPORT=$1 - run curl -m 5 -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[] | select(.["@type"] == "type.googleapis.com/envoy.admin.v3.ListenersConfigDump") | .dynamic_listeners[] | select(.name | startswith("exposed_path_"))' -} - -function get_envoy_public_listener_once { - local HOSTPORT=$1 - run curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[] | select(.["@type"] == "type.googleapis.com/envoy.admin.v3.ListenersConfigDump") | .dynamic_listeners[] | select(.name | startswith("public_listener:"))' -} - -function assert_envoy_http_rbac_policy_count { - local HOSTPORT=$1 - local EXPECT_COUNT=$2 - - GOT_COUNT=$(get_envoy_http_rbac_once $HOSTPORT | jq '.rules.policies | length') - echo "GOT_COUNT = $GOT_COUNT" - [ "${GOT_COUNT:-0}" -eq $EXPECT_COUNT ] -} - -function get_envoy_http_rbac_once { - local HOSTPORT=$1 - run curl -m 5 -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[2].dynamic_listeners[].active_state.listener.filter_chains[0].filters[0].typed_config.http_filters[] | select(.name == "envoy.filters.http.rbac") | .typed_config' -} - -function assert_envoy_network_rbac_policy_count { - local HOSTPORT=$1 - local EXPECT_COUNT=$2 - - GOT_COUNT=$(get_envoy_network_rbac_once $HOSTPORT | jq '.rules.policies | length') - echo "GOT_COUNT = $GOT_COUNT" - [ "${GOT_COUNT:-0}" -eq $EXPECT_COUNT ] -} - -function get_envoy_network_rbac_once { - local HOSTPORT=$1 - run curl -m 5 -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[2].dynamic_listeners[].active_state.listener.filter_chains[0].filters[] | select(.name == "envoy.filters.network.rbac") | .typed_config' -} - -function get_envoy_listener_filters { - local HOSTPORT=$1 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[2].dynamic_listeners[].active_state.listener | "\(.name) \( .filter_chains[0].filters | map(.name) | join(","))"' -} - -function get_envoy_http_filter { - local HOSTPORT=$1 - local FILTER_NAME=$2 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output ".configs[2].dynamic_listeners[] | .active_state.listener.filter_chains[].filters[] | select(.name == \"envoy.filters.network.http_connection_manager\") | .typed_config.http_filters[] | select(.name == \"${FILTER_NAME}\")" -} - -function get_envoy_http_filters { - local HOSTPORT=$1 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '.configs[2].dynamic_listeners[].active_state.listener | "\(.name) \( .filter_chains[0].filters[] | select(.name == "envoy.filters.network.http_connection_manager") | .typed_config.http_filters | map(.name) | join(","))"' -} - -function get_envoy_dynamic_cluster_once { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - run curl -m 5 -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output ".configs[] | select (.[\"@type\"] == \"type.googleapis.com/envoy.admin.v3.ClustersConfigDump\") | .dynamic_active_clusters[] | select(.cluster.name | startswith(\"${NAME_PREFIX}\"))" -} - -function assert_envoy_dynamic_cluster_exists_once { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - local EXPECT_SNI=$3 - BODY="$(get_envoy_dynamic_cluster_once $HOSTPORT $NAME_PREFIX)" - [ -n "$BODY" ] - - SNI="$(echo "$BODY" | jq --raw-output ".cluster.transport_socket.typed_config.sni | select(. | startswith(\"${EXPECT_SNI}\"))")" - [ -n "$SNI" ] -} - -function assert_envoy_dynamic_cluster_exists { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - local EXPECT_SNI=$3 - run retry_long assert_envoy_dynamic_cluster_exists_once $HOSTPORT $NAME_PREFIX $EXPECT_SNI - [ "$status" -eq 0 ] -} - -function get_envoy_cluster_config { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output " - .configs[1].dynamic_active_clusters[] - | select(.cluster.name|startswith(\"${CLUSTER_NAME}\")) - | .cluster - " -} - -function get_envoy_stats_flush_interval { - local HOSTPORT=$1 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - #echo "$output" > /workdir/s1_envoy_dump.json - echo "$output" | jq --raw-output '.configs[0].bootstrap.stats_flush_interval' -} - -# snapshot_envoy_admin is meant to be used from a teardown scriptlet from the host. -function snapshot_envoy_admin { - local HOSTPORT=$1 - local ENVOY_NAME=$2 - local DC=${3:-primary} - local OUTDIR="${LOG_DIR}/envoy-snapshots/${DC}/${ENVOY_NAME}" - - mkdir -p "${OUTDIR}" - docker_consul_exec "$DC" bash -c "curl -s http://${HOSTPORT}/config_dump" > "${OUTDIR}/config_dump.json" - docker_consul_exec "$DC" bash -c "curl -s http://${HOSTPORT}/clusters?format=json" > "${OUTDIR}/clusters.json" - docker_consul_exec "$DC" bash -c "curl -s http://${HOSTPORT}/stats" > "${OUTDIR}/stats.txt" - docker_consul_exec "$DC" bash -c "curl -s http://${HOSTPORT}/stats/prometheus" > "${OUTDIR}/stats_prometheus.txt" -} - -function reset_envoy_metrics { - local HOSTPORT=$1 - curl -m 5 -s -f -XPOST $HOSTPORT/reset_counters - return $? -} - -function get_all_envoy_metrics { - local HOSTPORT=$1 - curl -m 5 -s -f $HOSTPORT/stats - return $? -} - -function get_envoy_metrics { - local HOSTPORT=$1 - local METRICS=$2 - - get_all_envoy_metrics $HOSTPORT | grep "$METRICS" -} - -function assert_upstream_has_endpoint_port { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local PORT_VALUE=$3 - - run retry_long assert_upstream_has_endpoint_port_once $HOSTPORT $CLUSTER_NAME $PORT_VALUE - [ "$status" -eq 0 ] -} - -function get_upstream_endpoint_in_status_count { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local HEALTH_STATUS=$3 - run curl -m 5 -s -f "http://${HOSTPORT}/clusters?format=json" - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output " -.cluster_statuses[] -| select(.name|startswith(\"${CLUSTER_NAME}\")) -| [.host_statuses[].health_status.eds_health_status] -| [select(.[] == \"${HEALTH_STATUS}\")] -| length" -} - -function assert_upstream_has_endpoints_in_status_once { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local HEALTH_STATUS=$3 - local EXPECT_COUNT=$4 - - GOT_COUNT=$(get_upstream_endpoint_in_status_count $HOSTPORT $CLUSTER_NAME $HEALTH_STATUS) - - [ "$GOT_COUNT" -eq $EXPECT_COUNT ] -} - -function assert_upstream_has_endpoints_in_status { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local HEALTH_STATUS=$3 - local EXPECT_COUNT=$4 - run retry_long assert_upstream_has_endpoints_in_status_once $HOSTPORT $CLUSTER_NAME $HEALTH_STATUS $EXPECT_COUNT - [ "$status" -eq 0 ] -} - -function assert_envoy_metric { - set -eEuo pipefail - local HOSTPORT=$1 - local METRIC=$2 - local EXPECT_COUNT=$3 - - METRICS=$(get_envoy_metrics $HOSTPORT "$METRIC") - - if [ -z "${METRICS}" ]; then - echo "Metric not found" 1>&2 - return 1 - fi - - GOT_COUNT=$(awk -F: '{print $2}' <<<"$METRICS" | head -n 1 | tr -d ' ') - - if [ -z "$GOT_COUNT" ]; then - echo "Couldn't parse metric count" 1>&2 - return 1 - fi - - if [ $EXPECT_COUNT -ne $GOT_COUNT ]; then - echo "$METRIC - expected count: $EXPECT_COUNT, actual count: $GOT_COUNT" 1>&2 - return 1 - fi -} - -function assert_envoy_metric_at_least { - set -eEuo pipefail - local HOSTPORT=$1 - local METRIC=$2 - local EXPECT_COUNT=$3 - - METRICS=$(get_envoy_metrics $HOSTPORT "$METRIC") - - if [ -z "${METRICS}" ]; then - echo "Metric not found" 1>&2 - return 1 - fi - - GOT_COUNT=$(awk -F: '{print $2}' <<<"$METRICS" | head -n 1 | tr -d ' ') - - if [ -z "$GOT_COUNT" ]; then - echo "Couldn't parse metric count" 1>&2 - return 1 - fi - - if [ $EXPECT_COUNT -gt $GOT_COUNT ]; then - echo "$METRIC - expected >= count: $EXPECT_COUNT, actual count: $GOT_COUNT" 1>&2 - return 1 - fi -} - -function assert_envoy_aggregate_metric_at_least { - set -eEuo pipefail - local HOSTPORT=$1 - local METRIC=$2 - local EXPECT_COUNT=$3 - - METRICS=$(get_envoy_metrics $HOSTPORT "$METRIC") - - if [ -z "${METRICS}" ]; then - echo "Metric not found" 1>&2 - return 1 - fi - - GOT_COUNT=$(awk '{ sum += $2 } END { print sum }' <<<"$METRICS") - - if [ -z "$GOT_COUNT" ]; then - echo "Couldn't parse metric count" 1>&2 - return 1 - fi - - if [ $EXPECT_COUNT -gt $GOT_COUNT ]; then - echo "$METRIC - expected >= count: $EXPECT_COUNT, actual count: $GOT_COUNT" 1>&2 - return 1 - fi -} - -function get_healthy_service_count { - local SERVICE_NAME=$1 - local DC=$2 - local NS=$3 - local AP=$4 - local PEER_NAME=$5 - - run curl -m 5 -s -f ${HEADERS} "consul-${DC}-client:8500/v1/health/connect/${SERVICE_NAME}?passing&ns=${NS}&partition=${AP}&peer=${PEER_NAME}" - - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output '. | length' -} - -function assert_alive_wan_member_count { - local DC=$1 - local EXPECT_COUNT=$2 - run retry_long assert_alive_wan_member_count_once $DC $EXPECT_COUNT - [ "$status" -eq 0 ] -} - -function assert_alive_wan_member_count_once { - local DC=$1 - local EXPECT_COUNT=$2 - - GOT_COUNT=$(get_alive_wan_member_count $DC) - - [ "$GOT_COUNT" -eq "$EXPECT_COUNT" ] -} - -function get_alive_wan_member_count { - local DC=$1 - run retry_default curl -sL -f "consul-${DC}-server:8500/v1/agent/members?wan=1" - [ "$status" -eq 0 ] - # echo "$output" >&3 - echo "$output" | jq '.[] | select(.Status == 1) | .Name' | wc -l -} - -function assert_service_has_healthy_instances_once { - local SERVICE_NAME=$1 - local EXPECT_COUNT=$2 - local DC=${3:-primary} - local NS=${4:-} - local AP=${5:-} - local PEER_NAME=${6:-} - - GOT_COUNT=$(get_healthy_service_count "$SERVICE_NAME" "$DC" "$NS" "$AP" "$PEER_NAME") - - [ "$GOT_COUNT" -eq $EXPECT_COUNT ] -} - -function assert_service_has_healthy_instances { - local SERVICE_NAME=$1 - local EXPECT_COUNT=$2 - local DC=${3:-primary} - local NS=${4:-} - local AP=${5:-} - local PEER_NAME=${6:-} - - run retry_long assert_service_has_healthy_instances_once "$SERVICE_NAME" "$EXPECT_COUNT" "$DC" "$NS" "$AP" "$PEER_NAME" - [ "$status" -eq 0 ] -} - -function check_intention { - local SOURCE=$1 - local DESTINATION=$2 - get_consul_hostname primary - - curl -m 5 -s -f "${CONSUL_HOSTNAME}:8500/v1/connect/intentions/check?source=${SOURCE}&destination=${DESTINATION}" | jq ".Allowed" -} - -function assert_intention_allowed { - local SOURCE=$1 - local DESTINATION=$2 - - run check_intention "${SOURCE}" "${DESTINATION}" - [ "$status" -eq 0 ] - [ "$output" = "true" ] -} - -function assert_intention_denied { - local SOURCE=$1 - local DESTINATION=$2 - - run check_intention "${SOURCE}" "${DESTINATION}" - [ "$status" -eq 0 ] - [ "$output" = "false" ] -} - -function docker_consul { - local DC=$1 - shift 1 - retry_default docker_exec envoy_consul-${DC}_1 "$@" -} - -function docker_consul_for_proxy_bootstrap { - local DC=$1 - shift 1 - - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$DC"_1 - - docker.exe exec -i $CONTAINER_NAME bash.exe -c "$@" -} - -function docker_exec { - if ! docker.exe exec -i "$@"; then - echo "Failed to execute: docker exec -i $@" 1>&2 - return 1 - fi -} - -function docker_consul_exec { - local DC=$1 - shift 1 - docker_exec envoy_consul-${DC}_1 "$@" -} - -function kill_envoy { - local BOOTSTRAP_NAME=$1 - local DC=${2:-primary} - - PORT=$( cat /c/workdir/$DC/envoy/${BOOTSTRAP_NAME}-bootstrap.json | jq .admin.address.socket_address.port_value ) - PID=$( netstat -qo | grep "127.0.0.1:$PORT" | sed -r "s/.* //g" ) - tskill $PID -} - -function must_match_in_statsd_logs { - local DC=${2:-primary} - local FILE="/c/workdir/${DC}/statsd/statsd.log" - - COUNT=$( grep -Ec $1 $FILE ) - echo "COUNT of '$1' matches: $COUNT" - - [ "$COUNT" -gt "0" ] -} - -function must_match_in_prometheus_response { - run curl -m 5 -f -s $1/metrics - COUNT=$( echo "$output" | grep -Ec $2 ) - - echo "OUTPUT head -n 10" - echo "$output" | head -n 10 - echo "COUNT of '$2' matches: $COUNT" - - [ "$status" == 0 ] - [ "$COUNT" -gt "0" ] -} - -function must_match_in_stats_proxy_response { - run curl -m 5 -f -s $1/$2 - COUNT=$( echo "$output" | grep -Ec $3 ) - - echo "OUTPUT head -n 10" - echo "$output" | head -n 10 - echo "COUNT of '$3' matches: $COUNT" - - [ "$status" == 0 ] - [ "$COUNT" -gt "0" ] -} - -# must_fail_tcp_connection checks that a request made through an upstream fails, -# probably due to authz being denied if all other tests passed already. Although -# we are using curl, this only works as expected for TCP upstreams as we are -# checking TCP-level errors. HTTP upstreams will return a valid 503 generated by -# Envoy rather than a connection-level error. -function must_fail_tcp_connection { - # Attempt to curl through upstream - run curl -m 5 --no-keepalive -s -v -f -d hello $1 - - echo "OUTPUT $output" - - # Should fail during handshake and return "got nothing" error - [ "$status" == "52" ] - - # Verbose output should enclude empty reply - echo "$output" | grep 'Empty reply from server' -} - -function must_pass_tcp_connection { - run curl -m 5 --no-keepalive -s -f -d hello $1 - - echo "OUTPUT $output" - - [ "$status" == "0" ] - [ "$output" = "hello" ] -} - -# must_fail_http_connection see must_fail_tcp_connection but this expects Envoy -# to generate a 503 response since the upstreams have refused connection. -function must_fail_http_connection { - # Attempt to curl through upstream - run curl -m 5 --no-keepalive -s -i -d hello "$1" - - echo "OUTPUT $output" - - [ "$status" == "0" ] - - local expect_response="${2:-403 Forbidden}" - # Should fail request with 503 - echo "$output" | grep "${expect_response}" -} - -# must_pass_http_request allows you to craft a specific http request to assert -# that envoy will NOT reject the request. Primarily of use for testing L7 -# intentions. -function must_pass_http_request { - local METHOD=$1 - local URL=$2 - local DEBUG_HEADER_VALUE="${3:-""}" - - local extra_args - if [[ -n "${DEBUG_HEADER_VALUE}" ]]; then - extra_args="-H x-test-debug:${DEBUG_HEADER_VALUE}" - fi - case "$METHOD" in - GET) ;; - - DELETE) - extra_args="$extra_args -X${METHOD}" - ;; - PUT | POST) - extra_args="$extra_args -d'{}' -X${METHOD}" - ;; - *) - return 1 - ;; - esac - - run curl -m 5 --no-keepalive -v -s -f $extra_args "$URL" - [ "$status" == 0 ] -} - -# must_fail_http_request allows you to craft a specific http request to assert -# that envoy will reject the request. Primarily of use for testing L7 -# intentions. -function must_fail_http_request { - local METHOD=$1 - local URL=$2 - local DEBUG_HEADER_VALUE="${3:-""}" - - local extra_args - if [[ -n "${DEBUG_HEADER_VALUE}" ]]; then - extra_args="-H x-test-debug:${DEBUG_HEADER_VALUE}" - fi - case "$METHOD" in - HEAD) - extra_args="$extra_args -I" - ;; - GET) ;; - - DELETE) - extra_args="$extra_args -X${METHOD}" - ;; - PUT | POST) - extra_args="$extra_args -d'{}' -X${METHOD}" - ;; - *) - return 1 - ;; - esac - - # Attempt to curl through upstream - run curl -m 5 --no-keepalive -s -i $extra_args "$URL" - - echo "OUTPUT $output" - - echo "$output" | grep "403 Forbidden" -} - -function upsert_config_entry { - local DC="$1" - local BODY="$2" - - echo "$BODY" | docker_consul "$DC" consul config write - -} - -function gen_envoy_bootstrap { - SERVICE=$1 - ADMIN_PORT=$2 - DC=${3:-primary} - IS_GW=${4:-0} - EXTRA_ENVOY_BS_ARGS="${5-}" - ADMIN_HOST="0.0.0.0" - - PROXY_ID="$SERVICE" - if ! is_set "$IS_GW"; then - PROXY_ID="$SERVICE-sidecar-proxy" - ADMIN_HOST="127.0.0.1" - fi - - if output=$(docker_consul_for_proxy_bootstrap $DC "consul connect envoy -bootstrap \ - -proxy-id $PROXY_ID \ - -envoy-version "$ENVOY_VERSION" \ - -http-addr envoy_consul-${DC}_1:8500 \ - -grpc-addr envoy_consul-${DC}_1:8502 \ - -admin-access-log-path="C:/envoy/envoy.log" \ - -admin-bind $ADMIN_HOST:$ADMIN_PORT ${EXTRA_ENVOY_BS_ARGS} \ - > /c/workdir/${DC}/envoy/${SERVICE}-bootstrap.json"); then - - # All OK, write config to file - echo $output - #echo "$output" > /c/workdir/${DC}/envoy/$SERVICE-bootstrap.json - else - status=$? - # Command failed, instead of swallowing error (printed on stdout by docker - # it seems) by writing it to file, echo it - echo "$output" - #return $status - fi - - -} - -function read_config_entry { - local KIND=$1 - local NAME=$2 - local DC=${3:-primary} - get_consul_hostname $DC - docker_consul_exec "$DC" bash -c "consul config read -kind $KIND -name $NAME -http-addr=\"$CONSUL_HOSTNAME:8500\"" -} - -function wait_for_namespace { - local NS="${1}" - local DC=${2:-primary} - get_consul_hostname $DC - retry_default docker_consul_exec "$DC" bash -c "curl -sLf http://${CONSUL_HOSTNAME}:8500/v1/namespace/${NS} >/dev/null" -} - -function wait_for_config_entry { - retry_default read_config_entry "$@" -} - -function assert_config_entry_status { - local TYPE="$1" - local STATUS="$2" - local REASON="$3" - local DC="$4" - local KIND="$5" - local NAME="$6" - local NS=${7:-} - local AP=${8:-} - local PEER=${9:-} - - status=$(curl -s -f "consul-${DC}-client:8500/v1/config/${KIND}/${NAME}?passing&ns=${NS}&partition=${AP}&peer=${PEER}" | jq ".Status.Conditions[] | select(.Type == \"$TYPE\" and .Status == \"$STATUS\" and .Reason == \"$REASON\")") - [ -n "$status" ] -} - -function delete_config_entry { - local KIND=$1 - local NAME=$2 - get_consul_hostname primary - retry_default curl -sL -XDELETE "http://${CONSUL_HOSTNAME}:8500/v1/config/${KIND}/${NAME}" -} - -function register_services { - local DC=${1:-primary} - wait_for_leader "$DC" - docker_consul_exec ${DC} bash -c "consul services register workdir/${DC}/register/service_*.hcl" -} - -# wait_for_leader waits until a leader is elected. -# Its first argument must be the datacenter name. -function wait_for_leader { - get_consul_hostname primary - retry_default docker_consul_exec "$1" bash -c "[[ $(curl --fail -sS http://${CONSUL_HOSTNAME}:8500/v1/status/leader) ]]" -} - -function setup_upsert_l4_intention { - local SOURCE=$1 - local DESTINATION=$2 - local ACTION=$3 - get_consul_hostname primary - retry_default docker_consul_exec primary bash -c "curl -sL -X PUT -d '{\"Action\": \"${ACTION}\"}' 'http://${CONSUL_HOSTNAME}:8500/v1/connect/intentions/exact?source=${SOURCE}&destination=${DESTINATION}'" -} - -function upsert_l4_intention { - local SOURCE=$1 - local DESTINATION=$2 - local ACTION=$3 - get_consul_hostname primary - retry_default curl -sL -XPUT "http://${CONSUL_HOSTNAME}:8500/v1/connect/intentions/exact?source=${SOURCE}&destination=${DESTINATION}" \ - -d"{\"Action\": \"${ACTION}\"}" >/dev/null -} - -function get_ca_root { - get_consul_hostname primary - curl -s -f "http://${CONSUL_HOSTNAME}:8500/v1/connect/ca/roots" | jq -r ".Roots[0].RootCert" -} - -function wait_for_agent_service_register { - local SERVICE_ID=$1 - local DC=${2:-primary} - get_consul_hostname $DC - retry_default docker_consul_exec "$DC" bash -c "curl -sLf 'http://${CONSUL_HOSTNAME}:8500/v1/agent/service/${SERVICE_ID}' >/dev/null" -} - -function set_ttl_check_state { - local CHECK_ID=$1 - local CHECK_STATE=$2 - local DC=${3:-primary} - get_consul_hostname $DC - - case "$CHECK_STATE" in - pass) ;; - - warn) ;; - - fail) ;; - - *) - echo "invalid ttl check state '${CHECK_STATE}'" >&2 - return 1 - ;; - esac - - retry_default docker_consul_exec "$DC" bash -c "curl -sL -XPUT 'http://${CONSUL_HOSTNAME}:8500/v1/agent/check/warn/${CHECK_ID}' >/dev/null" -} - -function get_upstream_fortio_name { - local HOST=$1 - local PORT=$2 - local PREFIX=$3 - local DEBUG_HEADER_VALUE="${4:-""}" - local extra_args - if [[ -n "${DEBUG_HEADER_VALUE}" ]]; then - extra_args="-H x-test-debug:${DEBUG_HEADER_VALUE}" - fi - # split proto if https:// is at the front of the host since the --resolve - # string needs just a bare host. - local PROTO="" - local CA_FILE="" - if [ "${HOST:0:8}" = "https://" ]; then - HOST="${HOST:8}" - PROTO="https://" - # Fix in the CA_FILE parameter: for Windows environments, the root path starts with "/c" - extra_args="${extra_args} --cacert /c/workdir/test-sds-server/certs/ca-root.crt" - fi - # We use --resolve instead of setting a Host header since we need the right - # name to be sent for SNI in some cases too. - run retry_default curl --ssl-revoke-best-effort -v -s -f --resolve "${HOST}:${PORT}:127.0.0.1" $extra_args \ - "${PROTO}${HOST}:${PORT}${PREFIX}/debug?env=dump" - - # Useful Debugging but breaks the expectation that the value output is just - # the grep output when things don't fail - if [ "$status" != 0 ]; then - echo "GOT FORTIO OUTPUT: $output" - fi - [ "$status" == 0 ] - echo "$output" | grep -E "^FORTIO_NAME=" -} - -function get_upstream_endpoint_port { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local PORT_VALUE=$3 - run curl -s -f "http://${HOSTPORT}/clusters?format=json" - [ "$status" -eq 0 ] - echo "$output" | jq --raw-output " -.cluster_statuses[] -| select(.name|startswith(\"${CLUSTER_NAME}\")) -| [.host_statuses[].address.socket_address.port_value] -| [select(.[] == ${PORT_VALUE})] -| length" -} - -function assert_upstream_has_endpoint_port_once { - local HOSTPORT=$1 - local CLUSTER_NAME=$2 - local PORT_VALUE=$3 - - GOT_COUNT=$(get_upstream_endpoint_port $HOSTPORT $CLUSTER_NAME $PORT_VALUE) - - [ "$GOT_COUNT" -eq 1 ] -} - -function assert_expected_fortio_name { - local EXPECT_NAME=$1 - local HOST=${2:-"localhost"} - local PORT=${3:-5000} - local URL_PREFIX=${4:-""} - local DEBUG_HEADER_VALUE="${5:-""}" - - run get_upstream_fortio_name ${HOST} ${PORT} "${URL_PREFIX}" "${DEBUG_HEADER_VALUE}" - - echo "GOT: $output" - - [ "$status" == 0 ] - [ "$output" == "FORTIO_NAME=${EXPECT_NAME}" ] -} - -function assert_expected_fortio_name_pattern { - local EXPECT_NAME_PATTERN=$1 - local HOST=${2:-"localhost"} - local PORT=${3:-5000} - local URL_PREFIX=${4:-""} - local DEBUG_HEADER_VALUE="${5:-""}" - - GOT=$(get_upstream_fortio_name ${HOST} ${PORT} "${URL_PREFIX}" "${DEBUG_HEADER_VALUE}") - - if [[ "$GOT" =~ $EXPECT_NAME_PATTERN ]]; then - : - else - echo "expected name pattern: $EXPECT_NAME_PATTERN, actual name: $GOT" 1>&2 - return 1 - fi -} - -function get_upstream_fortio_host_header { - local HOST=$1 - local PORT=$2 - local PREFIX=$3 - local DEBUG_HEADER_VALUE="${4:-""}" - local extra_args - if [[ -n "${DEBUG_HEADER_VALUE}" ]]; then - extra_args="-H x-test-debug:${DEBUG_HEADER_VALUE}" - fi - run retry_default curl -v -s -f -H"Host: ${HOST}" $extra_args \ - "localhost:${PORT}${PREFIX}/debug" - [ "$status" == 0 ] - echo "$output" | grep -E "^Host: " -} - -function assert_expected_fortio_host_header { - local EXPECT_HOST=$1 - local HOST=${2:-"localhost"} - local PORT=${3:-5000} - local URL_PREFIX=${4:-""} - local DEBUG_HEADER_VALUE="${5:-""}" - - GOT=$(get_upstream_fortio_host_header ${HOST} ${PORT} "${URL_PREFIX}" "${DEBUG_HEADER_VALUE}") - - if [ "$GOT" != "Host: ${EXPECT_HOST}" ]; then - echo "expected Host header: $EXPECT_HOST, actual Host header: $GOT" 1>&2 - return 1 - fi -} - -function create_peering { - local GENERATE_PEER=$1 - local ESTABLISH_PEER=$2 - run curl -m 5 -sL -XPOST "http://consul-${GENERATE_PEER}-client:8500/v1/peering/token" -d"{ \"PeerName\" : \"${GENERATE_PEER}-to-${ESTABLISH_PEER}\" }" - # echo "$output" >&3 - [ "$status" == 0 ] - - local token - token="$(echo "$output" | jq -r .PeeringToken)" - [ -n "$token" ] - - run curl -m 5 -sLv -XPOST "http://consul-${ESTABLISH_PEER}-client:8500/v1/peering/establish" -d"{ \"PeerName\" : \"${ESTABLISH_PEER}-to-${GENERATE_PEER}\", \"PeeringToken\" : \"${token}\" }" - # echo "$output" >&3 - [ "$status" == 0 ] -} - -function assert_service_has_imported { - local DC=${1:-primary} - local SERVICE_NAME=$2 - local PEER_NAME=$3 - - run curl -s -f "http://consul-${DC}-client:8500/v1/peering/${PEER_NAME}" - [ "$status" == 0 ] - - echo "$output" | jq --raw-output '.StreamStatus.ImportedServices' | grep -e "${SERVICE_NAME}" - if [ $? -ne 0 ]; then - echo "Error finding service: ${SERVICE_NAME}" - return 1 - fi -} - -function get_lambda_envoy_http_filter { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - run retry_default curl -s -f $HOSTPORT/config_dump - [ "$status" -eq 0 ] - # get the full http filter object so the individual fields can be validated. - echo "$output" | jq --raw-output ".configs[2].dynamic_listeners[] | .active_state.listener.filter_chains[].filters[] | select(.name == \"envoy.filters.network.http_connection_manager\") | .typed_config.http_filters[] | select(.name == \"envoy.filters.http.aws_lambda\") | .typed_config" -} - -function register_lambdas { - local DC=${1:-primary} - # register lambdas to the catalog - for f in $(find workdir/${DC}/register -type f -name 'lambda_*.json'); do - retry_default curl -sL -XPUT -d @${f} "http://localhost:8500/v1/catalog/register" >/dev/null && \ - echo "Registered Lambda: $(jq -r .Service.Service $f)" - done - # write service-defaults config entries for lambdas - for f in $(find workdir/${DC}/register -type f -name 'service_defaults_*.json'); do - varsub ${f} AWS_LAMBDA_REGION AWS_LAMBDA_ARN - retry_default curl -sL -XPUT -d @${f} "http://localhost:8500/v1/config" >/dev/null && \ - echo "Wrote config: $(jq -r '.Kind + " / " + .Name' $f)" - done -} - -function assert_lambda_envoy_dynamic_cluster_exists { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - - local BODY=$(get_envoy_dynamic_cluster_once $HOSTPORT $NAME_PREFIX) - [ -n "$BODY" ] - - [ "$(echo $BODY | jq -r '.cluster.transport_socket.typed_config.sni')" == '*.amazonaws.com' ] -} - -function assert_lambda_envoy_dynamic_http_filter_exists { - local HOSTPORT=$1 - local NAME_PREFIX=$2 - local ARN=$3 - - local FILTER=$(get_lambda_envoy_http_filter $HOSTPORT $NAME_PREFIX) - [ -n "$FILTER" ] - - [ "$(echo $FILTER | jq -r '.arn')" == "$ARN" ] -} - -function varsub { - local file=$1 - shift - for v in "$@"; do - sed -i "s/\${$v}/${!v}/g" $file - done -} - -function get_url_header { - local URL=$1 - local HEADER=$2 - run curl -s -f -X GET -I "${URL}" - [ "$status" == 0 ] - RESP=$(echo "$output" | tr -d '\r') - RESP=$(echo "$RESP" | grep -E "^${HEADER}: ") - RESP=$(echo "$RESP" | sed "s/^${HEADER}: //g") - echo "$RESP" -} - -function assert_url_header { - local URL=$1 - local HEADER=$2 - local VALUE=$3 - run get_url_header "$URL" "$HEADER" - [ "$status" == 0 ] - [ "$VALUE" = "$output" ] -} - -# assert_upstream_message asserts both the returned code -# and message from upstream service -function assert_upstream_message { - local HOSTPORT=$1 - run curl -s -d hello localhost:$HOSTPORT - - if [ "$status" -ne 0 ]; then - echo "Command failed" - return 1 - fi - - if (echo $output | grep 'hello'); then - return 0 - fi - - echo "expected message not found in $output" - return 1 -} \ No newline at end of file diff --git a/test/integration/connect/envoy/main_test.go b/test/integration/connect/envoy/main_test.go index 52f3b74187e2a..b81a72e37ddcb 100644 --- a/test/integration/connect/envoy/main_test.go +++ b/test/integration/connect/envoy/main_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build integration // +build integration @@ -7,9 +7,6 @@ package envoy import ( - "flag" - "io/ioutil" - "log" "os" "os/exec" "sort" @@ -19,23 +16,11 @@ import ( "github.com/stretchr/testify/require" ) -var ( - flagWin = flag.Bool("win", false, "Execute tests on windows") -) - func TestEnvoy(t *testing.T) { - flag.Parse() - - if *flagWin == true { - dir := "../../../" - check_dir_files(dir) - } - testcases, err := discoverCases() require.NoError(t, err) runCmd(t, "suite_setup") - defer runCmd(t, "suite_teardown") for _, tc := range testcases { @@ -55,7 +40,7 @@ func TestEnvoy(t *testing.T) { } } -func runCmdLinux(t *testing.T, c string, env ...string) { +func runCmd(t *testing.T, c string, env ...string) { t.Helper() cmd := exec.Command("./run-tests.sh", c) @@ -67,35 +52,7 @@ func runCmdLinux(t *testing.T, c string, env ...string) { } } -func runCmdWindows(t *testing.T, c string, env ...string) { - t.Helper() - - param_5 := "false" - if env != nil { - param_5 = strings.Join(env, " ") - } - - cmd := exec.Command("cmd", "/C", "bash run-tests.windows.sh", c, param_5) - cmd.Env = append(os.Environ(), env...) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - t.Fatalf("command failed: %v", err) - } -} - -func runCmd(t *testing.T, c string, env ...string) { - t.Helper() - - if *flagWin == true { - runCmdWindows(t, c, env...) - - } else { - runCmdLinux(t, c, env...) - } -} - -// Discover the cases so we pick up both ce and ent copies. +// Discover the cases so we pick up both oss and ent copies. func discoverCases() ([]string, error) { cwd, err := os.Getwd() if err != nil { @@ -117,57 +74,3 @@ func discoverCases() ([]string, error) { sort.Strings(out) return out, nil } - -// CRLF convert functions -// Recursively iterates through the directory passed by parameter looking for the sh and bash files. -// Upon finding them, it calls crlf_file_check. -func check_dir_files(path string) { - files, err := ioutil.ReadDir(path) - if err != nil { - log.Fatal(err) - } - for _, fil := range files { - - v := strings.Split(fil.Name(), ".") - file_extension := v[len(v)-1] - - file_path := path + "/" + fil.Name() - - if fil.IsDir() == true { - check_dir_files(file_path) - } - - if file_extension == "sh" || file_extension == "bash" { - crlf_file_check(file_path) - } - } -} - -// Check if a file contains CRLF line endings if so call crlf_normalize -func crlf_file_check(file_name string) { - - file, err := ioutil.ReadFile(file_name) - text := string(file) - - if edit := crlf_verify(text); edit != -1 { - crlf_normalize(file_name, text) - } - - if err != nil { - log.Fatal(err) - } -} - -// Checks for the existence of CRLF line endings. -func crlf_verify(text string) int { - position := strings.Index(text, "\r\n") - return position -} - -// Replace CRLF line endings with LF. -func crlf_normalize(filename, text string) { - text = strings.Replace(text, "\r\n", "\n", -1) - data := []byte(text) - - ioutil.WriteFile(filename, data, 0644) -} diff --git a/test/integration/connect/envoy/run-tests.sh b/test/integration/connect/envoy/run-tests.sh index 99c918a6ee593..ba0d6fa810902 100755 --- a/test/integration/connect/envoy/run-tests.sh +++ b/test/integration/connect/envoy/run-tests.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/run-tests.windows.sh b/test/integration/connect/envoy/run-tests.windows.sh deleted file mode 100644 index b8ba4a1ee64dd..0000000000000 --- a/test/integration/connect/envoy/run-tests.windows.sh +++ /dev/null @@ -1,911 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - - -if [ $2 != "false" ] -then - export $2 -fi - -readonly self_name="$0" - -readonly HASHICORP_DOCKER_PROXY="docker.mirror.hashicorp.services" - -readonly SINGLE_CONTAINER_BASE_NAME=envoy_consul - -# DEBUG=1 enables set -x for this script so echos every command run -DEBUG=${DEBUG:-} - -XDS_TARGET=${XDS_TARGET:-server} - -# ENVOY_VERSION to run each test against -ENVOY_VERSION=${ENVOY_VERSION:-"1.23.1"} -export ENVOY_VERSION - -export DOCKER_BUILDKIT=0 - -if [ ! -z "$DEBUG" ] ; then - set -x -fi - -source helpers.windows.bash - -function command_error { - echo "ERR: command exited with status $1" 1>&2 - echo " command: $2" 1>&2 - echo " line: $3" 1>&2 - echo " function: $4" 1>&2 - echo " called at: $5" 1>&2 - # printf '%s\n' "${FUNCNAME[@]}" - # printf '%s\n' "${BASH_SOURCE[@]}" - # printf '%s\n' "${BASH_LINENO[@]}" -} - -trap 'command_error $? "${BASH_COMMAND}" "${LINENO}" "${FUNCNAME[0]:-main}" "${BASH_SOURCE[0]}:${BASH_LINENO[0]}"' ERR - -readonly WORKDIR_SNIPPET="-v envoy_workdir:C:\workdir" - -function network_snippet { - local DC="$1" - echo "--net=envoy-tests" -} - -function aws_snippet { - LAMBDA_TESTS_ENABLED=${LAMBDA_TESTS_ENABLED:-false} - if [ "$LAMBDA_TESTS_ENABLED" != false ]; then - local snippet="" - - # The Lambda integration cases assume that a Lambda function exists in $AWS_REGION with an ARN of $AWS_LAMBDA_ARN. - # The AWS credentials must have permission to invoke the Lambda function. - [ -n "$(set | grep '^AWS_ACCESS_KEY_ID=')" ] && snippet="${snippet} -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" - [ -n "$(set | grep '^AWS_SECRET_ACCESS_KEY=')" ] && snippet="${snippet} -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" - [ -n "$(set | grep '^AWS_SESSION_TOKEN=')" ] && snippet="${snippet} -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" - [ -n "$(set | grep '^AWS_LAMBDA_REGION=')" ] && snippet="${snippet} -e AWS_LAMBDA_REGION=$AWS_LAMBDA_REGION" - [ -n "$(set | grep '^AWS_LAMBDA_ARN=')" ] && snippet="${snippet} -e AWS_LAMBDA_ARN=$AWS_LAMBDA_ARN" - - echo "$snippet" - fi -} - -function init_workdir { - local CLUSTER="$1" - - if test -z "$CLUSTER" - then - CLUSTER=primary - fi - - # Note, we use explicit set of dirs so we don't delete .gitignore. Also, - # don't wipe logs between runs as they are already split and we need them to - # upload as artifacts later. - rm -rf workdir/${CLUSTER} - rm -rf workdir/logs - mkdir -p workdir/${CLUSTER}/{consul,consul-server,register,envoy,bats,statsd,data} - - # Reload consul config from defaults - cp consul-base-cfg/*.hcl workdir/${CLUSTER}/consul/ - - # Add any overrides if there are any (no op if not) - find ${CASE_DIR} -maxdepth 1 -name '*.hcl' -type f -exec cp -f {} workdir/${CLUSTER}/consul \; - - # Copy all the test files - find ${CASE_DIR} -maxdepth 1 -name '*.bats' -type f -exec cp -f {} workdir/${CLUSTER}/bats \; - # Copy CLUSTER specific bats - cp helpers.windows.bash workdir/${CLUSTER}/bats/helpers.bash - - # Add any CLUSTER overrides - if test -d "${CASE_DIR}/${CLUSTER}" - then - find ${CASE_DIR}/${CLUSTER} -type f -name '*.hcl' -exec cp -f {} workdir/${CLUSTER}/consul \; - find ${CASE_DIR}/${CLUSTER} -type f -name '*.bats' -exec cp -f {} workdir/${CLUSTER}/bats \; - fi - - # move all of the registration files OUT of the consul config dir now - find workdir/${CLUSTER}/consul -type f -name 'service_*.hcl' -exec mv -f {} workdir/${CLUSTER}/register \; - - # move the server.hcl out of the consul dir so that it doesn't get picked up - # by the client agent (if we're running with XDS_TARGET=client). - if test -f "workdir/${CLUSTER}/consul/server.hcl" - then - mv workdir/${CLUSTER}/consul/server.hcl workdir/${CLUSTER}/consul-server/server.hcl - fi - - # copy the ca-certs for SDS so we can verify the right ones are served - mkdir -p workdir/test-sds-server/certs - cp test-sds-server/certs/ca-root.crt workdir/test-sds-server/certs/ca-root.crt - - if test -d "${CASE_DIR}/data" - then - cp -r ${CASE_DIR}/data/* workdir/${CLUSTER}/data - fi - - return 0 -} - -function docker_kill_rm { - local name - local todo=() - for name in "$@"; do - name="envoy_${name}_1" - if docker.exe container inspect $name &>/dev/null; then - if [[ "$name" == envoy_tcpdump-* ]]; then - echo -n "Gracefully stopping $name..." - docker.exe stop $name &> /dev/null - echo "done" - fi - todo+=($name) - fi - done - - if [[ ${#todo[@]} -eq 0 ]]; then - return 0 - fi - - echo -n "Killing and removing: ${todo[@]}..." - docker.exe rm -v -f ${todo[@]} &> /dev/null - echo "done" -} - -function start_consul { - local DC=${1:-primary} - - # 8500/8502 are for consul - # 9411 is for zipkin which shares the network with consul - # 16686 is for jaeger ui which also shares the network with consul - ports=( - '-p=8500:8500' - '-p=8502:8502' - '-p=9411:9411' - '-p=16686:16686' - ) - case "$DC" in - secondary) - ports=( - '-p=9500:8500' - '-p=9502:8502' - ) - ;; - alpha) - ports=( - '-p=9510:8500' - '-p=9512:8502' - ) - ;; - esac - - license="${CONSUL_LICENSE:-}" - # load the consul license so we can pass it into the consul - # containers as an env var in the case that this is a consul - # enterprise test - if test -z "$license" -a -n "${CONSUL_LICENSE_PATH:-}" - then - license=$(cat $CONSUL_LICENSE_PATH) - fi - - # We currently run these integration tests in two modes: one in which Envoy's - # xDS sessions are served directly by a Consul server, and another in which it - # goes through a client agent. - # - # This is necessary because servers and clients source configuration data in - # different ways (client agents use an RPC-backed cache and servers use their - # own local data) and we want to catch regressions in both. - # - # In the future we should also expand these tests to register services to the - # catalog directly (agentless) rather than relying on the server also being - # an agent. - # - # When XDS_TARGET=client we'll start a Consul server with its gRPC port - # disabled (but only if REQUIRE_PEERS is not set), and a client agent with - # its gRPC port enabled. - # - # When XDS_TARGET=server (or anything else) we'll run a single Consul server - # with its gRPC port enabled. - # - # In either case, the hostname `consul-${DC}-server` should be used as a - # server address (e.g. for WAN joining) and `consul-${DC}-client` should be - # used as a client address (e.g. for interacting with the HTTP API). - # - # Both hostnames work in both modes because we set network aliases on the - # containers such that both hostnames will resolve to the same container when - # XDS_TARGET=server. - # - # We also join containers to the network `container:consul-${DC}_1` in many - # places (see: network_snippet) so that we can curl localhost etc. In both - # modes, you can assume that this name refers to the client's container. - # - # Any .hcl files in the case/cluster directory will be given to both clients - # and servers (via the -config-dir flag) *except for* server.hcl which will - # only be applied to the server (and service registrations which will be made - # against the client). - if [[ "$XDS_TARGET" == "client" ]] - then - docker_kill_rm consul-${DC}-server - docker_kill_rm consul-${DC} - - server_grpc_port="-1" - if is_set $REQUIRE_PEERS; then - server_grpc_port="8502" - fi - - docker.exe run -d --name envoy_consul-${DC}-server_1 \ - --net=envoy-tests \ - $WORKDIR_SNIPPET \ - --hostname "consul-${DC}-server" \ - --network-alias "consul-${DC}-server" \ - -e "CONSUL_LICENSE=$license" \ - windows/consul:local \ - agent -dev -datacenter "${DC}" \ - -config-dir "C:\\workdir\\${DC}\\consul" \ - -config-dir "C:\\workdir\\${DC}\\consul-server" \ - -grpc-port $server_grpc_port \ - -client "0.0.0.0" \ - -bind "0.0.0.0" >/dev/null - - docker.exe run -d --name envoy_consul-${DC}_1 \ - --net=envoy-tests \ - $WORKDIR_SNIPPET \ - --hostname "consul-${DC}-client" \ - --network-alias "consul-${DC}-client" \ - -e "CONSUL_LICENSE=$license" \ - ${ports[@]} \ - windows/consul:local \ - agent -datacenter "${DC}" \ - -config-dir "C:\\workdir\\${DC}\\consul" \ - -data-dir "/tmp/consul" \ - -client "0.0.0.0" \ - -grpc-port 8502 \ - -datacenter "${DC}" \ - -retry-join "consul-${DC}-server" >/dev/null - else - docker_kill_rm consul-${DC} - - docker.exe run -d --name envoy_consul-${DC}_1 \ - --net=envoy-tests \ - $WORKDIR_SNIPPET \ - --memory 4096m \ - --cpus 2 \ - --hostname "consul-${DC}" \ - --network-alias "consul-${DC}-client" \ - --network-alias "consul-${DC}-server" \ - -e "CONSUL_LICENSE=$license" \ - ${ports[@]} \ - windows/consul:local \ - agent -dev -datacenter "${DC}" \ - -config-dir "C:\\workdir\\${DC}\\consul" \ - -config-dir "C:\\workdir\\${DC}\\consul-server" \ - -client "0.0.0.0" >/dev/null - fi -} - -function start_partitioned_client { - local PARTITION=${1:-ap1} - - # Start consul now as setup script needs it up - docker_kill_rm consul-${PARTITION} - - license="${CONSUL_LICENSE:-}" - # load the consul license so we can pass it into the consul - # containers as an env var in the case that this is a consul - # enterprise test - if test -z "$license" -a -n "${CONSUL_LICENSE_PATH:-}" - then - license=$(cat $CONSUL_LICENSE_PATH) - fi - - sh -c "rm -rf /workdir/${PARTITION}/data" - - # Run consul and expose some ports to the host to make debugging locally a - # bit easier. - # - docker.exe run -d --name envoy_consul-${PARTITION}_1 \ - --net=envoy-tests \ - $WORKDIR_SNIPPET \ - --hostname "consul-${PARTITION}-client" \ - --network-alias "consul-${PARTITION}-client" \ - -e "CONSUL_LICENSE=$license" \ - windows/consul:local agent \ - -datacenter "primary" \ - -retry-join "consul-primary-server" \ - -grpc-port 8502 \ - -data-dir "/tmp/consul" \ - -config-dir "C:\\workdir\\${PARTITION}/consul" \ - -client "0.0.0.0" >/dev/null -} - -function pre_service_setup { - local CLUSTER=${1:-primary} - - # Run test case setup (e.g. generating Envoy bootstrap, starting containers) - if [ -f "${CASE_DIR}/${CLUSTER}/setup.sh" ] - then - source ${CASE_DIR}/${CLUSTER}/setup.sh - else - source ${CASE_DIR}/setup.sh - fi -} - -function start_services { - # Start containers required - if [ ! -z "$REQUIRED_SERVICES" ] ; then - docker_kill_rm $REQUIRED_SERVICES - run_containers $REQUIRED_SERVICES - fi - - return 0 -} - -function verify { - local CLUSTER="$1" - if test -z "$CLUSTER"; then - CLUSTER="primary" - fi - - # Execute tests - res=0 - - # Nuke any previous case's verify container. - docker_kill_rm verify-${CLUSTER} - - echo "Running ${CLUSTER} verification step for ${CASE_DIR}..." - - # need to tell the PID 1 inside of the container that it won't be actual PID - # 1 because we're using --pid=host so we use TINI_SUBREAPER - if docker.exe exec -i ${SINGLE_CONTAINER_BASE_NAME}-${CLUSTER}_1 bash \ - -c "TINI_SUBREAPER=1 \ - ENVOY_VERSION=${ENVOY_VERSION} \ - XDS_TARGET=${XDS_TARGET} \ - /c/bats/bin/bats \ - --pretty /c/workdir/${CLUSTER}/bats" ; then - echo "✓ PASS" - else - echo "⨯ FAIL" - res=1 - fi - - return $res -} - -function capture_logs { - local LOG_DIR="workdir/logs/${CASE_DIR}/${ENVOY_VERSION}" - - init_vars - - echo "Capturing Logs" - mkdir -p "$LOG_DIR" - - services="$REQUIRED_SERVICES consul-primary" - if [[ "$XDS_TARGET" == "client" ]] - then - services="$services consul-primary-server" - fi - - if is_set $REQUIRE_SECONDARY - then - services="$services consul-secondary" - - if [[ "$XDS_TARGET" == "client" ]] - then - services="$services consul-secondary-server" - fi - fi - - if is_set $REQUIRE_PARTITIONS - then - services="$services consul-ap1" - fi - if is_set $REQUIRE_PEERS - then - services="$services consul-alpha" - - if [[ "$XDS_TARGET" == "client" ]] - then - services="$services consul-alpha-server" - fi - fi - - if [ -f "${CASE_DIR}/capture.sh" ] - then - echo "Executing ${CASE_DIR}/capture.sh" - source ${CASE_DIR}/capture.sh || true - fi - - for cont in $services; do - echo "Capturing log for $cont" - docker.exe logs "envoy_${cont}_1" &> "${LOG_DIR}/${cont}.log" || { - echo "EXIT CODE $?" > "${LOG_DIR}/${cont}.log" - } - done -} - -function stop_services { - # Teardown - docker_kill_rm $REQUIRED_SERVICES - - docker_kill_rm consul-primary consul-primary-server consul-secondary consul-secondary-server consul-ap1 consul-alpha consul-alpha-server -} - -function init_vars { - source "defaults.sh" - if [ -f "${CASE_DIR}/vars.sh" ] ; then - source "${CASE_DIR}/vars.sh" - fi -} - -function global_setup { - if [ -f "${CASE_DIR}/global-setup-windows.sh" ] ; then - source "${CASE_DIR}/global-setup-windows.sh" - fi -} - -function wipe_volumes { - docker.exe exec -w "C:\workdir" envoy_workdir_1 cmd /c "rd /s /q . 2>nul" -} - -# Windows containers does not allow cp command while running. -function stop_and_copy_files { - # Create CMD file to execute within the container - echo "icacls C:\workdir /grant:r Everyone:(OI)(CI)F /T" > copy.cmd - echo "XCOPY C:\workdir_bak C:\workdir /e /h /c /i /y" > copy.cmd - # Stop dummy container to copy local workdir to container's workdir_bak - docker.exe stop envoy_workdir_1 > /dev/null - docker.exe cp workdir/. envoy_workdir_1:/workdir_bak - # Copy CMD file into container - docker.exe cp copy.cmd envoy_workdir_1:/ - # Start dummy container and execute the CMD file - docker.exe start envoy_workdir_1 > /dev/null - docker.exe exec envoy_workdir_1 copy.cmd - # Delete local CMD file after execution - rm copy.cmd -} - -function run_tests { - CASE_DIR="${CASE_DIR?CASE_DIR must be set to the path of the test case}" - CASE_NAME=$( basename $CASE_DIR | cut -c6- ) - export CASE_NAME - export SKIP_CASE="" - - init_vars - - # Initialize the workdir - init_workdir primary - - if is_set $REQUIRE_SECONDARY - then - init_workdir secondary - fi - if is_set $REQUIRE_PARTITIONS - then - init_workdir ap1 - fi - if is_set $REQUIRE_PEERS - then - init_workdir alpha - fi - - global_setup - - # Allow vars.sh to set a reason to skip this test case based on the ENV - if [ "$SKIP_CASE" != "" ] ; then - echo "SKIPPING CASE: $SKIP_CASE" - return 0 - fi - - # Wipe state - wipe_volumes - - # Copying base files to shared volume - stop_and_copy_files - - # Starting Consul primary cluster - start_consul primary - - if is_set $REQUIRE_SECONDARY; then - start_consul secondary - fi - if is_set $REQUIRE_PARTITIONS; then - docker_consul "primary" consul partition create -name ap1 > /dev/null - start_partitioned_client ap1 - fi - if is_set $REQUIRE_PEERS; then - start_consul alpha - fi - - echo "Setting up the primary datacenter" - pre_service_setup primary - - if is_set $REQUIRE_SECONDARY; then - echo "Setting up the secondary datacenter" - pre_service_setup secondary - fi - if is_set $REQUIRE_PARTITIONS; then - echo "Setting up the non-default partition" - pre_service_setup ap1 - fi - if is_set $REQUIRE_PEERS; then - echo "Setting up the alpha peer" - pre_service_setup alpha - fi - - echo "Starting services" - start_services - - # Run the verify container and report on the output - echo "Verifying the primary datacenter" - verify primary - - if is_set $REQUIRE_SECONDARY; then - echo "Verifying the secondary datacenter" - verify secondary - fi - if is_set $REQUIRE_PEERS; then - echo "Verifying the alpha peer" - verify alpha - fi -} - -function test_teardown { - init_vars - - stop_services -} - -function workdir_cleanup { - docker_kill_rm workdir - docker.exe volume rm -f envoy_workdir &>/dev/null || true -} - - -function suite_setup { - # Cleanup from any previous unclean runs. - suite_teardown - - docker.exe network create -d "nat" envoy-tests &>/dev/null - - # Start the volume container - # - # This is a dummy container that we use to create volume and keep it - # accessible while other containers are down. - docker.exe volume create envoy_workdir &>/dev/null - docker.exe run -d --name envoy_workdir_1 \ - $WORKDIR_SNIPPET \ - --user ContainerAdministrator \ - --net=none \ - "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" &>/dev/null - - # pre-build the consul+envoy container - echo "Rebuilding 'windows/consul:local' image with envoy $ENVOY_VERSION..." - retry_default docker.exe build -t windows/consul:local \ - --build-arg ENVOY_VERSION=${ENVOY_VERSION} \ - -f Dockerfile-consul-envoy-windows . - - - local CONSUL_VERSION=$(docker image inspect --format='{{.ContainerConfig.Labels.version}}' \ - windows/consul:local) - echo "Running Tests with Consul=$CONSUL_VERSION - Envoy=$ENVOY_VERSION - XDS_TARGET=$XDS_TARGET" -} - -function suite_teardown { - docker_kill_rm verify-primary verify-secondary verify-alpha - - # this is some hilarious magic - docker_kill_rm $(grep "^function run_container_" $self_name | \ - sed 's/^function run_container_\(.*\) {/\1/g') - - docker_kill_rm consul-primary consul-primary-server consul-secondary consul-secondary-server consul-ap1 consul-alpha consul-alpha-server - - if docker.exe network inspect envoy-tests &>/dev/null ; then - echo -n "Deleting network 'envoy-tests'..." - docker.exe network rm envoy-tests - echo "done" - fi - - workdir_cleanup -} - -function run_containers { - for name in $@ ; do - run_container $name - done -} - -function run_container { - docker_kill_rm "$1" - "run_container_$1" -} - -function common_run_container_service { - local service="$1" - local CLUSTER="$2" - local httpPort="$3" - local grpcPort="$4" - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$CLUSTER"_1 - - docker.exe exec -d $CONTAINER_NAME bash \ - -c "FORTIO_NAME=${service} \ - fortio.exe server \ - -http-port ":$httpPort" \ - -grpc-port ":$grpcPort" \ - -redirect-port disabled" -} - -function run_container_s1 { - common_run_container_service s1 primary 8080 8079 -} - -function run_container_s1-ap1 { - common_run_container_service s1 ap1 8080 8079 -} - -function run_container_s2 { - common_run_container_service s2 primary 8181 8179 -} -function run_container_s2-v1 { - common_run_container_service s2-v1 primary 8182 8178 -} -function run_container_s2-v2 { - common_run_container_service s2-v2 primary 8183 8177 -} - -function run_container_s3 { - common_run_container_service s3 primary 8282 8279 -} -function run_container_s3-v1 { - common_run_container_service s3-v1 primary 8283 8278 -} -function run_container_s3-v2 { - common_run_container_service s3-v2 primary 8284 8277 -} -function run_container_s3-alt { - common_run_container_service s3-alt primary 8286 8280 -} - -function run_container_s4 { - common_run_container_service s4 primary 8382 8281 -} - -function run_container_s1-secondary { - common_run_container_service s1-secondary secondary 8080 8079 -} - -function run_container_s2-secondary { - common_run_container_service s2-secondary secondary 8181 8179 -} - -function run_container_s2-ap1 { - common_run_container_service s2 ap1 8480 8479 -} - -function run_container_s3-ap1 { - common_run_container_service s3 ap1 8580 8579 -} - -function run_container_s1-alpha { - common_run_container_service s1-alpha alpha 8080 8079 -} - -function run_container_s2-alpha { - common_run_container_service s2-alpha alpha 8181 8179 -} - -function run_container_s3-alpha { - common_run_container_service s3-alpha alpha 8282 8279 -} - -function common_run_container_sidecar_proxy { - local service="$1" - local CLUSTER="$2" - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$CLUSTER"_1 - - # Hot restart breaks since both envoys seem to interact with each other - # despite separate containers that don't share IPC namespace. Not quite - # sure how this happens but may be due to unix socket being in some shared - # location? - docker.exe exec -d $CONTAINER_NAME bash \ - -c "envoy.exe \ - -c /c/workdir/${CLUSTER}/envoy/${service}-bootstrap.json \ - -l trace \ - --disable-hot-restart \ - --drain-time-s 1 >/dev/null" -} - -function run_container_s1-sidecar-proxy { - common_run_container_sidecar_proxy s1 primary -} - -function run_container_s1-ap1-sidecar-proxy { - common_run_container_sidecar_proxy s1 ap1 -} - -function run_container_s1-sidecar-proxy-consul-exec { - local CLUSTER="primary" - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$CLUSTER"_1 - local ADMIN_HOST="127.0.0.1" - local ADMIN_PORT="19000" - - docker.exe exec -d $CONTAINER_NAME bash \ - -c "consul connect envoy -sidecar-for s1 \ - -http-addr $CONTAINER_NAME:8500 \ - -grpc-addr $CONTAINER_NAME:8502 \ - -admin-bind $ADMIN_HOST:$ADMIN_PORT \ - -envoy-version ${ENVOY_VERSION} \ - -- \ - -l trace >/dev/null" -} - -function run_container_s2-sidecar-proxy { - common_run_container_sidecar_proxy s2 primary -} -function run_container_s2-v1-sidecar-proxy { - common_run_container_sidecar_proxy s2-v1 primary -} -function run_container_s2-v2-sidecar-proxy { - common_run_container_sidecar_proxy s2-v2 primary -} - -function run_container_s3-sidecar-proxy { - common_run_container_sidecar_proxy s3 primary -} -function run_container_s3-v1-sidecar-proxy { - common_run_container_sidecar_proxy s3-v1 primary -} -function run_container_s3-v2-sidecar-proxy { - common_run_container_sidecar_proxy s3-v2 primary -} - -function run_container_s3-alt-sidecar-proxy { - common_run_container_sidecar_proxy s3-alt primary -} - -function run_container_s1-sidecar-proxy-secondary { - common_run_container_sidecar_proxy s1 secondary -} -function run_container_s2-sidecar-proxy-secondary { - common_run_container_sidecar_proxy s2 secondary -} - -function run_container_s2-ap1-sidecar-proxy { - common_run_container_sidecar_proxy s2 ap1 -} - -function run_container_s3-ap1-sidecar-proxy { - common_run_container_sidecar_proxy s3 ap1 -} - -function run_container_s1-sidecar-proxy-alpha { - common_run_container_sidecar_proxy s1 alpha -} -function run_container_s2-sidecar-proxy-alpha { - common_run_container_sidecar_proxy s2 alpha -} -function run_container_s3-sidecar-proxy-alpha { - common_run_container_sidecar_proxy s3 alpha -} - -function common_run_container_gateway { - local name="$1" - local DC="$2" - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$DC"_1 - - # Hot restart breaks since both envoys seem to interact with each other - # despite separate containers that don't share IPC namespace. Not quite - # sure how this happens but may be due to unix socket being in some shared - # location? - docker.exe exec -d $CONTAINER_NAME bash \ - -c "envoy.exe \ - -c /c/workdir/${DC}/envoy/${name}-bootstrap.json \ - -l trace \ - --disable-hot-restart \ - --drain-time-s 1 >/dev/null" -} - -function run_container_gateway-primary { - common_run_container_gateway mesh-gateway primary -} -function run_container_gateway-secondary { - common_run_container_gateway mesh-gateway secondary -} -function run_container_gateway-alpha { - common_run_container_gateway mesh-gateway alpha -} - -function run_container_ingress-gateway-primary { - common_run_container_gateway ingress-gateway primary -} - -function run_container_api-gateway-primary { - common_run_container_gateway api-gateway primary -} - -function run_container_terminating-gateway-primary { - common_run_container_gateway terminating-gateway primary -} - -function run_container_fake-statsd { - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"primary"_1 - # This magic SYSTEM incantation is needed since Envoy doesn't add newlines and so - # we need each packet to be passed to echo to add a new line before - # appending. But it does not work on Windows. - docker.exe exec -d $CONTAINER_NAME bash -c "socat -u UDP-RECVFROM:8125,fork,reuseaddr OPEN:/workdir/primary/statsd/statsd.log,create,append" -} - -function run_container_zipkin { - docker.exe run -d --name $(container_name) \ - $WORKDIR_SNIPPET \ - $(network_snippet primary) \ - "${HASHICORP_DOCKER_PROXY}/windows/openzipkin" -} - -function run_container_jaeger { - echo "Starting Jaeger service..." - - local DC=${1:-primary} - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$DC"_1 - - docker.exe exec -d $CONTAINER_NAME bash -c "jaeger-all-in-one.exe \ - --collector.zipkin.http-port=9411" -} - -function run_container_test-sds-server { - echo "Starting test-sds-server" - - local DC=${1:-primary} - local CONTAINER_NAME="$SINGLE_CONTAINER_BASE_NAME"-"$DC"_1 - - docker.exe exec -d $CONTAINER_NAME bash -c "cd /c/test-sds-server && - ./test-sds-server.exe" -} - -function container_name { - echo "envoy_${FUNCNAME[1]/#run_container_/}_1" -} -function container_name_prev { - echo "envoy_${FUNCNAME[2]/#run_container_/}_1" -} - -# This is a debugging tool. Run via 'bash run-tests.sh debug_dump_volumes' on Powershell -function debug_dump_volumes { - local LINUX_PATH=$(pwd) - local WIN_PATH=$( echo "$LINUX_PATH" | sed 's/^\/mnt//' | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/' ) - docker.exe run -it \ - $WORKDIR_SNIPPET \ - -v "$WIN_PATH":"C:\\cwd" \ - --net=none \ - "${HASHICORP_DOCKER_PROXY}/windows/nanoserver:1809" \ - cmd /c "xcopy \workdir \cwd\workdir /E /H /C /I /Y" -} - -function run_container_tcpdump-primary { - # To use add "tcpdump-primary" to REQUIRED_SERVICES - common_run_container_tcpdump primary -} -function run_container_tcpdump-secondary { - # To use add "tcpdump-secondary" to REQUIRED_SERVICES - common_run_container_tcpdump secondary -} -function run_container_tcpdump-alpha { - # To use add "tcpdump-alpha" to REQUIRED_SERVICES - common_run_container_tcpdump alpha -} - -function common_run_container_tcpdump { - local DC="$1" - - # we cant run this in circle but its only here to temporarily enable. - -# docker.exe build --rm=false -t envoy-tcpdump -f Dockerfile-tcpdump-windows . - - docker.exe run -d --name $(container_name_prev) \ - $(network_snippet $DC) \ - envoy-tcpdump \ - -v -i any \ - -w "/data/${DC}.pcap" -} - -case "${1-}" in - "") - echo "command required" - exit 1 ;; - *) - "$@" ;; -esac diff --git a/test/integration/connect/envoy/test-sds-server/Dockerfile b/test/integration/connect/envoy/test-sds-server/Dockerfile index 73f72667b95a0..5ea87089c7047 100644 --- a/test/integration/connect/envoy/test-sds-server/Dockerfile +++ b/test/integration/connect/envoy/test-sds-server/Dockerfile @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 FROM golang:latest diff --git a/test/integration/connect/envoy/test-sds-server/certs/gen-certs.sh b/test/integration/connect/envoy/test-sds-server/certs/gen-certs.sh index 2c416ad146db6..bf46e5da0abf5 100755 --- a/test/integration/connect/envoy/test-sds-server/certs/gen-certs.sh +++ b/test/integration/connect/envoy/test-sds-server/certs/gen-certs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 set -eEuo pipefail diff --git a/test/integration/connect/envoy/test-sds-server/sds.go b/test/integration/connect/envoy/test-sds-server/sds.go index 6223d894449d2..6c1ed208cd521 100644 --- a/test/integration/connect/envoy/test-sds-server/sds.go +++ b/test/integration/connect/envoy/test-sds-server/sds.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/test/integration/connect/envoy/windows-troubleshooting.md b/test/integration/connect/envoy/windows-troubleshooting.md deleted file mode 100644 index a3a83e088808a..0000000000000 --- a/test/integration/connect/envoy/windows-troubleshooting.md +++ /dev/null @@ -1,90 +0,0 @@ -# Envoy Integration Tests on Windows - -## Index - -- [About this Guide](#about-this-guide) -- [Prerequisites](#prerequisites) -- [Running the Tests](#running-the-tests) -- [Troubleshooting](#troubleshooting) - - [About Envoy Integration Tests on Windows](#about-envoy-integration-tests-on-windows) - - [Common Errors](#common-errors) -- [Windows Scripts Changes](#windows-scripts-changes) -- [Volume Issues](#volume-issues) - -## About this Guide - -On this guide you will find all the information required to run the Envoy integration tests on Windows. - -## Prerequisites - -To run the integration tests yo will need to have the following installed on your System: - -- GO v1.18(or later). -- Gotestsum library [installation](https://pkg.go.dev/gotest.tools/gotestsum). -- Docker. - -Before running the tests, you will need to build the required Docker images, to do so, you can use the script provided [here](../../../../build-support-windows/build-images.sh): - -- Build Images Script Execution - - From a Bash console (GitBash or WSL) execute: `./build-images.sh` - -## Running the Tests - -To execute the tests you need to run the following command depending on the shell you are using: -**On Powershell**: -`go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/" -win=true` -Where **TEST CASE** is the individual test case we want to execute (e.g. case-badauthz). - -**On Git Bash**: -`ENVOY_VERSION= go test -v -timeout=30m -tags integration ./test/integration/connect/envoy -run="TestEnvoy/" -win=true` -Where **TEST CASE** is the individual test case we want to execute (e.g. case-badauthz), and **ENVOY VERSION** is the version which you are currently testing. - -> [!TIP] -> When executing the integration tests using **Powershell** you may need to set the ENVOY_VERSION value manually in line 20 of the [run-tests.windows.sh](run-tests.windows.sh) file. - -> [!WARNING] -> When executing the integration tests for Windows environments, the **End of Line Sequence** of every related file and/or script will be changed from **LF** to **CRLF**. - -### About Envoy Integration Tests on Windows - -Integration tests on Linux run a multi-container architecture that take advantage of the Host Network Docker feature, using this feature means that the container's network stack is not isolated from the Docker host (the container shares the host’s networking namespace), and the container does not get its own IP-address allocated (read more about this [here](https://docs.docker.com/network/host/)). This feature is only available for Linux, which made migrating the tests to Windows challenging, since replicating the same architecture created more issues, that's why a **single container** architecture was chosen to run the Envoy integration tests. -Using a single container architecture meant that we could use the same tests as on linux, moreover we were able to speed-up their execution by replacing *docker run* commands which started utility containers, for *docker exec* commands. - -### Common errors - -If the tests are executed without docker running, the following error will be seen: - -```powershell -error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile-bats-windows&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=bats-verify&target=&ulimits=null&version=1": open //./pipe/docker_engine: The system cannot find the file specified. -``` - -If any of the docker images does not exist or is mistagged, an error similar to the following will be displayed: - -```powershell -Error response from daemon: No such container: envoy_workdir_1 -``` - -If you run the Windows tests from WSL you will get the following error message: - -```bash -main_test.go:34: command failed: exec: "cmd": executable file not found in $PATH -``` - -## Windows Scripts Changes - -- The "http-addr", "grpc-addr" and "admin-access-log-path" flags were added to the creation of the Envoy Bootstrap files. -- To execute commands sh was replaced by bash on our Windows container. -- All paths were updated to use Windows format. -- Created *stop_and_copy_files* function to copy files into the shared volume (see [volume issues](#volume-issues)). -- Changed the *-admin-bind* value from `0.0.0.0` to `127.0.0.1` when generating the Envoy Bootstrap files. -- Removed the *&&* from the *common_run_container_service's* docker exec command and replaced it with *\*. -- Removed *docker_wget* and *docker_curl* functions from [helpers.windows.bash](helpers.windows.bash) file and replaced them with **docker_consul_exec**, this way we avoid starting intermediate containers when capturing logs. -- The function *wipe_volumes* uses a `docker exec` command instead of the original `docker run`, this way we speed up test execution by avoiding to start a new container just to delete volume content before each test run. -- For **case-grpc** we increased the `envoy_stats_flush_interval` value from 1s to 5s, on Windows, the original value caused the test to pass or fail randomly. -- For **case-wanfed-gw** a new script was created: **global-setup-windows.sh**, this file replaces global-setup.sh when running this test in Windows. The new script uses the windows/consul:local Docker image to generate the required TLS files and copies them into host's workdir directory. -- To use the **debug_dump_volumes** function, you need to use it via Powershell and execute the following command: `bash run-tests.windows.sh debug_dump_volumes` Make sure to be positioned with your terminal in the correct directory. -- For **case-consul-exec** this case can only be run when using the consul-dev Docker image on this repository, since it relies on features implemented only here. These features are: Windows valid default value for "-admin-access-log-path" and `consul connect envoy` command starts Envoy. This features have also been submitted in [PR#15114](https://github.com/hashicorp/consul/pull/15114). - -## Volume Issues - -Another difference that arose when migrating the tests from Linux to Windows, is that file system operations can't be executed while Windows containers are running. Currently, when running the tests a **named volume** is created and all of the required files are copied into that volume. Because of the constraint mentioned before, the workaround we implemented was creating a function (**stop_and_copy_files**) that stops the *kubernetes/pause* container and executes a script to copy the required files and finally starts the container again. diff --git a/test/integration/consul-container/assets/tproxy-startup.sh b/test/integration/consul-container/assets/tproxy-startup.sh index 974d9368cbfdf..1e5963fe9fe9e 100644 --- a/test/integration/consul-container/assets/tproxy-startup.sh +++ b/test/integration/consul-container/assets/tproxy-startup.sh @@ -1,7 +1,4 @@ #!/usr/bin/env sh -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - set -ex diff --git a/test/integration/consul-container/go.mod b/test/integration/consul-container/go.mod index f7b3ab9b4774d..6b54e847e8afc 100644 --- a/test/integration/consul-container/go.mod +++ b/test/integration/consul-container/go.mod @@ -7,23 +7,17 @@ require ( github.com/avast/retry-go v3.0.0+incompatible github.com/docker/docker v24.0.5+incompatible github.com/docker/go-connections v0.4.0 - github.com/evanphx/json-patch v4.12.0+incompatible github.com/go-jose/go-jose/v3 v3.0.0 - github.com/hashicorp/consul v0.0.0-00010101000000-000000000000 github.com/hashicorp/consul/api v1.24.0 github.com/hashicorp/consul/envoyextensions v0.4.1 - github.com/hashicorp/consul/proto-public v0.4.1 github.com/hashicorp/consul/sdk v0.14.1 - github.com/hashicorp/consul/testing/deployer v0.0.0-00010101000000-000000000000 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.2.1 - github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/serf v0.10.1 github.com/itchyny/gojq v0.12.9 github.com/mitchellh/copystructure v1.2.0 - github.com/mitchellh/mapstructure v1.5.0 github.com/otiai10/copy v1.10.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 @@ -34,197 +28,66 @@ require ( ) require ( - cloud.google.com/go/compute v1.20.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.1 // indirect dario.cat/mergo v1.0.0 // indirect fortio.org/dflag v1.5.2 // indirect fortio.org/log v1.3.0 // indirect fortio.org/sets v1.0.2 // indirect fortio.org/version v1.0.2 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/DataDog/datadog-go v4.8.2+incompatible // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.62.156 // indirect - github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/armon/go-radix v1.0.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/aws/aws-sdk-go v1.44.289 // indirect - github.com/benbjohnson/immutable v0.4.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/boltdb/bolt v1.3.1 // indirect - github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible // indirect - github.com/circonus-labs/circonusllhist v0.1.3 // indirect github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect github.com/containerd/containerd v1.7.3 // indirect - github.com/coreos/etcd v3.3.27+incompatible // indirect - github.com/coreos/go-oidc v2.1.0+incompatible // indirect - github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect - github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f // indirect github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect github.com/fatih/color v1.14.1 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/runtime v0.25.0 // indirect - github.com/go-openapi/spec v0.20.8 // indirect - github.com/go-openapi/strfmt v0.21.3 // indirect - github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-openapi/validate v0.22.1 // indirect - github.com/go-ozzo/ozzo-validation v3.6.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect - github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706 // indirect - github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-bexpr v0.1.2 // indirect - github.com/hashicorp/go-connlimit v0.3.0 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-memdb v1.3.4 // indirect github.com/hashicorp/go-msgpack v1.1.5 // indirect - github.com/hashicorp/go-msgpack/v2 v2.0.0 // indirect - github.com/hashicorp/go-plugin v1.4.5 // indirect - github.com/hashicorp/go-raftchunking v0.7.0 // indirect - github.com/hashicorp/go-retryablehttp v0.6.7 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect - github.com/hashicorp/go-syslog v1.0.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcp-scada-provider v0.2.3 // indirect - github.com/hashicorp/hcp-sdk-go v0.55.0 // indirect - github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 // indirect github.com/hashicorp/memberlist v0.5.0 // indirect - github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 // indirect - github.com/hashicorp/raft v1.5.0 // indirect - github.com/hashicorp/raft-autopilot v0.1.6 // indirect - github.com/hashicorp/raft-boltdb/v2 v2.2.2 // indirect - github.com/hashicorp/raft-wal v0.3.0 // indirect - github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0 // indirect - github.com/hashicorp/vault/api v1.8.3 // indirect - github.com/hashicorp/vault/api/auth/gcp v0.3.0 // indirect - github.com/hashicorp/vault/sdk v0.7.0 // indirect - github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect - github.com/imdario/mergo v0.3.15 // indirect github.com/itchyny/timefmt-go v0.1.4 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.16.7 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.50 // indirect - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-testing-interface v1.14.0 // indirect - github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 // indirect - github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/pointerstructure v1.2.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/patternmatcher v0.5.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/oklog/run v1.0.0 // indirect - github.com/oklog/ulid v1.3.1 // indirect - github.com/oklog/ulid/v2 v2.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc4 // indirect github.com/opencontainers/runc v1.1.8 // indirect - github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pierrec/lz4 v2.5.2+incompatible // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect - github.com/segmentio/fasthash v1.0.3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - go.mongodb.org/mongo-driver v1.11.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/sdk v1.16.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.9.0 // indirect golang.org/x/crypto v0.12.0 // indirect - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect + golang.org/x/exp v0.0.0-20230807204917-050eac23e9de // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.1 // indirect - google.golang.org/api v0.126.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 // indirect + golang.org/x/tools v0.12.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.66.2 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.26.2 // indirect - k8s.io/apimachinery v0.26.2 // indirect - k8s.io/client-go v0.26.2 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect ) replace ( diff --git a/test/integration/consul-container/go.sum b/test/integration/consul-container/go.sum index c5563b08a8bdf..d194eacdceb58 100644 --- a/test/integration/consul-container/go.sum +++ b/test/integration/consul-container/go.sum @@ -1,56 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= fortio.org/assert v1.1.4 h1:Za1RaG+OjsTMpQS3J3UCvTF6wc4+IOHCz+jAOU37Y4o= fortio.org/dflag v1.5.2 h1:F9XVRj4Qr2IbJP7BMj7XZc9wB0Q/RZ61Ool+4YPVad8= fortio.org/dflag v1.5.2/go.mod h1:ppb/A8u+KKg+qUUYZNYuvRnXuVb8IsdHb/XGzsmjkN8= @@ -66,93 +16,39 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go v4.8.2+incompatible h1:qbcKSx29aBLD+5QLvlQZlGmRMF/FfGqFLFev/1TDzRo= -github.com/DataDog/datadog-go v4.8.2+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.156 h1:K4N91T1+RlSlx+t2dujeDviy4ehSGVjEltluDgmeHS4= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.156/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= -github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.44.289 h1:5CVEjiHFvdiVlKPBzv0rjG4zH/21W/onT18R5AH/qx0= -github.com/aws/aws-sdk-go v1.44.289/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/immutable v0.4.0 h1:CTqXbEerYso8YzVPxmWxh2gnoRQbbB9X1quUC8+vGZA= -github.com/benbjohnson/immutable v0.4.0/go.mod h1:iAr8OjJGLnLmVUr9MZ/rz4PWUy6Ouc2JLYuMArmvAJM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o= github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8= -github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA= -github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf h1:GOPo6vn/vTN+3IwZBvXX0y5doJfSC7My0cdzelyOCsQ= -github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -167,405 +63,107 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f h1:7T++XKzy4xg7PKy+bM+Sa9/oe1OC88yz2hXQUISoXfA= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= -github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= -github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= -github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= -github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 h1:AtvtonGEH/fZK0XPNNBdB6swgy7Iudfx88wzyIpwqJ8= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706 h1:1ZEjnveDe20yFa6lSkfdQZm5BR/b271n0MsB5R2L3us= -github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706/go.mod h1:1Cs8FlmD1BfSQXJGcFLSV5FuIx1AbJP+EJGdxosoS2g= -github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69 h1:wzWurXrxfSyG1PHskIZlfuXlTSCj1Tsyatp9DtaasuY= -github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69/go.mod h1:svUZZDvotY8zTODknUePc6mZ9pX8nN0ViGwWcUSOBEA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.2 h1:ijMXI4qERbzxbCnkxmfUtwMyjrrk3y+Vt0MxojNCbBs= -github.com/hashicorp/go-bexpr v0.1.2/go.mod h1:ANbpTX1oAql27TZkKVeW8p1w8NTdnyzPe/0qqPCKohU= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-connlimit v0.3.0 h1:oAojHGjFxUTTTA8c5XXnDqWJ2HLuWbDiBPTpWvNzvqM= -github.com/hashicorp/go-connlimit v0.3.0/go.mod h1:OUj9FGL1tPIhl/2RCfzYHrIiWj+VVPGNyVPnUX8AqS0= -github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk= -github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= -github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= -github.com/hashicorp/go-msgpack/v2 v2.0.0 h1:c1fiLq1LNghmLOry1ipGhvLDi+/zEoaEP2JrE1oFJ9s= -github.com/hashicorp/go-msgpack/v2 v2.0.0/go.mod h1:JIxYkkFJRDDRSoWQBSh7s9QAVThq+82iWmUpmE4jKak= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-raftchunking v0.7.0 h1:APNMnCXmTOhumkFv/GpJIbq7HteWF7EnGZ3875lRN0Y= -github.com/hashicorp/go-raftchunking v0.7.0/go.mod h1:Dg/eBOaJzE0jYKNwNLs5IA5j0OSmL5HoCUiMy3mDmrI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.6.7 h1:8/CAEZt/+F7kR7GevNHulKkUjLht3CPmn7egmhieNKo= -github.com/hashicorp/go-retryablehttp v0.6.7/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6 h1:W9WN8p6moV1fjKLkeqEgkAMu5rauy9QeYDAmIaPuuiA= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6/go.mod h1:MpCPSPGLDILGb4JMm94/mMi3YysIqsXzGCzkEZjcjXg= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcp-scada-provider v0.2.3 h1:AarYR+/Pcv+cMvPdAlb92uOBmZfEH6ny4+DT+4NY2VQ= -github.com/hashicorp/hcp-scada-provider v0.2.3/go.mod h1:ZFTgGwkzNv99PLQjTsulzaCplCzOTBh0IUQsPKzrQFo= -github.com/hashicorp/hcp-sdk-go v0.55.0 h1:T4sQtgQfQJOD0uucT4hS+GZI1FmoHAQMADj277W++xw= -github.com/hashicorp/hcp-sdk-go v0.55.0/go.mod h1:hZqky4HEzsKwvLOt4QJlZUrjeQmb4UCZUhDP2HyQFfc= -github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 h1:n9J0rwVWXDpNd5iZnwY7w4WZyq53/rROeI7OVvLW8Ok= -github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 h1:kBpVVl1sl3MaSrs97e0+pDQhSrqJv9gVbSUrPpVfl1w= -github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0/go.mod h1:6pdNz0vo0mF0GvhwDG56O3N18qBrAz/XRIcfINfTbwo= -github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= -github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= -github.com/hashicorp/raft v1.3.11/go.mod h1:J8naEwc6XaaCfts7+28whSeRvCqTd6e20BlCU3LtEO4= -github.com/hashicorp/raft v1.5.0 h1:uNs9EfJ4FwiArZRxxfd/dQ5d33nV31/CdCHArH89hT8= -github.com/hashicorp/raft v1.5.0/go.mod h1:pKHB2mf/Y25u3AHNSXVRv+yT+WAnmeTX0BwVppVQV+M= -github.com/hashicorp/raft-autopilot v0.1.6 h1:C1q3RNF2FfXNZfHWbvVAu0QixaQK8K5pX4O5lh+9z4I= -github.com/hashicorp/raft-autopilot v0.1.6/go.mod h1:Af4jZBwaNOI+tXfIqIdbcAnh/UyyqIMj/pOISIfhArw= -github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= -github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea/go.mod h1:qRd6nFJYYS6Iqnc/8HcUmko2/2Gw8qTFEmxDLii6W5I= -github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0 h1:CO8dBMLH6dvE1jTn/30ZZw3iuPsNfajshWoJTnVc5cc= -github.com/hashicorp/raft-boltdb/v2 v2.2.2 h1:rlkPtOllgIcKLxVT4nutqlTH2NRFn+tO1wwZk/4Dxqw= -github.com/hashicorp/raft-boltdb/v2 v2.2.2/go.mod h1:N8YgaZgNJLpZC+h+by7vDu5rzsRgONThTEeUS3zWbfY= -github.com/hashicorp/raft-wal v0.3.0 h1:Mi6RPoRbsxIIYZryI+bSTXHD97Ua6rIYO51ibYV9bkY= -github.com/hashicorp/raft-wal v0.3.0/go.mod h1:A6vP5o8hGOs1LHfC1Okh9xPwWDcmb6Vvuz/QyqUXlOE= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0 h1:O6tNk0s/arubLUbLeCyaRs5xGo9VwmbQazISY/BfPK4= -github.com/hashicorp/vault-plugin-auth-alicloud v0.14.0/go.mod h1:We3fJplmALwK1VpjwrLuXr/4QCQHYMdnXLHmLUU6Ntg= -github.com/hashicorp/vault/api v1.8.0/go.mod h1:uJrw6D3y9Rv7hhmS17JQC50jbPDAZdjZoTtrCCxxs7E= -github.com/hashicorp/vault/api v1.8.3 h1:cHQOLcMhBR+aVI0HzhPxO62w2+gJhIrKguQNONPzu6o= -github.com/hashicorp/vault/api v1.8.3/go.mod h1:4g/9lj9lmuJQMtT6CmVMHC5FW1yENaVv+Nv4ZfG8fAg= -github.com/hashicorp/vault/api/auth/gcp v0.3.0 h1:taum+3pCmOXnNgEKHlQbmgXmKw5daWHk7YJrLPP/w8g= -github.com/hashicorp/vault/api/auth/gcp v0.3.0/go.mod h1:gnNBFOASYUaFunedTHOzdir7vKcHL3skWBUzEn263bo= -github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= -github.com/hashicorp/vault/sdk v0.7.0 h1:2pQRO40R1etpKkia5fb4kjrdYMx3BHklPxl1pxpxDHg= -github.com/hashicorp/vault/sdk v0.7.0/go.mod h1:KyfArJkhooyba7gYCKSq8v66QdqJmnbAxtV/OX1+JTs= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/itchyny/gojq v0.12.9 h1:biKpbKwMxVYhCU1d6mR7qMr3f0Hn9F5k5YykCVb3gmM= github.com/itchyny/gojq v0.12.9/go.mod h1:T4Ip7AETUXeGpD+436m+UEl3m3tokRgajd5pRfsR5oE= github.com/itchyny/timefmt-go v0.1.4 h1:hFEfWVdwsEi+CY8xY2FtgWHGQaBaC3JeHd+cve0ynVM= github.com/itchyny/timefmt-go v0.1.4/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -575,7 +173,6 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -583,39 +180,20 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.14.0 h1:/x0XQ6h+3U3nAyk1yx+bHPURrKa9sVVvYbuqZ7pIAtI= -github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= -github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= -github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= @@ -625,48 +203,24 @@ github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWK github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= -github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v1.1.8 h1:zICRlc+C1XzivLc3nzE+cbJV4LIi8tib6YG0MqC6OqA= github.com/opencontainers/runc v1.1.8/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= -github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= github.com/otiai10/copy v1.10.0 h1:znyI7l134wNg/wDktoVQPxPkgvhDfGCYUasey+h0rDQ= github.com/otiai10/copy v1.10.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -676,645 +230,174 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 h1:xzABM9let0HLLqFypcxvLmlvEciCHL7+Lv+4vwZqecI= github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569/go.mod h1:2Ly+NIftZN4de9zRmENdYbvPQeaVIYKWpLFStLFEBgI= github.com/testcontainers/testcontainers-go v0.22.0 h1:hOK4NzNu82VZcKEB1aP9LO1xYssVFMvlfeuDW9JMmV0= github.com/testcontainers/testcontainers-go v0.22.0/go.mod h1:k0YiPa26xJCRUbUkYqy5rY6NGvSbVCeUBXCvucscBR4= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= -go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= -go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= -golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e h1:xIXmWJ303kJCuogpj0bHq+dcjcZHU+XFyc1I0Yl9cRg= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 h1:XVeBY8d/FaK4848myy41HBqnDwvxeV3zMZhwN1TvAMU= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 h1:eSaPbMR4T7WfH9FvABk36NBMacoTUKdWCvV0dx+KfOg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= -k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= -k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= -k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= -k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/test/integration/consul-container/libs/assert/common.go b/test/integration/consul-container/libs/assert/common.go index c10cb7b9b4793..5f2431f6ff2f1 100644 --- a/test/integration/consul-container/libs/assert/common.go +++ b/test/integration/consul-container/libs/assert/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package assert diff --git a/test/integration/consul-container/libs/assert/envoy.go b/test/integration/consul-container/libs/assert/envoy.go index 05add74c92b0a..eef407c25021f 100644 --- a/test/integration/consul-container/libs/assert/envoy.go +++ b/test/integration/consul-container/libs/assert/envoy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package assert @@ -14,12 +14,11 @@ import ( "testing" "time" + "github.com/hashicorp/consul/sdk/testutil/retry" "github.com/hashicorp/go-cleanhttp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/hashicorp/consul/sdk/testutil/retry" - libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" ) @@ -114,7 +113,7 @@ func AssertUpstreamEndpointStatusWithClient( | length`, clusterName, healthStatus) results, err := utils.JQFilter(clusters, filter) - require.NoErrorf(r, err, "could not found cluster name %q: %v \n%s", clusterName, err, clusters) + require.NoErrorf(r, err, "could not found cluster name %s in \n%s", clusterName, clusters) require.Len(r, results, 1) // the final part of the pipeline is "length" which only ever returns 1 result result, err := strconv.Atoi(results[0]) diff --git a/test/integration/consul-container/libs/assert/grpc.go b/test/integration/consul-container/libs/assert/grpc.go index a41ef65af620e..ec72f0a651fd4 100644 --- a/test/integration/consul-container/libs/assert/grpc.go +++ b/test/integration/consul-container/libs/assert/grpc.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package assert @@ -26,7 +26,6 @@ func GRPCPing(t *testing.T, addr string) { var msg *fgrpc.PingMessage retries := 0 retry.RunWith(&retry.Timer{Timeout: time.Minute, Wait: 25 * time.Millisecond}, t, func(r *retry.R) { - t.Logf("making grpc call to %s", addr) retries += 1 msg, err = pingCl.Ping(context.Background(), &fgrpc.PingMessage{ // use addr as payload so we have something variable to check against diff --git a/test/integration/consul-container/libs/assert/peering.go b/test/integration/consul-container/libs/assert/peering.go index ab000268d7900..2cf842a4aed2b 100644 --- a/test/integration/consul-container/libs/assert/peering.go +++ b/test/integration/consul-container/libs/assert/peering.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package assert @@ -10,8 +10,6 @@ import ( "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/sdk/testutil/retry" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) // PeeringStatus verifies the peering connection is the specified state with a default retry. @@ -54,8 +52,14 @@ func PeeringExportsOpts(t *testing.T, client *api.Client, peerName string, expor retry.RunWith(failer(), t, func(r *retry.R) { peering, _, err := client.Peerings().Read(context.Background(), peerName, opts) - require.Nil(r, err, "reading peering data") - require.NotNilf(r, peering, "peering not found %q", peerName) - assert.Len(r, peering.StreamStatus.ExportedServices, exports, "peering exported services") + if err != nil { + r.Fatal("error reading peering data") + } + if peering == nil { + r.Fatal("peering not found") + } + if exports != len(peering.StreamStatus.ExportedServices) { + r.Fatal("peering exported services did not match: got ", len(peering.StreamStatus.ExportedServices), " want ", exports) + } }) } diff --git a/test/integration/consul-container/libs/assert/service.go b/test/integration/consul-container/libs/assert/service.go index 35fad6bfb15ba..135403da913a4 100644 --- a/test/integration/consul-container/libs/assert/service.go +++ b/test/integration/consul-container/libs/assert/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package assert @@ -34,7 +34,7 @@ func CatalogServiceExists(t *testing.T, c *api.Client, svc string, opts *api.Que r.Fatal("error reading service data") } if len(services) == 0 { - r.Fatalf("did not find catalog entry for %q with opts %#v", svc, opts) + r.Fatal("did not find catalog entry for ", svc) } }) } diff --git a/test/integration/consul-container/libs/cluster/agent.go b/test/integration/consul-container/libs/cluster/agent.go index 6ffc4d4f8c289..6753fd8c017e1 100644 --- a/test/integration/consul-container/libs/cluster/agent.go +++ b/test/integration/consul-container/libs/cluster/agent.go @@ -1,23 +1,15 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster import ( "context" - "encoding/json" - "fmt" "io" - jsonpatch "github.com/evanphx/json-patch" - "github.com/hashicorp/hcl" - "github.com/mitchellh/mapstructure" "github.com/testcontainers/testcontainers-go" - "google.golang.org/grpc" - agentconfig "github.com/hashicorp/consul/agent/config" "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/lib/decode" "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" ) @@ -44,7 +36,6 @@ type Agent interface { Upgrade(ctx context.Context, config Config) error Exec(ctx context.Context, cmd []string) (string, error) DataDir() string - GetGRPCConn() *grpc.ClientConn } // Config is a set of configurations required to create a Agent @@ -95,30 +86,6 @@ func (c Config) Clone() Config { return c2 } -type decodeTarget struct { - agentconfig.Config `mapstructure:",squash"` -} - -// MutatebyAgentConfig mutates config by applying the fields in the input hclConfig -// Note that the precedence order is config > hclConfig, because user provider hclConfig -// may not work with the testing environment, e.g., data dir, agent name, etc. -// Currently only hcl config is allowed -func (c *Config) MutatebyAgentConfig(hclConfig string) error { - rawConfigJson, err := convertHcl2Json(hclConfig) - if err != nil { - return fmt.Errorf("error converting to Json: %s", err) - } - - // Merge 2 json - mergedConfigJosn, err := jsonpatch.MergePatch([]byte(rawConfigJson), []byte(c.JSON)) - if err != nil { - return fmt.Errorf("error merging configurations: %w", err) - } - - c.JSON = string(mergedConfigJosn) - return nil -} - // TODO: refactor away type AgentInfo struct { CACertFile string @@ -126,39 +93,3 @@ type AgentInfo struct { UseTLSForGRPC bool DebugURI string } - -func convertHcl2Json(in string) (string, error) { - var raw map[string]interface{} - err := hcl.Decode(&raw, in) - if err != nil { - return "", err - } - - var target decodeTarget - var md mapstructure.Metadata - d, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - DecodeHook: mapstructure.ComposeDecodeHookFunc( - // decode.HookWeakDecodeFromSlice is only necessary when reading from - // an HCL config file. In the future we could omit it when reading from - // JSON configs. It is left here for now to maintain backwards compat - // for the unlikely scenario that someone is using malformed JSON configs - // and expecting this behaviour to correct their config. - decode.HookWeakDecodeFromSlice, - decode.HookTranslateKeys, - ), - Metadata: &md, - Result: &target, - }) - if err != nil { - return "", err - } - if err := d.Decode(raw); err != nil { - return "", err - } - - rawjson, err := json.MarshalIndent(target, "", " ") - if err != nil { - return "", err - } - return string(rawjson), nil -} diff --git a/test/integration/consul-container/libs/cluster/app.go b/test/integration/consul-container/libs/cluster/app.go index 001880b85f432..f434fcff135b6 100644 --- a/test/integration/consul-container/libs/cluster/app.go +++ b/test/integration/consul-container/libs/cluster/app.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/builder.go b/test/integration/consul-container/libs/cluster/builder.go index 945b2bcd9ea02..72228a26d6134 100644 --- a/test/integration/consul-container/libs/cluster/builder.go +++ b/test/integration/consul-container/libs/cluster/builder.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/cluster.go b/test/integration/consul-container/libs/cluster/cluster.go index 66e9ac5c2ddbb..aedf0ac9267a5 100644 --- a/test/integration/consul-container/libs/cluster/cluster.go +++ b/test/integration/consul-container/libs/cluster/cluster.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/config.go b/test/integration/consul-container/libs/cluster/config.go index f46be0429541e..505811d35e7f3 100644 --- a/test/integration/consul-container/libs/cluster/config.go +++ b/test/integration/consul-container/libs/cluster/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/container.go b/test/integration/consul-container/libs/cluster/container.go index d444162364730..7ed88b0d824f5 100644 --- a/test/integration/consul-container/libs/cluster/container.go +++ b/test/integration/consul-container/libs/cluster/container.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster @@ -8,7 +8,6 @@ import ( "encoding/json" "fmt" "io" - "net/url" "os" "path/filepath" "strconv" @@ -16,14 +15,11 @@ import ( goretry "github.com/avast/retry-go" dockercontainer "github.com/docker/docker/api/types/container" - "github.com/docker/go-connections/nat" "github.com/hashicorp/go-multierror" "github.com/otiai10/copy" "github.com/pkg/errors" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" "github.com/hashicorp/consul/api" @@ -62,8 +58,6 @@ type consulContainerNode struct { clientCACertFile string ip string - grpcConn *grpc.ClientConn - nextAdminPortOffset int nextConnectPortOffset int @@ -178,8 +172,7 @@ func NewConsulContainer(ctx context.Context, config Config, cluster *Cluster, po clientAddr string clientCACertFile string - info AgentInfo - grpcConn *grpc.ClientConn + info AgentInfo ) debugURI := "" if utils.Debug { @@ -243,28 +236,6 @@ func NewConsulContainer(ctx context.Context, config Config, cluster *Cluster, po info.CACertFile = clientCACertFile } - // TODO: Support gRPC+TLS port. - if pc.Ports.GRPC > 0 { - port, err := nat.NewPort("tcp", strconv.Itoa(pc.Ports.GRPC)) - if err != nil { - return nil, fmt.Errorf("failed to parse gRPC TLS port: %w", err) - } - endpoint, err := podContainer.PortEndpoint(ctx, port, "tcp") - if err != nil { - return nil, fmt.Errorf("failed to get gRPC TLS endpoint: %w", err) - } - url, err := url.Parse(endpoint) - if err != nil { - return nil, fmt.Errorf("failed to parse gRPC endpoint URL: %w", err) - } - conn, err := grpc.Dial(url.Host, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return nil, fmt.Errorf("failed to dial gRPC connection: %w", err) - } - deferClean.Add(func() { _ = conn.Close() }) - grpcConn = conn - } - ip, err := podContainer.ContainerIP(ctx) if err != nil { return nil, err @@ -311,7 +282,6 @@ func NewConsulContainer(ctx context.Context, config Config, cluster *Cluster, po name: name, ip: ip, info: info, - grpcConn: grpcConn, } if httpPort > 0 || httpsPort > 0 { @@ -406,10 +376,6 @@ func (c *consulContainerNode) GetClient() *api.Client { return c.client } -func (c *consulContainerNode) GetGRPCConn() *grpc.ClientConn { - return c.grpcConn -} - // NewClient returns an API client by making a new one based on the provided token // - updateDefault: if true update the default client func (c *consulContainerNode) NewClient(token string, updateDefault bool) (*api.Client, error) { @@ -542,10 +508,6 @@ func (c *consulContainerNode) terminate(retainPod bool, skipFuncs bool) error { continue } } - - // if the pod is retained and therefore the IP then the grpc conn - // should handle reconnecting so there is no reason to close it. - c.closeGRPC() } var merr error @@ -567,16 +529,6 @@ func (c *consulContainerNode) terminate(retainPod bool, skipFuncs bool) error { return merr } -func (c *consulContainerNode) closeGRPC() error { - if c.grpcConn != nil { - if err := c.grpcConn.Close(); err != nil { - return err - } - c.grpcConn = nil - } - return nil -} - func (c *consulContainerNode) DataDir() string { return c.dataDir } @@ -613,7 +565,6 @@ func newContainerRequest(config Config, opts containerOpts, ports ...int) (podRe ExposedPorts: []string{ "8500/tcp", // Consul HTTP API "8501/tcp", // Consul HTTPs API - "8502/tcp", // Consul gRPC API "8443/tcp", // Envoy Gateway Listener @@ -630,8 +581,6 @@ func newContainerRequest(config Config, opts containerOpts, ports ...int) (podRe "9997/tcp", // Envoy App Listener "9998/tcp", // Envoy App Listener "9999/tcp", // Envoy App Listener - - "80/tcp", // Nginx - http port used in wasm tests }, Hostname: opts.hostname, Networks: opts.addtionalNetworks, diff --git a/test/integration/consul-container/libs/cluster/encryption.go b/test/integration/consul-container/libs/cluster/encryption.go index 79e7133fbbd0b..3adb5a317700f 100644 --- a/test/integration/consul-container/libs/cluster/encryption.go +++ b/test/integration/consul-container/libs/cluster/encryption.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/log.go b/test/integration/consul-container/libs/cluster/log.go index 59e69a64efdaf..f2a185d532f4f 100644 --- a/test/integration/consul-container/libs/cluster/log.go +++ b/test/integration/consul-container/libs/cluster/log.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster diff --git a/test/integration/consul-container/libs/cluster/network.go b/test/integration/consul-container/libs/cluster/network.go index be6f34c77983e..e0ee10f4e35ff 100644 --- a/test/integration/consul-container/libs/cluster/network.go +++ b/test/integration/consul-container/libs/cluster/network.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package cluster @@ -20,7 +20,6 @@ func createNetwork(t TestingT, name string) (testcontainers.Network, error) { Name: name, Attachable: true, CheckDuplicate: true, - SkipReaper: isRYUKDisabled(), }, } first := true diff --git a/test/integration/consul-container/libs/service/common.go b/test/integration/consul-container/libs/service/common.go index 0e0e2739571b0..add9f1395d241 100644 --- a/test/integration/consul-container/libs/service/common.go +++ b/test/integration/consul-container/libs/service/common.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service diff --git a/test/integration/consul-container/libs/service/connect.go b/test/integration/consul-container/libs/service/connect.go index 6d283eac67d9b..4028309acb3ec 100644 --- a/test/integration/consul-container/libs/service/connect.go +++ b/test/integration/consul-container/libs/service/connect.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service @@ -172,15 +172,8 @@ type SidecarConfig struct { // "consul connect envoy", for service name (serviceName) on the specified // node. The container exposes port serviceBindPort and envoy admin port // (19000) by mapping them onto host ports. The container's name has a prefix -// combining datacenter and name. The customContainerConf parameter can be used -// to mutate the testcontainers.ContainerRequest used to create the sidecar proxy. -func NewConnectService( - ctx context.Context, - sidecarCfg SidecarConfig, - serviceBindPorts []int, - node cluster.Agent, - customContainerConf func(request testcontainers.ContainerRequest) testcontainers.ContainerRequest, -) (*ConnectContainer, error) { +// combining datacenter and name. +func NewConnectService(ctx context.Context, sidecarCfg SidecarConfig, serviceBindPorts []int, node cluster.Agent) (*ConnectContainer, error) { nodeConfig := node.GetConfig() if nodeConfig.ScratchDir == "" { return nil, fmt.Errorf("node ScratchDir is required") @@ -287,11 +280,6 @@ func NewConnectService( exposedPorts := make([]string, len(appPortStrs)) copy(exposedPorts, appPortStrs) exposedPorts = append(exposedPorts, adminPortStr) - - if customContainerConf != nil { - req = customContainerConf(req) - } - info, err := cluster.LaunchContainerOnNode(ctx, node, req, exposedPorts) if err != nil { return nil, err diff --git a/test/integration/consul-container/libs/service/examples.go b/test/integration/consul-container/libs/service/examples.go index cc37cdb0a750e..85505c5dccc5e 100644 --- a/test/integration/consul-container/libs/service/examples.go +++ b/test/integration/consul-container/libs/service/examples.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service @@ -127,42 +127,6 @@ func (c exampleContainer) GetStatus() (string, error) { return state.Status, err } -// NewCustomService creates a new test service from a custom testcontainers.ContainerRequest. -func NewCustomService(ctx context.Context, name string, httpPort int, grpcPort int, node libcluster.Agent, request testcontainers.ContainerRequest) (Service, error) { - namePrefix := fmt.Sprintf("%s-service-example-%s", node.GetDatacenter(), name) - containerName := utils.RandName(namePrefix) - - pod := node.GetPod() - if pod == nil { - return nil, fmt.Errorf("node Pod is required") - } - - var ( - httpPortStr = strconv.Itoa(httpPort) - grpcPortStr = strconv.Itoa(grpcPort) - ) - - request.Name = containerName - - info, err := libcluster.LaunchContainerOnNode(ctx, node, request, []string{httpPortStr, grpcPortStr}) - if err != nil { - return nil, err - } - - out := &exampleContainer{ - ctx: ctx, - container: info.Container, - ip: info.IP, - httpPort: info.MappedPorts[httpPortStr].Int(), - grpcPort: info.MappedPorts[grpcPortStr].Int(), - serviceName: name, - } - - fmt.Printf("Custom service exposed http port %d, gRPC port %d\n", out.httpPort, out.grpcPort) - - return out, nil -} - func NewExampleService(ctx context.Context, name string, httpPort int, grpcPort int, node libcluster.Agent, containerArgs ...string) (Service, error) { namePrefix := fmt.Sprintf("%s-service-example-%s", node.GetDatacenter(), name) containerName := utils.RandName(namePrefix) diff --git a/test/integration/consul-container/libs/service/gateway.go b/test/integration/consul-container/libs/service/gateway.go index 61bc4d31503ad..fda7b7a92693e 100644 --- a/test/integration/consul-container/libs/service/gateway.go +++ b/test/integration/consul-container/libs/service/gateway.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service diff --git a/test/integration/consul-container/libs/service/helpers.go b/test/integration/consul-container/libs/service/helpers.go index a524d9c040bff..d7168448c208b 100644 --- a/test/integration/consul-container/libs/service/helpers.go +++ b/test/integration/consul-container/libs/service/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service @@ -9,7 +9,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/testcontainers/testcontainers-go" "github.com/hashicorp/consul/api" libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" @@ -52,7 +51,7 @@ type ServiceOpts struct { } // createAndRegisterStaticServerAndSidecar register the services and launch static-server containers -func createAndRegisterStaticServerAndSidecar(node libcluster.Agent, httpPort int, grpcPort int, svc *api.AgentServiceRegistration, customContainerCfg func(testcontainers.ContainerRequest) testcontainers.ContainerRequest, containerArgs ...string) (Service, Service, error) { +func createAndRegisterStaticServerAndSidecar(node libcluster.Agent, httpPort int, grpcPort int, svc *api.AgentServiceRegistration, containerArgs ...string) (Service, Service, error) { // Do some trickery to ensure that partial completion is correctly torn // down, but successful execution is not. var deferClean utils.ResettableDefer @@ -80,62 +79,10 @@ func createAndRegisterStaticServerAndSidecar(node libcluster.Agent, httpPort int svc.Connect.SidecarService.Proxy != nil && svc.Connect.SidecarService.Proxy.Mode == api.ProxyModeTransparent, } - serverConnectProxy, err := NewConnectService(context.Background(), sidecarCfg, []int{svc.Port}, node, customContainerCfg) // bindPort not used + serverConnectProxy, err := NewConnectService(context.Background(), sidecarCfg, []int{svc.Port}, node) // bindPort not used if err != nil { return nil, nil, err } - - deferClean.Add(func() { - _ = serverConnectProxy.Terminate() - }) - - // disable cleanup functions now that we have an object with a Terminate() function - deferClean.Reset() - - return serverService, serverConnectProxy, nil -} - -// createAndRegisterCustomServiceAndSidecar creates a custom service from the given testcontainers.ContainerRequest -// and a sidecar proxy for the service. The customContainerCfg parameter is used to mutate the -// testcontainers.ContainerRequest for the sidecar proxy. -func createAndRegisterCustomServiceAndSidecar(node libcluster.Agent, - httpPort int, - grpcPort int, - svc *api.AgentServiceRegistration, - request testcontainers.ContainerRequest, - customContainerCfg func(testcontainers.ContainerRequest) testcontainers.ContainerRequest, -) (Service, Service, error) { - // Do some trickery to ensure that partial completion is correctly torn - // down, but successful execution is not. - var deferClean utils.ResettableDefer - defer deferClean.Execute() - - if err := node.GetClient().Agent().ServiceRegister(svc); err != nil { - return nil, nil, err - } - - // Create a service and proxy instance - serverService, err := NewCustomService(context.Background(), svc.ID, httpPort, grpcPort, node, request) - if err != nil { - return nil, nil, err - } - deferClean.Add(func() { - _ = serverService.Terminate() - }) - sidecarCfg := SidecarConfig{ - Name: fmt.Sprintf("%s-sidecar", svc.ID), - ServiceID: svc.ID, - Namespace: svc.Namespace, - EnableTProxy: svc.Connect != nil && - svc.Connect.SidecarService != nil && - svc.Connect.SidecarService.Proxy != nil && - svc.Connect.SidecarService.Proxy.Mode == api.ProxyModeTransparent, - } - serverConnectProxy, err := NewConnectService(context.Background(), sidecarCfg, []int{svc.Port}, node, customContainerCfg) // bindPort not used - if err != nil { - return nil, nil, err - } - deferClean.Add(func() { _ = serverConnectProxy.Terminate() }) @@ -146,52 +93,7 @@ func createAndRegisterCustomServiceAndSidecar(node libcluster.Agent, return serverService, serverConnectProxy, nil } -func CreateAndRegisterCustomServiceAndSidecar(node libcluster.Agent, - serviceOpts *ServiceOpts, - request testcontainers.ContainerRequest, - customContainerCfg func(testcontainers.ContainerRequest) testcontainers.ContainerRequest) (Service, Service, error) { - // Register the static-server service and sidecar first to prevent race with sidecar - // trying to get xDS before it's ready - p := serviceOpts.HTTPPort - agentCheck := api.AgentServiceCheck{ - Name: "Static Server Listening", - TCP: fmt.Sprintf("127.0.0.1:%d", p), - Interval: "10s", - Status: api.HealthPassing, - } - if serviceOpts.RegisterGRPC { - p = serviceOpts.GRPCPort - agentCheck.TCP = "" - agentCheck.GRPC = fmt.Sprintf("127.0.0.1:%d", p) - } - req := &api.AgentServiceRegistration{ - Name: serviceOpts.Name, - ID: serviceOpts.ID, - Port: p, - Connect: &api.AgentServiceConnect{ - SidecarService: &api.AgentServiceRegistration{ - Proxy: &api.AgentServiceConnectProxyConfig{ - Mode: api.ProxyMode(serviceOpts.Connect.Proxy.Mode), - }, - }, - }, - Namespace: serviceOpts.Namespace, - Partition: serviceOpts.Partition, - Locality: serviceOpts.Locality, - Meta: serviceOpts.Meta, - Check: &agentCheck, - } - return createAndRegisterCustomServiceAndSidecar(node, serviceOpts.HTTPPort, serviceOpts.GRPCPort, req, request, customContainerCfg) -} - -// CreateAndRegisterStaticServerAndSidecarWithCustomContainerConfig creates an example static server and a sidecar for -// the service. The customContainerCfg parameter is a function of testcontainers.ContainerRequest to -// testcontainers.ContainerRequest which can be used to mutate the container request for the sidecar proxy and inject -// custom configuration and lifecycle hooks. -func CreateAndRegisterStaticServerAndSidecarWithCustomContainerConfig(node libcluster.Agent, - serviceOpts *ServiceOpts, - customContainerCfg func(testcontainers.ContainerRequest) testcontainers.ContainerRequest, - containerArgs ...string) (Service, Service, error) { +func CreateAndRegisterStaticServerAndSidecar(node libcluster.Agent, serviceOpts *ServiceOpts, containerArgs ...string) (Service, Service, error) { // Register the static-server service and sidecar first to prevent race with sidecar // trying to get xDS before it's ready p := serviceOpts.HTTPPort @@ -223,11 +125,7 @@ func CreateAndRegisterStaticServerAndSidecarWithCustomContainerConfig(node libcl Meta: serviceOpts.Meta, Check: &agentCheck, } - return createAndRegisterStaticServerAndSidecar(node, serviceOpts.HTTPPort, serviceOpts.GRPCPort, req, customContainerCfg, containerArgs...) -} - -func CreateAndRegisterStaticServerAndSidecar(node libcluster.Agent, serviceOpts *ServiceOpts, containerArgs ...string) (Service, Service, error) { - return CreateAndRegisterStaticServerAndSidecarWithCustomContainerConfig(node, serviceOpts, nil, containerArgs...) + return createAndRegisterStaticServerAndSidecar(node, serviceOpts.HTTPPort, serviceOpts.GRPCPort, req, containerArgs...) } func CreateAndRegisterStaticServerAndSidecarWithChecks(node libcluster.Agent, serviceOpts *ServiceOpts) (Service, Service, error) { @@ -257,7 +155,7 @@ func CreateAndRegisterStaticServerAndSidecarWithChecks(node libcluster.Agent, se Locality: serviceOpts.Locality, } - return createAndRegisterStaticServerAndSidecar(node, serviceOpts.HTTPPort, serviceOpts.GRPCPort, req, nil) + return createAndRegisterStaticServerAndSidecar(node, serviceOpts.HTTPPort, serviceOpts.GRPCPort, req) } func CreateAndRegisterStaticClientSidecar( @@ -339,7 +237,7 @@ func CreateAndRegisterStaticClientSidecar( EnableTProxy: enableTProxy, } - clientConnectProxy, err := NewConnectService(context.Background(), sidecarCfg, []int{libcluster.ServiceUpstreamLocalBindPort}, node, nil) + clientConnectProxy, err := NewConnectService(context.Background(), sidecarCfg, []int{libcluster.ServiceUpstreamLocalBindPort}, node) if err != nil { return nil, err } diff --git a/test/integration/consul-container/libs/service/log.go b/test/integration/consul-container/libs/service/log.go index 4e64bb7e54bbf..86e10a3fc719c 100644 --- a/test/integration/consul-container/libs/service/log.go +++ b/test/integration/consul-container/libs/service/log.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service diff --git a/test/integration/consul-container/libs/service/service.go b/test/integration/consul-container/libs/service/service.go index ca186849728c6..5e1af3ab14c73 100644 --- a/test/integration/consul-container/libs/service/service.go +++ b/test/integration/consul-container/libs/service/service.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package service diff --git a/test/integration/consul-container/libs/topology/peering_topology.go b/test/integration/consul-container/libs/topology/peering_topology.go index 1d11851753a2f..bd88ea58e66e9 100644 --- a/test/integration/consul-container/libs/topology/peering_topology.go +++ b/test/integration/consul-container/libs/topology/peering_topology.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package topology @@ -194,22 +194,13 @@ type ClusterConfig struct { ExposedPorts []int } -func NewCluster( - t *testing.T, - config *ClusterConfig, -) (*libcluster.Cluster, *libcluster.BuildContext, *api.Client) { - return NewClusterWithConfig(t, config, "", "") -} - // NewCluster creates a cluster with peering enabled. It also creates // and registers a mesh-gateway at the client agent. The API client returned is // pointed at the client agent. // - proxy-defaults.protocol = tcp -func NewClusterWithConfig( +func NewCluster( t *testing.T, config *ClusterConfig, - serverHclConfig string, - clientHclConfig string, ) (*libcluster.Cluster, *libcluster.BuildContext, *api.Client) { var ( cluster *libcluster.Cluster @@ -247,10 +238,6 @@ func NewClusterWithConfig( serverConf.Cmd = append(serverConf.Cmd, config.Cmd) } - if serverHclConfig != "" { - serverConf.MutatebyAgentConfig(serverHclConfig) - } - if config.ExposedPorts != nil { cluster, err = libcluster.New(t, []libcluster.Config{*serverConf}, config.ExposedPorts...) } else { @@ -274,9 +261,6 @@ func NewClusterWithConfig( RetryJoin(retryJoin...) clientConf := configbuiilder.ToAgentConfig(t) t.Logf("%s client config: \n%s", opts.Datacenter, clientConf.JSON) - if clientHclConfig != "" { - clientConf.MutatebyAgentConfig(clientHclConfig) - } require.NoError(t, cluster.AddN(*clientConf, config.NumClients, true)) diff --git a/test/integration/consul-container/libs/topology/service_topology.go b/test/integration/consul-container/libs/topology/service_topology.go index be0af12cf086e..6aca247f296af 100644 --- a/test/integration/consul-container/libs/topology/service_topology.go +++ b/test/integration/consul-container/libs/topology/service_topology.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package topology @@ -7,16 +7,14 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" - "github.com/hashicorp/consul/api" libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" libservice "github.com/hashicorp/consul/test/integration/consul-container/libs/service" + "github.com/stretchr/testify/require" ) -// CreateServices -func CreateServices(t *testing.T, cluster *libcluster.Cluster, protocol string) (libservice.Service, libservice.Service) { +func CreateServices(t *testing.T, cluster *libcluster.Cluster) (libservice.Service, libservice.Service) { node := cluster.Agents[0] client := node.GetClient() @@ -24,7 +22,7 @@ func CreateServices(t *testing.T, cluster *libcluster.Cluster, protocol string) serviceDefault := &api.ServiceConfigEntry{ Kind: api.ServiceDefaults, Name: libservice.StaticServerServiceName, - Protocol: protocol, + Protocol: "http", } ok, _, err := client.ConfigEntries().Set(serviceDefault, nil) @@ -39,10 +37,6 @@ func CreateServices(t *testing.T, cluster *libcluster.Cluster, protocol string) GRPCPort: 8079, } - if protocol == "grpc" { - serviceOpts.RegisterGRPC = true - } - // Create a service and proxy instance _, serverConnectProxy, err := libservice.CreateAndRegisterStaticServerAndSidecar(node, serviceOpts) require.NoError(t, err) diff --git a/test/integration/consul-container/libs/utils/debug.go b/test/integration/consul-container/libs/utils/debug.go index fac44c4e2e002..146a7e4cacdd1 100644 --- a/test/integration/consul-container/libs/utils/debug.go +++ b/test/integration/consul-container/libs/utils/debug.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils diff --git a/test/integration/consul-container/libs/utils/defer.go b/test/integration/consul-container/libs/utils/defer.go index 85d913c7dba24..867de61972a98 100644 --- a/test/integration/consul-container/libs/utils/defer.go +++ b/test/integration/consul-container/libs/utils/defer.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils diff --git a/test/integration/consul-container/libs/utils/docker.go b/test/integration/consul-container/libs/utils/docker.go index b807cf66fae26..109205855cd5a 100644 --- a/test/integration/consul-container/libs/utils/docker.go +++ b/test/integration/consul-container/libs/utils/docker.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils @@ -9,9 +9,6 @@ import ( "io" "os" "os/exec" - "strings" - - "github.com/hashicorp/go-version" ) // DockerExec simply shell out to the docker CLI binary on your host. @@ -19,18 +16,6 @@ func DockerExec(args []string, stdout io.Writer) error { return cmdExec("docker", "docker", args, stdout, "") } -// DockerImageVersion retrieves the value of the org.opencontainers.image.version label from the specified image. -func DockerImageVersion(imageName string) (*version.Version, error) { - var b strings.Builder - err := cmdExec("docker", "docker", []string{"image", "inspect", "--format", `{{index .Config.Labels "org.opencontainers.image.version"}}`, imageName}, &b, "") - if err != nil { - return nil, err - } - output := b.String() - - return version.NewVersion(strings.TrimSpace(output)) -} - func cmdExec(name, binary string, args []string, stdout io.Writer, dir string) error { if binary == "" { panic("binary named " + name + " was not detected") diff --git a/test/integration/consul-container/libs/utils/helpers.go b/test/integration/consul-container/libs/utils/helpers.go index 7f08b27b9ffe8..5f75e3e4b3f7f 100644 --- a/test/integration/consul-container/libs/utils/helpers.go +++ b/test/integration/consul-container/libs/utils/helpers.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils diff --git a/test/integration/consul-container/libs/utils/retry.go b/test/integration/consul-container/libs/utils/retry.go index cfe5ade347cd7..651a195cf116f 100644 --- a/test/integration/consul-container/libs/utils/retry.go +++ b/test/integration/consul-container/libs/utils/retry.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils diff --git a/test/integration/consul-container/libs/utils/tenancy.go b/test/integration/consul-container/libs/utils/tenancy.go index 058f9cee0147a..c116a55a4c276 100644 --- a/test/integration/consul-container/libs/utils/tenancy.go +++ b/test/integration/consul-container/libs/utils/tenancy.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package utils import "github.com/hashicorp/consul/api" @@ -25,11 +22,11 @@ func DefaultToEmpty(name string) string { return name } -// CompatQueryOpts cleans a QueryOptions so that Partition and Namespace fields -// are compatible with CE or ENT -// TODO: not sure why we can't do this server-side -func CompatQueryOpts(opts *api.QueryOptions) *api.QueryOptions { - opts.Partition = DefaultToEmpty(opts.Partition) - opts.Namespace = DefaultToEmpty(opts.Namespace) - return opts +// PartitionQueryOptions returns an *api.QueryOptions with the given partition +// field set only if the partition is non-default. This helps when writing +// tests for joint use in OSS and ENT. +func PartitionQueryOptions(partition string) *api.QueryOptions { + return &api.QueryOptions{ + Partition: DefaultToEmpty(partition), + } } diff --git a/test/integration/consul-container/libs/utils/utils.go b/test/integration/consul-container/libs/utils/utils.go index b3d8382ed45a7..7be336eb8d507 100644 --- a/test/integration/consul-container/libs/utils/utils.go +++ b/test/integration/consul-container/libs/utils/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils diff --git a/test/integration/consul-container/libs/utils/version.go b/test/integration/consul-container/libs/utils/version.go index 24e66a8698145..bad097550278d 100644 --- a/test/integration/consul-container/libs/utils/version.go +++ b/test/integration/consul-container/libs/utils/version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package utils @@ -7,7 +7,6 @@ import ( "flag" "strings" - "github.com/hashicorp/consul/testing/deployer/topology" "github.com/hashicorp/go-version" ) @@ -56,20 +55,6 @@ func GetLatestImageName() string { return LatestImageName } -func TargetImages() topology.Images { - img := DockerImage(targetImageName, TargetVersion) - - if IsEnterprise() { - return topology.Images{ - ConsulEnterprise: img, - } - } else { - return topology.Images{ - ConsulCE: img, - } - } -} - func IsEnterprise() bool { return isInEnterpriseRepo } func DockerImage(image, version string) string { diff --git a/test/integration/consul-container/libs/utils/version_ce.go b/test/integration/consul-container/libs/utils/version_ce.go index 2e5b1b3656b01..2232ed8eb4e17 100644 --- a/test/integration/consul-container/libs/utils/version_ce.go +++ b/test/integration/consul-container/libs/utils/version_ce.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !consulent // +build !consulent diff --git a/test/integration/consul-container/test/basic/connect_service_test.go b/test/integration/consul-container/test/basic/connect_service_test.go index ee045f1286d38..650db9fef0794 100644 --- a/test/integration/consul-container/test/basic/connect_service_test.go +++ b/test/integration/consul-container/test/basic/connect_service_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package basic @@ -7,8 +7,6 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" - libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" "github.com/hashicorp/consul/test/integration/consul-container/libs/topology" @@ -39,7 +37,7 @@ func TestBasicConnectService(t *testing.T) { }, }) - _, clientService := topology.CreateServices(t, cluster, "http") + _, clientService := topology.CreateServices(t, cluster) _, port := clientService.GetAddr() _, adminPort := clientService.GetAdminAddr() @@ -50,54 +48,3 @@ func TestBasicConnectService(t *testing.T) { libassert.HTTPServiceEchoes(t, "localhost", port, "") libassert.AssertFortioName(t, fmt.Sprintf("http://localhost:%d", port), "static-server", "") } - -func TestConnectGRPCService_WithInputConfig(t *testing.T) { - serverHclConfig := ` -datacenter = "dc2" -data_dir = "/non-existent/conssul-data-dir" -node_name = "server-1" - -bind_addr = "0.0.0.0" -max_query_time = "800s" - ` - - clientHclConfig := ` -datacenter = "dc2" -data_dir = "/non-existent/conssul-data-dir" -node_name = "client-1" - -bind_addr = "0.0.0.0" -max_query_time = "900s" - ` - - cluster, _, _ := topology.NewClusterWithConfig(t, &topology.ClusterConfig{ - NumServers: 1, - NumClients: 1, - ApplyDefaultProxySettings: true, - BuildOpts: &libcluster.BuildOptions{ - Datacenter: "dc1", - InjectAutoEncryption: true, - InjectGossipEncryption: true, - AllowHTTPAnyway: true, - }, - }, - serverHclConfig, - clientHclConfig, - ) - - // Verify the provided server config is merged to agent config - serverConfig := cluster.Agents[0].GetConfig() - require.Contains(t, serverConfig.JSON, "\"max_query_time\":\"800s\"") - - clientConfig := cluster.Agents[1].GetConfig() - require.Contains(t, clientConfig.JSON, "\"max_query_time\":\"900s\"") - - _, clientService := topology.CreateServices(t, cluster, "grpc") - _, port := clientService.GetAddr() - _, adminPort := clientService.GetAdminAddr() - - libassert.AssertUpstreamEndpointStatus(t, adminPort, "static-server.default", "HEALTHY", 1) - libassert.GRPCPing(t, fmt.Sprintf("localhost:%d", port)) - - // time.Sleep(9999 * time.Second) -} diff --git a/test/integration/consul-container/test/catalog/catalog_test.go b/test/integration/consul-container/test/catalog/catalog_test.go deleted file mode 100644 index a2f4216c1c459..0000000000000 --- a/test/integration/consul-container/test/catalog/catalog_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package catalog - -import ( - "testing" - - "github.com/stretchr/testify/require" - - libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" - libtopology "github.com/hashicorp/consul/test/integration/consul-container/libs/topology" - - "github.com/hashicorp/consul/internal/catalog/catalogtest" - pbresource "github.com/hashicorp/consul/proto-public/pbresource" -) - -func TestCatalog(t *testing.T) { - t.Parallel() - - cluster, _, _ := libtopology.NewCluster(t, &libtopology.ClusterConfig{ - NumServers: 3, - BuildOpts: &libcluster.BuildOptions{Datacenter: "dc1"}, - Cmd: `-hcl=experiments=["resource-apis"]`, - }) - - followers, err := cluster.Followers() - require.NoError(t, err) - client := pbresource.NewResourceServiceClient(followers[0].GetGRPCConn()) - - t.Run("one-shot", func(t *testing.T) { - catalogtest.RunCatalogV1Alpha1IntegrationTest(t, client) - }) - - t.Run("lifecycle", func(t *testing.T) { - catalogtest.RunCatalogV1Alpha1LifecycleIntegrationTest(t, client) - }) -} diff --git a/test/integration/consul-container/test/consul_envoy_version/consul_envoy_version.go b/test/integration/consul-container/test/consul_envoy_version/consul_envoy_version.go index c37dfc8116640..72c4964ffbf4d 100644 --- a/test/integration/consul-container/test/consul_envoy_version/consul_envoy_version.go +++ b/test/integration/consul-container/test/consul_envoy_version/consul_envoy_version.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/test/integration/consul-container/test/debugging.md b/test/integration/consul-container/test/debugging.md deleted file mode 100644 index 2957b520ac074..0000000000000 --- a/test/integration/consul-container/test/debugging.md +++ /dev/null @@ -1,78 +0,0 @@ -# Remote Debugging Integration Tests - -- [Introduction](#introduction) - - [How it works](#how-it-works) -- [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Running Upgrade integration tests](#debugging-integration-tests) - - [Building images](#building-images) - - [Remote debugging using GoLand](#remote-debugging-using-goland) - - -## Introduction - -Remote debugging integration tests allows you to attach your debugger to the consul container and debug go code running on that container. - -### How it works -The `dev-docker-dbg` Make target will build consul docker container that has the following: -- [delve (dlv) debugger](https://github.com/go-delve/delve) installed. -- a port exposed on the container that allows a debugger from your development environment to connect and attach to the consul process and debug it remotely. -- logs out the host and port information so that you have the information needed to connect to the port. - -The integration tests have been modified to expose the `--debug` flag that will switch the test from using a `consul:local` image that can be built using `make dev-docker` to using the `consul-dbg:local` image that was built from `make dev-docker-dbg`. - -The test is run in debug mode with a breakpoint set to just after the cluster is created and you can retrieve the port information. From there, you can set up a remote debugging session that connects to this port. - -## Getting Started -### Prerequisites -To run/debug integration tests locally, the following tools are required on your machine: -- Install [Go](https://go.dev/) (the version should match that of our CI config's Go image). -- Install [`Makefile`](https://www.gnu.org/software/make/manual/make.html). -- Install [`Docker`](https://docs.docker.com/get-docker/) required to run tests locally. - -### Debugging integration tests -#### Building images -- Build a consul image with dlv installed and a port exposed that the debugger can attach to. - ``` - make dev-docker-dbg - ``` -- Build a consul-envoy container image from the consul root directory that is required for testing but not for debugging. - ``` - docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=consul:local --build-arg ENVOY_VERSION=1.24.6 -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets - ``` - -#### Remote debugging using GoLand -(For additional information, see [GoLand's documentation on remote debugging](https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#attach-to-a-process-on-a-remote-machine).) -##### Set up the Debug Configuration for your test -- Create the configuration for debugging the test. (You may have to debug the test once so GoLand creates the configuration for you.) -- Go to `Run > Edit Configurations` and select the appropriate configuration. -- Add `--debug` to `Program arguments` and click OK. - - isolated -##### Obtain the debug port of your container -(This is required every time a test is debugged.) - -- Put a breakpoint in the test that you are running right after the cluster has been created. This should be on the line after the call to `topology.NewCluster()`. -- Debug the test and wait for the debug session to stop on the breakpoint in the test. -- In the Debug window, search for `debug info` on the Console tab and note the host and port. - - isolated -- Go to `Run > Edit Configurations` and add a `Go Remote` configuration with the host and port that your test has exposed. Click OK. - - isolated -- Debug the configuration that you just created. Verify that it shows as connected in the `Debugger` of this configuration in the `Debug` window. - - isolated -##### Debug the consul backend -- Set an appropriate breakpoint in the backend code of the endpoint that your test will call and that you wish to debug. -- Go to the test debugging tab for the integration test in the `Debug` window and `Resume Program`. - - isolated -- The remote debugging session should stop on the breakpoint, and you can freely debug the code path. - - isolated - -#### Remote debugging using VSCode -(For additional information, see [VSCode's documentation on remote debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging).) - -[comment]: <> (TODO: Openly looking for someone to add VSCode specific instructions.) diff --git a/test/integration/consul-container/test/envoy_extensions/ext_authz_test.go b/test/integration/consul-container/test/envoy_extensions/ext_authz_test.go index cf00105345fa4..3c43cdbdbd039 100644 --- a/test/integration/consul-container/test/envoy_extensions/ext_authz_test.go +++ b/test/integration/consul-container/test/envoy_extensions/ext_authz_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package envoyextensions diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/Dockerfile b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/Dockerfile deleted file mode 100644 index 31e2dd93d0428..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -FROM tinygo/tinygo:sha-598cb1e4ddce53d85600a1b7724ed39eea80e119 -COPY ./build.sh / -ENTRYPOINT ["/build.sh"] diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/README.md b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/README.md deleted file mode 100644 index 173e27bf3709e..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Building WASM test files - -We have seen some issues with building the wasm test files on the build runners for the integration test. Currently, -the theory is that there may be some differences in the clang toolchain on different runners which cause panics in -tinygo if the job is scheduled on particular runners but not others. - -In order to get around this, we are just building the wasm test file and checking it into the repo. - -To build the wasm test file, - -```bash -~/consul/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files -> docker run -v ./:/wasm --rm $(docker build -q .) -``` \ No newline at end of file diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/build.sh b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/build.sh deleted file mode 100755 index 6affddf298eb1..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -cd /wasm -tinygo build -o /wasm/wasm_add_header.wasm -scheduler=none -target=wasi /wasm/wasm_add_header.go \ No newline at end of file diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.mod b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.mod deleted file mode 100644 index 703b71414fae0..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module main - -go 1.20 - -require github.com/tetratelabs/proxy-wasm-go-sdk v0.21.0 diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.sum b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.sum deleted file mode 100644 index e09133fbccbf5..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/tetratelabs/proxy-wasm-go-sdk v0.21.0 h1:sxuh1wxy/zz4vXwMEC+ESVpwJmej1f22eYsrJlgVn7c= -github.com/tetratelabs/proxy-wasm-go-sdk v0.21.0/go.mod h1:jqQTUvJBI6WJ+sVCZON3A4GwmUfBDuiNnZ4kuxsvLCo= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/nginx.conf b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/nginx.conf deleted file mode 100644 index 06533f75ac1a7..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/nginx.conf +++ /dev/null @@ -1,13 +0,0 @@ -server { - # send wasm files as download rather than render as html - location ~ ^.*/(?P[^/]+\.(wasm))$ { - root /www/downloads; - - add_header Content-disposition 'attachment; filename="$request_basename"'; - types { - application/octet-stream .wasm; - } - default_type application/octet-stream; - } -} - diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.go b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.go deleted file mode 100644 index 91aeae6956764..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package main - -import ( - "github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm" - "github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm/types" -) - -func main() { - proxywasm.SetVMContext(&vmContext{}) -} - -type vmContext struct { - // Embed the default VM context here, - // so that we don't need to reimplement all the methods. - types.DefaultVMContext -} - -func (*vmContext) NewPluginContext(contextID uint32) types.PluginContext { - return &pluginContext{} -} - -type pluginContext struct { - // Embed the default plugin context here, - // so that we don't need to reimplement all the methods. - types.DefaultPluginContext -} - -func (p *pluginContext) NewHttpContext(contextID uint32) types.HttpContext { - return &httpHeaders{} -} - -type httpHeaders struct { - // Embed the default http context here, - // so that we don't need to reimplement all the methods. - types.DefaultHttpContext -} - -func (ctx *httpHeaders) OnHttpResponseHeaders(int, bool) types.Action { - proxywasm.LogDebug("adding header: x-test:true") - - err := proxywasm.AddHttpResponseHeader("x-test", "true") - if err != nil { - proxywasm.LogCriticalf("failed to add test header to response: %v", err) - } - - return types.ActionContinue -} diff --git a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.wasm b/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.wasm deleted file mode 100755 index 520e7e144ada5..0000000000000 Binary files a/test/integration/consul-container/test/envoy_extensions/testdata/wasm_test_files/wasm_add_header.wasm and /dev/null differ diff --git a/test/integration/consul-container/test/envoy_extensions/wasm_test.go b/test/integration/consul-container/test/envoy_extensions/wasm_test.go deleted file mode 100644 index ae5cf3b3d5b76..0000000000000 --- a/test/integration/consul-container/test/envoy_extensions/wasm_test.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package envoyextensions - -import ( - "context" - "crypto/sha256" - "fmt" - "io" - "net/http" - "os" - "testing" - "time" - - "github.com/hashicorp/go-cleanhttp" - "github.com/stretchr/testify/require" - "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/wait" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/consul/sdk/testutil/retry" - libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert" - libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" - libservice "github.com/hashicorp/consul/test/integration/consul-container/libs/service" - "github.com/hashicorp/consul/test/integration/consul-container/libs/topology" -) - -// TestWASMRemote Summary -// This test ensures that a WASM extension can be loaded from a remote file server then executed. -// It uses the same basic WASM extension as the TestWASMLocal test which adds the header -// "x-test:true" to the response. -// This test configures a static server and proxy, a client proxy, as well as an Nginx file server to -// serve the compiled wasm extension. The static proxy is configured to apply the wasm filter -// and pointed at the remote file server. When the filter is added with the remote wasm file configured -// envoy calls out to the nginx file server to download it. -func TestWASMRemote(t *testing.T) { - t.Parallel() - - // build all the file paths we will need for the test - cwd, err := os.Getwd() - require.NoError(t, err, "could not get current working directory") - hostWASMDir := fmt.Sprintf("%s/testdata/wasm_test_files", cwd) - - cluster, _, _ := topology.NewCluster(t, &topology.ClusterConfig{ - NumServers: 1, - NumClients: 1, - ApplyDefaultProxySettings: true, - BuildOpts: &libcluster.BuildOptions{ - Datacenter: "dc1", - InjectAutoEncryption: true, - InjectGossipEncryption: true, - }, - }) - - clientService, staticProxy := createTestServices(t, cluster) - _, port := clientService.GetAddr() - _, adminPort := clientService.GetAdminAddr() - - libassert.AssertUpstreamEndpointStatus(t, adminPort, "static-server.default", "HEALTHY", 1) - libassert.GetEnvoyListenerTCPFilters(t, adminPort) - - libassert.AssertContainerState(t, clientService, "running") - libassert.AssertFortioName(t, fmt.Sprintf("http://localhost:%d", port), "static-server", "") - - // Check header not present - c1 := cleanhttp.DefaultClient() - res, err := c1.Get(fmt.Sprintf("http://localhost:%d", port)) - require.NoError(t, err) - - // check that header DOES NOT exist before wasm applied - if value := res.Header.Get(http.CanonicalHeaderKey("x-test")); value != "" { - t.Fatal("unexpected test header present before WASM applied") - } - - // Create Nginx file server - uri, nginxService, nginxProxy := createNginxFileServer(t, cluster, - // conf file - testcontainers.ContainerFile{ - HostFilePath: fmt.Sprintf("%s/nginx.conf", hostWASMDir), - ContainerFilePath: "/etc/nginx/conf.d/wasm.conf", - FileMode: 777, - }, - // extra files loaded after startup - testcontainers.ContainerFile{ - HostFilePath: fmt.Sprintf("%s/wasm_add_header.wasm", hostWASMDir), - ContainerFilePath: "/usr/share/nginx/html/wasm_add_header.wasm", - FileMode: 777, - }) - - defer nginxService.Terminate() - defer nginxProxy.Terminate() - - // wire up the wasm filter - node := cluster.Agents[0] - client := node.GetClient() - - agentService, _, err := client.Agent().Service(libservice.StaticServerServiceName, nil) - require.NoError(t, err) - - agentService.Connect = &api.AgentServiceConnect{ - SidecarService: &api.AgentServiceRegistration{ - Kind: api.ServiceKindConnectProxy, - Proxy: &api.AgentServiceConnectProxyConfig{ - Upstreams: []api.Upstream{ - { - DestinationName: "nginx-fileserver", - DestinationPeer: "", - LocalBindAddress: "0.0.0.0", - LocalBindPort: 9595, - }, - }, - }, - }, - } - - // Upsert the service registration to add the nginx file server as an - // upstream so that the static server proxy can retrieve the wasm plugin. - err = client.Agent().ServiceRegister(&api.AgentServiceRegistration{ - Kind: agentService.Kind, - ID: agentService.ID, - Name: agentService.Service, - Tags: agentService.Tags, - Port: agentService.Port, - Address: agentService.Address, - SocketPath: agentService.SocketPath, - TaggedAddresses: agentService.TaggedAddresses, - EnableTagOverride: agentService.EnableTagOverride, - Meta: agentService.Meta, - Weights: &agentService.Weights, - Check: nil, - Checks: nil, - Proxy: agentService.Proxy, - Connect: agentService.Connect, - Namespace: agentService.Namespace, - Partition: agentService.Partition, - Locality: agentService.Locality, - }) - if err != nil { - t.Fatal(err) - } - - // wait until the nginx-fileserver is reachable from the static proxy - t.Log("Attempting wait until nginx-fileserver-sidecar-proxy is available") - bashScript := "for i in {1..10}; do echo Attempt $1: contacting nginx; if curl -I localhost:9595; then break; fi;" + - "if [[ $i -ge 10 ]]; then echo Unable to connect to nginx; exit 1; fi; sleep 3; done; echo nginx available" - _, err = staticProxy.Exec(context.Background(), []string{"/bin/bash", "-c", bashScript}) - require.NoError(t, err) - - consul := cluster.APIClient(0) - defaults := api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: "static-server", - Protocol: "http", - EnvoyExtensions: []api.EnvoyExtension{{ - Name: "builtin/wasm", - Arguments: map[string]any{ - "Protocol": "http", - "ListenerType": "inbound", - "PluginConfig": map[string]any{ - "VmConfig": map[string]any{ - "Code": map[string]any{ - "Remote": map[string]any{ - "HttpURI": map[string]any{ - "Service": map[string]any{ - "Name": "nginx-fileserver", - }, - "URI": fmt.Sprintf("%s/wasm_add_header.wasm", uri), - }, - "SHA256": sha256FromFile(t, fmt.Sprintf("%s/wasm_add_header.wasm", hostWASMDir)), - }, - }, - }, - }, - }, - }}, - } - - _, _, err = consul.ConfigEntries().Set(&defaults, nil) - require.NoError(t, err, "could not set config entries") - - // Check that header is present after wasm applied - c2 := cleanhttp.DefaultClient() - - // The wasm plugin is not always applied on the first call. Retry and see if it is loaded. - retryStrategy := func() *retry.Timer { - return &retry.Timer{Timeout: 5 * time.Second, Wait: time.Second} - } - retry.RunWith(retryStrategy(), t, func(r *retry.R) { - res2, err := c2.Get(fmt.Sprintf("http://localhost:%d", port)) - require.NoError(r, err) - - if value := res2.Header.Get(http.CanonicalHeaderKey("x-test")); value == "" { - r.Fatal("test header missing after WASM applied") - } - }) -} - -// TestWASMLocal Summary -// This test ensures that a WASM extension with basic functionality is executed correctly. -// The extension takes an incoming request and adds the header "x-test:true" -func TestWASMLocal(t *testing.T) { - t.Parallel() - - cluster, _, _ := topology.NewCluster(t, &topology.ClusterConfig{ - NumServers: 1, - NumClients: 1, - ApplyDefaultProxySettings: true, - BuildOpts: &libcluster.BuildOptions{ - Datacenter: "dc1", - InjectAutoEncryption: true, - InjectGossipEncryption: true, - }, - }) - - clientService, _ := createTestServices(t, cluster) - _, port := clientService.GetAddr() - _, adminPort := clientService.GetAdminAddr() - - libassert.AssertUpstreamEndpointStatus(t, adminPort, "static-server.default", "HEALTHY", 1) - libassert.GetEnvoyListenerTCPFilters(t, adminPort) - - libassert.AssertContainerState(t, clientService, "running") - libassert.AssertFortioName(t, fmt.Sprintf("http://localhost:%d", port), "static-server", "") - - // Check header not present - c1 := cleanhttp.DefaultClient() - res, err := c1.Get(fmt.Sprintf("http://localhost:%d", port)) - require.NoError(t, err) - - // check that header DOES NOT exist before wasm applied - if value := res.Header.Get(http.CanonicalHeaderKey("x-test")); value != "" { - t.Fatal("unexpected test header present before WASM applied") - } - - // wire up the wasm filter - consul := cluster.APIClient(0) - defaults := api.ServiceConfigEntry{ - Kind: api.ServiceDefaults, - Name: "static-server", - Protocol: "http", - EnvoyExtensions: []api.EnvoyExtension{{ - Name: "builtin/wasm", - Arguments: map[string]any{ - "Protocol": "http", - "ListenerType": "inbound", - "PluginConfig": map[string]any{ - "VmConfig": map[string]any{ - "Code": map[string]any{ - "Local": map[string]any{ - "Filename": "/wasm_add_header.wasm", - }, - }, - }, - }, - }, - }}, - } - - _, _, err = consul.ConfigEntries().Set(&defaults, nil) - require.NoError(t, err, "could not set config entries") - - // Check that header is present after wasm applied - c2 := cleanhttp.DefaultClient() - - // The wasm plugin is not always applied on the first call. Retry and see if it is loaded. - retryStrategy := func() *retry.Timer { - return &retry.Timer{Timeout: 5 * time.Second, Wait: time.Second} - } - retry.RunWith(retryStrategy(), t, func(r *retry.R) { - res2, err := c2.Get(fmt.Sprintf("http://localhost:%d", port)) - require.NoError(r, err) - - if value := res2.Header.Get(http.CanonicalHeaderKey("x-test")); value == "" { - r.Fatal("test header missing after WASM applied") - } - }) -} - -func createTestServices(t *testing.T, cluster *libcluster.Cluster) (libservice.Service, libservice.Service) { - node := cluster.Agents[0] - client := node.GetClient() - // Create a service and proxy instance - serviceOpts := &libservice.ServiceOpts{ - Name: libservice.StaticServerServiceName, - ID: libservice.StaticServerServiceName, - HTTPPort: 8080, - GRPCPort: 8079, - } - cwd, err := os.Getwd() - require.NoError(t, err, "could not get current working directory") - hostWASMDir := fmt.Sprintf("%s/testdata/wasm_test_files", cwd) - - wasmFile := testcontainers.ContainerFile{ - HostFilePath: fmt.Sprintf("%s/wasm_add_header.wasm", hostWASMDir), - ContainerFilePath: "/wasm_add_header.wasm", - FileMode: 777, - } - - customFn := chain( - copyFilesToContainer([]testcontainers.ContainerFile{wasmFile}), - chownFiles([]testcontainers.ContainerFile{wasmFile}, "envoy", true), - ) - - // Create a service and proxy instance - _, staticProxy, err := libservice.CreateAndRegisterStaticServerAndSidecarWithCustomContainerConfig(node, serviceOpts, customFn) - require.NoError(t, err) - - libassert.CatalogServiceExists(t, client, "static-server-sidecar-proxy", nil) - libassert.CatalogServiceExists(t, client, libservice.StaticServerServiceName, nil) - - // Create a client proxy instance with the server as an upstream - - clientConnectProxy, err := libservice.CreateAndRegisterStaticClientSidecar(node, "", false, false, nil) - require.NoError(t, err) - - libassert.CatalogServiceExists(t, client, "static-client-sidecar-proxy", nil) - - return clientConnectProxy, staticProxy -} - -// createNginxFileServer creates an nginx container configured to serve a wasm file for download, as well as a sidecar -// registered for the service. -func createNginxFileServer(t *testing.T, - cluster *libcluster.Cluster, - conf testcontainers.ContainerFile, - files ...testcontainers.ContainerFile) (string, libservice.Service, libservice.Service) { - - nginxName := "nginx-fileserver" - nginxPort := 80 - svc := &libservice.ServiceOpts{ - Name: nginxName, - ID: nginxName, - HTTPPort: nginxPort, - GRPCPort: 9999, - } - - node := cluster.Agents[0] - - req := testcontainers.ContainerRequest{ - // nginx:stable - Image: "nginx@sha256:b07a5ab5292bd90c4271a55a44761899cc1b14814172cf7f186e3afb8bdbec28", - Name: nginxName, - WaitingFor: wait.ForLog("").WithStartupTimeout(time.Second * 30), - LifecycleHooks: []testcontainers.ContainerLifecycleHooks{ - { - PostStarts: []testcontainers.ContainerHook{ - func(ctx context.Context, c testcontainers.Container) error { - _, _, err := c.Exec(ctx, []string{"mkdir", "-p", "/www/downloads"}) - if err != nil { - return err - } - - for _, f := range files { - fBytes, err := os.ReadFile(f.HostFilePath) - if err != nil { - return err - } - err = c.CopyToContainer(ctx, fBytes, f.ContainerFilePath, f.FileMode) - if err != nil { - return err - } - - _, _, err = c.Exec(ctx, []string{"chmod", "+r", f.ContainerFilePath}) - if err != nil { - return err - } - } - - return err - }, - }, - }, - }, - Files: []testcontainers.ContainerFile{conf}, - } - - nginxService, nginxProxy, err := libservice.CreateAndRegisterCustomServiceAndSidecar(node, svc, req, nil) - require.NoError(t, err, "could not create custom server and sidecar") - - _, port := nginxService.GetAddr() - - client := node.GetClient() - libassert.CatalogServiceExists(t, client, nginxName, nil) - libassert.CatalogServiceExists(t, client, fmt.Sprintf("%s-sidecar-proxy", nginxName), nil) - - return fmt.Sprintf("http://nginx-fileserver:%d", port), nginxService, nginxProxy -} - -// chain takes multiple setup functions for testcontainers.ContainerRequest and chains them together into a single function -// of testcontainers.ContainerRequest to testcontainers.ContainerRequest. -func chain(fns ...func(testcontainers.ContainerRequest) testcontainers.ContainerRequest) func(testcontainers.ContainerRequest) testcontainers.ContainerRequest { - return func(req testcontainers.ContainerRequest) testcontainers.ContainerRequest { - for _, fn := range fns { - req = fn(req) - } - - return req - } -} - -// copyFilesToContainer is a convenience function to build custom testcontainers.ContainerRequest. It takes a list of files -// which need to be copied to the container. It returns a function which updates a given testcontainers.ContainerRequest -// to include the files which need to be copied to the container on startup. -func copyFilesToContainer(files []testcontainers.ContainerFile) func(testcontainers.ContainerRequest) testcontainers.ContainerRequest { - return func(req testcontainers.ContainerRequest) testcontainers.ContainerRequest { - req.Files = files - return req - } -} - -// chownFiles is a convenience function to build custom testcontainers.ContainerRequest. It takes a list of files, -// a user to make the owner, and whether the command requires sudo. It then returns a function which updates -// a testcontainers.ContainerRequest with a lifecycle hook which will chown the files to the user after container startup. -func chownFiles(files []testcontainers.ContainerFile, user string, sudo bool) func(request testcontainers.ContainerRequest) testcontainers.ContainerRequest { - return func(req testcontainers.ContainerRequest) testcontainers.ContainerRequest { - req.LifecycleHooks = append(req.LifecycleHooks, testcontainers.ContainerLifecycleHooks{ - PostStarts: []testcontainers.ContainerHook{ - func(ctx context.Context, c testcontainers.Container) error { - cmd := []string{} - if sudo { - cmd = append(cmd, "sudo") - } - - cmd = append(cmd, "chown", user) - - for _, f := range files { - cmd = append(cmd, f.ContainerFilePath) - } - - _, _, err := c.Exec(ctx, cmd) - return err - }, - }, - }) - - return req - } -} - -// sha256FromFile reads in the file from filepath and computes a sha256 of its contents. -func sha256FromFile(t *testing.T, filepath string) string { - f, err := os.Open(filepath) - require.NoError(t, err, "could not open file for sha") - defer f.Close() - - h := sha256.New() - _, err = io.Copy(h, f) - require.NoError(t, err, "could not copy file to sha") - - return fmt.Sprintf("%x", h.Sum(nil)) -} - -// safeDelete removes a given file if it exists. -func safeDelete(t *testing.T, filePath string) { - t.Logf("cleaning up stale build file: %s", filePath) - if _, err := os.Stat(filePath); err != nil { - return - } - - // build is out of date, wipe compiled wasm - err := os.Remove(filePath) - require.NoError(t, err, "could not remove file") -} diff --git a/test/integration/consul-container/test/gateways/gateway_endpoint_test.go b/test/integration/consul-container/test/gateways/gateway_endpoint_test.go index 42cccef121a2a..659fc4e3fdfea 100644 --- a/test/integration/consul-container/test/gateways/gateway_endpoint_test.go +++ b/test/integration/consul-container/test/gateways/gateway_endpoint_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package gateways diff --git a/test/integration/consul-container/test/gateways/http_route_test.go b/test/integration/consul-container/test/gateways/http_route_test.go index e3a975c15042d..fcdbb7ce1c961 100644 --- a/test/integration/consul-container/test/gateways/http_route_test.go +++ b/test/integration/consul-container/test/gateways/http_route_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package gateways diff --git a/test/integration/consul-container/test/gateways/ingress_gateway_test.go b/test/integration/consul-container/test/gateways/ingress_gateway_test.go index fb616232995f5..fcadd3a0fae62 100644 --- a/test/integration/consul-container/test/gateways/ingress_gateway_test.go +++ b/test/integration/consul-container/test/gateways/ingress_gateway_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package gateways @@ -51,7 +51,7 @@ func TestIngressGateway(t *testing.T) { clientNode := cluster.Clients()[0] // Set up the "static-server" backend - serverService, _ := topology.CreateServices(t, cluster, "http") + serverService, _ := topology.CreateServices(t, cluster) // Create the ingress gateway service // We expose this on the client node, which already has port 9999 exposed as part of it's pause "pod" diff --git a/test/integration/consul-container/test/gateways/tenancy_ce.go b/test/integration/consul-container/test/gateways/tenancy_ce.go index ebf59c40d9613..19d82d39db17a 100644 --- a/test/integration/consul-container/test/gateways/tenancy_ce.go +++ b/test/integration/consul-container/test/gateways/tenancy_ce.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - //go:build !consulent // +build !consulent diff --git a/test/integration/consul-container/test/jwtauth/jwt_auth_test.go b/test/integration/consul-container/test/jwtauth/jwt_auth_test.go index 939dec13882bf..b75e608de6de4 100644 --- a/test/integration/consul-container/test/jwtauth/jwt_auth_test.go +++ b/test/integration/consul-container/test/jwtauth/jwt_auth_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package jwtauth diff --git a/test/integration/consul-container/test/observability/access_logs_test.go b/test/integration/consul-container/test/observability/access_logs_test.go index e48b05a1254d4..43931cf4ea2a4 100644 --- a/test/integration/consul-container/test/observability/access_logs_test.go +++ b/test/integration/consul-container/test/observability/access_logs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package observability @@ -72,7 +72,7 @@ func TestAccessLogs(t *testing.T) { require.NoError(t, err) require.True(t, set) - serverService, clientService := topology.CreateServices(t, cluster, "http") + serverService, clientService := topology.CreateServices(t, cluster) _, port := clientService.GetAddr() // Validate Custom JSON diff --git a/test/integration/consul-container/test/observability/metrics_leader_test.go b/test/integration/consul-container/test/observability/metrics_leader_test.go index 781e657a9f35a..4d3a024e9b609 100644 --- a/test/integration/consul-container/test/observability/metrics_leader_test.go +++ b/test/integration/consul-container/test/observability/metrics_leader_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package observability diff --git a/test/integration/consul-container/test/peering/rotate_server_and_ca_then_fail_test.go b/test/integration/consul-container/test/peering/rotate_server_and_ca_then_fail_test.go index 77639b78d1a71..86285f2c605a2 100644 --- a/test/integration/consul-container/test/peering/rotate_server_and_ca_then_fail_test.go +++ b/test/integration/consul-container/test/peering/rotate_server_and_ca_then_fail_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package peering diff --git a/test/integration/consul-container/test/ratelimit/ratelimit_test.go b/test/integration/consul-container/test/ratelimit/ratelimit_test.go index ed35bcf64646a..18258c2ab8db4 100644 --- a/test/integration/consul-container/test/ratelimit/ratelimit_test.go +++ b/test/integration/consul-container/test/ratelimit/ratelimit_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package ratelimit @@ -32,6 +32,8 @@ const ( // - logs for exceeding func TestServerRequestRateLimit(t *testing.T) { + t.Parallel() + type action struct { function func(client *api.Client) error rateLimitOperation string @@ -50,7 +52,6 @@ func TestServerRequestRateLimit(t *testing.T) { mode string } - // getKV and putKV are net/RPC calls getKV := action{ function: func(client *api.Client) error { _, _, err := client.KV().Get("foo", &api.QueryOptions{}) @@ -98,13 +99,13 @@ func TestServerRequestRateLimit(t *testing.T) { action: putKV, expectedErrorMsg: "", expectExceededLog: true, - expectMetric: true, + expectMetric: false, }, { action: getKV, expectedErrorMsg: "", expectExceededLog: true, - expectMetric: true, + expectMetric: false, }, }, }, @@ -126,13 +127,10 @@ func TestServerRequestRateLimit(t *testing.T) { expectMetric: true, }, }, - }, - } + }} for _, tc := range testCases { - tc := tc t.Run(tc.description, func(t *testing.T) { - t.Parallel() clusterConfig := &libtopology.ClusterConfig{ NumServers: 1, NumClients: 0, @@ -146,9 +144,12 @@ func TestServerRequestRateLimit(t *testing.T) { ApplyDefaultProxySettings: false, } - cluster, client := setupClusterAndClient(t, clusterConfig, true) + cluster, _, _ := libtopology.NewCluster(t, clusterConfig) defer terminate(t, cluster) + client, err := cluster.GetClient(nil, true) + require.NoError(t, err) + // perform actions and validate returned errors to client for _, op := range tc.operations { err := op.action.function(client) @@ -164,14 +165,22 @@ func TestServerRequestRateLimit(t *testing.T) { // doing this in a separate loop so we can perform actions, allow metrics // and logs to collect and then assert on each. for _, op := range tc.operations { - timer := &retry.Timer{Timeout: 15 * time.Second, Wait: 500 * time.Millisecond} + timer := &retry.Timer{Timeout: 10 * time.Second, Wait: 500 * time.Millisecond} retry.RunWith(timer, t, func(r *retry.R) { - checkForMetric(t, cluster, op.action.rateLimitOperation, op.action.rateLimitType, tc.mode, op.expectMetric) + // validate metrics + metricsInfo, err := client.Agent().Metrics() + // TODO(NET-1978): currently returns NaN error + // require.NoError(t, err) + if metricsInfo != nil && err == nil { + if op.expectMetric { + checkForMetric(r, metricsInfo, op.action.rateLimitOperation, op.action.rateLimitType, tc.mode) + } + } // validate logs // putting this last as there are cases where logs // were not present in consumer when assertion was made. - checkLogsForMessage(t, clusterConfig.LogConsumer.Msgs, + checkLogsForMessage(r, clusterConfig.LogConsumer.Msgs, fmt.Sprintf("[DEBUG] agent.server.rpc-rate-limit: RPC exceeded allowed rate limit: rpc=%s", op.action.rateLimitOperation), op.action.rateLimitOperation, "exceeded", op.expectExceededLog) @@ -181,65 +190,43 @@ func TestServerRequestRateLimit(t *testing.T) { } } -func setupClusterAndClient(t *testing.T, config *libtopology.ClusterConfig, isServer bool) (*libcluster.Cluster, *api.Client) { - cluster, _, _ := libtopology.NewCluster(t, config) - - client, err := cluster.GetClient(nil, isServer) - require.NoError(t, err) - - return cluster, client -} +func checkForMetric(t *retry.R, metricsInfo *api.MetricsInfo, operationName string, expectedLimitType string, expectedMode string) { + const counterName = "consul.rpc.rate_limit.exceeded" -func checkForMetric(t *testing.T, cluster *libcluster.Cluster, operationName string, expectedLimitType string, expectedMode string, expectMetric bool) { - // validate metrics - server, err := cluster.GetClient(nil, true) - require.NoError(t, err) - metricsInfo, err := server.Agent().Metrics() - // TODO(NET-1978): currently returns NaN error - // require.NoError(t, err) - if metricsInfo != nil && err == nil { - if expectMetric { - const counterName = "consul.rpc.rate_limit.exceeded" - - var counter api.SampledValue - for _, c := range metricsInfo.Counters { - if c.Name == counterName { - counter = c - break - } - } - require.NotEmptyf(t, counter.Name, "counter not found: %s", counterName) + var counter api.SampledValue + for _, c := range metricsInfo.Counters { + if c.Name == counterName { + counter = c + break + } + } + require.NotEmptyf(t, counter.Name, "counter not found: %s", counterName) - operation, ok := counter.Labels["op"] - require.True(t, ok) + operation, ok := counter.Labels["op"] + require.True(t, ok) - limitType, ok := counter.Labels["limit_type"] - require.True(t, ok) + limitType, ok := counter.Labels["limit_type"] + require.True(t, ok) - mode, ok := counter.Labels["mode"] - require.True(t, ok) + mode, ok := counter.Labels["mode"] + require.True(t, ok) - if operation == operationName { - require.GreaterOrEqual(t, counter.Count, 1) - require.Equal(t, expectedLimitType, limitType) - require.Equal(t, expectedMode, mode) - } - } + if operation == operationName { + require.GreaterOrEqual(t, counter.Count, 1) + require.Equal(t, expectedLimitType, limitType) + require.Equal(t, expectedMode, mode) } } -func checkLogsForMessage(t *testing.T, logs []string, msg string, operationName string, logType string, logShouldExist bool) { - if logShouldExist { - found := false - for _, log := range logs { - if strings.Contains(log, msg) { - found = true - break - } +func checkLogsForMessage(t *retry.R, logs []string, msg string, operationName string, logType string, logShouldExist bool) { + found := false + for _, log := range logs { + if strings.Contains(log, msg) { + found = true + break } - expectedLog := fmt.Sprintf("%s log check failed for: %s. Log expected: %t", logType, operationName, logShouldExist) - require.Equal(t, logShouldExist, found, expectedLog) } + require.Equal(t, logShouldExist, found, fmt.Sprintf("%s log check failed for: %s. Log expected: %t", logType, operationName, logShouldExist)) } func terminate(t *testing.T, cluster *libcluster.Cluster) { diff --git a/test/integration/consul-container/test/snapshot/snapshot_restore_test.go b/test/integration/consul-container/test/snapshot/snapshot_restore_test.go index 91fcec05bb026..70fa0d2d41434 100644 --- a/test/integration/consul-container/test/snapshot/snapshot_restore_test.go +++ b/test/integration/consul-container/test/snapshot/snapshot_restore_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package snapshot diff --git a/test/integration/consul-container/test/tproxy/tproxy_test.go b/test/integration/consul-container/test/tproxy/tproxy_test.go index 15eae0c210906..cbeaff398f86a 100644 --- a/test/integration/consul-container/test/tproxy/tproxy_test.go +++ b/test/integration/consul-container/test/tproxy/tproxy_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tproxy diff --git a/test/integration/consul-container/test/troubleshoot/troubleshoot_test.go b/test/integration/consul-container/test/troubleshoot/troubleshoot_test.go index 538f4f2c27796..d0152611c878f 100644 --- a/test/integration/consul-container/test/troubleshoot/troubleshoot_test.go +++ b/test/integration/consul-container/test/troubleshoot/troubleshoot_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot @@ -31,7 +31,7 @@ func TestTroubleshootProxy(t *testing.T) { ApplyDefaultProxySettings: true, }) - serverService, clientService := topology.CreateServices(t, cluster, "http") + serverService, clientService := topology.CreateServices(t, cluster) clientSidecar, ok := clientService.(*libservice.ConnectContainer) require.True(t, ok) diff --git a/test/integration/consul-container/test/upgrade/acl_node_test.go b/test/integration/consul-container/test/upgrade/acl_node_test.go index 67b5fa12ad171..94886a4e27a42 100644 --- a/test/integration/consul-container/test/upgrade/acl_node_test.go +++ b/test/integration/consul-container/test/upgrade/acl_node_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/basic/basic_test.go b/test/integration/consul-container/test/upgrade/basic/basic_test.go index fe9f28fa2240e..40406caebeefb 100644 --- a/test/integration/consul-container/test/upgrade/basic/basic_test.go +++ b/test/integration/consul-container/test/upgrade/basic/basic_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/basic/fullstopupgrade_test.go b/test/integration/consul-container/test/upgrade/basic/fullstopupgrade_test.go index 75ae754fd5b90..6b4a047952bc4 100644 --- a/test/integration/consul-container/test/upgrade/basic/fullstopupgrade_test.go +++ b/test/integration/consul-container/test/upgrade/basic/fullstopupgrade_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/basic/healthcheck_test.go b/test/integration/consul-container/test/upgrade/basic/healthcheck_test.go index b0988cd280c29..fde78c182ea3f 100644 --- a/test/integration/consul-container/test/upgrade/basic/healthcheck_test.go +++ b/test/integration/consul-container/test/upgrade/basic/healthcheck_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/catalog/catalog_test.go b/test/integration/consul-container/test/upgrade/catalog/catalog_test.go deleted file mode 100644 index 73f94d4687bc3..0000000000000 --- a/test/integration/consul-container/test/upgrade/catalog/catalog_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package catalog - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/internal/catalog/catalogtest" - "github.com/hashicorp/consul/proto-public/pbresource" - libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster" - "github.com/hashicorp/consul/test/integration/consul-container/libs/topology" - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" - "github.com/hashicorp/go-version" -) - -var minCatalogResourceVersion = version.Must(version.NewVersion("v1.16.0")) - -const ( - versionUndetermined = ` -Cannot determine the actual version the starting image represents. -Scrutinze test failures to ensure that the starting version should -actually be able to be used for creating the initial data set. - ` -) - -func maybeSkipUpgradeTest(t *testing.T, minVersion *version.Version) { - t.Helper() - - image := utils.DockerImage(utils.GetLatestImageName(), utils.LatestVersion) - latestVersion, err := utils.DockerImageVersion(image) - - if latestVersion != nil && latestVersion.LessThan(minVersion) { - t.Skipf("Upgrade test isn't applicable with version %q as the starting version", latestVersion.String()) - } - - if err != nil || latestVersion == nil { - t.Log(versionUndetermined) - } -} - -// Test upgrade a cluster of latest version to the target version and ensure that the catalog still -// functions properly. Note -func TestCatalogUpgrade(t *testing.T) { - maybeSkipUpgradeTest(t, minCatalogResourceVersion) - t.Parallel() - - const numServers = 1 - buildOpts := &libcluster.BuildOptions{ - ConsulImageName: utils.GetLatestImageName(), - ConsulVersion: utils.LatestVersion, - Datacenter: "dc1", - InjectAutoEncryption: true, - } - - cluster, _, _ := topology.NewCluster(t, &topology.ClusterConfig{ - NumServers: 1, - BuildOpts: buildOpts, - ApplyDefaultProxySettings: true, - Cmd: `-hcl=experiments=["resource-apis"]`, - }) - - client := cluster.APIClient(0) - - libcluster.WaitForLeader(t, cluster, client) - libcluster.WaitForMembers(t, client, numServers) - - leader, err := cluster.Leader() - require.NoError(t, err) - rscClient := pbresource.NewResourceServiceClient(leader.GetGRPCConn()) - - // Initialize some data - catalogtest.PublishCatalogV1Alpha1IntegrationTestData(t, rscClient) - - // upgrade the cluster to the Target version - t.Logf("initiating standard upgrade to version=%q", utils.TargetVersion) - err = cluster.StandardUpgrade(t, context.Background(), utils.GetTargetImageName(), utils.TargetVersion) - - require.NoError(t, err) - libcluster.WaitForLeader(t, cluster, client) - libcluster.WaitForMembers(t, client, numServers) - - catalogtest.VerifyCatalogV1Alpha1IntegrationTestResults(t, rscClient) -} diff --git a/test/integration/consul-container/test/upgrade/common.go b/test/integration/consul-container/test/upgrade/common.go index cbbf9aea35af3..44bdcca25180a 100644 --- a/test/integration/consul-container/test/upgrade/common.go +++ b/test/integration/consul-container/test/upgrade/common.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - package upgrade import ( @@ -69,7 +66,7 @@ func CreateAndRegisterStaticClientSidecarWith2Upstreams(c *cluster.Cluster, dest ServiceID: libservice.StaticClientServiceName, } - clientConnectProxy, err := libservice.NewConnectService(context.Background(), sidecarCfg, []int{cluster.ServiceUpstreamLocalBindPort, cluster.ServiceUpstreamLocalBindPort2}, node, nil) + clientConnectProxy, err := libservice.NewConnectService(context.Background(), sidecarCfg, []int{cluster.ServiceUpstreamLocalBindPort, cluster.ServiceUpstreamLocalBindPort2}, node) if err != nil { return nil, err } diff --git a/test/integration/consul-container/test/upgrade/ingress_gateway_grpc_test.go b/test/integration/consul-container/test/upgrade/ingress_gateway_grpc_test.go index 174769d53170f..36a807a7ce131 100644 --- a/test/integration/consul-container/test/upgrade/ingress_gateway_grpc_test.go +++ b/test/integration/consul-container/test/upgrade/ingress_gateway_grpc_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go b/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go index a237bd98b2300..c31f8007b2e3f 100644 --- a/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go +++ b/test/integration/consul-container/test/upgrade/ingress_gateway_sds_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/ingress_gateway_test.go b/test/integration/consul-container/test/upgrade/ingress_gateway_test.go index e4bc12629fe5e..c0acfeb775b5b 100644 --- a/test/integration/consul-container/test/upgrade/ingress_gateway_test.go +++ b/test/integration/consul-container/test/upgrade/ingress_gateway_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/l7_traffic_management/resolver_default_subset_test.go b/test/integration/consul-container/test/upgrade/l7_traffic_management/resolver_default_subset_test.go index 9feb9d82092a1..b8282bcb0c3e6 100644 --- a/test/integration/consul-container/test/upgrade/l7_traffic_management/resolver_default_subset_test.go +++ b/test/integration/consul-container/test/upgrade/l7_traffic_management/resolver_default_subset_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade @@ -73,8 +73,8 @@ func TestTrafficManagement_ResolverDefaultSubset(t *testing.T) { assertionFn := func() { _, serverAdminPortV1 := serverConnectProxyV1.GetAdminAddr() _, serverAdminPortV2 := serverConnectProxyV2.GetAdminAddr() - _, adminPort := staticClientProxy.GetAdminAddr() // httpPort - _, port := staticClientProxy.GetAddr() // EnvoyAdminPort + _, adminPort := staticClientProxy.GetAdminAddr() + _, port := staticClientProxy.GetAddr() libassert.AssertEnvoyRunning(t, serverAdminPortV1) libassert.AssertEnvoyRunning(t, serverAdminPortV2) diff --git a/test/integration/consul-container/test/upgrade/peering/peering_control_plane_mgw_test.go b/test/integration/consul-container/test/upgrade/peering/peering_control_plane_mgw_test.go index b88781bd790af..6bd4c13aabaf5 100644 --- a/test/integration/consul-container/test/upgrade/peering/peering_control_plane_mgw_test.go +++ b/test/integration/consul-container/test/upgrade/peering/peering_control_plane_mgw_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/upgrade/peering/peering_http_test.go b/test/integration/consul-container/test/upgrade/peering/peering_http_test.go index 9c48727d83a64..037d1606064bb 100644 --- a/test/integration/consul-container/test/upgrade/peering/peering_http_test.go +++ b/test/integration/consul-container/test/upgrade/peering/peering_http_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package upgrade diff --git a/test/integration/consul-container/test/util/test_debug_breakpoint_hit.png b/test/integration/consul-container/test/util/test_debug_breakpoint_hit.png deleted file mode 100644 index 2eae03da3b905..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_breakpoint_hit.png and /dev/null differ diff --git a/test/integration/consul-container/test/util/test_debug_configuration.png b/test/integration/consul-container/test/util/test_debug_configuration.png deleted file mode 100644 index 8fa19ba939985..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_configuration.png and /dev/null differ diff --git a/test/integration/consul-container/test/util/test_debug_info.png b/test/integration/consul-container/test/util/test_debug_info.png deleted file mode 100644 index a177999c0d95a..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_info.png and /dev/null differ diff --git a/test/integration/consul-container/test/util/test_debug_remote_configuration.png b/test/integration/consul-container/test/util/test_debug_remote_configuration.png deleted file mode 100644 index 01b14eada6d9a..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_remote_configuration.png and /dev/null differ diff --git a/test/integration/consul-container/test/util/test_debug_remote_connected.png b/test/integration/consul-container/test/util/test_debug_remote_connected.png deleted file mode 100644 index 52fc905ef29af..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_remote_connected.png and /dev/null differ diff --git a/test/integration/consul-container/test/util/test_debug_resume_program.png b/test/integration/consul-container/test/util/test_debug_resume_program.png deleted file mode 100644 index 99c2899019bb5..0000000000000 Binary files a/test/integration/consul-container/test/util/test_debug_resume_program.png and /dev/null differ diff --git a/test/integration/consul-container/test/wanfed/acl_bootstrap_replication_test.go b/test/integration/consul-container/test/wanfed/acl_bootstrap_replication_test.go index 7eedc158d133a..0caddbc302e3e 100644 --- a/test/integration/consul-container/test/wanfed/acl_bootstrap_replication_test.go +++ b/test/integration/consul-container/test/wanfed/acl_bootstrap_replication_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wanfed diff --git a/test/integration/consul-container/test/wanfed/wanfed_peering_test.go b/test/integration/consul-container/test/wanfed/wanfed_peering_test.go index 41d6854e2832a..3cca4b4dc5056 100644 --- a/test/integration/consul-container/test/wanfed/wanfed_peering_test.go +++ b/test/integration/consul-container/test/wanfed/wanfed_peering_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package wanfed diff --git a/test/load/packer/consul-ami/consul.pkr.hcl b/test/load/packer/consul-ami/consul.pkr.hcl index d24ef7b9cbc6d..7290845ef0c55 100644 --- a/test/load/packer/consul-ami/consul.pkr.hcl +++ b/test/load/packer/consul-ami/consul.pkr.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 packer { required_version = ">= 1.5.4" diff --git a/test/load/packer/consul-ami/scripts/conf.yaml b/test/load/packer/consul-ami/scripts/conf.yaml index e61a9b94ef1d6..04c9dd2e292ba 100755 --- a/test/load/packer/consul-ami/scripts/conf.yaml +++ b/test/load/packer/consul-ami/scripts/conf.yaml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 init_config: diff --git a/test/load/packer/consul-ami/scripts/datadog.yaml b/test/load/packer/consul-ami/scripts/datadog.yaml index bfe671563d96b..e64cf4d9cd6b9 100755 --- a/test/load/packer/consul-ami/scripts/datadog.yaml +++ b/test/load/packer/consul-ami/scripts/datadog.yaml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 ######################### ## Basic Configuration ## diff --git a/test/load/packer/consul-ami/scripts/move-files.sh b/test/load/packer/consul-ami/scripts/move-files.sh index 8b695ac83c6f1..e5773ef195f71 100644 --- a/test/load/packer/consul-ami/scripts/move-files.sh +++ b/test/load/packer/consul-ami/scripts/move-files.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 ##Move datadog files diff --git a/test/load/packer/loadtest-ami/loadtest.pkr.hcl b/test/load/packer/loadtest-ami/loadtest.pkr.hcl index e7deb402e3ef9..1a0a3db907519 100644 --- a/test/load/packer/loadtest-ami/loadtest.pkr.hcl +++ b/test/load/packer/loadtest-ami/loadtest.pkr.hcl @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 packer { required_version = ">= 1.5.4" diff --git a/test/load/packer/loadtest-ami/scripts/install-k6.sh b/test/load/packer/loadtest-ami/scripts/install-k6.sh index fce98cea62542..e0fa57b064d42 100644 --- a/test/load/packer/loadtest-ami/scripts/install-k6.sh +++ b/test/load/packer/loadtest-ami/scripts/install-k6.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # set new limit diff --git a/test/load/packer/loadtest-ami/scripts/loadtest.js b/test/load/packer/loadtest-ami/scripts/loadtest.js index e048b0e307fc6..975191d3c09c5 100644 --- a/test/load/packer/loadtest-ami/scripts/loadtest.js +++ b/test/load/packer/loadtest-ami/scripts/loadtest.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import http from 'k6/http'; diff --git a/test/load/terraform/consul.tf b/test/load/terraform/consul.tf index 969ccd58fc4a4..4ba0eb7a9acf9 100644 --- a/test/load/terraform/consul.tf +++ b/test/load/terraform/consul.tf @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 data "aws_ami" "consul" { most_recent = true diff --git a/test/load/terraform/main.tf b/test/load/terraform/main.tf index 76f0c81286ff6..216b6eb83613d 100644 --- a/test/load/terraform/main.tf +++ b/test/load/terraform/main.tf @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 terraform { required_version = ">= 0.13" diff --git a/test/load/terraform/outputs.tf b/test/load/terraform/outputs.tf index 80e213f4282e3..48753c8fa7d4a 100644 --- a/test/load/terraform/outputs.tf +++ b/test/load/terraform/outputs.tf @@ -1,3 +1,3 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 diff --git a/test/load/terraform/providers.tf b/test/load/terraform/providers.tf index 87b6bf51e97de..8c1541cb51310 100644 --- a/test/load/terraform/providers.tf +++ b/test/load/terraform/providers.tf @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 terraform { required_providers { diff --git a/test/load/terraform/test-servers.tf b/test/load/terraform/test-servers.tf index 4d4b0a6acc3fd..78c757e35ac18 100644 --- a/test/load/terraform/test-servers.tf +++ b/test/load/terraform/test-servers.tf @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 data "aws_ami" "test" { most_recent = true diff --git a/test/load/terraform/user-data-client.sh b/test/load/terraform/user-data-client.sh index 27a14004a54d3..9ed15e89ab29c 100644 --- a/test/load/terraform/user-data-client.sh +++ b/test/load/terraform/user-data-client.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # SOURCE: GRUNTWORKS # This script is meant to be run in the User Data of each EC2 Instance while it's booting. The script uses the diff --git a/test/load/terraform/user-data-server.sh b/test/load/terraform/user-data-server.sh index 0d743f57ab687..f6e0b7452c371 100755 --- a/test/load/terraform/user-data-server.sh +++ b/test/load/terraform/user-data-server.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # SOURCE: GRUNTWORKS # This script is meant to be run in the User Data of each EC2 Instance while it's booting. The script uses the diff --git a/test/load/terraform/variables.tf b/test/load/terraform/variables.tf index 8d5d82e1ca02f..9d93fa17773b7 100644 --- a/test/load/terraform/variables.tf +++ b/test/load/terraform/variables.tf @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 # --------------------------------------------------------------------------------------------------------------------- # ENVIRONMENT VARIABLES diff --git a/testing/deployer/.gitignore b/testing/deployer/.gitignore deleted file mode 100644 index 5d18603464e65..0000000000000 --- a/testing/deployer/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/terraform -/workdir -/sample-cli -workdir diff --git a/testing/deployer/README.md b/testing/deployer/README.md deleted file mode 100644 index 604bbdb08781c..0000000000000 --- a/testing/deployer/README.md +++ /dev/null @@ -1,179 +0,0 @@ -[![GoDoc](https://pkg.go.dev/badge/github.com/hashicorp/consul/testing/deployer)](https://pkg.go.dev/github.com/hashicorp/consul/testing/deployer) - -## Summary - -This is a Go library used to launch one or more Consul clusters that can be -peered using the cluster peering feature. Under the covers `terraform` is used -in conjunction with the -[`kreuzwerker/docker`](https://registry.terraform.io/providers/kreuzwerker/docker/latest) -provider to manage a fleet of local docker containers and networks. - -### Configuration - -The complete topology of Consul clusters is defined using a topology.Config -which allows you to define a set of networks and reference those networks when -assigning nodes and services to clusters. Both Consul clients and -`consul-dataplane` instances are supported. - -Here is an example configuration with two peered clusters: - -``` -cfg := &topology.Config{ - Networks: []*topology.Network{ - {Name: "dc1"}, - {Name: "dc2"}, - {Name: "wan", Type: "wan"}, - }, - Clusters: []*topology.Cluster{ - { - Name: "dc1", - Nodes: []*topology.Node{ - { - Kind: topology.NodeKindServer, - Name: "dc1-server1", - Addresses: []*topology.Address{ - {Network: "dc1"}, - {Network: "wan"}, - }, - }, - { - Kind: topology.NodeKindClient, - Name: "dc1-client1", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "mesh-gateway"}, - Port: 8443, - EnvoyAdminPort: 19000, - IsMeshGateway: true, - }, - }, - }, - { - Kind: topology.NodeKindClient, - Name: "dc1-client2", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "ping"}, - Image: "rboyer/pingpong:latest", - Port: 8080, - EnvoyAdminPort: 19000, - Command: []string{ - "-bind", "0.0.0.0:8080", - "-dial", "127.0.0.1:9090", - "-pong-chaos", - "-dialfreq", "250ms", - "-name", "ping", - }, - Upstreams: []*topology.Upstream{{ - ID: topology.ServiceID{Name: "pong"}, - LocalPort: 9090, - Peer: "peer-dc2-default", - }}, - }, - }, - }, - }, - InitialConfigEntries: []api.ConfigEntry{ - &api.ExportedServicesConfigEntry{ - Name: "default", - Services: []api.ExportedService{{ - Name: "ping", - Consumers: []api.ServiceConsumer{{ - Peer: "peer-dc2-default", - }}, - }}, - }, - }, - }, - { - Name: "dc2", - Nodes: []*topology.Node{ - { - Kind: topology.NodeKindServer, - Name: "dc2-server1", - Addresses: []*topology.Address{ - {Network: "dc2"}, - {Network: "wan"}, - }, - }, - { - Kind: topology.NodeKindClient, - Name: "dc2-client1", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "mesh-gateway"}, - Port: 8443, - EnvoyAdminPort: 19000, - IsMeshGateway: true, - }, - }, - }, - { - Kind: topology.NodeKindDataplane, - Name: "dc2-client2", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "pong"}, - Image: "rboyer/pingpong:latest", - Port: 8080, - EnvoyAdminPort: 19000, - Command: []string{ - "-bind", "0.0.0.0:8080", - "-dial", "127.0.0.1:9090", - "-pong-chaos", - "-dialfreq", "250ms", - "-name", "pong", - }, - Upstreams: []*topology.Upstream{{ - ID: topology.ServiceID{Name: "ping"}, - LocalPort: 9090, - Peer: "peer-dc1-default", - }}, - }, - }, - }, - }, - InitialConfigEntries: []api.ConfigEntry{ - &api.ExportedServicesConfigEntry{ - Name: "default", - Services: []api.ExportedService{{ - Name: "ping", - Consumers: []api.ServiceConsumer{{ - Peer: "peer-dc2-default", - }}, - }}, - }, - }, - }, - }, - Peerings: []*topology.Peering{{ - Dialing: topology.PeerCluster{ - Name: "dc1", - }, - Accepting: topology.PeerCluster{ - Name: "dc2", - }, - }}, -} -``` - -Once you have a topology configuration, you simply call the appropriate -`Launch` function to validate and boot the cluster. - -You may also modify your original configuration (in some allowed ways) and call -`Relaunch` on an existing topology which will differentially adjust the running -infrastructure. This can be useful to do things like upgrade instances in place -or subly reconfigure them. - -### For Testing - -It is meant to be consumed primarily by unit tests desiring a complex -reasonably realistic Consul setup. For that use case use the `sprawl/sprawltest` wrapper: - -``` -func TestSomething(t *testing.T) { - cfg := &topology.Config{...} - sp := sprawltest.Launch(t, cfg) - // do stuff with 'sp' -} -``` \ No newline at end of file diff --git a/testing/deployer/TODO.md b/testing/deployer/TODO.md deleted file mode 100644 index 2d651cd162950..0000000000000 --- a/testing/deployer/TODO.md +++ /dev/null @@ -1,9 +0,0 @@ -Missing things that should probably be added; - -- consul-dataplane support for running mesh gateways -- consul-dataplane health check updates (automatic; manual) -- ServerExternalAddresses in a peering; possibly rig up a DNS name for this. -- after creating a token, verify it exists on all servers before proceding (rather than sleep looping on not-founds) -- investigate strange gRPC bug that is currently papered over -- allow services to override their mesh gateway modes -- remove some of the debug prints of various things diff --git a/testing/deployer/go.mod b/testing/deployer/go.mod deleted file mode 100644 index 9bf70b9cc1468..0000000000000 --- a/testing/deployer/go.mod +++ /dev/null @@ -1,45 +0,0 @@ -module github.com/hashicorp/consul/testing/deployer - -go 1.20 - -require ( - github.com/google/go-cmp v0.5.9 - github.com/hashicorp/consul/api v1.24.0 - github.com/hashicorp/consul/sdk v0.14.1 - github.com/hashicorp/go-cleanhttp v0.5.2 - github.com/hashicorp/go-hclog v1.5.0 - github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/hcl/v2 v2.16.2 - github.com/mitchellh/copystructure v1.2.0 - github.com/rboyer/safeio v0.2.2 - github.com/stretchr/testify v1.8.3 - golang.org/x/crypto v0.11.0 -) - -require ( - github.com/agext/levenshtein v1.2.1 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/fatih/color v1.14.1 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.2.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/serf v0.10.1 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/zclconf/go-cty v1.12.1 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/testing/deployer/go.sum b/testing/deployer/go.sum deleted file mode 100644 index 603dbfb8d6c84..0000000000000 --- a/testing/deployer/go.sum +++ /dev/null @@ -1,246 +0,0 @@ -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/hashicorp/consul/api v1.24.0 h1:u2XyStA2j0jnCiVUU7Qyrt8idjRn4ORhK6DlvZ3bWhA= -github.com/hashicorp/consul/api v1.24.0/go.mod h1:NZJGRFYruc/80wYowkPFCp1LbGmJC9L8izrwfyVx/Wg= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= -github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= -github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/rboyer/safeio v0.2.2 h1:XhtqyUTRleMYGyBt3ni4j2BtEh669U2ry2INnnd+B4k= -github.com/rboyer/safeio v0.2.2/go.mod h1:pSnr2LFXyn/c/fotxotyOdYy7pP/XSh6MpBmzXPjiNc= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= -github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/testing/deployer/sprawl/acl.go b/testing/deployer/sprawl/acl.go deleted file mode 100644 index 63d86220d9fff..0000000000000 --- a/testing/deployer/sprawl/acl.go +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "fmt" - "strings" - "time" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -// TODO: fix this by checking that a token/policy works on ALL servers before -// returning from create. -func isACLNotFound(err error) bool { - if err == nil { - return false - } - return strings.Contains(err.Error(), `ACL not found`) -} - -func (s *Sprawl) bootstrapACLs(cluster string) error { - var ( - client = s.clients[cluster] - logger = s.logger.With("cluster", cluster) - mgmtToken = s.secrets.ReadGeneric(cluster, secrets.BootstrapToken) - ) - - ac := client.ACL() - - if mgmtToken != "" { - NOT_BOOTED: - ready, err := s.isACLBootstrapped(cluster, client) - if err != nil { - return fmt.Errorf("error checking if the acl system is bootstrapped: %w", err) - } else if !ready { - logger.Warn("ACL system is not ready yet") - time.Sleep(250 * time.Millisecond) - goto NOT_BOOTED - } - - TRYAGAIN: - // check to see if it works - _, _, err = ac.TokenReadSelf(&api.QueryOptions{Token: mgmtToken}) - if err != nil { - if isACLNotBootstrapped(err) { - logger.Warn("system is rebooting", "error", err) - time.Sleep(250 * time.Millisecond) - goto TRYAGAIN - } - - return fmt.Errorf("management token no longer works: %w", err) - } - - logger.Info("current management token", "token", mgmtToken) - return nil - } - -TRYAGAIN2: - logger.Info("bootstrapping ACLs") - tok, _, err := ac.Bootstrap() - if err != nil { - if isACLNotBootstrapped(err) { - logger.Warn("system is rebooting", "error", err) - time.Sleep(250 * time.Millisecond) - goto TRYAGAIN2 - } - return err - } - mgmtToken = tok.SecretID - s.secrets.SaveGeneric(cluster, secrets.BootstrapToken, mgmtToken) - - logger.Info("current management token", "token", mgmtToken) - - return nil - -} - -func isACLNotBootstrapped(err error) bool { - switch { - case strings.Contains(err.Error(), "ACL system must be bootstrapped before making any requests that require authorization"): - return true - case strings.Contains(err.Error(), "The ACL system is currently in legacy mode"): - return true - } - return false -} - -func (s *Sprawl) isACLBootstrapped(cluster string, client *api.Client) (bool, error) { - policy, _, err := client.ACL().PolicyReadByName("global-management", &api.QueryOptions{ - Token: s.secrets.ReadGeneric(cluster, secrets.BootstrapToken), - }) - if err != nil { - if strings.Contains(err.Error(), "Unexpected response code: 403 (ACL not found)") { - return false, nil - } else if isACLNotBootstrapped(err) { - return false, nil - } - return false, err - } - return policy != nil, nil -} - -func (s *Sprawl) createAnonymousToken(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - if err := s.createAnonymousPolicy(cluster); err != nil { - return err - } - - token, err := CreateOrUpdateToken(client, anonymousToken()) - if err != nil { - return err - } - - logger.Info("created anonymous token", - "token", token.SecretID, - ) - - return nil -} - -func (s *Sprawl) createAnonymousPolicy(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - op, err := CreateOrUpdatePolicy(client, anonymousPolicy(cluster.Enterprise)) - if err != nil { - return err - } - - logger.Info("created anonymous policy", - "policy-name", op.Name, - "policy-id", op.ID, - ) - - return nil -} - -func (s *Sprawl) createAgentTokens(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - for _, node := range cluster.Nodes { - // NOTE: always create tokens even for disabled nodes. - if !node.IsAgent() { - continue - } - - if tok := s.secrets.ReadAgentToken(cluster.Name, node.ID()); tok == "" { - token, err := CreateOrUpdateToken(client, tokenForNode(node, cluster.Enterprise)) - if err != nil { - return err - } - - logger.Info("created agent token", - "node", node.ID(), - "token", token.SecretID, - ) - - s.secrets.SaveAgentToken(cluster.Name, node.ID(), token.SecretID) - } - } - - return nil -} - -// Create a policy to allow super permissive catalog reads across namespace -// boundaries. -func (s *Sprawl) createCrossNamespaceCatalogReadPolicies(cluster *topology.Cluster, partition string) error { - if !cluster.Enterprise { - return nil - } - - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - op, err := CreateOrUpdatePolicy(client, policyForCrossNamespaceRead(partition)) - if err != nil { - return err - } - - logger.Info("created cross-ns-catalog-read policy", - "policy-name", op.Name, - "policy-id", op.ID, - "partition", partition, - ) - - return nil -} - -func (s *Sprawl) createAllServiceTokens() error { - for _, cluster := range s.topology.Clusters { - if err := s.createServiceTokens(cluster); err != nil { - return fmt.Errorf("createServiceTokens[%s]: %w", cluster.Name, err) - } - } - return nil -} - -func (s *Sprawl) createServiceTokens(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - sids := make(map[topology.ServiceID]struct{}) - for _, node := range cluster.Nodes { - if !node.RunsWorkloads() || len(node.Services) == 0 || node.Disabled { - continue - } - - for _, svc := range node.Services { - sid := svc.ID - - if _, done := sids[sid]; done { - continue - } - - var overridePolicy *api.ACLPolicy - if svc.IsMeshGateway { - var err error - overridePolicy, err = CreateOrUpdatePolicy(client, policyForMeshGateway(svc, cluster.Enterprise)) - if err != nil { - return fmt.Errorf("could not create policy: %w", err) - } - } - - token, err := CreateOrUpdateToken(client, tokenForService(svc, overridePolicy, cluster.Enterprise)) - if err != nil { - return fmt.Errorf("could not create token: %w", err) - } - - logger.Info("created service token", - "service", svc.ID.Name, - "namespace", svc.ID.Namespace, - "partition", svc.ID.Partition, - "token", token.SecretID, - ) - - s.secrets.SaveServiceToken(cluster.Name, sid, token.SecretID) - - sids[sid] = struct{}{} - } - } - - return nil -} - -func CreateOrUpdateToken(client *api.Client, t *api.ACLToken) (*api.ACLToken, error) { - ac := client.ACL() - - currentToken, err := getTokenByDescription(client, t.Description, &api.QueryOptions{ - Partition: t.Partition, - Namespace: t.Namespace, - }) - if err != nil { - return nil, err - } else if currentToken != nil { - t.AccessorID = currentToken.AccessorID - t.SecretID = currentToken.SecretID - } - - if t.AccessorID != "" { - t, _, err = ac.TokenUpdate(t, nil) - } else { - t, _, err = ac.TokenCreate(t, nil) - } - if err != nil { - return nil, err - } - return t, nil -} - -func getTokenByDescription(client *api.Client, description string, opts *api.QueryOptions) (*api.ACLToken, error) { - ac := client.ACL() - tokens, _, err := ac.TokenList(opts) - if err != nil { - return nil, err - } - - for _, tokenEntry := range tokens { - if tokenEntry.Description == description { - token, _, err := ac.TokenRead(tokenEntry.AccessorID, opts) - if err != nil { - return nil, err - } - - return token, nil - } - } - return nil, nil -} - -func CreateOrUpdatePolicy(client *api.Client, p *api.ACLPolicy) (*api.ACLPolicy, error) { - ac := client.ACL() - - currentPolicy, _, err := ac.PolicyReadByName(p.Name, &api.QueryOptions{ - Partition: p.Partition, - Namespace: p.Namespace, - }) - - // There is a quirk about Consul 1.14.x, where: if reading a policy yields - // an empty result, we return "ACL not found". It's safe to ignore this here, - // because if the Client's ACL token truly doesn't exist, then the create fails below. - if err != nil && !strings.Contains(err.Error(), "ACL not found") { - return nil, err - } else if currentPolicy != nil { - p.ID = currentPolicy.ID - } - - if p.ID != "" { - p, _, err = ac.PolicyUpdate(p, nil) - } else { - p, _, err = ac.PolicyCreate(p, nil) - } - - if err != nil { - return nil, err - } - return p, nil -} diff --git a/testing/deployer/sprawl/acl_rules.go b/testing/deployer/sprawl/acl_rules.go deleted file mode 100644 index 036149cdfd6c9..0000000000000 --- a/testing/deployer/sprawl/acl_rules.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "fmt" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func policyForCrossNamespaceRead(partition string) *api.ACLPolicy { - return &api.ACLPolicy{ - Name: "cross-ns-catalog-read", - Description: "cross-ns-catalog-read", - Partition: partition, - Rules: fmt.Sprintf(` -partition %[1]q { - namespace_prefix "" { - node_prefix "" { policy = "read" } - service_prefix "" { policy = "read" } - } -} -`, partition), - } -} - -const anonymousTokenAccessorID = "00000000-0000-0000-0000-000000000002" - -func anonymousToken() *api.ACLToken { - return &api.ACLToken{ - AccessorID: anonymousTokenAccessorID, - // SecretID: "anonymous", - Description: "anonymous", - Local: false, - Policies: []*api.ACLTokenPolicyLink{ - { - Name: "anonymous", - }, - }, - } -} - -func anonymousPolicy(enterprise bool) *api.ACLPolicy { - p := &api.ACLPolicy{ - Name: "anonymous", - Description: "anonymous", - } - if enterprise { - p.Rules = ` -partition_prefix "" { - namespace_prefix "" { - node_prefix "" { policy = "read" } - service_prefix "" { policy = "read" } - } -} -` - } else { - p.Rules = ` -node_prefix "" { policy = "read" } -service_prefix "" { policy = "read" } -` - } - return p -} - -func tokenForNode(node *topology.Node, enterprise bool) *api.ACLToken { - nid := node.ID() - - tokenName := "agent--" + nid.ACLString() - - token := &api.ACLToken{ - Description: tokenName, - Local: false, - NodeIdentities: []*api.ACLNodeIdentity{{ - NodeName: node.PodName(), - Datacenter: node.Datacenter, - }}, - } - if enterprise { - token.Partition = node.Partition - token.Namespace = "default" - } - return token -} - -func tokenForService(svc *topology.Service, overridePolicy *api.ACLPolicy, enterprise bool) *api.ACLToken { - token := &api.ACLToken{ - Description: "service--" + svc.ID.ACLString(), - Local: false, - } - if overridePolicy != nil { - token.Policies = []*api.ACLTokenPolicyLink{{ID: overridePolicy.ID}} - } else { - token.ServiceIdentities = []*api.ACLServiceIdentity{{ - ServiceName: svc.ID.Name, - }} - } - - if enterprise { - token.Namespace = svc.ID.Namespace - token.Partition = svc.ID.Partition - } - - return token -} - -func policyForMeshGateway(svc *topology.Service, enterprise bool) *api.ACLPolicy { - policyName := "mesh-gateway--" + svc.ID.ACLString() - - policy := &api.ACLPolicy{ - Name: policyName, - Description: policyName, - } - if enterprise { - policy.Partition = svc.ID.Partition - policy.Namespace = "default" - } - - if enterprise { - policy.Rules = ` -namespace_prefix "" { - service "mesh-gateway" { - policy = "write" - } - service_prefix "" { - policy = "read" - } - node_prefix "" { - policy = "read" - } -} -agent_prefix "" { - policy = "read" -} -# for peering -mesh = "write" -peering = "read" -` - } else { - policy.Rules = ` -service "mesh-gateway" { - policy = "write" -} -service_prefix "" { - policy = "read" -} -node_prefix "" { - policy = "read" -} -agent_prefix "" { - policy = "read" -} -# for peering -mesh = "write" -peering = "read" -` - } - - return policy -} diff --git a/testing/deployer/sprawl/boot.go b/testing/deployer/sprawl/boot.go deleted file mode 100644 index 6f16f928f5d13..0000000000000 --- a/testing/deployer/sprawl/boot.go +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "context" - "crypto/rand" - "encoding/base64" - "errors" - "fmt" - "strings" - "time" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-multierror" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/build" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/tfgen" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -const ( - sharedBootstrapToken = "root" - // sharedBootstrapToken = "ec59aa56-1996-4ff1-911a-f5d782552a13" - - sharedAgentRecoveryToken = "22082b05-05c9-4a0a-b3da-b9685ac1d688" -) - -func (s *Sprawl) launch() error { - return s.launchType(true) -} -func (s *Sprawl) relaunch() error { - return s.launchType(false) -} -func (s *Sprawl) launchType(firstTime bool) (launchErr error) { - if err := build.DockerImages(s.logger, s.runner, s.topology); err != nil { - return fmt.Errorf("build.DockerImages: %w", err) - } - - if firstTime { - // Initialize secrets the easy way for now (same in all clusters). - gossipKey, err := newGossipKey() - if err != nil { - return fmt.Errorf("newGossipKey: %w", err) - } - for _, cluster := range s.topology.Clusters { - s.secrets.SaveGeneric(cluster.Name, secrets.BootstrapToken, sharedBootstrapToken) - s.secrets.SaveGeneric(cluster.Name, secrets.AgentRecovery, sharedAgentRecoveryToken) - s.secrets.SaveGeneric(cluster.Name, secrets.GossipKey, gossipKey) - - // Give servers a copy of the bootstrap token for use as their agent tokens - // to avoid complicating the chicken/egg situation for startup. - for _, node := range cluster.Nodes { - if node.IsServer() { // include disabled - s.secrets.SaveAgentToken(cluster.Name, node.ID(), sharedBootstrapToken) - } - } - } - } - - var cleanupFuncs []func() - defer func() { - for i := len(cleanupFuncs) - 1; i >= 0; i-- { - cleanupFuncs[i]() - } - }() - - if firstTime { - var err error - s.generator, err = tfgen.NewGenerator( - s.logger.Named("tfgen"), - s.runner, - s.topology, - &s.secrets, - s.workdir, - s.license, - ) - if err != nil { - return err - } - } else { - s.generator.SetTopology(s.topology) - } - cleanupFuncs = append(cleanupFuncs, func() { - // Log the error before the cleanup so you don't have to wait to see - // the cause. - if launchErr != nil { - s.logger.Error("fatal error during launch", "error", launchErr) - } - - _ = s.generator.DestroyAllQuietly() - }) - - if firstTime { - // The networking phase is special. We have to pick a random subnet and - // hope. Once we have this established once it is immutable for future - // runs. - if err := s.initNetworkingAndVolumes(); err != nil { - return fmt.Errorf("initNetworkingAndVolumes: %w", err) - } - } - - if err := s.assignIPAddresses(); err != nil { - return fmt.Errorf("assignIPAddresses: %w", err) - } - - // The previous terraform run should have made the special volume for us. - if err := s.initTLS(context.TODO()); err != nil { - return fmt.Errorf("initTLS: %w", err) - } - - if firstTime { - if err := s.createFirstTime(); err != nil { - return err - } - - s.generator.MarkLaunched() - } else { - if err := s.updateExisting(); err != nil { - return err - } - } - - if err := s.waitForPeeringEstablishment(); err != nil { - return fmt.Errorf("waitForPeeringEstablishment: %w", err) - } - - cleanupFuncs = nil // reset - - return nil -} - -func (s *Sprawl) Stop() error { - var merr error - if s.generator != nil { - if err := s.generator.DestroyAllQuietly(); err != nil { - merr = multierror.Append(merr, err) - } - } - return merr -} - -const dockerOutOfNetworksErrorMessage = `Unable to create network: Error response from daemon: Pool overlaps with other one on this address space` - -var ErrDockerNetworkCollision = errors.New("could not create one or more docker networks for use due to subnet collision") - -func (s *Sprawl) initNetworkingAndVolumes() error { - var lastErr error - for attempts := 0; attempts < 5; attempts++ { - err := s.generator.Generate(tfgen.StepNetworks) - if err != nil && strings.Contains(err.Error(), dockerOutOfNetworksErrorMessage) { - lastErr = ErrDockerNetworkCollision - s.logger.Warn(ErrDockerNetworkCollision.Error()+"; retrying", "attempt", attempts+1) - time.Sleep(1 * time.Second) - continue - } else if err != nil { - return fmt.Errorf("generator[networks]: %w", err) - } - return nil - } - - return lastErr -} - -func (s *Sprawl) assignIPAddresses() error { - // assign ips now that we have network ips known to us - for _, net := range s.topology.Networks { - if len(net.IPPool) == 0 { - return fmt.Errorf("network %q does not have any ip assignments", net.Name) - } - } - for _, cluster := range s.topology.Clusters { - for _, node := range cluster.Nodes { - for _, addr := range node.Addresses { - net, ok := s.topology.Networks[addr.Network] - if !ok { - return fmt.Errorf("unknown network %q", addr.Network) - } - addr.IPAddress = net.IPByIndex(node.Index) - } - } - } - - return nil -} - -func (s *Sprawl) initConsulServers() error { - if err := s.generator.Generate(tfgen.StepServers); err != nil { - return fmt.Errorf("generator[servers]: %w", err) - } - - // s.logger.Info("ALL", "t", jd(s.topology)) // TODO - - // Create token-less api clients first. - for _, cluster := range s.topology.Clusters { - node := cluster.FirstServer() - - var err error - s.clients[cluster.Name], err = util.ProxyAPIClient( - node.LocalProxyPort(), - node.LocalAddress(), - 8500, - "", /*no token yet*/ - ) - if err != nil { - return fmt.Errorf("error creating initial bootstrap client for cluster=%s: %w", cluster.Name, err) - } - } - - if err := s.rejoinAllConsulServers(); err != nil { - return err - } - - for _, cluster := range s.topology.Clusters { - err := s.bootstrapACLs(cluster.Name) - if err != nil { - return fmt.Errorf("bootstrap[%s]: %w", cluster.Name, err) - } - - mgmtToken := s.secrets.ReadGeneric(cluster.Name, secrets.BootstrapToken) - - // Reconfigure the clients to use a management token. - node := cluster.FirstServer() - s.clients[cluster.Name], err = util.ProxyAPIClient( - node.LocalProxyPort(), - node.LocalAddress(), - 8500, - mgmtToken, - ) - if err != nil { - return fmt.Errorf("error creating final client for cluster=%s: %v", cluster.Name, err) - } - - // For some reason the grpc resolver stuff for partitions takes some - // time to get ready. - s.waitForLocalWrites(cluster, mgmtToken) - - // Create tenancies so that the ACL tokens and clients have somewhere to go. - if cluster.Enterprise { - if err := s.initTenancies(cluster); err != nil { - return fmt.Errorf("initTenancies[%s]: %w", cluster.Name, err) - } - } - - if err := s.populateInitialConfigEntries(cluster); err != nil { - return fmt.Errorf("populateInitialConfigEntries[%s]: %w", cluster.Name, err) - } - - if err := s.createAnonymousToken(cluster); err != nil { - return fmt.Errorf("createAnonymousToken[%s]: %w", cluster.Name, err) - } - - // Create tokens for all of the agents to use for anti-entropy. - // - // NOTE: this will cause the servers to roll to pick up the change to - // the acl{tokens{agent=XXX}}} section. - if err := s.createAgentTokens(cluster); err != nil { - return fmt.Errorf("createAgentTokens[%s]: %w", cluster.Name, err) - } - } - - return nil -} - -func (s *Sprawl) createFirstTime() error { - if err := s.initConsulServers(); err != nil { - return fmt.Errorf("initConsulServers: %w", err) - } - - if err := s.generator.Generate(tfgen.StepAgents); err != nil { - return fmt.Errorf("generator[agents]: %w", err) - } - for _, cluster := range s.topology.Clusters { - if err := s.waitForClientAntiEntropyOnce(cluster); err != nil { - return fmt.Errorf("waitForClientAntiEntropyOnce[%s]: %w", cluster.Name, err) - } - } - - // Ideally we start services WITH a token initially, so we pre-create them - // before running terraform for them. - if err := s.createAllServiceTokens(); err != nil { - return fmt.Errorf("createAllServiceTokens: %w", err) - } - - if err := s.registerAllServicesForDataplaneInstances(); err != nil { - return fmt.Errorf("registerAllServicesForDataplaneInstances: %w", err) - } - - // We can do this ahead, because we've incrementally run terraform as - // we went. - if err := s.registerAllServicesToAgents(); err != nil { - return fmt.Errorf("registerAllServicesToAgents: %w", err) - } - - // NOTE: start services WITH token initially - if err := s.generator.Generate(tfgen.StepServices); err != nil { - return fmt.Errorf("generator[services]: %w", err) - } - - if err := s.initPeerings(); err != nil { - return fmt.Errorf("initPeerings: %w", err) - } - return nil -} - -func (s *Sprawl) updateExisting() error { - if err := s.preRegenTasks(); err != nil { - return fmt.Errorf("preRegenTasks: %w", err) - } - - // We save all of the terraform to the end. Some of the containers will - // be a little broken until we can do stuff like register services to - // new agents, which we cannot do until they come up. - if err := s.generator.Generate(tfgen.StepRelaunch); err != nil { - return fmt.Errorf("generator[relaunch]: %w", err) - } - - if err := s.postRegenTasks(); err != nil { - return fmt.Errorf("postRegenTasks: %w", err) - } - - // TODO: enforce that peering relationships cannot change - // TODO: include a fixup version of new peerings? - - return nil -} - -func (s *Sprawl) preRegenTasks() error { - for _, cluster := range s.topology.Clusters { - // Create tenancies so that the ACL tokens and clients have somewhere to go. - if cluster.Enterprise { - if err := s.initTenancies(cluster); err != nil { - return fmt.Errorf("initTenancies[%s]: %w", cluster.Name, err) - } - } - - if err := s.populateInitialConfigEntries(cluster); err != nil { - return fmt.Errorf("populateInitialConfigEntries[%s]: %w", cluster.Name, err) - } - - // Create tokens for all of the agents to use for anti-entropy. - if err := s.createAgentTokens(cluster); err != nil { - return fmt.Errorf("createAgentTokens[%s]: %w", cluster.Name, err) - } - } - - // Ideally we start services WITH a token initially, so we pre-create them - // before running terraform for them. - if err := s.createAllServiceTokens(); err != nil { - return fmt.Errorf("createAllServiceTokens: %w", err) - } - - if err := s.registerAllServicesForDataplaneInstances(); err != nil { - return fmt.Errorf("registerAllServicesForDataplaneInstances: %w", err) - } - - return nil -} - -func (s *Sprawl) postRegenTasks() error { - if err := s.rejoinAllConsulServers(); err != nil { - return err - } - - for _, cluster := range s.topology.Clusters { - var err error - - mgmtToken := s.secrets.ReadGeneric(cluster.Name, secrets.BootstrapToken) - - // Reconfigure the clients to use a management token. - node := cluster.FirstServer() - s.clients[cluster.Name], err = util.ProxyAPIClient( - node.LocalProxyPort(), - node.LocalAddress(), - 8500, - mgmtToken, - ) - if err != nil { - return fmt.Errorf("error creating final client for cluster=%s: %v", cluster.Name, err) - } - - s.waitForLeader(cluster) - - // For some reason the grpc resolver stuff for partitions takes some - // time to get ready. - s.waitForLocalWrites(cluster, mgmtToken) - } - - for _, cluster := range s.topology.Clusters { - if err := s.waitForClientAntiEntropyOnce(cluster); err != nil { - return fmt.Errorf("waitForClientAntiEntropyOnce[%s]: %w", cluster.Name, err) - } - } - - if err := s.registerAllServicesToAgents(); err != nil { - return fmt.Errorf("registerAllServicesToAgents: %w", err) - } - - return nil -} - -func (s *Sprawl) waitForLocalWrites(cluster *topology.Cluster, token string) { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - tryKV := func() error { - _, err := client.KV().Put(&api.KVPair{ - Key: "local-test", - Value: []byte("payload-for-local-test-in-" + cluster.Name), - }, nil) - return err - } - tryAP := func() error { - if !cluster.Enterprise { - return nil - } - _, _, err := client.Partitions().Create(context.Background(), &api.Partition{ - Name: "placeholder", - }, &api.WriteOptions{Token: token}) - return err - } - - start := time.Now() - for attempts := 0; ; attempts++ { - if err := tryKV(); err != nil { - logger.Warn("local kv write failed; something is not ready yet", "error", err) - time.Sleep(500 * time.Millisecond) - continue - } else { - dur := time.Since(start) - logger.Info("local kv write success", "elapsed", dur, "retries", attempts) - } - - break - } - - if cluster.Enterprise { - start = time.Now() - for attempts := 0; ; attempts++ { - if err := tryAP(); err != nil { - logger.Warn("local partition write failed; something is not ready yet", "error", err) - time.Sleep(500 * time.Millisecond) - continue - } else { - dur := time.Since(start) - logger.Info("local partition write success", "elapsed", dur, "retries", attempts) - } - - break - } - } -} - -func (s *Sprawl) waitForClientAntiEntropyOnce(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - var ( - queryOptionList = cluster.PartitionQueryOptionsList() - start = time.Now() - cc = client.Catalog() - ) - for { - // Enumerate all of the nodes that are currently in the catalog. This - // will overmatch including things like fake nodes for agentless but - // that's ok. - current := make(map[topology.NodeID]*api.Node) - for _, queryOpts := range queryOptionList { - nodes, _, err := cc.Nodes(queryOpts) - if err != nil { - return err - } - for _, node := range nodes { - nid := topology.NewNodeID(node.Node, node.Partition) - current[nid] = node - } - } - - // See if we have them all. - var stragglers []topology.NodeID - for _, node := range cluster.Nodes { - if !node.IsAgent() || node.Disabled { - continue - } - nid := node.CatalogID() - - got, ok := current[nid] - if ok && len(got.TaggedAddresses) > 0 { - // this is a field that is not updated just due to serf reconcile - continue - } - - stragglers = append(stragglers, nid) - } - - if len(stragglers) == 0 { - dur := time.Since(start) - logger.Info("all nodes have posted node updates, so first anti-entropy has happened", "elapsed", dur) - return nil - } - logger.Info("not all client nodes have posted node updates yet", "nodes", stragglers) - - time.Sleep(1 * time.Second) - } -} - -func newGossipKey() (string, error) { - key := make([]byte, 16) - n, err := rand.Reader.Read(key) - if err != nil { - return "", fmt.Errorf("Error reading random data: %s", err) - } - if n != 16 { - return "", fmt.Errorf("Couldn't read enough entropy. Generate more entropy!") - } - return base64.StdEncoding.EncodeToString(key), nil -} diff --git a/testing/deployer/sprawl/catalog.go b/testing/deployer/sprawl/catalog.go deleted file mode 100644 index eb355739a6cf7..0000000000000 --- a/testing/deployer/sprawl/catalog.go +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "fmt" - "net/http" - "time" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -func (s *Sprawl) registerAllServicesToAgents() error { - for _, cluster := range s.topology.Clusters { - if err := s.registerServicesToAgents(cluster); err != nil { - return fmt.Errorf("registerServicesToAgents[%s]: %w", cluster.Name, err) - } - } - return nil -} - -func (s *Sprawl) registerAllServicesForDataplaneInstances() error { - for _, cluster := range s.topology.Clusters { - if err := s.registerServicesForDataplaneInstances(cluster); err != nil { - return fmt.Errorf("registerServicesForDataplaneInstances[%s]: %w", cluster.Name, err) - } - } - return nil -} - -func (s *Sprawl) registerServicesToAgents(cluster *topology.Cluster) error { - for _, node := range cluster.Nodes { - if !node.RunsWorkloads() || len(node.Services) == 0 || node.Disabled { - continue - } - - if !node.IsAgent() { - continue - } - - agentClient, err := util.ProxyAPIClient( - node.LocalProxyPort(), - node.LocalAddress(), - 8500, - "", /*token will be in request*/ - ) - if err != nil { - return err - } - - for _, svc := range node.Services { - if err := s.registerAgentService(agentClient, cluster, node, svc); err != nil { - return err - } - } - } - - return nil -} - -func (s *Sprawl) registerAgentService( - agentClient *api.Client, - cluster *topology.Cluster, - node *topology.Node, - svc *topology.Service, -) error { - if !node.IsAgent() { - panic("called wrong method type") - } - - if svc.IsMeshGateway { - return nil // handled at startup time for agent-full, but won't be for agent-less - } - - var ( - logger = s.logger.With("cluster", cluster.Name) - ) - - reg := &api.AgentServiceRegistration{ - ID: svc.ID.Name, - Name: svc.ID.Name, - Port: svc.Port, - Meta: svc.Meta, - } - if cluster.Enterprise { - reg.Namespace = svc.ID.Namespace - reg.Partition = svc.ID.Partition - } - - if !svc.DisableServiceMesh { - var upstreams []api.Upstream - for _, u := range svc.Upstreams { - uAPI := api.Upstream{ - DestinationPeer: u.Peer, - DestinationName: u.ID.Name, - LocalBindAddress: u.LocalAddress, - LocalBindPort: u.LocalPort, - // Config map[string]interface{} `json:",omitempty" bexpr:"-"` - // MeshGateway MeshGatewayConfig `json:",omitempty"` - } - if cluster.Enterprise { - uAPI.DestinationNamespace = u.ID.Namespace - if u.Peer == "" { - uAPI.DestinationPartition = u.ID.Partition - } - } - upstreams = append(upstreams, uAPI) - } - reg.Connect = &api.AgentServiceConnect{ - SidecarService: &api.AgentServiceRegistration{ - Proxy: &api.AgentServiceConnectProxyConfig{ - Upstreams: upstreams, - }, - }, - } - } - - switch { - case svc.CheckTCP != "": - chk := &api.AgentServiceCheck{ - Name: "up", - TCP: svc.CheckTCP, - Interval: "5s", - Timeout: "1s", - } - reg.Checks = append(reg.Checks, chk) - case svc.CheckHTTP != "": - chk := &api.AgentServiceCheck{ - Name: "up", - HTTP: svc.CheckHTTP, - Method: "GET", - Interval: "5s", - Timeout: "1s", - } - reg.Checks = append(reg.Checks, chk) - } - - // Switch token for every request. - hdr := make(http.Header) - hdr.Set("X-Consul-Token", s.secrets.ReadServiceToken(cluster.Name, svc.ID)) - agentClient.SetHeaders(hdr) - -RETRY: - if err := agentClient.Agent().ServiceRegister(reg); err != nil { - if isACLNotFound(err) { - time.Sleep(50 * time.Millisecond) - goto RETRY - } - return fmt.Errorf("failed to register service %q to node %q: %w", svc.ID, node.ID(), err) - } - - logger.Info("registered service to client agent", - "service", svc.ID.Name, - "node", node.Name, - "namespace", svc.ID.Namespace, - "partition", svc.ID.Partition, - ) - - return nil -} - -func (s *Sprawl) registerServicesForDataplaneInstances(cluster *topology.Cluster) error { - for _, node := range cluster.Nodes { - if !node.RunsWorkloads() || len(node.Services) == 0 || node.Disabled { - continue - } - - if !node.IsDataplane() { - continue - } - - if err := s.registerCatalogNode(cluster, node); err != nil { - return fmt.Errorf("error registering virtual node: %w", err) - } - - for _, svc := range node.Services { - if err := s.registerCatalogService(cluster, node, svc); err != nil { - return fmt.Errorf("error registering service: %w", err) - } - if !svc.DisableServiceMesh { - if err := s.registerCatalogSidecarService(cluster, node, svc); err != nil { - return fmt.Errorf("error registering sidecar service: %w", err) - } - } - } - } - - return nil -} - -func (s *Sprawl) registerCatalogNode( - cluster *topology.Cluster, - node *topology.Node, -) error { - if !node.IsDataplane() { - panic("called wrong method type") - } - - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - reg := &api.CatalogRegistration{ - Node: node.PodName(), - Address: node.LocalAddress(), - NodeMeta: map[string]string{ - "dataplane-faux": "1", - }, - } - if cluster.Enterprise { - reg.Partition = node.Partition - } - - // register synthetic node -RETRY: - if _, err := client.Catalog().Register(reg, nil); err != nil { - if isACLNotFound(err) { - time.Sleep(50 * time.Millisecond) - goto RETRY - } - return fmt.Errorf("error registering virtual node %s: %w", node.ID(), err) - } - - logger.Info("virtual node created", - "node", node.ID(), - ) - - return nil -} - -func (s *Sprawl) registerCatalogService( - cluster *topology.Cluster, - node *topology.Node, - svc *topology.Service, -) error { - if !node.IsDataplane() { - panic("called wrong method type") - } - - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - reg := serviceToCatalogRegistration(cluster, node, svc) - -RETRY: - if _, err := client.Catalog().Register(reg, nil); err != nil { - if isACLNotFound(err) { - time.Sleep(50 * time.Millisecond) - goto RETRY - } - return fmt.Errorf("error registering service %s to node %s: %w", svc.ID, node.ID(), err) - } - - logger.Info("dataplane service created", - "service", svc.ID, - "node", node.ID(), - ) - - return nil -} - -func (s *Sprawl) registerCatalogSidecarService( - cluster *topology.Cluster, - node *topology.Node, - svc *topology.Service, -) error { - if !node.IsDataplane() { - panic("called wrong method type") - } - if svc.DisableServiceMesh { - panic("not valid") - } - - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - pid, reg := serviceToSidecarCatalogRegistration(cluster, node, svc) -RETRY: - if _, err := client.Catalog().Register(reg, nil); err != nil { - if isACLNotFound(err) { - time.Sleep(50 * time.Millisecond) - goto RETRY - } - return fmt.Errorf("error registering service %s to node %s: %w", svc.ID, node.ID(), err) - } - - logger.Info("dataplane sidecar service created", - "service", pid, - "node", node.ID(), - ) - - return nil -} - -func serviceToCatalogRegistration( - cluster *topology.Cluster, - node *topology.Node, - svc *topology.Service, -) *api.CatalogRegistration { - reg := &api.CatalogRegistration{ - Node: node.PodName(), - SkipNodeUpdate: true, - Service: &api.AgentService{ - Kind: api.ServiceKindTypical, - ID: svc.ID.Name, - Service: svc.ID.Name, - Meta: svc.Meta, - Port: svc.Port, - Address: node.LocalAddress(), - }, - } - if node.HasPublicAddress() { - reg.TaggedAddresses = map[string]string{ - "lan": node.LocalAddress(), - "lan_ipv4": node.LocalAddress(), - "wan": node.PublicAddress(), - "wan_ipv4": node.PublicAddress(), - } - } - if cluster.Enterprise { - reg.Partition = svc.ID.Partition - reg.Service.Namespace = svc.ID.Namespace - reg.Service.Partition = svc.ID.Partition - } - - if svc.HasCheck() { - chk := &api.HealthCheck{ - Name: "external sync", - // Type: "external-sync", - Status: "passing", // TODO - ServiceID: svc.ID.Name, - ServiceName: svc.ID.Name, - Output: "", - } - if cluster.Enterprise { - chk.Namespace = svc.ID.Namespace - chk.Partition = svc.ID.Partition - } - switch { - case svc.CheckTCP != "": - chk.Definition.TCP = svc.CheckTCP - case svc.CheckHTTP != "": - chk.Definition.HTTP = svc.CheckHTTP - chk.Definition.Method = "GET" - } - reg.Checks = append(reg.Checks, chk) - } - return reg -} - -func serviceToSidecarCatalogRegistration( - cluster *topology.Cluster, - node *topology.Node, - svc *topology.Service, -) (topology.ServiceID, *api.CatalogRegistration) { - pid := svc.ID - pid.Name += "-sidecar-proxy" - reg := &api.CatalogRegistration{ - Node: node.PodName(), - SkipNodeUpdate: true, - Service: &api.AgentService{ - Kind: api.ServiceKindConnectProxy, - ID: pid.Name, - Service: pid.Name, - Meta: svc.Meta, - Port: svc.EnvoyPublicListenerPort, - Address: node.LocalAddress(), - Proxy: &api.AgentServiceConnectProxyConfig{ - DestinationServiceName: svc.ID.Name, - DestinationServiceID: svc.ID.Name, - LocalServicePort: svc.Port, - }, - }, - Checks: []*api.HealthCheck{{ - Name: "external sync", - // Type: "external-sync", - Status: "passing", // TODO - ServiceID: pid.Name, - ServiceName: pid.Name, - Definition: api.HealthCheckDefinition{ - TCP: fmt.Sprintf("%s:%d", node.LocalAddress(), svc.EnvoyPublicListenerPort), - }, - Output: "", - }}, - } - if node.HasPublicAddress() { - reg.TaggedAddresses = map[string]string{ - "lan": node.LocalAddress(), - "lan_ipv4": node.LocalAddress(), - "wan": node.PublicAddress(), - "wan_ipv4": node.PublicAddress(), - } - } - if cluster.Enterprise { - reg.Partition = pid.Partition - reg.Service.Namespace = pid.Namespace - reg.Service.Partition = pid.Partition - reg.Checks[0].Namespace = pid.Namespace - reg.Checks[0].Partition = pid.Partition - } - - for _, u := range svc.Upstreams { - pu := api.Upstream{ - DestinationName: u.ID.Name, - DestinationPeer: u.Peer, - LocalBindAddress: u.LocalAddress, - LocalBindPort: u.LocalPort, - } - if cluster.Enterprise { - pu.DestinationNamespace = u.ID.Namespace - if u.Peer == "" { - pu.DestinationPartition = u.ID.Partition - } - } - reg.Service.Proxy.Upstreams = append(reg.Service.Proxy.Upstreams, pu) - } - - return pid, reg -} diff --git a/testing/deployer/sprawl/configentries.go b/testing/deployer/sprawl/configentries.go deleted file mode 100644 index 90ca2bb4cda2e..0000000000000 --- a/testing/deployer/sprawl/configentries.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "fmt" - "strings" - "time" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func (s *Sprawl) populateInitialConfigEntries(cluster *topology.Cluster) error { - if len(cluster.InitialConfigEntries) == 0 { - return nil - } - - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - for _, ce := range cluster.InitialConfigEntries { - _, _, err := client.ConfigEntries().Set(ce, nil) - if err != nil { - if ce.GetKind() == api.ServiceIntentions && strings.Contains(err.Error(), intentionsMigrationError) { - logger.Warn("known error writing initial config entry; trying again", - "kind", ce.GetKind(), - "name", ce.GetName(), - "namespace", ce.GetNamespace(), - "partition", ce.GetPartition(), - "error", err, - ) - - time.Sleep(500 * time.Millisecond) - continue - } - return fmt.Errorf( - "error persisting config entry kind=%q name=%q namespace=%q partition=%q: %w", - ce.GetKind(), - ce.GetName(), - ce.GetNamespace(), - ce.GetPartition(), - err, - ) - } - logger.Info("wrote initial config entry", - "kind", ce.GetKind(), - "name", ce.GetName(), - "namespace", ce.GetNamespace(), - "partition", ce.GetPartition(), - ) - } - - return nil -} - -const intentionsMigrationError = `Intentions are read only while being upgraded to config entries` diff --git a/testing/deployer/sprawl/consul.go b/testing/deployer/sprawl/consul.go deleted file mode 100644 index e92fe218846e4..0000000000000 --- a/testing/deployer/sprawl/consul.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "errors" - "fmt" - "time" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -func getLeader(client *api.Client) (string, error) { - leaderAdd, err := client.Status().Leader() - if err != nil { - return "", fmt.Errorf("could not query leader: %w", err) - } - if leaderAdd == "" { - return "", errors.New("no leader available") - } - return leaderAdd, nil -} - -func (s *Sprawl) waitForLeader(cluster *topology.Cluster) { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - for { - leader, err := client.Status().Leader() - if leader != "" && err == nil { - logger.Info("cluster has leader", "leader_addr", leader) - return - } - logger.Info("cluster has no leader yet", "error", err) - time.Sleep(500 * time.Millisecond) - } -} - -func (s *Sprawl) rejoinAllConsulServers() error { - // Join the servers together. - for _, cluster := range s.topology.Clusters { - if err := s.rejoinServers(cluster); err != nil { - return fmt.Errorf("rejoinServers[%s]: %w", cluster.Name, err) - } - s.waitForLeader(cluster) - } - return nil -} - -func (s *Sprawl) rejoinServers(cluster *topology.Cluster) error { - var ( - // client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - servers := cluster.ServerNodes() - - recoveryToken := s.secrets.ReadGeneric(cluster.Name, secrets.AgentRecovery) - - node0, rest := servers[0], servers[1:] - client, err := util.ProxyNotPooledAPIClient( - node0.LocalProxyPort(), - node0.LocalAddress(), - 8500, - recoveryToken, - ) - if err != nil { - return fmt.Errorf("could not get client for %q: %w", node0.ID(), err) - } - - logger.Info("joining servers together", - "from", node0.ID(), - "rest", nodeSliceToNodeIDSlice(rest), - ) - for _, node := range rest { - for { - err = client.Agent().Join(node.LocalAddress(), false) - if err == nil { - break - } - logger.Warn("could not join", "from", node0.ID(), "to", node.ID(), "error", err) - time.Sleep(500 * time.Millisecond) - } - } - - return nil -} - -func nodeSliceToNodeIDSlice(nodes []*topology.Node) []topology.NodeID { - var out []topology.NodeID - for _, node := range nodes { - out = append(out, node.ID()) - } - return out -} diff --git a/testing/deployer/sprawl/debug.go b/testing/deployer/sprawl/debug.go deleted file mode 100644 index df11f96c3c8b6..0000000000000 --- a/testing/deployer/sprawl/debug.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import "encoding/json" - -func jd(v any) string { - b, _ := json.MarshalIndent(v, "", " ") - return string(b) -} diff --git a/testing/deployer/sprawl/details.go b/testing/deployer/sprawl/details.go deleted file mode 100644 index 1c896598b4a9d..0000000000000 --- a/testing/deployer/sprawl/details.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "bytes" - "fmt" - "sort" - "strconv" - "strings" - "text/tabwriter" -) - -// PrintDetails will dump relevant addressing and naming data to the logger for -// human interaction purposes. -func (s *Sprawl) PrintDetails() error { - det := logDetails{ - TopologyID: s.topology.ID, - } - - for _, cluster := range s.topology.Clusters { - client := s.clients[cluster.Name] - - cfg, err := client.Operator().RaftGetConfiguration(nil) - if err != nil { - return fmt.Errorf("could not get raft config for cluster %q: %w", cluster.Name, err) - } - - var leaderNode string - for _, svr := range cfg.Servers { - if svr.Leader { - leaderNode = strings.TrimSuffix(svr.Node, "-pod") - } - } - - cd := clusterDetails{ - Name: cluster.Name, - Leader: leaderNode, - } - - for _, node := range cluster.Nodes { - if node.Disabled { - continue - } - - var addrs []string - for _, addr := range node.Addresses { - addrs = append(addrs, addr.Network+"="+addr.IPAddress) - } - sort.Strings(addrs) - - if node.IsServer() { - cd.Apps = append(cd.Apps, appDetail{ - Type: "server", - Container: node.DockerName(), - Addresses: addrs, - ExposedPort: node.ExposedPort(8500), - }) - } - - for _, svc := range node.Services { - if svc.IsMeshGateway { - cd.Apps = append(cd.Apps, appDetail{ - Type: "mesh-gateway", - Container: node.DockerName(), - ExposedPort: node.ExposedPort(svc.Port), - ExposedEnvoyAdminPort: node.ExposedPort(svc.EnvoyAdminPort), - Addresses: addrs, - Service: svc.ID.String(), - }) - } else { - cd.Apps = append(cd.Apps, appDetail{ - Type: "app", - Container: node.DockerName(), - ExposedPort: node.ExposedPort(svc.Port), - ExposedEnvoyAdminPort: node.ExposedPort(svc.EnvoyAdminPort), - Addresses: addrs, - Service: svc.ID.String(), - }) - } - } - } - - det.Clusters = append(det.Clusters, cd) - } - - var buf bytes.Buffer - w := tabwriter.NewWriter(&buf, 0, 0, 3, ' ', tabwriter.Debug) - - score := map[string]int{ - "server": 0, - "mesh-gateway": 1, - "app": 2, - } - - for _, cluster := range det.Clusters { - fmt.Fprintf(w, "CLUSTER\tTYPE\tCONTAINER\tNAME\tADDRS\tPORTS\t\n") - sort.Slice(cluster.Apps, func(i, j int) bool { - a := cluster.Apps[i] - b := cluster.Apps[j] - - asc := score[a.Type] - bsc := score[b.Type] - - if asc < bsc { - return true - } else if asc > bsc { - return false - } - - if a.Container < b.Container { - return true - } else if a.Container > b.Container { - return false - } - - if a.Service < b.Service { - return true - } else if a.Service > b.Service { - return false - } - - return a.ExposedPort < b.ExposedPort - }) - for _, d := range cluster.Apps { - if d.Type == "server" && d.Container == cluster.Leader { - d.Type = "leader" - } - portStr := "app=" + strconv.Itoa(d.ExposedPort) - if d.ExposedEnvoyAdminPort > 0 { - portStr += " envoy=" + strconv.Itoa(d.ExposedEnvoyAdminPort) - } - fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t\n", - cluster.Name, - d.Type, - d.Container, - d.Service, - strings.Join(d.Addresses, ", "), - portStr, - ) - } - fmt.Fprintf(w, "\t\t\t\t\t\n") - } - - w.Flush() - - s.logger.Info("CURRENT SPRAWL DETAILS", "details", buf.String()) - - return nil -} - -type logDetails struct { - TopologyID string - Clusters []clusterDetails -} - -type clusterDetails struct { - Name string - - Leader string - Apps []appDetail -} - -type appDetail struct { - Type string // server|mesh-gateway|app - Container string - Addresses []string - ExposedPort int `json:",omitempty"` - ExposedEnvoyAdminPort int `json:",omitempty"` - // just services - Service string `json:",omitempty"` -} diff --git a/testing/deployer/sprawl/ent.go b/testing/deployer/sprawl/ent.go deleted file mode 100644 index 8ec2925ef1638..0000000000000 --- a/testing/deployer/sprawl/ent.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "bytes" - "context" - "fmt" - "os" - "strings" - "time" - - "github.com/hashicorp/consul/api" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func (s *Sprawl) ensureLicense() error { - if s.license != "" { - return nil - } - v, err := readLicense() - if err != nil { - return err - } - s.license = v - return nil -} - -func readLicense() (string, error) { - if license := os.Getenv("CONSUL_LICENSE"); license != "" { - return license, nil - } - - licensePath := os.Getenv("CONSUL_LICENSE_PATH") - if licensePath == "" { - return "", nil - } - - licenseBytes, err := os.ReadFile(licensePath) - if err != nil { - return "", err - } - return strings.TrimSpace(string(licenseBytes)), nil -} - -func (s *Sprawl) initTenancies(cluster *topology.Cluster) error { - var ( - client = s.clients[cluster.Name] - logger = s.logger.With("cluster", cluster.Name) - ) - - // TODO: change this to UPSERT - - var ( - partClient = client.Partitions() - nsClient = client.Namespaces() - - partitionNameList []string - ) - for _, ap := range cluster.Partitions { - if ap.Name != "default" { - old, _, err := partClient.Read(context.Background(), ap.Name, nil) - if err != nil { - return fmt.Errorf("error reading partition %q: %w", ap.Name, err) - } - if old == nil { - obj := &api.Partition{ - Name: ap.Name, - } - - _, _, err := partClient.Create(context.Background(), obj, nil) - if err != nil { - return fmt.Errorf("error creating partition %q: %w", ap.Name, err) - } - logger.Info("created partition", "partition", ap.Name) - } - - partitionNameList = append(partitionNameList, ap.Name) - } - - if err := s.createCrossNamespaceCatalogReadPolicies(cluster, ap.Name); err != nil { - return fmt.Errorf("createCrossNamespaceCatalogReadPolicies[%s]: %w", ap.Name, err) - } - - for _, ns := range ap.Namespaces { - old, _, err := nsClient.Read(ns, &api.QueryOptions{Partition: ap.Name}) - if err != nil { - return err - } - - if old == nil { - obj := &api.Namespace{ - Partition: ap.Name, - Name: ns, - ACLs: &api.NamespaceACLConfig{ - PolicyDefaults: []api.ACLLink{ - {Name: "cross-ns-catalog-read"}, - }, - }, - } - if ns == "default" { - _, _, err := nsClient.Update(obj, nil) - if err != nil { - return err - } - logger.Info("updated namespace", "namespace", ns, "partition", ap.Name) - } else { - _, _, err := nsClient.Create(obj, nil) - if err != nil { - return err - } - logger.Info("created namespace", "namespace", ns, "partition", ap.Name) - } - } - } - } - - if err := s.waitUntilPartitionedSerfIsReady(context.TODO(), cluster, partitionNameList); err != nil { - return fmt.Errorf("waitUntilPartitionedSerfIsReady: %w", err) - } - - return nil -} - -func (s *Sprawl) waitUntilPartitionedSerfIsReady(ctx context.Context, cluster *topology.Cluster, partitions []string) error { - var ( - logger = s.logger.With("cluster", cluster.Name) - ) - - readyLogs := make(map[string]string) - for _, partition := range partitions { - readyLogs[partition] = `agent.server: Added serf partition to gossip network: partition=` + partition - } - - start := time.Now() - logger.Info("waiting for partitioned serf to be ready on all servers", "partitions", partitions) - for _, node := range cluster.Nodes { - if !node.IsServer() || node.Disabled { - continue - } - - var buf bytes.Buffer - for { - buf.Reset() - - err := s.runner.DockerExec(ctx, []string{ - "logs", node.DockerName(), - }, &buf, nil) - if err != nil { - return fmt.Errorf("could not fetch docker logs from node %q: %w", node.ID(), err) - } - - var ( - body = buf.String() - found []string - ) - - for partition, readyLog := range readyLogs { - if strings.Contains(body, readyLog) { - found = append(found, partition) - } - } - - if len(found) == len(readyLogs) { - break - } - } - - time.Sleep(500 * time.Millisecond) - } - - logger.Info("partitioned serf is ready on all servers", "partitions", partitions, "elapsed", time.Since(start)) - - return nil -} diff --git a/testing/deployer/sprawl/helpers.go b/testing/deployer/sprawl/helpers.go deleted file mode 100644 index 941311a1c1183..0000000000000 --- a/testing/deployer/sprawl/helpers.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -// Deprecated: remove -func TruncateSquidError(err error) error { - return err -} - -// Deprecated: remove -func IsSquid503(err error) bool { - return false -} diff --git a/testing/deployer/sprawl/internal/build/docker.go b/testing/deployer/sprawl/internal/build/docker.go deleted file mode 100644 index 7007d44c844ae..0000000000000 --- a/testing/deployer/sprawl/internal/build/docker.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package build - -import ( - "context" - "strings" - - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/runner" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -const dockerfileEnvoy = ` -ARG CONSUL_IMAGE -ARG ENVOY_IMAGE -FROM ${CONSUL_IMAGE} -FROM ${ENVOY_IMAGE} -COPY --from=0 /bin/consul /bin/consul -` - -// FROM hashicorp/consul-dataplane:latest -// COPY --from=busybox:uclibc /bin/sh /bin/sh -const dockerfileDataplane = ` -ARG DATAPLANE_IMAGE -FROM busybox:latest -FROM ${DATAPLANE_IMAGE} -COPY --from=0 /bin/busybox /bin/busybox -USER 0:0 -RUN ["busybox", "--install", "/bin", "-s"] -USER 100:0 -ENTRYPOINT [] -` - -func DockerImages( - logger hclog.Logger, - run *runner.Runner, - t *topology.Topology, -) error { - logw := logger.Named("docker").StandardWriter(&hclog.StandardLoggerOptions{ForceLevel: hclog.Info}) - - built := make(map[string]struct{}) - for _, c := range t.Clusters { - for _, n := range c.Nodes { - joint := n.Images.EnvoyConsulImage() - if _, ok := built[joint]; joint != "" && !ok { - logger.Info("building image", "image", joint) - err := run.DockerExec(context.TODO(), []string{ - "build", - "--build-arg", - "CONSUL_IMAGE=" + n.Images.Consul, - "--build-arg", - "ENVOY_IMAGE=" + n.Images.Envoy, - "-t", joint, - "-", - }, logw, strings.NewReader(dockerfileEnvoy)) - if err != nil { - return err - } - - built[joint] = struct{}{} - } - - cdp := n.Images.LocalDataplaneImage() - if _, ok := built[cdp]; cdp != "" && !ok { - logger.Info("building image", "image", cdp) - err := run.DockerExec(context.TODO(), []string{ - "build", - "--build-arg", - "DATAPLANE_IMAGE=" + n.Images.Dataplane, - "-t", cdp, - "-", - }, logw, strings.NewReader(dockerfileDataplane)) - if err != nil { - return err - } - - built[cdp] = struct{}{} - } - } - } - - return nil -} diff --git a/testing/deployer/sprawl/internal/runner/exec.go b/testing/deployer/sprawl/internal/runner/exec.go deleted file mode 100644 index 1c2a8a1d311b4..0000000000000 --- a/testing/deployer/sprawl/internal/runner/exec.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package runner - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "os" - "os/exec" - - "github.com/hashicorp/go-hclog" -) - -type Runner struct { - logger hclog.Logger - - tfBin string - dockerBin string -} - -func Load(logger hclog.Logger) (*Runner, error) { - r := &Runner{ - logger: logger, - } - - type item struct { - name string - dest *string - warn string // optional - } - lookup := []item{ - {"docker", &r.dockerBin, ""}, - {"terraform", &r.tfBin, ""}, - } - - var ( - bins []string - err error - ) - for _, i := range lookup { - *i.dest, err = exec.LookPath(i.name) - if err != nil { - if errors.Is(err, exec.ErrNotFound) { - if i.warn != "" { - return nil, fmt.Errorf("Could not find %q on path (%s): %w", i.name, i.warn, err) - } else { - return nil, fmt.Errorf("Could not find %q on path: %w", i.name, err) - } - } - return nil, fmt.Errorf("Unexpected failure looking for %q on path: %w", i.name, err) - } - bins = append(bins, *i.dest) - } - r.logger.Trace("using binaries", "paths", bins) - - return r, nil -} - -func (r *Runner) DockerExec(ctx context.Context, args []string, stdout io.Writer, stdin io.Reader) error { - return cmdExec(ctx, "docker", r.dockerBin, args, stdout, nil, stdin, "") -} - -func (r *Runner) DockerExecWithStderr(ctx context.Context, args []string, stdout, stderr io.Writer, stdin io.Reader) error { - return cmdExec(ctx, "docker", r.dockerBin, args, stdout, stderr, stdin, "") -} - -func (r *Runner) TerraformExec(ctx context.Context, args []string, stdout io.Writer, workdir string) error { - return cmdExec(ctx, "terraform", r.tfBin, args, stdout, nil, nil, workdir) -} - -func cmdExec(ctx context.Context, name, binary string, args []string, stdout, stderr io.Writer, stdin io.Reader, dir string) error { - if binary == "" { - panic("binary named " + name + " was not detected") - } - var errWriter bytes.Buffer - - if stdout == nil { - stdout = os.Stdout // TODO: wrap logs - } - - cmd := exec.CommandContext(ctx, binary, args...) - if dir != "" { - cmd.Dir = dir - } - cmd.Stdout = stdout - cmd.Stderr = &errWriter - if stderr != nil { - cmd.Stderr = io.MultiWriter(stderr, cmd.Stderr) - } - cmd.Stdin = stdin - if err := cmd.Run(); err != nil { - return &ExecError{ - BinaryName: name, - Err: err, - ErrorOutput: errWriter.String(), - } - } - - return nil -} - -type ExecError struct { - BinaryName string - ErrorOutput string - Err error -} - -func (e *ExecError) Unwrap() error { - return e.Err -} - -func (e *ExecError) Error() string { - return fmt.Sprintf( - "could not invoke %q: %v : %s", - e.BinaryName, - e.Err, - e.ErrorOutput, - ) -} diff --git a/testing/deployer/sprawl/internal/secrets/store.go b/testing/deployer/sprawl/internal/secrets/store.go deleted file mode 100644 index 0cacf88b256eb..0000000000000 --- a/testing/deployer/sprawl/internal/secrets/store.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package secrets - -import ( - "net/url" - "strings" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -type Store struct { - m map[string]string -} - -const ( - GossipKey = "gossip" - BootstrapToken = "bootstrap-token" - AgentRecovery = "agent-recovery" -) - -func (s *Store) SaveGeneric(cluster, name, value string) { - s.save(encode(cluster, "generic", name), value) -} - -func (s *Store) ReadGeneric(cluster, name string) string { - return s.read(encode(cluster, "generic", name)) -} - -func (s *Store) SaveAgentToken(cluster string, nid topology.NodeID, value string) { - s.save(encode(cluster, "agent", nid.String()), value) -} - -func (s *Store) ReadAgentToken(cluster string, nid topology.NodeID) string { - return s.read(encode(cluster, "agent", nid.String())) -} - -func (s *Store) SaveServiceToken(cluster string, sid topology.ServiceID, value string) { - s.save(encode(cluster, "service", sid.String()), value) -} - -func (s *Store) ReadServiceToken(cluster string, sid topology.ServiceID) string { - return s.read(encode(cluster, "service", sid.String())) -} - -func (s *Store) save(key, value string) { - if s.m == nil { - s.m = make(map[string]string) - } - - s.m[key] = value -} - -func (s *Store) read(key string) string { - if s.m == nil { - return "" - } - - v, ok := s.m[key] - if !ok { - return "" - } - return v -} - -func encode(parts ...string) string { - var out []string - for _, p := range parts { - out = append(out, url.QueryEscape(p)) - } - return strings.Join(out, "/") -} diff --git a/testing/deployer/sprawl/internal/tfgen/agent.go b/testing/deployer/sprawl/internal/tfgen/agent.go deleted file mode 100644 index d884d200d2e92..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/agent.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "fmt" - "strings" - - "github.com/hashicorp/hcl/v2/hclwrite" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func (g *Generator) generateAgentHCL(node *topology.Node) (string, error) { - if !node.IsAgent() { - return "", fmt.Errorf("not an agent") - } - - cluster, ok := g.topology.Clusters[node.Cluster] - if !ok { - return "", fmt.Errorf("no such cluster: %s", node.Cluster) - } - - var b HCLBuilder - - b.add("server", node.IsServer()) - b.add("bind_addr", "0.0.0.0") - b.add("client_addr", "0.0.0.0") - b.add("advertise_addr", `{{ GetInterfaceIP "eth0" }}`) - b.add("datacenter", node.Datacenter) - b.add("disable_update_check", true) - b.add("log_level", "trace") - b.add("enable_debug", true) - b.add("use_streaming_backend", true) - - // speed up leaves - b.addBlock("performance", func() { - b.add("leave_drain_time", "50ms") - }) - - b.add("primary_datacenter", node.Datacenter) - - // Using retry_join here is bad because changing server membership will - // destroy and recreate all of the servers - // if !node.IsServer() { - b.addSlice("retry_join", []string{"server." + node.Cluster + "-consulcluster.lan"}) - b.add("retry_interval", "1s") - // } - - if node.IsServer() { - b.addBlock("peering", func() { - b.add("enabled", true) - }) - } - - b.addBlock("ui_config", func() { - b.add("enabled", true) - }) - - b.addBlock("telemetry", func() { - b.add("disable_hostname", true) - b.add("prometheus_retention_time", "168h") - }) - - b.add("encrypt", g.sec.ReadGeneric(node.Cluster, secrets.GossipKey)) - - { - var ( - root = "/consul/config/certs" - caFile = root + "/consul-agent-ca.pem" - certFile = root + "/" + node.TLSCertPrefix + ".pem" - certKey = root + "/" + node.TLSCertPrefix + "-key.pem" - ) - - b.addBlock("tls", func() { - b.addBlock("internal_rpc", func() { - b.add("ca_file", caFile) - b.add("cert_file", certFile) - b.add("key_file", certKey) - b.add("verify_incoming", true) - b.add("verify_server_hostname", true) - b.add("verify_outgoing", true) - }) - // if cfg.EncryptionTLSAPI { - // b.addBlock("https", func() { - // b.add("ca_file", caFile) - // b.add("cert_file", certFile) - // b.add("key_file", certKey) - // // b.add("verify_incoming", true) - // }) - // } - if node.IsServer() { - b.addBlock("grpc", func() { - b.add("ca_file", caFile) - b.add("cert_file", certFile) - b.add("key_file", certKey) - // b.add("verify_incoming", true) - }) - } - }) - } - - b.addBlock("ports", func() { - if node.IsServer() { - b.add("grpc_tls", 8503) - b.add("grpc", -1) - } else { - b.add("grpc", 8502) - b.add("grpc_tls", -1) - } - b.add("http", 8500) - b.add("dns", 8600) - }) - - b.addSlice("recursors", []string{"8.8.8.8"}) - - b.addBlock("acl", func() { - b.add("enabled", true) - b.add("default_policy", "deny") - b.add("down_policy", "extend-cache") - b.add("enable_token_persistence", true) - b.addBlock("tokens", func() { - if node.IsServer() { - b.add("initial_management", g.sec.ReadGeneric(node.Cluster, secrets.BootstrapToken)) - } - b.add("agent_recovery", g.sec.ReadGeneric(node.Cluster, secrets.AgentRecovery)) - b.add("agent", g.sec.ReadAgentToken(node.Cluster, node.ID())) - }) - }) - - if node.IsServer() { - b.add("bootstrap_expect", len(cluster.ServerNodes())) - // b.add("translate_wan_addrs", true) - b.addBlock("rpc", func() { - b.add("enable_streaming", true) - }) - if node.HasPublicAddress() { - b.add("advertise_addr_wan", `{{ GetInterfaceIP "eth1" }}`) // note: can't use 'node.PublicAddress()' b/c we don't know that yet - } - - // Exercise config entry bootstrap - // b.addBlock("config_entries", func() { - // b.addBlock("bootstrap", func() { - // b.add("kind", "service-defaults") - // b.add("name", "placeholder") - // b.add("protocol", "grpc") - // }) - // b.addBlock("bootstrap", func() { - // b.add("kind", "service-intentions") - // b.add("name", "placeholder") - // b.addBlock("sources", func() { - // b.add("name", "placeholder-client") - // b.add("action", "allow") - // }) - // }) - // }) - - b.addBlock("connect", func() { - b.add("enabled", true) - }) - - } else { - if cluster.Enterprise { - b.add("partition", node.Partition) - } - } - - return b.String(), nil -} - -type HCLBuilder struct { - parts []string -} - -func (b *HCLBuilder) format(s string, a ...any) { - if len(a) == 0 { - b.parts = append(b.parts, s) - } else { - b.parts = append(b.parts, fmt.Sprintf(s, a...)) - } -} - -func (b *HCLBuilder) add(k string, v any) { - switch x := v.(type) { - case string: - if x != "" { - b.format("%s = %q", k, x) - } - case int: - b.format("%s = %d", k, x) - case bool: - b.format("%s = %v", k, x) - default: - panic(fmt.Sprintf("unexpected type %T", v)) - } -} - -func (b *HCLBuilder) addBlock(block string, fn func()) { - b.format(block + "{") - fn() - b.format("}") -} - -func (b *HCLBuilder) addSlice(name string, vals []string) { - b.format(name + " = [") - for _, v := range vals { - b.format("%q,", v) - } - b.format("]") -} - -func (b *HCLBuilder) String() string { - joined := strings.Join(b.parts, "\n") - // Ensure it looks tidy - return string(hclwrite.Format([]byte(joined))) -} diff --git a/testing/deployer/sprawl/internal/tfgen/digest.go b/testing/deployer/sprawl/internal/tfgen/digest.go deleted file mode 100644 index e840f91ee67b5..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/digest.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "fmt" -) - -// digestOutputs takes the data extracted from terraform output variables and -// updates various fields on the topology.Topology with that data. -func (g *Generator) digestOutputs(out *Outputs) error { - for clusterName, nodeMap := range out.Nodes { - cluster, ok := g.topology.Clusters[clusterName] - if !ok { - return fmt.Errorf("found output cluster that does not exist: %s", clusterName) - } - for nid, nodeOut := range nodeMap { - node := cluster.NodeByID(nid) - if node == nil { - return fmt.Errorf("found output node that does not exist in cluster %q: %s", nid, clusterName) - } - - if node.DigestExposedPorts(nodeOut.Ports) { - g.logger.Info("discovered exposed port mappings", - "cluster", clusterName, - "node", nid.String(), - "ports", nodeOut.Ports, - ) - } - } - } - - for netName, proxyPort := range out.ProxyPorts { - changed, err := g.topology.DigestExposedProxyPort(netName, proxyPort) - if err != nil { - return err - } - if changed { - g.logger.Info("discovered exposed forward proxy port", - "network", netName, - "port", proxyPort, - ) - } - } - - return nil -} diff --git a/testing/deployer/sprawl/internal/tfgen/dns.go b/testing/deployer/sprawl/internal/tfgen/dns.go deleted file mode 100644 index 6c3e5ca624696..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/dns.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "bytes" - "fmt" - "os" - "path/filepath" - "strings" - "text/template" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -func (g *Generator) getCoreDNSContainer( - net *topology.Network, - ipAddress string, - hashes []string, -) Resource { - var env []string - for i, hv := range hashes { - env = append(env, fmt.Sprintf("HASH_FILE_%d_VALUE=%s", i, hv)) - } - coredns := struct { - Name string - DockerNetworkName string - IPAddress string - HashValues string - Env []string - }{ - Name: net.Name, - DockerNetworkName: net.DockerName, - IPAddress: ipAddress, - Env: env, - } - return Eval(tfCorednsT, &coredns) -} - -func (g *Generator) writeCoreDNSFiles(net *topology.Network, dnsIPAddress string) (bool, []string, error) { - if net.IsPublic() { - return false, nil, fmt.Errorf("coredns only runs on local networks") - } - - rootdir := filepath.Join(g.workdir, "terraform", "coredns-config-"+net.Name) - if err := os.MkdirAll(rootdir, 0755); err != nil { - return false, nil, err - } - - for _, cluster := range g.topology.Clusters { - if cluster.NetworkName != net.Name { - continue - } - var addrs []string - for _, node := range cluster.SortedNodes() { - if node.Kind != topology.NodeKindServer || node.Disabled { - continue - } - addr := node.AddressByNetwork(net.Name) - if addr.IPAddress != "" { - addrs = append(addrs, addr.IPAddress) - } - } - - var ( - clusterDNSName = cluster.Name + "-consulcluster.lan" - ) - - corefilePath := filepath.Join(rootdir, "Corefile") - zonefilePath := filepath.Join(rootdir, "servers") - - _, err := UpdateFileIfDifferent( - g.logger, - generateCoreDNSConfigFile( - clusterDNSName, - addrs, - ), - corefilePath, - 0644, - ) - if err != nil { - return false, nil, fmt.Errorf("error writing %q: %w", corefilePath, err) - } - corefileHash, err := util.HashFile(corefilePath) - if err != nil { - return false, nil, fmt.Errorf("error hashing %q: %w", corefilePath, err) - } - - _, err = UpdateFileIfDifferent( - g.logger, - generateCoreDNSZoneFile( - dnsIPAddress, - clusterDNSName, - addrs, - ), - zonefilePath, - 0644, - ) - if err != nil { - return false, nil, fmt.Errorf("error writing %q: %w", zonefilePath, err) - } - zonefileHash, err := util.HashFile(zonefilePath) - if err != nil { - return false, nil, fmt.Errorf("error hashing %q: %w", zonefilePath, err) - } - - return true, []string{corefileHash, zonefileHash}, nil - } - - return false, nil, nil -} - -func generateCoreDNSConfigFile( - clusterDNSName string, - addrs []string, -) []byte { - serverPart := "" - if len(addrs) > 0 { - var servers []string - for _, addr := range addrs { - servers = append(servers, addr+":8600") - } - serverPart = fmt.Sprintf(` -consul:53 { - forward . %s - log - errors - whoami -} -`, strings.Join(servers, " ")) - } - - return []byte(fmt.Sprintf(` -%[1]s:53 { - file /config/servers %[1]s - log - errors - whoami -} - -%[2]s - -.:53 { - forward . 8.8.8.8:53 - log - errors - whoami -} -`, clusterDNSName, serverPart)) -} - -func generateCoreDNSZoneFile( - dnsIPAddress string, - clusterDNSName string, - addrs []string, -) []byte { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf(` -$TTL 60 -$ORIGIN %[1]s. -@ IN SOA ns.%[1]s. webmaster.%[1]s. ( - 2017042745 ; serial - 7200 ; refresh (2 hours) - 3600 ; retry (1 hour) - 1209600 ; expire (2 weeks) - 3600 ; minimum (1 hour) - ) -@ IN NS ns.%[1]s. ; Name server -ns IN A %[2]s ; self -`, clusterDNSName, dnsIPAddress)) - - for _, addr := range addrs { - buf.WriteString(fmt.Sprintf(` -server IN A %s ; Consul server -`, addr)) - } - - return buf.Bytes() -} - -var tfCorednsT = template.Must(template.ParseFS(content, "templates/container-coredns.tf.tmpl")) diff --git a/testing/deployer/sprawl/internal/tfgen/docker.go b/testing/deployer/sprawl/internal/tfgen/docker.go deleted file mode 100644 index bc8bd657563df..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/docker.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "fmt" - "regexp" -) - -var invalidResourceName = regexp.MustCompile(`[^a-z0-9-]+`) - -func DockerImageResourceName(image string) string { - return invalidResourceName.ReplaceAllLiteralString(image, "-") -} - -func DockerNetwork(name, subnet string) Resource { - return Text(fmt.Sprintf(` -resource "docker_network" %[1]q { - name = %[1]q - attachable = true - ipam_config { - subnet = %[2]q - } -} -`, name, subnet)) -} - -func DockerVolume(name string) Resource { - return Text(fmt.Sprintf(` -resource "docker_volume" %[1]q { - name = %[1]q -}`, name)) -} - -func DockerImage(name, image string) Resource { - return Text(fmt.Sprintf(` -resource "docker_image" %[1]q { - name = %[2]q - keep_locally = true -}`, name, image)) -} diff --git a/testing/deployer/sprawl/internal/tfgen/docker_test.go b/testing/deployer/sprawl/internal/tfgen/docker_test.go deleted file mode 100644 index 942b87189fca5..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/docker_test.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestDockerImageResourceName(t *testing.T) { - fn := DockerImageResourceName - - assert.Equal(t, "", fn("")) - assert.Equal(t, "abcdefghijklmnopqrstuvwxyz0123456789-", fn("abcdefghijklmnopqrstuvwxyz0123456789-")) - assert.Equal(t, "hashicorp-consul-1-15-0", fn("hashicorp/consul:1.15.0")) -} diff --git a/testing/deployer/sprawl/internal/tfgen/gen.go b/testing/deployer/sprawl/internal/tfgen/gen.go deleted file mode 100644 index b576f2c93e59a..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/gen.go +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "os" - "path/filepath" - "strconv" - "strings" - - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/runner" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -type Generator struct { - logger hclog.Logger - runner *runner.Runner - topology *topology.Topology - sec *secrets.Store - workdir string - license string - - tfLogger io.Writer - - // set during network phase - remainingSubnets map[string]struct{} - - launched bool -} - -func NewGenerator( - logger hclog.Logger, - runner *runner.Runner, - topo *topology.Topology, - sec *secrets.Store, - workdir string, - license string, -) (*Generator, error) { - if logger == nil { - panic("logger is required") - } - if runner == nil { - panic("runner is required") - } - if topo == nil { - panic("topology is required") - } - if sec == nil { - panic("secrets store is required") - } - if workdir == "" { - panic("workdir is required") - } - - g := &Generator{ - logger: logger, - runner: runner, - sec: sec, - workdir: workdir, - license: license, - - tfLogger: logger.Named("terraform").StandardWriter(&hclog.StandardLoggerOptions{ - ForceLevel: hclog.Info, - }), - } - g.SetTopology(topo) - - _ = g.terraformDestroy(context.Background(), true) // cleanup prior run - - return g, nil -} - -func (g *Generator) MarkLaunched() { - g.launched = true -} - -func (g *Generator) SetTopology(topo *topology.Topology) { - if topo == nil { - panic("topology is required") - } - g.topology = topo -} - -type Step int - -const ( - StepAll Step = 0 - StepNetworks Step = 1 - StepServers Step = 2 - StepAgents Step = 3 - StepServices Step = 4 - // StepPeering Step = XXX5 - StepRelaunch Step = 5 -) - -func (s Step) String() string { - switch s { - case StepAll: - return "all" - case StepNetworks: - return "networks" - case StepServers: - return "servers" - case StepAgents: - return "agents" - case StepServices: - return "services" - case StepRelaunch: - return "relaunch" - // case StepPeering: - // return "peering" - default: - return "UNKNOWN--" + strconv.Itoa(int(s)) - } -} - -func (s Step) StartServers() bool { return s >= StepServers } -func (s Step) StartAgents() bool { return s >= StepAgents } -func (s Step) StartServices() bool { return s >= StepServices } - -// func (s Step) InitiatePeering() bool { return s >= StepPeering } - -func (g *Generator) Regenerate() error { - return g.Generate(StepRelaunch) -} - -func (g *Generator) Generate(step Step) error { - if g.launched && step != StepRelaunch { - return fmt.Errorf("cannot use step %q after successful launch; see Regenerate()", step) - } - - g.logger.Info("generating and creating resources", "step", step.String()) - var ( - networks []Resource - volumes []Resource - images []Resource - containers []Resource - - imageNames = make(map[string]string) - ) - - addVolume := func(name string) { - volumes = append(volumes, DockerVolume(name)) - } - addImage := func(name, image string) { - if image == "" { - return - } - if _, ok := imageNames[image]; ok { - return - } - - if name == "" { - name = DockerImageResourceName(image) - } - - imageNames[image] = name - - g.logger.Info("registering image", "resource", name, "image", image) - - images = append(images, DockerImage(name, image)) - } - - if g.remainingSubnets == nil { - g.remainingSubnets = util.GetPossibleDockerNetworkSubnets() - } - if len(g.remainingSubnets) == 0 { - return fmt.Errorf("exhausted all docker networks") - } - - addImage("nginx", "nginx:latest") - addImage("coredns", "coredns/coredns:latest") - for _, net := range g.topology.SortedNetworks() { - if net.Subnet == "" { - // Because this harness runs on a linux or macos host, we can't - // directly invoke the moby libnetwork calls to check for free - // subnets as it would have to cross into the docker desktop vm on - // mac. - // - // Instead rely on map iteration order being random to avoid - // collisions, but detect the terraform failure and retry until - // success. - - var ipnet string - for ipnet = range g.remainingSubnets { - } - if ipnet == "" { - return fmt.Errorf("could not get a free docker network") - } - delete(g.remainingSubnets, ipnet) - - if _, err := net.SetSubnet(ipnet); err != nil { - return fmt.Errorf("assigned subnet is invalid %q: %w", ipnet, err) - } - } - networks = append(networks, DockerNetwork(net.DockerName, net.Subnet)) - - var ( - // We always ask for a /24, so just blindly pick x.x.x.252 as our - // proxy address. There's an offset of 2 in the list of available - // addresses here because we removed x.x.x.0 and x.x.x.1 from the - // pool. - proxyIPAddress = net.IPByIndex(250) - // Grab x.x.x.253 for the dns server - dnsIPAddress = net.IPByIndex(251) - ) - - { - // wrote, hashes, err := g.write - } - - { // nginx forward proxy - _, hash, err := g.writeNginxConfig(net) - if err != nil { - return fmt.Errorf("writeNginxConfig[%s]: %w", net.Name, err) - } - - containers = append(containers, g.getForwardProxyContainer(net, proxyIPAddress, hash)) - - } - - net.ProxyAddress = proxyIPAddress - net.DNSAddress = "" - - if net.IsLocal() { - wrote, hashes, err := g.writeCoreDNSFiles(net, dnsIPAddress) - if err != nil { - return fmt.Errorf("writeCoreDNSFiles[%s]: %w", net.Name, err) - } - if wrote { - net.DNSAddress = dnsIPAddress - containers = append(containers, g.getCoreDNSContainer(net, dnsIPAddress, hashes)) - } - } - } - - for _, c := range g.topology.SortedClusters() { - if c.TLSVolumeName == "" { - c.TLSVolumeName = c.Name + "-tls-material-" + g.topology.ID - } - addVolume(c.TLSVolumeName) - } - - addImage("pause", "registry.k8s.io/pause:3.3") - - if step.StartServers() { - for _, c := range g.topology.SortedClusters() { - for _, node := range c.SortedNodes() { - if node.Disabled { - continue - } - addImage("", node.Images.Consul) - addImage("", node.Images.EnvoyConsulImage()) - addImage("", node.Images.LocalDataplaneImage()) - - if node.IsAgent() { - addVolume(node.DockerName()) - } - - for _, svc := range node.Services { - addImage("", svc.Image) - } - - myContainers, err := g.generateNodeContainers(step, c, node) - if err != nil { - return err - } - - containers = append(containers, myContainers...) - } - } - } - - tfpath := func(p string) string { - return filepath.Join(g.workdir, "terraform", p) - } - - if _, err := WriteHCLResourceFile(g.logger, []Resource{Text(terraformPrelude)}, tfpath("init.tf"), 0644); err != nil { - return err - } - if netResult, err := WriteHCLResourceFile(g.logger, networks, tfpath("networks.tf"), 0644); err != nil { - return err - } else if netResult == UpdateResultModified { - if step != StepNetworks { - return fmt.Errorf("cannot change networking details after they are established") - } - } - if _, err := WriteHCLResourceFile(g.logger, volumes, tfpath("volumes.tf"), 0644); err != nil { - return err - } - if _, err := WriteHCLResourceFile(g.logger, images, tfpath("images.tf"), 0644); err != nil { - return err - } - if _, err := WriteHCLResourceFile(g.logger, containers, tfpath("containers.tf"), 0644); err != nil { - return err - } - - if err := g.terraformApply(context.TODO()); err != nil { - return err - } - - out, err := g.terraformOutputs(context.TODO()) - if err != nil { - return err - } - - return g.digestOutputs(out) -} - -func (g *Generator) DestroyAll() error { - return g.terraformDestroy(context.TODO(), false) -} - -func (g *Generator) DestroyAllQuietly() error { - return g.terraformDestroy(context.TODO(), true) -} - -func (g *Generator) terraformApply(ctx context.Context) error { - tfdir := filepath.Join(g.workdir, "terraform") - - if _, err := os.Stat(filepath.Join(tfdir, ".terraform")); err != nil { - if !os.IsNotExist(err) { - return err - } - - // On the fly init - g.logger.Info("Running 'terraform init'...") - if err := g.runner.TerraformExec(ctx, []string{"init", "-input=false"}, g.tfLogger, tfdir); err != nil { - return err - } - } - - g.logger.Info("Running 'terraform apply'...") - return g.runner.TerraformExec(ctx, []string{"apply", "-input=false", "-auto-approve"}, g.tfLogger, tfdir) -} - -func (g *Generator) terraformDestroy(ctx context.Context, quiet bool) error { - g.logger.Info("Running 'terraform destroy'...") - - var out io.Writer - if quiet { - out = io.Discard - } else { - out = g.tfLogger - } - - tfdir := filepath.Join(g.workdir, "terraform") - return g.runner.TerraformExec(ctx, []string{ - "destroy", "-input=false", "-auto-approve", "-refresh=false", - }, out, tfdir) -} - -func (g *Generator) terraformOutputs(ctx context.Context) (*Outputs, error) { - tfdir := filepath.Join(g.workdir, "terraform") - - var buf bytes.Buffer - err := g.runner.TerraformExec(ctx, []string{ - "output", "-json", - }, &buf, tfdir) - if err != nil { - return nil, err - } - - type outputVar struct { - // may be map[string]any - Value any `json:"value"` - } - - raw := make(map[string]*outputVar) - dec := json.NewDecoder(&buf) - if err := dec.Decode(&raw); err != nil { - return nil, err - } - - out := &Outputs{} - - for key, rv := range raw { - switch { - case strings.HasPrefix(key, "ports_"): - cluster, nid, ok := extractNodeOutputKey("ports_", key) - if !ok { - return nil, fmt.Errorf("unexpected output var: %s", key) - } - - ports := make(map[int]int) - for k, v := range rv.Value.(map[string]any) { - ki, err := strconv.Atoi(k) - if err != nil { - return nil, fmt.Errorf("unexpected port value %q: %w", k, err) - } - ports[ki] = int(v.(float64)) - } - out.SetNodePorts(cluster, nid, ports) - case strings.HasPrefix(key, "forwardproxyport_"): - netname := strings.TrimPrefix(key, "forwardproxyport_") - - found := rv.Value.(map[string]any) - if len(found) != 1 { - return nil, fmt.Errorf("found unexpected ports: %v", found) - } - got, ok := found[strconv.Itoa(proxyInternalPort)] - if !ok { - return nil, fmt.Errorf("found unexpected ports: %v", found) - } - - out.SetProxyPort(netname, int(got.(float64))) - } - } - - return out, nil -} - -func extractNodeOutputKey(prefix, key string) (string, topology.NodeID, bool) { - clusterNode := strings.TrimPrefix(key, prefix) - - cluster, nodeid, ok := strings.Cut(clusterNode, "_") - if !ok { - return "", topology.NodeID{}, false - } - - partition, node, ok := strings.Cut(nodeid, "_") - if !ok { - return "", topology.NodeID{}, false - } - - nid := topology.NewNodeID(node, partition) - return cluster, nid, true -} - -type Outputs struct { - ProxyPorts map[string]int // net -> exposed port - Nodes map[string]map[topology.NodeID]*NodeOutput // clusterID -> node -> stuff -} - -func (o *Outputs) SetNodePorts(cluster string, nid topology.NodeID, ports map[int]int) { - nodeOut := o.getNode(cluster, nid) - nodeOut.Ports = ports -} - -func (o *Outputs) SetProxyPort(net string, port int) { - if o.ProxyPorts == nil { - o.ProxyPorts = make(map[string]int) - } - o.ProxyPorts[net] = port -} - -func (o *Outputs) getNode(cluster string, nid topology.NodeID) *NodeOutput { - if o.Nodes == nil { - o.Nodes = make(map[string]map[topology.NodeID]*NodeOutput) - } - cnodes, ok := o.Nodes[cluster] - if !ok { - cnodes = make(map[topology.NodeID]*NodeOutput) - o.Nodes[cluster] = cnodes - } - - nodeOut, ok := cnodes[nid] - if !ok { - nodeOut = &NodeOutput{} - cnodes[nid] = nodeOut - } - - return nodeOut -} - -type NodeOutput struct { - Ports map[int]int `json:",omitempty"` -} diff --git a/testing/deployer/sprawl/internal/tfgen/io.go b/testing/deployer/sprawl/internal/tfgen/io.go deleted file mode 100644 index 160e85be316ba..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/io.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "bytes" - "os" - "strings" - - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/hcl/v2/hclwrite" - "github.com/rboyer/safeio" -) - -func WriteHCLResourceFile( - logger hclog.Logger, - res []Resource, - path string, - perm os.FileMode, -) (UpdateResult, error) { - var text []string - for _, r := range res { - val, err := r.Render() - if err != nil { - return UpdateResultNone, err - } - text = append(text, strings.TrimSpace(val)) - } - - body := strings.Join(text, "\n\n") - - // Ensure it looks tidy - out := hclwrite.Format(bytes.TrimSpace([]byte(body))) - - return UpdateFileIfDifferent(logger, out, path, perm) -} - -type UpdateResult int - -const ( - UpdateResultNone UpdateResult = iota - UpdateResultCreated - UpdateResultModified -) - -func UpdateFileIfDifferent( - logger hclog.Logger, - body []byte, - path string, - perm os.FileMode, -) (UpdateResult, error) { - prev, err := os.ReadFile(path) - - result := UpdateResultNone - if err != nil { - if !os.IsNotExist(err) { - return result, err - } - logger.Info("writing new file", "path", path) - result = UpdateResultCreated - } else { - // loaded - if bytes.Equal(body, prev) { - return result, nil - } - logger.Info("file has changed", "path", path) - result = UpdateResultModified - } - - _, err = safeio.WriteToFile(bytes.NewReader(body), path, perm) - return result, err -} diff --git a/testing/deployer/sprawl/internal/tfgen/nodes.go b/testing/deployer/sprawl/internal/tfgen/nodes.go deleted file mode 100644 index 7b7addfb207b3..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/nodes.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "fmt" - "sort" - "strconv" - "text/template" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -type terraformPod struct { - PodName string - Node *topology.Node - Ports []int - Labels map[string]string - TLSVolumeName string - DNSAddress string - DockerNetworkName string -} - -type terraformConsulAgent struct { - terraformPod - ImageResource string - HCL string - EnterpriseLicense string - Env []string -} - -type terraformMeshGatewayService struct { - terraformPod - EnvoyImageResource string - Service *topology.Service - Command []string -} - -type terraformService struct { - terraformPod - AppImageResource string - EnvoyImageResource string // agentful - DataplaneImageResource string // agentless - Service *topology.Service - Env []string - Command []string - EnvoyCommand []string // agentful -} - -func (g *Generator) generateNodeContainers( - step Step, - cluster *topology.Cluster, - node *topology.Node, -) ([]Resource, error) { - if node.Disabled { - return nil, fmt.Errorf("cannot generate containers for a disabled node") - } - - pod := terraformPod{ - PodName: node.PodName(), - Node: node, - Labels: map[string]string{ - "consulcluster-topology-id": g.topology.ID, - "consulcluster-cluster-name": node.Cluster, - }, - TLSVolumeName: cluster.TLSVolumeName, - DNSAddress: "8.8.8.8", - } - - cluster, ok := g.topology.Clusters[node.Cluster] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", node.Cluster) - } - - net, ok := g.topology.Networks[cluster.NetworkName] - if !ok { - return nil, fmt.Errorf("no local network: %s", cluster.NetworkName) - } - if net.DNSAddress != "" { - pod.DNSAddress = net.DNSAddress - } - pod.DockerNetworkName = net.DockerName - - var ( - containers []Resource - ) - - if node.IsAgent() { - agentHCL, err := g.generateAgentHCL(node) - if err != nil { - return nil, err - } - - agent := terraformConsulAgent{ - terraformPod: pod, - ImageResource: DockerImageResourceName(node.Images.Consul), - HCL: agentHCL, - EnterpriseLicense: g.license, - Env: node.AgentEnv, - } - - switch { - case node.IsServer() && step.StartServers(), - !node.IsServer() && step.StartAgents(): - containers = append(containers, Eval(tfConsulT, &agent)) - } - } - - for _, svc := range node.SortedServices() { - if svc.IsMeshGateway { - if node.Kind == topology.NodeKindDataplane { - panic("NOT READY YET") - } - gw := terraformMeshGatewayService{ - terraformPod: pod, - EnvoyImageResource: DockerImageResourceName(node.Images.EnvoyConsulImage()), - Service: svc, - Command: []string{ - "consul", "connect", "envoy", - "-register", - "-mesh-gateway", - }, - } - if token := g.sec.ReadServiceToken(node.Cluster, svc.ID); token != "" { - gw.Command = append(gw.Command, "-token", token) - } - if cluster.Enterprise { - gw.Command = append(gw.Command, - "-partition", - svc.ID.Partition, - ) - } - gw.Command = append(gw.Command, - "-address", - `{{ GetInterfaceIP \"eth0\" }}:`+strconv.Itoa(svc.Port), - "-wan-address", - `{{ GetInterfaceIP \"eth1\" }}:`+strconv.Itoa(svc.Port), - ) - gw.Command = append(gw.Command, - "-grpc-addr", "http://127.0.0.1:8502", - "-admin-bind", - // for demo purposes - "0.0.0.0:"+strconv.Itoa(svc.EnvoyAdminPort), - "--", - "-l", - "trace", - ) - if step.StartServices() { - containers = append(containers, Eval(tfMeshGatewayT, &gw)) - } - } else { - tfsvc := terraformService{ - terraformPod: pod, - AppImageResource: DockerImageResourceName(svc.Image), - Service: svc, - Command: svc.Command, - } - tfsvc.Env = append(tfsvc.Env, svc.Env...) - if step.StartServices() { - containers = append(containers, Eval(tfAppT, &tfsvc)) - } - - setenv := func(k, v string) { - tfsvc.Env = append(tfsvc.Env, k+"="+v) - } - - if !svc.DisableServiceMesh { - if node.IsDataplane() { - tfsvc.DataplaneImageResource = DockerImageResourceName(node.Images.LocalDataplaneImage()) - tfsvc.EnvoyImageResource = "" - tfsvc.EnvoyCommand = nil - // --- REQUIRED --- - setenv("DP_CONSUL_ADDRESSES", "server."+node.Cluster+"-consulcluster.lan") - setenv("DP_SERVICE_NODE_NAME", node.PodName()) - setenv("DP_PROXY_SERVICE_ID", svc.ID.Name+"-sidecar-proxy") - } else { - tfsvc.DataplaneImageResource = "" - tfsvc.EnvoyImageResource = DockerImageResourceName(node.Images.EnvoyConsulImage()) - tfsvc.EnvoyCommand = []string{ - "consul", "connect", "envoy", - "-sidecar-for", svc.ID.Name, - } - } - if cluster.Enterprise { - if node.IsDataplane() { - setenv("DP_SERVICE_NAMESPACE", svc.ID.Namespace) - setenv("DP_SERVICE_PARTITION", svc.ID.Partition) - } else { - tfsvc.EnvoyCommand = append(tfsvc.EnvoyCommand, - "-partition", - svc.ID.Partition, - "-namespace", - svc.ID.Namespace, - ) - } - } - if token := g.sec.ReadServiceToken(node.Cluster, svc.ID); token != "" { - if node.IsDataplane() { - setenv("DP_CREDENTIAL_TYPE", "static") - setenv("DP_CREDENTIAL_STATIC_TOKEN", token) - } else { - tfsvc.EnvoyCommand = append(tfsvc.EnvoyCommand, "-token", token) - } - } - if node.IsDataplane() { - setenv("DP_ENVOY_ADMIN_BIND_ADDRESS", "0.0.0.0") // for demo purposes - setenv("DP_ENVOY_ADMIN_BIND_PORT", "19000") - setenv("DP_LOG_LEVEL", "trace") - - setenv("DP_CA_CERTS", "/consul/config/certs/consul-agent-ca.pem") - setenv("DP_CONSUL_GRPC_PORT", "8503") - setenv("DP_TLS_SERVER_NAME", "server."+node.Datacenter+".consul") - } else { - tfsvc.EnvoyCommand = append(tfsvc.EnvoyCommand, - "-grpc-addr", "http://127.0.0.1:8502", - "-admin-bind", - // for demo purposes - "0.0.0.0:"+strconv.Itoa(svc.EnvoyAdminPort), - "--", - "-l", - "trace", - ) - } - if step.StartServices() { - sort.Strings(tfsvc.Env) - - if node.IsDataplane() { - containers = append(containers, Eval(tfAppDataplaneT, &tfsvc)) - } else { - containers = append(containers, Eval(tfAppSidecarT, &tfsvc)) - } - } - } - } - } - - // Wait until the very end to render the pod so we know all of the ports. - pod.Ports = node.SortedPorts() - - // pod placeholder container - containers = append(containers, Eval(tfPauseT, &pod)) - - return containers, nil -} - -var tfPauseT = template.Must(template.ParseFS(content, "templates/container-pause.tf.tmpl")) -var tfConsulT = template.Must(template.ParseFS(content, "templates/container-consul.tf.tmpl")) -var tfMeshGatewayT = template.Must(template.ParseFS(content, "templates/container-mgw.tf.tmpl")) -var tfAppT = template.Must(template.ParseFS(content, "templates/container-app.tf.tmpl")) -var tfAppSidecarT = template.Must(template.ParseFS(content, "templates/container-app-sidecar.tf.tmpl")) -var tfAppDataplaneT = template.Must(template.ParseFS(content, "templates/container-app-dataplane.tf.tmpl")) diff --git a/testing/deployer/sprawl/internal/tfgen/prelude.go b/testing/deployer/sprawl/internal/tfgen/prelude.go deleted file mode 100644 index 2e9a01cb08058..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/prelude.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -const terraformPrelude = `provider "docker" { - host = "unix:///var/run/docker.sock" -} - -terraform { - required_providers { - docker = { - source = "kreuzwerker/docker" - version = "~> 2.0" - } - } - required_version = ">= 0.13" -} -` diff --git a/testing/deployer/sprawl/internal/tfgen/proxy.go b/testing/deployer/sprawl/internal/tfgen/proxy.go deleted file mode 100644 index 0fafa9b925e9e..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/proxy.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "fmt" - "os" - "path/filepath" - "text/template" - - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -const proxyInternalPort = 80 - -func (g *Generator) writeNginxConfig(net *topology.Network) (bool, string, error) { - rootdir := filepath.Join(g.workdir, "terraform", "nginx-config-"+net.Name) - if err := os.MkdirAll(rootdir, 0755); err != nil { - return false, "", err - } - - configFile := filepath.Join(rootdir, "nginx.conf") - - body := fmt.Sprintf(` -server { - listen %d; - - location / { - resolver 8.8.8.8; - ############## - # Relevant config knobs are here: https://nginx.org/en/docs/http/ngx_http_proxy_module.html - ############## - proxy_pass http://$http_host$uri$is_args$args; - proxy_cache off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_connect_timeout 5s; - proxy_read_timeout 5s; - proxy_send_timeout 5s; - proxy_request_buffering off; - proxy_buffering off; - } -} -`, proxyInternalPort) - - _, err := UpdateFileIfDifferent( - g.logger, - []byte(body), - configFile, - 0644, - ) - if err != nil { - return false, "", fmt.Errorf("error writing %q: %w", configFile, err) - } - - hash, err := util.HashFile(configFile) - if err != nil { - return false, "", fmt.Errorf("error hashing %q: %w", configFile, err) - } - - return true, hash, err -} - -func (g *Generator) getForwardProxyContainer( - net *topology.Network, - ipAddress string, - hash string, -) Resource { - env := []string{"HASH_FILE_VALUE=" + hash} - proxy := struct { - Name string - DockerNetworkName string - InternalPort int - IPAddress string - Env []string - }{ - Name: net.Name, - DockerNetworkName: net.DockerName, - InternalPort: proxyInternalPort, - IPAddress: ipAddress, - Env: env, - } - - return Eval(tfForwardProxyT, &proxy) -} - -var tfForwardProxyT = template.Must(template.ParseFS(content, "templates/container-proxy.tf.tmpl")) diff --git a/testing/deployer/sprawl/internal/tfgen/res.go b/testing/deployer/sprawl/internal/tfgen/res.go deleted file mode 100644 index a45c460793d22..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/res.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "bytes" - "text/template" - - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/hcl/v2/hclwrite" -) - -type FileResource struct { - name string - res Resource -} - -func (r *FileResource) Name() string { return r.name } - -func (r *FileResource) Commit(logger hclog.Logger) error { - val, err := r.res.Render() - if err != nil { - return err - } - _, err = UpdateFileIfDifferent(logger, []byte(val), r.name, 0644) - return err -} - -func File(name string, res Resource) *FileResource { - return &FileResource{name: name, res: res} -} - -func Text(s string) Resource { - return &textResource{text: s} -} - -func Embed(name string) Resource { - return &embedResource{name: name} -} - -func Eval(t *template.Template, data any) Resource { - return &evalResource{template: t, data: data, hcl: false} -} - -func HCL(t *template.Template, data any) Resource { - return &evalResource{template: t, data: data, hcl: true} -} - -type Resource interface { - Render() (string, error) -} - -type embedResource struct { - name string -} - -func (r *embedResource) Render() (string, error) { - val, err := content.ReadFile(r.name) - if err != nil { - return "", err - } - return string(val), nil -} - -type textResource struct { - text string -} - -func (r *textResource) Render() (string, error) { - return r.text, nil -} - -type evalResource struct { - template *template.Template - data any - hcl bool -} - -func (r *evalResource) Render() (string, error) { - out, err := StringTemplate(r.template, r.data) - if err != nil { - return "", err - } - - if r.hcl { - return string(hclwrite.Format([]byte(out))), nil - } - return out, nil -} - -func StringTemplate(t *template.Template, data any) (string, error) { - var res bytes.Buffer - if err := t.Execute(&res, data); err != nil { - return "", err - } - return res.String(), nil -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-app-dataplane.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-app-dataplane.tf.tmpl deleted file mode 100644 index bfb0705e6df8e..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-app-dataplane.tf.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -resource "docker_container" "{{.Node.DockerName}}-{{.Service.ID.TFString}}-sidecar" { - name = "{{.Node.DockerName}}-{{.Service.ID.TFString}}-sidecar" - network_mode = "container:${docker_container.{{.PodName}}.id}" - image = docker_image.{{.DataplaneImageResource}}.latest - restart = "on-failure" - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - - volumes { - volume_name = "{{.TLSVolumeName}}" - container_path = "/consul/config/certs" - read_only = true - } - - env = [ -{{- range .Env }} - "{{.}}", -{{- end}} - ] - - command = [ - "/usr/local/bin/consul-dataplane", - ] -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-app-sidecar.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-app-sidecar.tf.tmpl deleted file mode 100644 index 6abb397c25341..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-app-sidecar.tf.tmpl +++ /dev/null @@ -1,31 +0,0 @@ -resource "docker_container" "{{.Node.DockerName}}-{{.Service.ID.TFString}}-sidecar" { - name = "{{.Node.DockerName}}-{{.Service.ID.TFString}}-sidecar" - network_mode = "container:${docker_container.{{.PodName}}.id}" - image = docker_image.{{.EnvoyImageResource}}.latest - restart = "on-failure" - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - - volumes { - volume_name = "{{.TLSVolumeName}}" - container_path = "/consul/config/certs" - read_only = true - } - - env = [ -{{- range .Env }} - "{{.}}", -{{- end}} - ] - - command = [ -{{- range .EnvoyCommand }} - "{{.}}", -{{- end }} - ] -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-app.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-app.tf.tmpl deleted file mode 100644 index b1b390f0f16c4..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-app.tf.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -resource "docker_container" "{{.Node.DockerName}}-{{.Service.ID.TFString}}" { - name = "{{.Node.DockerName}}-{{.Service.ID.TFString}}" - network_mode = "container:${docker_container.{{.PodName}}.id}" - image = docker_image.{{.AppImageResource}}.latest - restart = "on-failure" - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - - env = [ -{{- range .Env }} - "{{.}}", -{{- end}} - ] - - command = [ -{{- range .Command }} - "{{.}}", -{{- end }} - ] -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-consul.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-consul.tf.tmpl deleted file mode 100644 index 01f7f3fb4d7dd..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-consul.tf.tmpl +++ /dev/null @@ -1,40 +0,0 @@ -resource "docker_container" "{{.Node.DockerName}}" { - name = "{{.Node.DockerName}}" - network_mode = "container:${docker_container.{{.PodName}}.id}" - image = docker_image.{{.ImageResource}}.latest - restart = "always" - - env = [ - "CONSUL_UID=0", - "CONSUL_GID=0", - "CONSUL_LICENSE={{.EnterpriseLicense}}", -{{- range .Env }} - "{{.}}", -{{- end}} - ] - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - - command = [ - "agent", - "-hcl", - <<-EOT -{{ .HCL }} -EOT - ] - - volumes { - volume_name = "{{.Node.DockerName}}" - container_path = "/consul/data" - } - - volumes { - volume_name = "{{.TLSVolumeName}}" - container_path = "/consul/config/certs" - } -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl deleted file mode 100644 index 7789376a98f10..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl +++ /dev/null @@ -1,28 +0,0 @@ -resource "docker_container" "{{.DockerNetworkName}}-coredns" { - name = "{{.DockerNetworkName}}-coredns" - image = docker_image.coredns.latest - restart = "always" - dns = ["8.8.8.8"] - - networks_advanced { - name = docker_network.{{.DockerNetworkName}}.name - ipv4_address = "{{.IPAddress}}" - } - - env = [ -{{- range .Env }} - "{{.}}", -{{- end}} - ] - - volumes { - host_path = abspath("coredns-config-{{.Name}}") - container_path = "/config" - read_only = true - } - - command = [ - "-conf", - "/config/Corefile", - ] -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-mgw.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-mgw.tf.tmpl deleted file mode 100644 index ec25665f3ed87..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-mgw.tf.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -resource "docker_container" "{{.Node.DockerName}}-{{.Service.ID.TFString}}" { - name = "{{.Node.DockerName}}-{{.Service.ID.TFString}}" - network_mode = "container:${docker_container.{{.PodName}}.id}" - image = docker_image.{{.EnvoyImageResource}}.latest - restart = "on-failure" - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - - volumes { - volume_name = "{{.TLSVolumeName}}" - container_path = "/consul/config/certs" - read_only = true - } - - command = [ -{{- range .Command }} - "{{.}}", -{{- end }} - ] -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl deleted file mode 100644 index 1f1627b0719bd..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl +++ /dev/null @@ -1,38 +0,0 @@ -resource "docker_container" "{{.PodName}}" { - name = "{{.PodName}}" - image = docker_image.pause.latest - hostname = "{{.PodName}}" - restart = "always" - dns = ["{{.DNSAddress}}"] - -{{- range $k, $v := .Labels }} - labels { - label = "{{ $k }}" - value = "{{ $v }}" - } -{{- end }} - -depends_on = [ - docker_container.{{.DockerNetworkName}}-coredns, - docker_container.{{.DockerNetworkName}}-forwardproxy, -] - -{{- range .Ports }} -ports { - internal = {{.}} -} -{{- end }} - -{{- range .Node.Addresses }} -networks_advanced { - name = docker_network.{{.DockerNetworkName}}.name - ipv4_address = "{{.IPAddress}}" -} -{{- end }} -} - -output "ports_{{.Node.Cluster}}_{{.Node.Partition}}_{{.Node.Name}}" { - value = { - for port in docker_container.{{.PodName}}.ports : port.internal => port.external - } -} diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl deleted file mode 100644 index ed44d8343fe8b..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -resource "docker_container" "{{.DockerNetworkName}}-forwardproxy" { - name = "{{.DockerNetworkName}}-forwardproxy" - image = docker_image.nginx.latest - restart = "always" - dns = ["8.8.8.8"] - - ports { - internal = {{.InternalPort}} - } - - networks_advanced { - name = docker_network.{{.DockerNetworkName}}.name - ipv4_address = "{{.IPAddress}}" - } - - env = [ -{{- range .Env }} - "{{.}}", -{{- end}} - ] - - volumes { - host_path = abspath("nginx-config-{{.Name}}/nginx.conf") - container_path = "/etc/nginx/conf.d/default.conf" - read_only = true - } -} - -output "forwardproxyport_{{.Name}}" { - value = { - for port in docker_container.{{.DockerNetworkName}}-forwardproxy.ports : port.internal => port.external - } -} diff --git a/testing/deployer/sprawl/internal/tfgen/tfgen.go b/testing/deployer/sprawl/internal/tfgen/tfgen.go deleted file mode 100644 index e752528ef1619..0000000000000 --- a/testing/deployer/sprawl/internal/tfgen/tfgen.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tfgen - -import ( - "embed" -) - -//go:embed templates/container-app-dataplane.tf.tmpl -//go:embed templates/container-app-sidecar.tf.tmpl -//go:embed templates/container-app.tf.tmpl -//go:embed templates/container-consul.tf.tmpl -//go:embed templates/container-mgw.tf.tmpl -//go:embed templates/container-pause.tf.tmpl -//go:embed templates/container-proxy.tf.tmpl -//go:embed templates/container-coredns.tf.tmpl -var content embed.FS diff --git a/testing/deployer/sprawl/peering.go b/testing/deployer/sprawl/peering.go deleted file mode 100644 index 5275161cfd9a3..0000000000000 --- a/testing/deployer/sprawl/peering.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-hclog" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -// TODO: this is definitely a grpc resolver/balancer issue to look into -const grpcWeirdError = `transport: Error while dialing failed to find Consul server for global address` - -func isWeirdGRPCError(err error) bool { - if err == nil { - return false - } - return strings.Contains(err.Error(), grpcWeirdError) -} - -func (s *Sprawl) initPeerings() error { - // TODO: wait until services are healthy? wait until mesh gateways work? - // if err := s.generator.Generate(tfgen.StepPeering); err != nil { - // return fmt.Errorf("generator[peering]: %w", err) - // } - - var ( - logger = s.logger.Named("peering") - _ = logger - ) - - for _, peering := range s.topology.Peerings { - dialingCluster, ok := s.topology.Clusters[peering.Dialing.Name] - if !ok { - return fmt.Errorf("peering references dialing cluster that does not exist: %s", peering.String()) - } - acceptingCluster, ok := s.topology.Clusters[peering.Accepting.Name] - if !ok { - return fmt.Errorf("peering references accepting cluster that does not exist: %s", peering.String()) - } - - var ( - dialingClient = s.clients[dialingCluster.Name] - acceptingClient = s.clients[acceptingCluster.Name] - ) - - // TODO: allow for use of ServerExternalAddresses - - req1 := api.PeeringGenerateTokenRequest{ - PeerName: peering.Accepting.PeerName, - } - if acceptingCluster.Enterprise { - req1.Partition = peering.Accepting.Partition - } - - GENTOKEN: - resp, _, err := acceptingClient.Peerings().GenerateToken(context.Background(), req1, nil) - if err != nil { - if isWeirdGRPCError(err) { - time.Sleep(50 * time.Millisecond) - goto GENTOKEN - } - return fmt.Errorf("error generating peering token for %q: %w", peering.String(), err) - } - - peeringToken := resp.PeeringToken - logger.Info("generated peering token", "peering", peering.String()) - - req2 := api.PeeringEstablishRequest{ - PeerName: peering.Dialing.PeerName, - PeeringToken: peeringToken, - } - if dialingCluster.Enterprise { - req2.Partition = peering.Dialing.Partition - } - - logger.Info("establishing peering with token", "peering", peering.String()) - ESTABLISH: - _, _, err = dialingClient.Peerings().Establish(context.Background(), req2, nil) - if err != nil { - if isWeirdGRPCError(err) { - time.Sleep(50 * time.Millisecond) - goto ESTABLISH - } - return fmt.Errorf("error establishing peering with token for %q: %w", peering.String(), err) - } - - logger.Info("peering established", "peering", peering.String()) - } - - return nil -} - -func (s *Sprawl) waitForPeeringEstablishment() error { - var ( - logger = s.logger.Named("peering") - ) - - for _, peering := range s.topology.Peerings { - dialingCluster, ok := s.topology.Clusters[peering.Dialing.Name] - if !ok { - return fmt.Errorf("peering references dialing cluster that does not exist: %s", peering.String()) - } - acceptingCluster, ok := s.topology.Clusters[peering.Accepting.Name] - if !ok { - return fmt.Errorf("peering references accepting cluster that does not exist: %s", peering.String()) - } - - var ( - dialingClient = s.clients[dialingCluster.Name] - acceptingClient = s.clients[acceptingCluster.Name] - - dialingLogger = logger.With( - "cluster", dialingCluster.Name, - "peering", peering.String(), - ) - acceptingLogger = logger.With( - "cluster", acceptingCluster.Name, - "peering", peering.String(), - ) - ) - - s.checkPeeringDirection(dialingLogger, dialingClient, peering.Dialing, dialingCluster.Enterprise) - s.checkPeeringDirection(acceptingLogger, acceptingClient, peering.Accepting, acceptingCluster.Enterprise) - } - return nil -} - -func (s *Sprawl) checkPeeringDirection(logger hclog.Logger, client *api.Client, pc topology.PeerCluster, enterprise bool) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - for { - opts := &api.QueryOptions{} - if enterprise { - opts.Partition = pc.Partition - } - res, _, err := client.Peerings().Read(ctx, pc.PeerName, opts) - if isWeirdGRPCError(err) { - time.Sleep(50 * time.Millisecond) - continue - } - if err != nil { - logger.Info("error looking up peering", "error", err) - time.Sleep(100 * time.Millisecond) - continue - } - if res == nil { - logger.Info("peering not found") - time.Sleep(100 * time.Millisecond) - continue - } - - if res.State == api.PeeringStateActive { - logger.Info("peering is active") - return - } - logger.Info("peering not active yet", "state", res.State) - time.Sleep(500 * time.Millisecond) - } -} diff --git a/testing/deployer/sprawl/sprawl.go b/testing/deployer/sprawl/sprawl.go deleted file mode 100644 index a4b27597626e9..0000000000000 --- a/testing/deployer/sprawl/sprawl.go +++ /dev/null @@ -1,467 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "bufio" - "bytes" - "context" - "fmt" - "io" - "net/http" - "os" - "path/filepath" - "strings" - "time" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-multierror" - "github.com/mitchellh/copystructure" - - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/runner" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/secrets" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/tfgen" - "github.com/hashicorp/consul/testing/deployer/topology" - "github.com/hashicorp/consul/testing/deployer/util" -) - -// TODO: manage workdir externally without chdir - -// Sprawl is the definition of a complete running Consul deployment topology. -type Sprawl struct { - logger hclog.Logger - runner *runner.Runner - license string - secrets secrets.Store - - workdir string - - // set during Run - config *topology.Config - topology *topology.Topology - generator *tfgen.Generator - - clients map[string]*api.Client // one per cluster -} - -// Topology allows access to the topology that defines the resources. Do not -// write to any of these fields. -func (s *Sprawl) Topology() *topology.Topology { - return s.topology -} - -func (s *Sprawl) Config() *topology.Config { - c2, err := copyConfig(s.config) - if err != nil { - panic(err) - } - return c2 -} - -func (s *Sprawl) HTTPClientForCluster(clusterName string) (*http.Client, error) { - cluster, ok := s.topology.Clusters[clusterName] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", clusterName) - } - - // grab the local network for the cluster - network, ok := s.topology.Networks[cluster.NetworkName] - if !ok { - return nil, fmt.Errorf("no such network: %s", cluster.NetworkName) - } - - transport, err := util.ProxyHTTPTransport(network.ProxyPort) - if err != nil { - return nil, err - } - - return &http.Client{Transport: transport}, nil -} - -// APIClientForNode gets a pooled api.Client connected to the agent running on -// the provided node. -// -// Passing an empty token will assume the bootstrap token. If you want to -// actually use the anonymous token say "-". -func (s *Sprawl) APIClientForNode(clusterName string, nid topology.NodeID, token string) (*api.Client, error) { - cluster, ok := s.topology.Clusters[clusterName] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", clusterName) - } - - nid.Normalize() - - node := cluster.NodeByID(nid) - if !node.IsAgent() { - return nil, fmt.Errorf("node is not an agent") - } - - switch token { - case "": - token = s.secrets.ReadGeneric(clusterName, secrets.BootstrapToken) - case "-": - token = "" - } - - return util.ProxyAPIClient( - node.LocalProxyPort(), - node.LocalAddress(), - 8500, - token, - ) -} - -func copyConfig(cfg *topology.Config) (*topology.Config, error) { - dup, err := copystructure.Copy(cfg) - if err != nil { - return nil, err - } - return dup.(*topology.Config), nil -} - -// Launch will create the topology defined by the provided configuration and -// bring up all of the relevant clusters. Once created the Stop method must be -// called to destroy everything. -func Launch( - logger hclog.Logger, - workdir string, - cfg *topology.Config, -) (*Sprawl, error) { - if logger == nil { - panic("logger is required") - } - if workdir == "" { - panic("workdir is required") - } - - if err := os.MkdirAll(filepath.Join(workdir, "terraform"), 0755); err != nil { - return nil, err - } - - runner, err := runner.Load(logger) - if err != nil { - return nil, err - } - - // Copy this to avoid leakage. - cfg, err = copyConfig(cfg) - if err != nil { - return nil, err - } - - s := &Sprawl{ - logger: logger, - runner: runner, - workdir: workdir, - clients: make(map[string]*api.Client), - } - - if err := s.ensureLicense(); err != nil { - return nil, err - } - - // Copy this AGAIN, BEFORE compiling so we capture the original definition, without denorms. - s.config, err = copyConfig(cfg) - if err != nil { - return nil, err - } - - s.topology, err = topology.Compile(logger.Named("compile"), cfg) - if err != nil { - return nil, fmt.Errorf("topology.Compile: %w", err) - } - - s.logger.Info("compiled topology", "ct", jd(s.topology)) // TODO - - start := time.Now() - if err := s.launch(); err != nil { - return nil, err - } - s.logger.Info("topology is ready for use", "elapsed", time.Since(start)) - - if err := s.PrintDetails(); err != nil { - return nil, fmt.Errorf("error gathering diagnostic details: %w", err) - } - - return s, nil -} - -func (s *Sprawl) Relaunch( - cfg *topology.Config, -) error { - // Copy this BEFORE compiling so we capture the original definition, without denorms. - var err error - s.config, err = copyConfig(cfg) - if err != nil { - return err - } - - newTopology, err := topology.Recompile(s.logger.Named("recompile"), cfg, s.topology) - if err != nil { - return fmt.Errorf("topology.Compile: %w", err) - } - - s.topology = newTopology - - s.logger.Info("compiled replacement topology", "ct", jd(s.topology)) // TODO - - start := time.Now() - if err := s.relaunch(); err != nil { - return err - } - s.logger.Info("topology is ready for use", "elapsed", time.Since(start)) - - if err := s.PrintDetails(); err != nil { - return fmt.Errorf("error gathering diagnostic details: %w", err) - } - - return nil -} - -// Leader returns the cluster leader agent, or an error if no leader is -// available. -func (s *Sprawl) Leader(clusterName string) (*topology.Node, error) { - cluster, ok := s.topology.Clusters[clusterName] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", clusterName) - } - - var ( - client = s.clients[cluster.Name] - // logger = s.logger.With("cluster", cluster.Name) - ) - - leaderAddr, err := getLeader(client) - if err != nil { - return nil, err - } - - for _, node := range cluster.Nodes { - if !node.IsServer() || node.Disabled { - continue - } - if strings.HasPrefix(leaderAddr, node.LocalAddress()+":") { - return node, nil - } - } - - return nil, fmt.Errorf("leader not found") -} - -// Followers returns the cluster following servers. -func (s *Sprawl) Followers(clusterName string) ([]*topology.Node, error) { - cluster, ok := s.topology.Clusters[clusterName] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", clusterName) - } - - leaderNode, err := s.Leader(clusterName) - if err != nil { - return nil, fmt.Errorf("could not determine leader: %w", err) - } - - var followers []*topology.Node - - for _, node := range cluster.Nodes { - if !node.IsServer() || node.Disabled { - continue - } - if node.ID() != leaderNode.ID() { - followers = append(followers, node) - } - } - - return followers, nil -} - -func (s *Sprawl) DisabledServers(clusterName string) ([]*topology.Node, error) { - cluster, ok := s.topology.Clusters[clusterName] - if !ok { - return nil, fmt.Errorf("no such cluster: %s", clusterName) - } - - var servers []*topology.Node - - for _, node := range cluster.Nodes { - if !node.IsServer() || !node.Disabled { - continue - } - servers = append(servers, node) - } - - return servers, nil -} - -func (s *Sprawl) StopContainer(ctx context.Context, containerName string) error { - return s.runner.DockerExec(ctx, []string{"stop", containerName}, nil, nil) -} - -func (s *Sprawl) SnapshotEnvoy(ctx context.Context) error { - snapDir := filepath.Join(s.workdir, "envoy-snapshots") - if err := os.MkdirAll(snapDir, 0755); err != nil { - return fmt.Errorf("could not create envoy snapshot output dir %s: %w", snapDir, err) - } - - targets := map[string]string{ - "config_dump.json": "config_dump", - "clusters.json": "clusters?format=json", - "stats.txt": "stats", - "stats_prometheus.txt": "stats/prometheus", - } - - var merr error - for _, c := range s.topology.Clusters { - client, err := s.HTTPClientForCluster(c.Name) - if err != nil { - return fmt.Errorf("could not get http client for cluster %q: %w", c.Name, err) - } - - for _, n := range c.Nodes { - if n.Disabled { - continue - } - for _, s := range n.Services { - if s.Disabled || s.EnvoyAdminPort <= 0 { - continue - } - prefix := fmt.Sprintf("http://%s:%d", n.LocalAddress(), s.EnvoyAdminPort) - - for fn, target := range targets { - u := prefix + "/" + target - - body, err := scrapeURL(client, u) - if err != nil { - merr = multierror.Append(merr, fmt.Errorf("could not scrape %q for %s on %s: %w", - target, s.ID.String(), n.ID().String(), err, - )) - continue - } - - outFn := filepath.Join(snapDir, n.DockerName()+"--"+s.ID.TFString()+"."+fn) - - if err := os.WriteFile(outFn+".tmp", body, 0644); err != nil { - merr = multierror.Append(merr, fmt.Errorf("could not write output %q for %s on %s: %w", - target, s.ID.String(), n.ID().String(), err, - )) - continue - } - - if err := os.Rename(outFn+".tmp", outFn); err != nil { - merr = multierror.Append(merr, fmt.Errorf("could not write output %q for %s on %s: %w", - target, s.ID.String(), n.ID().String(), err, - )) - continue - } - } - } - } - } - return merr -} - -func scrapeURL(client *http.Client, url string) ([]byte, error) { - res, err := client.Get(url) - if err != nil { - return nil, err - } - defer res.Body.Close() - - body, err := io.ReadAll(res.Body) - if err != nil { - return nil, err - } - return body, nil -} - -func (s *Sprawl) CaptureLogs(ctx context.Context) error { - logDir := filepath.Join(s.workdir, "logs") - if err := os.MkdirAll(logDir, 0755); err != nil { - return fmt.Errorf("could not create log output dir %s: %w", logDir, err) - } - - containers, err := s.listContainers(ctx) - if err != nil { - return err - } - - s.logger.Info("Capturing logs") - - var merr error - for _, container := range containers { - if err := s.dumpContainerLogs(ctx, container, logDir); err != nil { - merr = multierror.Append(merr, fmt.Errorf("could not dump logs for container %s: %w", container, err)) - } - } - - return merr -} - -// Dump known containers out of terraform state file. -func (s *Sprawl) listContainers(ctx context.Context) ([]string, error) { - tfdir := filepath.Join(s.workdir, "terraform") - - var buf bytes.Buffer - if err := s.runner.TerraformExec(ctx, []string{"state", "list"}, &buf, tfdir); err != nil { - return nil, fmt.Errorf("error listing containers in terraform state file: %w", err) - } - - var ( - scan = bufio.NewScanner(&buf) - containers []string - ) - for scan.Scan() { - line := strings.TrimSpace(scan.Text()) - - name := strings.TrimPrefix(line, "docker_container.") - if name != line { - containers = append(containers, name) - continue - } - } - if err := scan.Err(); err != nil { - return nil, err - } - - return containers, nil -} - -func (s *Sprawl) dumpContainerLogs(ctx context.Context, containerName, outputRoot string) error { - path := filepath.Join(outputRoot, containerName+".log") - - f, err := os.Create(path + ".tmp") - if err != nil { - return err - } - keep := false - defer func() { - _ = f.Close() - if !keep { - _ = os.Remove(path + ".tmp") - _ = os.Remove(path) - } - }() - - err = s.runner.DockerExecWithStderr( - ctx, - []string{"logs", containerName}, - f, - f, - nil, - ) - if err != nil { - return err - } - - if err := f.Close(); err != nil { - return err - } - - if err := os.Rename(path+".tmp", path); err != nil { - return err - } - - keep = true - return nil -} diff --git a/testing/deployer/sprawl/sprawltest/sprawltest.go b/testing/deployer/sprawl/sprawltest/sprawltest.go deleted file mode 100644 index 2fe10537459c0..0000000000000 --- a/testing/deployer/sprawl/sprawltest/sprawltest.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawltest - -import ( - "context" - "fmt" - "io" - "os" - "os/exec" - "path/filepath" - "sync" - "testing" - - "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-multierror" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/testing/deployer/sprawl" - "github.com/hashicorp/consul/testing/deployer/sprawl/internal/runner" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -// TODO(rb): move comments to doc.go - -var ( - // set SPRAWL_WORKDIR_ROOT in the environment to have the test output - // coalesced in here. By default it uses a directory called "workdir" in - // each package. - workdirRoot string - - // set SPRAWL_KEEP_WORKDIR=1 in the environment to keep the workdir output - // intact. Files are all destroyed by default. - keepWorkdirOnFail bool - - // set SPRAWL_KEEP_RUNNING=1 in the environment to keep the workdir output - // intact and also refrain from tearing anything down. Things are all - // destroyed by default. - // - // SPRAWL_KEEP_RUNNING=1 implies SPRAWL_KEEP_WORKDIR=1 - keepRunningOnFail bool - - // set SPRAWL_SKIP_OLD_CLEANUP to prevent the library from tearing down and - // removing anything found in the working directory at init time. The - // default behavior is to do this. - skipOldCleanup bool -) - -var cleanupPriorRunOnce sync.Once - -func init() { - if root := os.Getenv("SPRAWL_WORKDIR_ROOT"); root != "" { - fmt.Fprintf(os.Stdout, "INFO: sprawltest: SPRAWL_WORKDIR_ROOT set; using %q as output root\n", root) - workdirRoot = root - } else { - workdirRoot = "workdir" - } - - if os.Getenv("SPRAWL_KEEP_WORKDIR") == "1" { - keepWorkdirOnFail = true - fmt.Fprintf(os.Stdout, "INFO: sprawltest: SPRAWL_KEEP_WORKDIR set; not destroying workdir on failure\n") - } - - if os.Getenv("SPRAWL_KEEP_RUNNING") == "1" { - keepRunningOnFail = true - keepWorkdirOnFail = true - fmt.Fprintf(os.Stdout, "INFO: sprawltest: SPRAWL_KEEP_RUNNING set; not tearing down resources on failure\n") - } - - if os.Getenv("SPRAWL_SKIP_OLD_CLEANUP") == "1" { - skipOldCleanup = true - fmt.Fprintf(os.Stdout, "INFO: sprawltest: SPRAWL_SKIP_OLD_CLEANUP set; not cleaning up anything found in %q\n", workdirRoot) - } - - if !skipOldCleanup { - cleanupPriorRunOnce.Do(func() { - fmt.Fprintf(os.Stdout, "INFO: sprawltest: triggering cleanup of any prior test runs\n") - CleanupWorkingDirectories() - }) - } -} - -// Launch will create the topology defined by the provided configuration and -// bring up all of the relevant clusters. -// -// - Logs will be routed to (*testing.T).Logf. -// -// - By default everything will be stopped and removed via -// (*testing.T).Cleanup. For failed tests, this can be skipped by setting the -// environment variable SKIP_TEARDOWN=1. -func Launch(t *testing.T, cfg *topology.Config) *sprawl.Sprawl { - SkipIfTerraformNotPresent(t) - sp, err := sprawl.Launch( - testutil.Logger(t), - initWorkingDirectory(t), - cfg, - ) - require.NoError(t, err) - stopOnCleanup(t, sp) - return sp -} - -func initWorkingDirectory(t *testing.T) string { - // TODO(rb): figure out how to get the calling package which we can put in - // the middle here, which is likely 2 call frames away so maybe - // runtime.Callers can help - scratchDir := filepath.Join(workdirRoot, t.Name()) - _ = os.RemoveAll(scratchDir) // cleanup prior runs - if err := os.MkdirAll(scratchDir, 0755); err != nil { - t.Fatalf("error: %v", err) - } - - t.Cleanup(func() { - if t.Failed() && keepWorkdirOnFail { - t.Logf("test failed; leaving sprawl terraform definitions in: %s", scratchDir) - } else { - _ = os.RemoveAll(scratchDir) - } - }) - - return scratchDir -} - -func stopOnCleanup(t *testing.T, sp *sprawl.Sprawl) { - t.Cleanup(func() { - if t.Failed() && keepWorkdirOnFail { - // It's only worth it to capture the logs if we aren't going to - // immediately discard them. - if err := sp.CaptureLogs(context.Background()); err != nil { - t.Logf("log capture encountered failures: %v", err) - } - if err := sp.SnapshotEnvoy(context.Background()); err != nil { - t.Logf("envoy snapshot capture encountered failures: %v", err) - } - } - - if t.Failed() && keepRunningOnFail { - t.Log("test failed; leaving sprawl running") - } else { - //nolint:errcheck - sp.Stop() - } - }) -} - -// CleanupWorkingDirectories is meant to run in an init() once at the start of -// any tests. -func CleanupWorkingDirectories() { - fi, err := os.ReadDir(workdirRoot) - if os.IsNotExist(err) { - return - } else if err != nil { - fmt.Fprintf(os.Stderr, "WARN: sprawltest: unable to scan 'workdir' for prior runs to cleanup\n") - return - } else if len(fi) == 0 { - fmt.Fprintf(os.Stdout, "INFO: sprawltest: no prior tests to clean up\n") - return - } - - r, err := runner.Load(hclog.NewNullLogger()) - if err != nil { - fmt.Fprintf(os.Stderr, "WARN: sprawltest: unable to look for 'terraform' and 'docker' binaries\n") - return - } - - ctx := context.Background() - - for _, d := range fi { - if !d.IsDir() { - continue - } - path := filepath.Join(workdirRoot, d.Name(), "terraform") - - fmt.Fprintf(os.Stdout, "INFO: sprawltest: cleaning up failed prior run in: %s\n", path) - - err := r.TerraformExec(ctx, []string{ - "init", "-input=false", - }, io.Discard, path) - - err2 := r.TerraformExec(ctx, []string{ - "destroy", "-input=false", "-auto-approve", "-refresh=false", - }, io.Discard, path) - - if err2 != nil { - err = multierror.Append(err, err2) - } - - if err != nil { - fmt.Fprintf(os.Stderr, "WARN: sprawltest: could not clean up failed prior run in: %s: %v\n", path, err) - } else { - _ = os.RemoveAll(path) - } - } -} - -func SkipIfTerraformNotPresent(t *testing.T) { - const terraformBinaryName = "terraform" - - path, err := exec.LookPath(terraformBinaryName) - if err != nil || path == "" { - t.Skipf("%q not found on $PATH - download and install to run this test", terraformBinaryName) - } -} diff --git a/testing/deployer/sprawl/sprawltest/test_test.go b/testing/deployer/sprawl/sprawltest/test_test.go deleted file mode 100644 index 1bb69ea77efee..0000000000000 --- a/testing/deployer/sprawl/sprawltest/test_test.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawltest_test - -import ( - "strconv" - "testing" - - "github.com/hashicorp/consul/api" - "github.com/stretchr/testify/require" - - "github.com/hashicorp/consul/testing/deployer/sprawl/sprawltest" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func TestSprawl(t *testing.T) { - serversDC1 := newTopologyServerSet("dc1-server", 3, []string{"dc1", "wan"}, nil) - serversDC2 := newTopologyServerSet("dc2-server", 3, []string{"dc2", "wan"}, nil) - - cfg := &topology.Config{ - Networks: []*topology.Network{ - {Name: "dc1"}, - {Name: "dc2"}, - {Name: "wan", Type: "wan"}, - }, - Clusters: []*topology.Cluster{ - { - Name: "dc1", - Nodes: topology.MergeSlices(serversDC1, []*topology.Node{ - { - Kind: topology.NodeKindClient, - Name: "dc1-client1", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "mesh-gateway"}, - Port: 8443, - EnvoyAdminPort: 19000, - IsMeshGateway: true, - }, - }, - }, - { - Kind: topology.NodeKindClient, - Name: "dc1-client2", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "ping"}, - Image: "rboyer/pingpong:latest", - Port: 8080, - EnvoyAdminPort: 19000, - Command: []string{ - "-bind", "0.0.0.0:8080", - "-dial", "127.0.0.1:9090", - "-pong-chaos", - "-dialfreq", "250ms", - "-name", "ping", - }, - Upstreams: []*topology.Upstream{{ - ID: topology.ServiceID{Name: "pong"}, - LocalPort: 9090, - Peer: "peer-dc2-default", - }}, - }, - }, - }, - }), - InitialConfigEntries: []api.ConfigEntry{ - &api.ExportedServicesConfigEntry{ - Name: "default", - Services: []api.ExportedService{{ - Name: "ping", - Consumers: []api.ServiceConsumer{{ - Peer: "peer-dc2-default", - }}, - }}, - }, - }, - }, - { - Name: "dc2", - Nodes: topology.MergeSlices(serversDC2, []*topology.Node{ - { - Kind: topology.NodeKindClient, - Name: "dc2-client1", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "mesh-gateway"}, - Port: 8443, - EnvoyAdminPort: 19000, - IsMeshGateway: true, - }, - }, - }, - { - Kind: topology.NodeKindDataplane, - Name: "dc2-client2", - Services: []*topology.Service{ - { - ID: topology.ServiceID{Name: "pong"}, - Image: "rboyer/pingpong:latest", - Port: 8080, - EnvoyAdminPort: 19000, - Command: []string{ - "-bind", "0.0.0.0:8080", - "-dial", "127.0.0.1:9090", - "-pong-chaos", - "-dialfreq", "250ms", - "-name", "pong", - }, - Upstreams: []*topology.Upstream{{ - ID: topology.ServiceID{Name: "ping"}, - LocalPort: 9090, - Peer: "peer-dc1-default", - }}, - }, - }, - }, - }), - InitialConfigEntries: []api.ConfigEntry{ - &api.ExportedServicesConfigEntry{ - Name: "default", - Services: []api.ExportedService{{ - Name: "ping", - Consumers: []api.ServiceConsumer{{ - Peer: "peer-dc2-default", - }}, - }}, - }, - }, - }, - }, - Peerings: []*topology.Peering{{ - Dialing: topology.PeerCluster{ - Name: "dc1", - }, - Accepting: topology.PeerCluster{ - Name: "dc2", - }, - }}, - } - - sp := sprawltest.Launch(t, cfg) - - for _, cluster := range sp.Topology().Clusters { - leader, err := sp.Leader(cluster.Name) - require.NoError(t, err) - t.Logf("%s: leader = %s", cluster.Name, leader.ID()) - - followers, err := sp.Followers(cluster.Name) - require.NoError(t, err) - for _, f := range followers { - t.Logf("%s: follower = %s", cluster.Name, f.ID()) - } - } -} - -func newTopologyServerSet( - namePrefix string, - num int, - networks []string, - mutateFn func(i int, node *topology.Node), -) []*topology.Node { - var out []*topology.Node - for i := 1; i <= num; i++ { - name := namePrefix + strconv.Itoa(i) - - node := &topology.Node{ - Kind: topology.NodeKindServer, - Name: name, - } - for _, net := range networks { - node.Addresses = append(node.Addresses, &topology.Address{Network: net}) - } - - if mutateFn != nil { - mutateFn(i, node) - } - - out = append(out, node) - } - return out -} diff --git a/testing/deployer/sprawl/tls.go b/testing/deployer/sprawl/tls.go deleted file mode 100644 index 4ba26432f1e14..0000000000000 --- a/testing/deployer/sprawl/tls.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package sprawl - -import ( - "bytes" - "context" - "fmt" - "io" - - "github.com/hashicorp/consul/testing/deployer/topology" -) - -const ( - consulUID = "100" - consulGID = "1000" - consulUserArg = consulUID + ":" + consulGID -) - -func tlsPrefixFromNode(node *topology.Node) string { - switch node.Kind { - case topology.NodeKindServer: - return node.Partition + "." + node.Name + ".server" - case topology.NodeKindClient: - return node.Partition + "." + node.Name + ".client" - default: - return "" - } -} - -func tlsCertCreateCommand(node *topology.Node) string { - if node.IsServer() { - return fmt.Sprintf(`consul tls cert create -server -dc=%s -node=%s`, node.Datacenter, node.PodName()) - } else { - return fmt.Sprintf(`consul tls cert create -client -dc=%s`, node.Datacenter) - } -} - -func (s *Sprawl) initTLS(ctx context.Context) error { - for _, cluster := range s.topology.Clusters { - - var buf bytes.Buffer - - // Create the CA if not already done, and proceed to do all of the - // consul CLI calls inside of a throwaway temp directory. - buf.WriteString(` -if [[ ! -f consul-agent-ca-key.pem || ! -f consul-agent-ca.pem ]]; then - consul tls ca create -fi -rm -rf tmp -mkdir -p tmp -cp -a consul-agent-ca-key.pem consul-agent-ca.pem tmp -cd tmp -`) - - for _, node := range cluster.Nodes { - if !node.IsAgent() || node.Disabled { - continue - } - - node.TLSCertPrefix = tlsPrefixFromNode(node) - if node.TLSCertPrefix == "" { - continue - } - - expectPrefix := cluster.Datacenter + "-" + string(node.Kind) + "-consul-0" - - // Conditionally generate these in isolation and rename them to - // not rely upon the numerical indexing. - buf.WriteString(fmt.Sprintf(` -if [[ ! -f %[1]s || ! -f %[2]s ]]; then - rm -f %[3]s %[4]s - %[5]s - mv -f %[3]s %[1]s - mv -f %[4]s %[2]s -fi -`, - "../"+node.TLSCertPrefix+"-key.pem", "../"+node.TLSCertPrefix+".pem", - expectPrefix+"-key.pem", expectPrefix+".pem", - tlsCertCreateCommand(node), - )) - } - - err := s.runner.DockerExec(ctx, []string{ - "run", - "--rm", - "-i", - "--net=none", - "-v", cluster.TLSVolumeName + ":/data", - "busybox:latest", - "sh", "-c", - // Need this so the permissions stick; docker seems to treat unused volumes differently. - `touch /data/VOLUME_PLACEHOLDER && chown -R ` + consulUserArg + ` /data`, - }, io.Discard, nil) - if err != nil { - return fmt.Errorf("could not initialize docker volume for cert data %q: %w", cluster.TLSVolumeName, err) - } - - err = s.runner.DockerExec(ctx, []string{"run", - "--rm", - "-i", - "--net=none", - "-u", consulUserArg, - "-v", cluster.TLSVolumeName + ":/data", - "-w", "/data", - "--entrypoint", "", - cluster.Images.Consul, - "/bin/sh", "-ec", buf.String(), - }, io.Discard, nil) - if err != nil { - return fmt.Errorf("could not create all necessary TLS certificates in docker volume: %v", err) - } - } - - return nil -} diff --git a/testing/deployer/topology/compile.go b/testing/deployer/topology/compile.go deleted file mode 100644 index 78ee5843c1b23..0000000000000 --- a/testing/deployer/topology/compile.go +++ /dev/null @@ -1,674 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - crand "crypto/rand" - "encoding/hex" - "errors" - "fmt" - "reflect" - "regexp" - "sort" - - "github.com/google/go-cmp/cmp" - "github.com/hashicorp/go-hclog" -) - -const DockerPrefix = "consulcluster" - -func Compile(logger hclog.Logger, raw *Config) (*Topology, error) { - return compile(logger, raw, nil) -} - -func Recompile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error) { - if prev == nil { - return nil, errors.New("missing previous topology") - } - return compile(logger, raw, prev) -} - -func compile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error) { - var id string - if prev == nil { - var err error - id, err = newTopologyID() - if err != nil { - return nil, err - } - } else { - id = prev.ID - } - - images := DefaultImages().OverrideWith(raw.Images) - if images.Consul != "" { - return nil, fmt.Errorf("topology.images.consul cannot be set at this level") - } - - if len(raw.Networks) == 0 { - return nil, fmt.Errorf("topology.networks is empty") - } - - networks := make(map[string]*Network) - for _, net := range raw.Networks { - if net.DockerName != "" { - return nil, fmt.Errorf("network %q should not specify DockerName", net.Name) - } - if !IsValidLabel(net.Name) { - return nil, fmt.Errorf("network name is not valid: %s", net.Name) - } - if _, exists := networks[net.Name]; exists { - return nil, fmt.Errorf("cannot have two networks with the same name %q", net.Name) - } - - switch net.Type { - case "": - net.Type = "lan" - case "wan", "lan": - default: - return nil, fmt.Errorf("network %q has unknown type %q", net.Name, net.Type) - } - - networks[net.Name] = net - net.DockerName = DockerPrefix + "-" + net.Name + "-" + id - } - - if len(raw.Clusters) == 0 { - return nil, fmt.Errorf("topology.clusters is empty") - } - - var ( - clusters = make(map[string]*Cluster) - nextIndex int // use a global index so any shared networks work properly with assignments - ) - - foundPeerNames := make(map[string]map[string]struct{}) - for _, c := range raw.Clusters { - if c.Name == "" { - return nil, fmt.Errorf("cluster has no name") - } - - foundPeerNames[c.Name] = make(map[string]struct{}) - - if !IsValidLabel(c.Name) { - return nil, fmt.Errorf("cluster name is not valid: %s", c.Name) - } - - if _, exists := clusters[c.Name]; exists { - return nil, fmt.Errorf("cannot have two clusters with the same name %q; use unique names and override the Datacenter field if that's what you want", c.Name) - } - - if c.Datacenter == "" { - c.Datacenter = c.Name - } else { - if !IsValidLabel(c.Datacenter) { - return nil, fmt.Errorf("datacenter name is not valid: %s", c.Datacenter) - } - } - - clusters[c.Name] = c - if c.NetworkName == "" { - c.NetworkName = c.Name - } - - c.Images = images.OverrideWith(c.Images).ChooseConsul(c.Enterprise) - - if _, ok := networks[c.NetworkName]; !ok { - return nil, fmt.Errorf("cluster %q uses network name %q that does not exist", c.Name, c.NetworkName) - } - - if len(c.Nodes) == 0 { - return nil, fmt.Errorf("cluster %q has no nodes", c.Name) - } - - if c.TLSVolumeName != "" { - return nil, fmt.Errorf("user cannot specify the TLSVolumeName field") - } - - tenancies := make(map[string]map[string]struct{}) - addTenancy := func(partition, namespace string) { - partition = PartitionOrDefault(partition) - namespace = NamespaceOrDefault(namespace) - m, ok := tenancies[partition] - if !ok { - m = make(map[string]struct{}) - tenancies[partition] = m - } - m[namespace] = struct{}{} - } - - for _, ap := range c.Partitions { - addTenancy(ap.Name, "default") - for _, ns := range ap.Namespaces { - addTenancy(ap.Name, ns) - } - } - - for _, ce := range c.InitialConfigEntries { - addTenancy(ce.GetPartition(), ce.GetNamespace()) - } - - seenNodes := make(map[NodeID]struct{}) - for _, n := range c.Nodes { - if n.Name == "" { - return nil, fmt.Errorf("cluster %q node has no name", c.Name) - } - if !IsValidLabel(n.Name) { - return nil, fmt.Errorf("node name is not valid: %s", n.Name) - } - - switch n.Kind { - case NodeKindServer, NodeKindClient, NodeKindDataplane: - default: - return nil, fmt.Errorf("cluster %q node %q has invalid kind: %s", c.Name, n.Name, n.Kind) - } - - n.Partition = PartitionOrDefault(n.Partition) - if !IsValidLabel(n.Partition) { - return nil, fmt.Errorf("node partition is not valid: %s", n.Partition) - } - addTenancy(n.Partition, "default") - - if _, exists := seenNodes[n.ID()]; exists { - return nil, fmt.Errorf("cannot have two nodes in the same cluster %q with the same name %q", c.Name, n.ID()) - } - seenNodes[n.ID()] = struct{}{} - - if len(n.usedPorts) != 0 { - return nil, fmt.Errorf("user cannot specify the usedPorts field") - } - n.usedPorts = make(map[int]int) - exposePort := func(v int) bool { - if _, ok := n.usedPorts[v]; ok { - return false - } - n.usedPorts[v] = 0 - return true - } - - if n.IsAgent() { - // TODO: the ux here is awful; we should be able to examine the topology to guess properly - exposePort(8500) - if n.IsServer() { - exposePort(8503) - } else { - exposePort(8502) - } - } - - if n.Index != 0 { - return nil, fmt.Errorf("user cannot specify the node index") - } - n.Index = nextIndex - nextIndex++ - - n.Images = c.Images.OverrideWith(n.Images).ChooseNode(n.Kind) - - n.Cluster = c.Name - n.Datacenter = c.Datacenter - n.dockerName = DockerPrefix + "-" + n.Name + "-" + id - - if len(n.Addresses) == 0 { - n.Addresses = append(n.Addresses, &Address{Network: c.NetworkName}) - } - var ( - numPublic int - numLocal int - ) - for _, addr := range n.Addresses { - if addr.Network == "" { - return nil, fmt.Errorf("cluster %q node %q has invalid address", c.Name, n.Name) - } - - if addr.Type != "" { - return nil, fmt.Errorf("user cannot specify the address type directly") - } - - net, ok := networks[addr.Network] - if !ok { - return nil, fmt.Errorf("cluster %q node %q uses network name %q that does not exist", c.Name, n.Name, addr.Network) - } - - if net.IsPublic() { - numPublic++ - } else if net.IsLocal() { - numLocal++ - } - addr.Type = net.Type - - addr.DockerNetworkName = net.DockerName - } - - if numLocal == 0 { - return nil, fmt.Errorf("cluster %q node %q has no local addresses", c.Name, n.Name) - } - if numPublic > 1 { - return nil, fmt.Errorf("cluster %q node %q has more than one public address", c.Name, n.Name) - } - - seenServices := make(map[ServiceID]struct{}) - for _, svc := range n.Services { - if n.IsAgent() { - // Default to that of the enclosing node. - svc.ID.Partition = n.Partition - } - svc.ID.Normalize() - - // Denormalize - svc.Node = n - - if !IsValidLabel(svc.ID.Partition) { - return nil, fmt.Errorf("service partition is not valid: %s", svc.ID.Partition) - } - if !IsValidLabel(svc.ID.Namespace) { - return nil, fmt.Errorf("service namespace is not valid: %s", svc.ID.Namespace) - } - if !IsValidLabel(svc.ID.Name) { - return nil, fmt.Errorf("service name is not valid: %s", svc.ID.Name) - } - addTenancy(svc.ID.Partition, svc.ID.Namespace) - - if _, exists := seenServices[svc.ID]; exists { - return nil, fmt.Errorf("cannot have two services on the same node %q in the same cluster %q with the same name %q", n.ID(), c.Name, svc.ID) - } - seenServices[svc.ID] = struct{}{} - - if !svc.DisableServiceMesh && n.IsDataplane() { - if svc.EnvoyPublicListenerPort <= 0 { - if _, ok := n.usedPorts[20000]; !ok { - // For convenience the FIRST service on a node can get 20000 for free. - svc.EnvoyPublicListenerPort = 20000 - } else { - return nil, fmt.Errorf("envoy public listener port is required") - } - } - } - - // add all of the service ports - for _, port := range svc.ports() { - if ok := exposePort(port); !ok { - return nil, fmt.Errorf("port used more than once on cluster %q node %q: %d", c.Name, n.ID(), port) - } - } - - // TODO(rb): re-expose? - // switch svc.Protocol { - // case "": - // svc.Protocol = "tcp" - // fallthrough - // case "tcp": - // if svc.CheckHTTP != "" { - // return nil, fmt.Errorf("cannot set CheckHTTP for tcp service") - // } - // case "http": - // if svc.CheckTCP != "" { - // return nil, fmt.Errorf("cannot set CheckTCP for tcp service") - // } - // default: - // return nil, fmt.Errorf("service has invalid protocol: %s", svc.Protocol) - // } - - for _, u := range svc.Upstreams { - // Default to that of the enclosing service. - if u.Peer == "" { - if u.ID.Partition == "" { - u.ID.Partition = svc.ID.Partition - } - if u.ID.Namespace == "" { - u.ID.Namespace = svc.ID.Namespace - } - } else { - if u.ID.Partition != "" { - u.ID.Partition = "" // irrelevant here; we'll set it to the value of the OTHER side for plumbing purposes in tests - } - u.ID.Namespace = NamespaceOrDefault(u.ID.Namespace) - foundPeerNames[c.Name][u.Peer] = struct{}{} - } - - if u.ID.Name == "" { - return nil, fmt.Errorf("upstream service name is required") - } - addTenancy(u.ID.Partition, u.ID.Namespace) - } - - if err := svc.Validate(); err != nil { - return nil, fmt.Errorf("cluster %q node %q service %q is not valid: %w", c.Name, n.Name, svc.ID.String(), err) - } - } - } - - // Explode this into the explicit list based on stray references made. - c.Partitions = nil - for ap, nsMap := range tenancies { - p := &Partition{ - Name: ap, - } - for ns := range nsMap { - p.Namespaces = append(p.Namespaces, ns) - } - sort.Strings(p.Namespaces) - c.Partitions = append(c.Partitions, p) - } - sort.Slice(c.Partitions, func(i, j int) bool { - return c.Partitions[i].Name < c.Partitions[j].Name - }) - - if !c.Enterprise { - expect := []*Partition{{Name: "default", Namespaces: []string{"default"}}} - if !reflect.DeepEqual(c.Partitions, expect) { - return nil, fmt.Errorf("cluster %q references non-default partitions or namespaces but is CE", c.Name) - } - } - } - - clusteredPeerings := make(map[string]map[string]*PeerCluster) // local-cluster -> local-peer -> info - addPeerMapEntry := func(pc PeerCluster) { - pm, ok := clusteredPeerings[pc.Name] - if !ok { - pm = make(map[string]*PeerCluster) - clusteredPeerings[pc.Name] = pm - } - pm[pc.PeerName] = &pc - } - for _, p := range raw.Peerings { - dialingCluster, ok := clusters[p.Dialing.Name] - if !ok { - return nil, fmt.Errorf("peering references a dialing cluster that does not exist: %s", p.Dialing.Name) - } - acceptingCluster, ok := clusters[p.Accepting.Name] - if !ok { - return nil, fmt.Errorf("peering references an accepting cluster that does not exist: %s", p.Accepting.Name) - } - if p.Dialing.Name == p.Accepting.Name { - return nil, fmt.Errorf("self peerings are not allowed: %s", p.Dialing.Name) - } - - p.Dialing.Partition = PartitionOrDefault(p.Dialing.Partition) - p.Accepting.Partition = PartitionOrDefault(p.Accepting.Partition) - - if dialingCluster.Enterprise { - if !dialingCluster.hasPartition(p.Dialing.Partition) { - return nil, fmt.Errorf("dialing side of peering cannot reference a partition that does not exist: %s", p.Dialing.Partition) - } - } else { - if p.Dialing.Partition != "default" { - return nil, fmt.Errorf("dialing side of peering cannot reference a partition when CE") - } - } - if acceptingCluster.Enterprise { - if !acceptingCluster.hasPartition(p.Accepting.Partition) { - return nil, fmt.Errorf("accepting side of peering cannot reference a partition that does not exist: %s", p.Accepting.Partition) - } - } else { - if p.Accepting.Partition != "default" { - return nil, fmt.Errorf("accepting side of peering cannot reference a partition when CE") - } - } - - if p.Dialing.PeerName == "" { - p.Dialing.PeerName = "peer-" + p.Accepting.Name + "-" + p.Accepting.Partition - } - if p.Accepting.PeerName == "" { - p.Accepting.PeerName = "peer-" + p.Dialing.Name + "-" + p.Dialing.Partition - } - - { // Ensure the link fields do not have recursive links. - p.Dialing.Link = nil - p.Accepting.Link = nil - - // Copy the un-linked data before setting the link - pa := p.Accepting - pd := p.Dialing - - p.Accepting.Link = &pd - p.Dialing.Link = &pa - } - - addPeerMapEntry(p.Accepting) - addPeerMapEntry(p.Dialing) - - delete(foundPeerNames[p.Accepting.Name], p.Accepting.PeerName) - delete(foundPeerNames[p.Dialing.Name], p.Dialing.PeerName) - } - - for cluster, peers := range foundPeerNames { - if len(peers) > 0 { - var pretty []string - for name := range peers { - pretty = append(pretty, name) - } - sort.Strings(pretty) - return nil, fmt.Errorf("cluster[%s] found topology references to peerings that do not exist: %v", cluster, pretty) - } - } - - // after we decoded the peering stuff, we can fill in some computed data in the upstreams - for _, c := range clusters { - c.Peerings = clusteredPeerings[c.Name] - for _, n := range c.Nodes { - for _, svc := range n.Services { - for _, u := range svc.Upstreams { - if u.Peer == "" { - u.Cluster = c.Name - u.Peering = nil - continue - } - remotePeer, ok := c.Peerings[u.Peer] - if !ok { - return nil, fmt.Errorf("not possible") - } - u.Cluster = remotePeer.Link.Name - u.Peering = remotePeer.Link - // this helps in generating fortio assertions; otherwise field is ignored - u.ID.Partition = remotePeer.Link.Partition - } - } - } - } - - t := &Topology{ - ID: id, - Networks: networks, - Clusters: clusters, - Images: images, - Peerings: raw.Peerings, - } - - if prev != nil { - // networks cannot change - if !sameKeys(prev.Networks, t.Networks) { - return nil, fmt.Errorf("cannot create or destroy networks") - } - - for _, newNetwork := range t.Networks { - oldNetwork := prev.Networks[newNetwork.Name] - - // Carryover - newNetwork.inheritFromExisting(oldNetwork) - - if err := isSame(oldNetwork, newNetwork); err != nil { - return nil, fmt.Errorf("networks cannot change: %w", err) - } - - } - - // cannot add or remove an entire cluster - if !sameKeys(prev.Clusters, t.Clusters) { - return nil, fmt.Errorf("cannot create or destroy clusters") - } - - for _, newCluster := range t.Clusters { - oldCluster := prev.Clusters[newCluster.Name] - - // Carryover - newCluster.inheritFromExisting(oldCluster) - - if newCluster.Name != oldCluster.Name || - newCluster.NetworkName != oldCluster.NetworkName || - newCluster.Datacenter != oldCluster.Datacenter || - newCluster.Enterprise != oldCluster.Enterprise { - return nil, fmt.Errorf("cannot edit some cluster fields for %q", newCluster.Name) - } - - // WARN on presence of some things. - if len(newCluster.InitialConfigEntries) > 0 { - logger.Warn("initial config entries were provided, but are skipped on recompile") - } - - // Check NODES - if err := inheritAndValidateNodes(oldCluster.Nodes, newCluster.Nodes); err != nil { - return nil, fmt.Errorf("some immutable aspects of nodes were changed in cluster %q: %w", newCluster.Name, err) - } - } - } - - return t, nil -} - -const permutedWarning = "use the disabled node kind if you want to ignore a node" - -func inheritAndValidateNodes( - prev, curr []*Node, -) error { - nodeMap := mapifyNodes(curr) - - for prevIdx, node := range prev { - currNode, ok := nodeMap[node.ID()] - if !ok { - return fmt.Errorf("node %q has vanished; "+permutedWarning, node.ID()) - } - // Ensure it hasn't been permuted. - if currNode.Pos != prevIdx { - return fmt.Errorf( - "node %q has been shuffled %d -> %d; "+permutedWarning, - node.ID(), - prevIdx, - currNode.Pos, - ) - } - - if currNode.Node.Kind != node.Kind || - currNode.Node.Partition != node.Partition || - currNode.Node.Name != node.Name || - currNode.Node.Index != node.Index || - len(currNode.Node.Addresses) != len(node.Addresses) || - !sameKeys(currNode.Node.usedPorts, node.usedPorts) { - return fmt.Errorf("cannot edit some node fields for %q", node.ID()) - } - - currNode.Node.inheritFromExisting(node) - - for i := 0; i < len(currNode.Node.Addresses); i++ { - prevAddr := node.Addresses[i] - currAddr := currNode.Node.Addresses[i] - - if prevAddr.Network != currAddr.Network { - return fmt.Errorf("addresses were shuffled for node %q", node.ID()) - } - - if prevAddr.Type != currAddr.Type { - return fmt.Errorf("cannot edit some address fields for %q", node.ID()) - } - - currAddr.inheritFromExisting(prevAddr) - } - - svcMap := mapifyServices(currNode.Node.Services) - - for _, svc := range node.Services { - currSvc, ok := svcMap[svc.ID] - if !ok { - continue // service has vanished, this is ok - } - // don't care about index permutation - - if currSvc.ID != svc.ID || - currSvc.Port != svc.Port || - currSvc.EnvoyAdminPort != svc.EnvoyAdminPort || - currSvc.EnvoyPublicListenerPort != svc.EnvoyPublicListenerPort || - isSame(currSvc.Command, svc.Command) != nil || - isSame(currSvc.Env, svc.Env) != nil { - return fmt.Errorf("cannot edit some address fields for %q", svc.ID) - } - - currSvc.inheritFromExisting(svc) - } - } - return nil -} - -func newTopologyID() (string, error) { - const n = 16 - id := make([]byte, n) - if _, err := crand.Read(id[:]); err != nil { - return "", err - } - return hex.EncodeToString(id)[:n], nil -} - -// matches valid DNS labels according to RFC 1123, should be at most 63 -// characters according to the RFC -var validLabel = regexp.MustCompile(`^[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?$`) - -// IsValidLabel returns true if the string given is a valid DNS label (RFC 1123). -// Note: the only difference between RFC 1035 and RFC 1123 labels is that in -// RFC 1123 labels can begin with a number. -func IsValidLabel(name string) bool { - return validLabel.MatchString(name) -} - -// ValidateLabel is similar to IsValidLabel except it returns an error -// instead of false when name is not a valid DNS label. The error will contain -// reference to what constitutes a valid DNS label. -func ValidateLabel(name string) error { - if !IsValidLabel(name) { - return errors.New("a valid DNS label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character") - } - return nil -} - -func isSame(x, y any) error { - diff := cmp.Diff(x, y) - if diff != "" { - return fmt.Errorf("values are not equal\n--- expected\n+++ actual\n%v", diff) - } - return nil -} - -func sameKeys[K comparable, V any](x, y map[K]V) bool { - if len(x) != len(y) { - return false - } - - for kx := range x { - if _, ok := y[kx]; !ok { - return false - } - } - return true -} - -func mapifyNodes(nodes []*Node) map[NodeID]nodeWithPosition { - m := make(map[NodeID]nodeWithPosition) - for i, node := range nodes { - m[node.ID()] = nodeWithPosition{ - Pos: i, - Node: node, - } - } - return m -} - -type nodeWithPosition struct { - Pos int - Node *Node -} - -func mapifyServices(services []*Service) map[ServiceID]*Service { - m := make(map[ServiceID]*Service) - for _, svc := range services { - m[svc.ID] = svc - } - return m -} diff --git a/testing/deployer/topology/default_cdp.go b/testing/deployer/topology/default_cdp.go deleted file mode 100644 index 22424d2dd1211..0000000000000 --- a/testing/deployer/topology/default_cdp.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -const DefaultDataplaneImage = "hashicorp/consul-dataplane:1.1.0" diff --git a/testing/deployer/topology/default_consul.go b/testing/deployer/topology/default_consul.go deleted file mode 100644 index f9542f16643d6..0000000000000 --- a/testing/deployer/topology/default_consul.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -const DefaultConsulImage = "hashicorp/consul:1.15.2" -const DefaultConsulEnterpriseImage = "hashicorp/consul-enterprise:1.15.2-ent" diff --git a/testing/deployer/topology/default_envoy.go b/testing/deployer/topology/default_envoy.go deleted file mode 100644 index c557a318a17fd..0000000000000 --- a/testing/deployer/topology/default_envoy.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -const DefaultEnvoyImage = "envoyproxy/envoy:v1.25.1" diff --git a/testing/deployer/topology/ids.go b/testing/deployer/topology/ids.go deleted file mode 100644 index 3f964b12548e6..0000000000000 --- a/testing/deployer/topology/ids.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - "fmt" - - "github.com/hashicorp/consul/api" -) - -type NodeServiceID struct { - Node string - Service string `json:",omitempty"` - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -func NewNodeServiceID(node, service, namespace, partition string) NodeServiceID { - id := NodeServiceID{ - Node: node, - Service: service, - Namespace: namespace, - Partition: partition, - } - id.Normalize() - return id -} - -func (id NodeServiceID) NodeID() NodeID { - return NewNodeID(id.Node, id.Partition) -} - -func (id NodeServiceID) ServiceID() ServiceID { - return NewServiceID(id.Service, id.Namespace, id.Partition) -} - -func (id *NodeServiceID) Normalize() { - id.Namespace = NamespaceOrDefault(id.Namespace) - id.Partition = PartitionOrDefault(id.Partition) -} - -func (id NodeServiceID) String() string { - return fmt.Sprintf("%s/%s/%s/%s", id.Partition, id.Node, id.Namespace, id.Service) -} - -type NodeID struct { - Name string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -func NewNodeID(name, partition string) NodeID { - id := NodeID{ - Name: name, - Partition: partition, - } - id.Normalize() - return id -} - -func (id *NodeID) Normalize() { - id.Partition = PartitionOrDefault(id.Partition) -} - -func (id NodeID) String() string { - return fmt.Sprintf("%s/%s", id.Partition, id.Name) -} - -func (id NodeID) ACLString() string { - return fmt.Sprintf("%s--%s", id.Partition, id.Name) -} -func (id NodeID) TFString() string { - return id.ACLString() -} - -type ServiceID struct { - Name string `json:",omitempty"` - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -func NewServiceID(name, namespace, partition string) ServiceID { - id := ServiceID{ - Name: name, - Namespace: namespace, - Partition: partition, - } - id.Normalize() - return id -} - -func (id ServiceID) Less(other ServiceID) bool { - if id.Partition != other.Partition { - return id.Partition < other.Partition - } - if id.Namespace != other.Namespace { - return id.Namespace < other.Namespace - } - return id.Name < other.Name -} - -func (id *ServiceID) Normalize() { - id.Namespace = NamespaceOrDefault(id.Namespace) - id.Partition = PartitionOrDefault(id.Partition) -} - -func (id ServiceID) String() string { - return fmt.Sprintf("%s/%s/%s", id.Partition, id.Namespace, id.Name) -} - -func (id ServiceID) ACLString() string { - return fmt.Sprintf("%s--%s--%s", id.Partition, id.Namespace, id.Name) -} -func (id ServiceID) TFString() string { - return id.ACLString() -} - -func PartitionOrDefault(name string) string { - if name == "" { - return "default" - } - return name -} -func NamespaceOrDefault(name string) string { - if name == "" { - return "default" - } - return name -} - -func DefaultToEmpty(name string) string { - if name == "default" { - return "" - } - return name -} - -// PartitionQueryOptions returns an *api.QueryOptions with the given partition -// field set only if the partition is non-default. This helps when writing -// tests for joint use in CE and ENT. -func PartitionQueryOptions(partition string) *api.QueryOptions { - return &api.QueryOptions{ - Partition: DefaultToEmpty(partition), - } -} diff --git a/testing/deployer/topology/images.go b/testing/deployer/topology/images.go deleted file mode 100644 index d58d7a1213dee..0000000000000 --- a/testing/deployer/topology/images.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - "strings" -) - -type Images struct { - Consul string `json:",omitempty"` - ConsulCE string `json:",omitempty"` - ConsulEnterprise string `json:",omitempty"` - Envoy string - Dataplane string -} - -func (i Images) LocalDataplaneImage() string { - if i.Dataplane == "" { - return "" - } - - img, tag, ok := strings.Cut(i.Dataplane, ":") - if !ok { - tag = "latest" - } - - repo, name, ok := strings.Cut(img, "/") - if ok { - name = repo + "-" + name - } - - // ex: local/hashicorp-consul-dataplane:1.1.0 - return "local/" + name + ":" + tag -} - -func (i Images) EnvoyConsulImage() string { - if i.Consul == "" || i.Envoy == "" { - return "" - } - - img1, tag1, ok1 := strings.Cut(i.Consul, ":") - img2, tag2, ok2 := strings.Cut(i.Envoy, ":") - if !ok1 { - tag1 = "latest" - } - if !ok2 { - tag2 = "latest" - } - - repo1, name1, ok1 := strings.Cut(img1, "/") - repo2, name2, ok2 := strings.Cut(img2, "/") - - if ok1 { - name1 = repo1 + "-" + name1 - } else { - name1 = repo1 - } - if ok2 { - name2 = repo2 + "-" + name2 - } else { - name2 = repo2 - } - - // ex: local/hashicorp-consul-and-envoyproxy-envoy:1.15.0-with-v1.26.2 - return "local/" + name1 + "-and-" + name2 + ":" + tag1 + "-with-" + tag2 -} - -func (i Images) ChooseNode(kind NodeKind) Images { - switch kind { - case NodeKindServer: - i.Envoy = "" - i.Dataplane = "" - case NodeKindClient: - i.Dataplane = "" - case NodeKindDataplane: - i.Envoy = "" - default: - // do nothing - } - return i -} - -func (i Images) ChooseConsul(enterprise bool) Images { - if enterprise { - i.Consul = i.ConsulEnterprise - } else { - i.Consul = i.ConsulCE - } - i.ConsulEnterprise = "" - i.ConsulCE = "" - return i -} - -func (i Images) OverrideWith(i2 Images) Images { - if i2.Consul != "" { - i.Consul = i2.Consul - } - if i2.ConsulCE != "" { - i.ConsulCE = i2.ConsulCE - } - if i2.ConsulEnterprise != "" { - i.ConsulEnterprise = i2.ConsulEnterprise - } - if i2.Envoy != "" { - i.Envoy = i2.Envoy - } - if i2.Dataplane != "" { - i.Dataplane = i2.Dataplane - } - return i -} - -// DefaultImages controls which specific docker images are used as default -// values for topology components that do not specify values. -// -// These can be bulk-updated using the make target 'make update-defaults' -func DefaultImages() Images { - return Images{ - Consul: "", - ConsulCE: DefaultConsulImage, - ConsulEnterprise: DefaultConsulEnterpriseImage, - Envoy: DefaultEnvoyImage, - Dataplane: DefaultDataplaneImage, - } -} diff --git a/testing/deployer/topology/images_test.go b/testing/deployer/topology/images_test.go deleted file mode 100644 index d3ea2136e260c..0000000000000 --- a/testing/deployer/topology/images_test.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - "strconv" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestImages_EnvoyConsulImage(t *testing.T) { - type testcase struct { - consul, envoy string - expect string - } - - run := func(t *testing.T, tc testcase) { - i := Images{Consul: tc.consul, Envoy: tc.envoy} - j := i.EnvoyConsulImage() - require.Equal(t, tc.expect, j) - } - - cases := []testcase{ - { - consul: "", - envoy: "", - expect: "", - }, - { - consul: "consul", - envoy: "", - expect: "", - }, - { - consul: "", - envoy: "envoy", - expect: "", - }, - { - consul: "consul", - envoy: "envoy", - expect: "local/consul-and-envoy:latest-with-latest", - }, - // repos - { - consul: "hashicorp/consul", - envoy: "envoy", - expect: "local/hashicorp-consul-and-envoy:latest-with-latest", - }, - { - consul: "consul", - envoy: "envoyproxy/envoy", - expect: "local/consul-and-envoyproxy-envoy:latest-with-latest", - }, - { - consul: "hashicorp/consul", - envoy: "envoyproxy/envoy", - expect: "local/hashicorp-consul-and-envoyproxy-envoy:latest-with-latest", - }, - // tags - { - consul: "consul:1.15.0", - envoy: "envoy", - expect: "local/consul-and-envoy:1.15.0-with-latest", - }, - { - consul: "consul", - envoy: "envoy:v1.26.1", - expect: "local/consul-and-envoy:latest-with-v1.26.1", - }, - { - consul: "consul:1.15.0", - envoy: "envoy:v1.26.1", - expect: "local/consul-and-envoy:1.15.0-with-v1.26.1", - }, - // repos+tags - { - consul: "hashicorp/consul:1.15.0", - envoy: "envoy:v1.26.1", - expect: "local/hashicorp-consul-and-envoy:1.15.0-with-v1.26.1", - }, - { - consul: "consul:1.15.0", - envoy: "envoyproxy/envoy:v1.26.1", - expect: "local/consul-and-envoyproxy-envoy:1.15.0-with-v1.26.1", - }, - { - consul: "hashicorp/consul:1.15.0", - envoy: "envoyproxy/envoy:v1.26.1", - expect: "local/hashicorp-consul-and-envoyproxy-envoy:1.15.0-with-v1.26.1", - }, - } - - for i, tc := range cases { - t.Run(strconv.Itoa(i), func(t *testing.T) { - run(t, tc) - }) - } -} diff --git a/testing/deployer/topology/topology.go b/testing/deployer/topology/topology.go deleted file mode 100644 index b485436612688..0000000000000 --- a/testing/deployer/topology/topology.go +++ /dev/null @@ -1,790 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - "errors" - "fmt" - "net" - "net/netip" - "reflect" - "sort" - - "github.com/hashicorp/consul/api" -) - -type Topology struct { - ID string - - // Images controls which specific docker images are used when running this - // node. Non-empty fields here override non-empty fields inherited from the - // general default values from DefaultImages(). - Images Images - - // Networks is the list of networks to create for this set of clusters. - Networks map[string]*Network - - // Clusters defines the list of Consul clusters that should be created, and - // their associated workloads. - Clusters map[string]*Cluster - - // Peerings defines the list of pairwise peerings that should be established - // between clusters. - Peerings []*Peering `json:",omitempty"` -} - -func (t *Topology) DigestExposedProxyPort(netName string, proxyPort int) (bool, error) { - net, ok := t.Networks[netName] - if !ok { - return false, fmt.Errorf("found output network that does not exist: %s", netName) - } - if net.ProxyPort == proxyPort { - return false, nil - } - - net.ProxyPort = proxyPort - - // Denormalize for UX. - for _, cluster := range t.Clusters { - for _, node := range cluster.Nodes { - for _, addr := range node.Addresses { - if addr.Network == netName { - addr.ProxyPort = proxyPort - } - } - } - } - - return true, nil -} - -func (t *Topology) SortedNetworks() []*Network { - var out []*Network - for _, n := range t.Networks { - out = append(out, n) - } - sort.Slice(out, func(i, j int) bool { - return out[i].Name < out[j].Name - }) - return out -} - -func (t *Topology) SortedClusters() []*Cluster { - var out []*Cluster - for _, c := range t.Clusters { - out = append(out, c) - } - sort.Slice(out, func(i, j int) bool { - return out[i].Name < out[j].Name - }) - return out -} - -type Config struct { - // Images controls which specific docker images are used when running this - // node. Non-empty fields here override non-empty fields inherited from the - // general default values from DefaultImages(). - Images Images - - // Networks is the list of networks to create for this set of clusters. - Networks []*Network - - // Clusters defines the list of Consul clusters that should be created, and - // their associated workloads. - Clusters []*Cluster - - // Peerings defines the list of pairwise peerings that should be established - // between clusters. - Peerings []*Peering -} - -func (c *Config) Cluster(name string) *Cluster { - for _, cluster := range c.Clusters { - if cluster.Name == name { - return cluster - } - } - return nil -} - -type Network struct { - Type string // lan/wan ; empty means lan - Name string // logical name - - // computed at topology compile - DockerName string - // generated during network-and-tls - Subnet string - IPPool []string `json:"-"` - // generated during network-and-tls - ProxyAddress string `json:",omitempty"` - DNSAddress string `json:",omitempty"` - // filled in from terraform outputs after network-and-tls - ProxyPort int `json:",omitempty"` -} - -func (n *Network) IsLocal() bool { - return n.Type == "" || n.Type == "lan" -} - -func (n *Network) IsPublic() bool { - return n.Type == "wan" -} - -func (n *Network) inheritFromExisting(existing *Network) { - n.Subnet = existing.Subnet - n.IPPool = existing.IPPool - n.ProxyAddress = existing.ProxyAddress - n.DNSAddress = existing.DNSAddress - n.ProxyPort = existing.ProxyPort -} - -func (n *Network) IPByIndex(index int) string { - if index >= len(n.IPPool) { - panic(fmt.Sprintf( - "not enough ips on this network to assign index %d: %d", - len(n.IPPool), index, - )) - } - return n.IPPool[index] -} - -func (n *Network) SetSubnet(subnet string) (bool, error) { - if n.Subnet == subnet { - return false, nil - } - - p, err := netip.ParsePrefix(subnet) - if err != nil { - return false, err - } - if !p.IsValid() { - return false, errors.New("not valid") - } - p = p.Masked() - - var ipPool []string - - addr := p.Addr() - for { - if !p.Contains(addr) { - break - } - ipPool = append(ipPool, addr.String()) - addr = addr.Next() - } - - ipPool = ipPool[2:] // skip the x.x.x.{0,1} - - n.Subnet = subnet - n.IPPool = ipPool - return true, nil -} - -// Cluster represents a single standalone install of Consul. This is the unit -// of what is peered when using cluster peering. Older consul installs would -// call this a datacenter. -type Cluster struct { - Name string - NetworkName string // empty assumes same as Name - - // Images controls which specific docker images are used when running this - // cluster. Non-empty fields here override non-empty fields inherited from - // the enclosing Topology. - Images Images - - // Enterprise marks this cluster as desiring to run Consul Enterprise - // components. - Enterprise bool `json:",omitempty"` - - // Nodes is the definition of the nodes (agent-less and agent-ful). - Nodes []*Node - - // Partitions is a list of tenancy configurations that should be created - // after the servers come up but before the clients and the rest of the - // topology starts. - // - // Enterprise Only. - Partitions []*Partition `json:",omitempty"` - - // Datacenter defaults to "Name" if left unspecified. It lets you possibly - // create multiple peer clusters with identical datacenter names. - Datacenter string - - // InitialConfigEntries is a convenience function to have some config - // entries created after the servers start up but before the rest of the - // topology comes up. - InitialConfigEntries []api.ConfigEntry `json:",omitempty"` - - // TLSVolumeName is the docker volume name containing the various certs - // generated by 'consul tls cert create' - // - // This is generated during the networking phase and is not user specified. - TLSVolumeName string `json:",omitempty"` - - // Peerings is a map of peering names to information about that peering in this cluster - // - // Denormalized during compile. - Peerings map[string]*PeerCluster `json:",omitempty"` -} - -func (c *Cluster) inheritFromExisting(existing *Cluster) { - c.TLSVolumeName = existing.TLSVolumeName -} - -type Partition struct { - Name string - Namespaces []string -} - -func (c *Cluster) hasPartition(p string) bool { - for _, partition := range c.Partitions { - if partition.Name == p { - return true - } - } - return false -} - -func (c *Cluster) PartitionQueryOptionsList() []*api.QueryOptions { - if !c.Enterprise { - return []*api.QueryOptions{{}} - } - - var out []*api.QueryOptions - for _, p := range c.Partitions { - out = append(out, &api.QueryOptions{Partition: p.Name}) - } - return out -} - -func (c *Cluster) ServerNodes() []*Node { - var out []*Node - for _, node := range c.SortedNodes() { - if node.Kind != NodeKindServer || node.Disabled { - continue - } - out = append(out, node) - } - return out -} - -func (c *Cluster) ServerByAddr(addr string) *Node { - expect, _, err := net.SplitHostPort(addr) - if err != nil { - return nil - } - - for _, node := range c.Nodes { - if node.Kind != NodeKindServer || node.Disabled { - continue - } - if node.LocalAddress() == expect { - return node - } - } - - return nil -} - -func (c *Cluster) FirstServer() *Node { - for _, node := range c.Nodes { - if node.IsServer() && !node.Disabled && node.ExposedPort(8500) > 0 { - return node - } - } - return nil -} - -func (c *Cluster) FirstClient() *Node { - for _, node := range c.Nodes { - if node.Kind != NodeKindClient || node.Disabled { - continue - } - return node - } - return nil -} - -func (c *Cluster) ActiveNodes() []*Node { - var out []*Node - for _, node := range c.Nodes { - if !node.Disabled { - out = append(out, node) - } - } - return out -} - -func (c *Cluster) SortedNodes() []*Node { - var out []*Node - out = append(out, c.Nodes...) - - kindOrder := map[NodeKind]int{ - NodeKindServer: 1, - NodeKindClient: 2, - NodeKindDataplane: 2, - } - sort.Slice(out, func(i, j int) bool { - ni, nj := out[i], out[j] - - // servers before clients/dataplanes - ki, kj := kindOrder[ni.Kind], kindOrder[nj.Kind] - if ki < kj { - return true - } else if ki > kj { - return false - } - - // lex sort by partition - if ni.Partition < nj.Partition { - return true - } else if ni.Partition > nj.Partition { - return false - } - - // lex sort by name - return ni.Name < nj.Name - }) - return out -} - -func (c *Cluster) FindService(id NodeServiceID) *Service { - id.Normalize() - - nid := id.NodeID() - sid := id.ServiceID() - return c.ServiceByID(nid, sid) -} - -func (c *Cluster) ServiceByID(nid NodeID, sid ServiceID) *Service { - return c.NodeByID(nid).ServiceByID(sid) -} - -func (c *Cluster) ServicesByID(sid ServiceID) []*Service { - sid.Normalize() - - var out []*Service - for _, n := range c.Nodes { - for _, svc := range n.Services { - if svc.ID == sid { - out = append(out, svc) - } - } - } - return out -} - -func (c *Cluster) NodeByID(nid NodeID) *Node { - nid.Normalize() - for _, n := range c.Nodes { - if n.ID() == nid { - return n - } - } - panic("node not found: " + nid.String()) -} - -type Address struct { - Network string - - // denormalized at topology compile - Type string - // denormalized at topology compile - DockerNetworkName string - // generated after network-and-tls - IPAddress string - // denormalized from terraform outputs stored in the Network - ProxyPort int `json:",omitempty"` -} - -func (a *Address) inheritFromExisting(existing *Address) { - a.IPAddress = existing.IPAddress - a.ProxyPort = existing.ProxyPort -} - -func (a Address) IsLocal() bool { - return a.Type == "" || a.Type == "lan" -} - -func (a Address) IsPublic() bool { - return a.Type == "wan" -} - -type NodeKind string - -const ( - NodeKindUnknown NodeKind = "" - NodeKindServer NodeKind = "server" - NodeKindClient NodeKind = "client" - NodeKindDataplane NodeKind = "dataplane" -) - -// TODO: rename pod -type Node struct { - Kind NodeKind - Partition string // will be not empty - Name string // logical name - - // Images controls which specific docker images are used when running this - // node. Non-empty fields here override non-empty fields inherited from - // the enclosing Cluster. - Images Images - - // AgentEnv contains optional environment variables to attach to Consul agents. - AgentEnv []string - - Disabled bool `json:",omitempty"` - - Addresses []*Address - Services []*Service - - // denormalized at topology compile - Cluster string - Datacenter string - - // computed at topology compile - Index int - - // generated during network-and-tls - TLSCertPrefix string `json:",omitempty"` - - // dockerName is computed at topology compile - dockerName string - - // usedPorts has keys that are computed at topology compile (internal - // ports) and values initialized to zero until terraform creates the pods - // and extracts the exposed port values from output variables. - usedPorts map[int]int // keys are from compile / values are from terraform output vars -} - -func (n *Node) DockerName() string { - return n.dockerName -} - -func (n *Node) ExposedPort(internalPort int) int { - return n.usedPorts[internalPort] -} - -func (n *Node) SortedPorts() []int { - var out []int - for internalPort := range n.usedPorts { - out = append(out, internalPort) - } - sort.Ints(out) - return out -} - -func (n *Node) inheritFromExisting(existing *Node) { - n.TLSCertPrefix = existing.TLSCertPrefix - - merged := existing.usedPorts - for k, vNew := range n.usedPorts { - if _, present := merged[k]; !present { - merged[k] = vNew - } - } - n.usedPorts = merged -} - -func (n *Node) String() string { - return n.ID().String() -} - -func (n *Node) ID() NodeID { - return NewNodeID(n.Name, n.Partition) -} - -func (n *Node) CatalogID() NodeID { - return NewNodeID(n.PodName(), n.Partition) -} - -func (n *Node) PodName() string { - return n.dockerName + "-pod" -} - -func (n *Node) AddressByNetwork(name string) *Address { - for _, a := range n.Addresses { - if a.Network == name { - return a - } - } - return nil -} - -func (n *Node) LocalAddress() string { - for _, a := range n.Addresses { - if a.IsLocal() { - if a.IPAddress == "" { - panic("node has no assigned local address") - } - return a.IPAddress - } - } - panic("node has no local network") -} - -func (n *Node) HasPublicAddress() bool { - for _, a := range n.Addresses { - if a.IsPublic() { - return true - } - } - return false -} - -func (n *Node) LocalProxyPort() int { - for _, a := range n.Addresses { - if a.IsLocal() { - if a.ProxyPort > 0 { - return a.ProxyPort - } - panic("node has no assigned local address") - } - } - panic("node has no local network") -} - -func (n *Node) PublicAddress() string { - for _, a := range n.Addresses { - if a.IsPublic() { - if a.IPAddress == "" { - panic("node has no assigned public address") - } - return a.IPAddress - } - } - panic("node has no public network") -} - -func (n *Node) PublicProxyPort() int { - for _, a := range n.Addresses { - if a.IsPublic() { - if a.ProxyPort > 0 { - return a.ProxyPort - } - panic("node has no assigned public address") - } - } - panic("node has no public network") -} - -func (n *Node) IsServer() bool { - return n.Kind == NodeKindServer -} - -func (n *Node) IsAgent() bool { - return n.Kind == NodeKindServer || n.Kind == NodeKindClient -} - -func (n *Node) RunsWorkloads() bool { - return n.IsAgent() || n.IsDataplane() -} - -func (n *Node) IsDataplane() bool { - return n.Kind == NodeKindDataplane -} - -func (n *Node) SortedServices() []*Service { - var out []*Service - out = append(out, n.Services...) - sort.Slice(out, func(i, j int) bool { - mi := out[i].IsMeshGateway - mj := out[j].IsMeshGateway - if mi && !mi { - return false - } else if !mi && mj { - return true - } - return out[i].ID.Less(out[j].ID) - }) - return out -} - -// DigestExposedPorts returns true if it was changed. -func (n *Node) DigestExposedPorts(ports map[int]int) bool { - if reflect.DeepEqual(n.usedPorts, ports) { - return false - } - for internalPort := range n.usedPorts { - if v, ok := ports[internalPort]; ok { - n.usedPorts[internalPort] = v - } else { - panic(fmt.Sprintf( - "cluster %q node %q port %d not found in exposed list", - n.Cluster, - n.ID(), - internalPort, - )) - } - } - for _, svc := range n.Services { - svc.DigestExposedPorts(ports) - } - - return true -} - -func (n *Node) ServiceByID(sid ServiceID) *Service { - sid.Normalize() - for _, svc := range n.Services { - if svc.ID == sid { - return svc - } - } - panic("service not found: " + sid.String()) -} - -type ServiceAndNode struct { - Service *Service - Node *Node -} - -type Service struct { - ID ServiceID - Image string - Port int - ExposedPort int `json:",omitempty"` - - Disabled bool `json:",omitempty"` // TODO - - // TODO: expose extra port here? - - Meta map[string]string `json:",omitempty"` - - // TODO(rb): re-expose this perhaps? Protocol string `json:",omitempty"` // tcp|http (empty == tcp) - CheckHTTP string `json:",omitempty"` // url; will do a GET - CheckTCP string `json:",omitempty"` // addr; will do a socket open/close - - EnvoyAdminPort int - ExposedEnvoyAdminPort int `json:",omitempty"` - EnvoyPublicListenerPort int `json:",omitempty"` // agentless - - Command []string `json:",omitempty"` // optional - Env []string `json:",omitempty"` // optional - - DisableServiceMesh bool `json:",omitempty"` - IsMeshGateway bool `json:",omitempty"` - Upstreams []*Upstream - - // denormalized at topology compile - Node *Node `json:"-"` -} - -func (s *Service) inheritFromExisting(existing *Service) { - s.ExposedPort = existing.ExposedPort - s.ExposedEnvoyAdminPort = existing.ExposedEnvoyAdminPort -} - -func (s *Service) ports() []int { - var out []int - if s.Port > 0 { - out = append(out, s.Port) - } - if s.EnvoyAdminPort > 0 { - out = append(out, s.EnvoyAdminPort) - } - if s.EnvoyPublicListenerPort > 0 { - out = append(out, s.EnvoyPublicListenerPort) - } - for _, u := range s.Upstreams { - if u.LocalPort > 0 { - out = append(out, u.LocalPort) - } - } - return out -} - -func (s *Service) HasCheck() bool { - return s.CheckTCP != "" || s.CheckHTTP != "" -} - -func (s *Service) DigestExposedPorts(ports map[int]int) { - s.ExposedPort = ports[s.Port] - if s.EnvoyAdminPort > 0 { - s.ExposedEnvoyAdminPort = ports[s.EnvoyAdminPort] - } else { - s.ExposedEnvoyAdminPort = 0 - } -} - -func (s *Service) Validate() error { - if s.ID.Name == "" { - return fmt.Errorf("service name is required") - } - if s.Image == "" && !s.IsMeshGateway { - return fmt.Errorf("service image is required") - } - if s.Port <= 0 { - return fmt.Errorf("service has invalid port") - } - if s.DisableServiceMesh && s.IsMeshGateway { - return fmt.Errorf("cannot disable service mesh and still run a mesh gateway") - } - if s.DisableServiceMesh && len(s.Upstreams) > 0 { - return fmt.Errorf("cannot disable service mesh and configure upstreams") - } - - if s.DisableServiceMesh { - if s.EnvoyAdminPort != 0 { - return fmt.Errorf("cannot use envoy admin port without a service mesh") - } - } else { - if s.EnvoyAdminPort <= 0 { - return fmt.Errorf("envoy admin port is required") - } - } - - for _, u := range s.Upstreams { - if u.ID.Name == "" { - return fmt.Errorf("upstream service name is required") - } - if u.LocalPort <= 0 { - return fmt.Errorf("upstream local port is required") - } - - if u.LocalAddress != "" { - ip := net.ParseIP(u.LocalAddress) - if ip == nil { - return fmt.Errorf("upstream local address is invalid: %s", u.LocalAddress) - } - } - } - - return nil -} - -type Upstream struct { - ID ServiceID - LocalAddress string `json:",omitempty"` // defaults to 127.0.0.1 - LocalPort int - Peer string `json:",omitempty"` - // TODO: what about mesh gateway mode overrides? - - // computed at topology compile - Cluster string `json:",omitempty"` - Peering *PeerCluster `json:",omitempty"` // this will have Link!=nil -} - -type Peering struct { - Dialing PeerCluster - Accepting PeerCluster -} - -type PeerCluster struct { - Name string - Partition string - PeerName string // name to call it on this side; defaults if not specified - - // computed at topology compile (pointer so it can be empty in json) - Link *PeerCluster `json:",omitempty"` -} - -func (c PeerCluster) String() string { - return c.Name + ":" + c.Partition -} - -func (p *Peering) String() string { - return "(" + p.Dialing.String() + ")->(" + p.Accepting.String() + ")" -} diff --git a/testing/deployer/topology/util.go b/testing/deployer/topology/util.go deleted file mode 100644 index a6d6670c2655c..0000000000000 --- a/testing/deployer/topology/util.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -func MergeSlices[V any](x, y []V) []V { - switch { - case len(x) == 0 && len(y) == 0: - return nil - case len(x) == 0: - return y - case len(y) == 0: - return x - } - - out := make([]V, 0, len(x)+len(y)) - out = append(out, x...) - out = append(out, y...) - return out -} diff --git a/testing/deployer/topology/util_test.go b/testing/deployer/topology/util_test.go deleted file mode 100644 index a858a4e698149..0000000000000 --- a/testing/deployer/topology/util_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topology - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestMergeSlices(t *testing.T) { - require.Nil(t, MergeSlices[int](nil, nil)) -} diff --git a/testing/deployer/util/consul.go b/testing/deployer/util/consul.go deleted file mode 100644 index d3ebc037a9fed..0000000000000 --- a/testing/deployer/util/consul.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package util - -import ( - "fmt" - "net/http" - "net/url" - "strconv" - - "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-cleanhttp" -) - -func ProxyNotPooledAPIClient(proxyPort int, containerIP string, containerPort int, token string) (*api.Client, error) { - return proxyAPIClient(cleanhttp.DefaultTransport(), proxyPort, containerIP, containerPort, token) -} - -func ProxyAPIClient(proxyPort int, containerIP string, containerPort int, token string) (*api.Client, error) { - return proxyAPIClient(cleanhttp.DefaultPooledTransport(), proxyPort, containerIP, containerPort, token) -} - -func proxyAPIClient(baseTransport *http.Transport, proxyPort int, containerIP string, containerPort int, token string) (*api.Client, error) { - if proxyPort <= 0 { - return nil, fmt.Errorf("cannot use an http proxy on port %d", proxyPort) - } - if containerIP == "" { - return nil, fmt.Errorf("container IP is required") - } - if containerPort <= 0 { - return nil, fmt.Errorf("cannot dial api client on port %d", containerPort) - } - - proxyURL, err := url.Parse("http://127.0.0.1:" + strconv.Itoa(proxyPort)) - if err != nil { - return nil, err - } - - cfg := api.DefaultConfig() - cfg.Transport = baseTransport - cfg.Transport.Proxy = http.ProxyURL(proxyURL) - cfg.Address = fmt.Sprintf("http://%s:%d", containerIP, containerPort) - cfg.Token = token - return api.NewClient(cfg) -} - -func ProxyNotPooledHTTPTransport(proxyPort int) (*http.Transport, error) { - return proxyHTTPTransport(cleanhttp.DefaultTransport(), proxyPort) -} - -func ProxyHTTPTransport(proxyPort int) (*http.Transport, error) { - return proxyHTTPTransport(cleanhttp.DefaultPooledTransport(), proxyPort) -} - -func proxyHTTPTransport(baseTransport *http.Transport, proxyPort int) (*http.Transport, error) { - if proxyPort <= 0 { - return nil, fmt.Errorf("cannot use an http proxy on port %d", proxyPort) - } - proxyURL, err := url.Parse("http://127.0.0.1:" + strconv.Itoa(proxyPort)) - if err != nil { - return nil, err - } - baseTransport.Proxy = http.ProxyURL(proxyURL) - return baseTransport, nil -} diff --git a/testing/deployer/util/files.go b/testing/deployer/util/files.go deleted file mode 100644 index 5929f227e501a..0000000000000 --- a/testing/deployer/util/files.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package util - -import ( - "fmt" - "io" - "os" - "path/filepath" - - "golang.org/x/crypto/blake2b" -) - -func FilesExist(parent string, paths ...string) (bool, error) { - for _, p := range paths { - ok, err := FileExists(filepath.Join(parent, p)) - if err != nil { - return false, err - } - if !ok { - return false, nil - } - } - return true, nil -} - -func FileExists(path string) (bool, error) { - _, err := os.Stat(path) - if os.IsNotExist(err) { - return false, nil - } else if err != nil { - return false, err - } else { - return true, nil - } -} - -func HashFile(path string) (string, error) { - hash, err := blake2b.New256(nil) - if err != nil { - return "", err - } - - if err := AddFileToHash(path, hash); err != nil { - return "", err - } - - return fmt.Sprintf("%x", hash.Sum(nil)), nil -} - -func AddFileToHash(path string, w io.Writer) error { - f, err := os.Open(path) - if err != nil { - return err - } - defer f.Close() - _, err = io.Copy(w, f) - return err -} diff --git a/testing/deployer/util/internal/ipamutils/doc.go b/testing/deployer/util/internal/ipamutils/doc.go deleted file mode 100644 index 7820e3776201b..0000000000000 --- a/testing/deployer/util/internal/ipamutils/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 Docker Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Originally from: -// https://github.com/moby/moby/blob/7489b51f610104ab5acc43f4e77142927e7b522e/libnetwork/ipamutils -// -// The only changes were to remove dead code from the package that we did not -// need, and to edit the tests to use github.com/stretchr/testify to avoid an -// extra dependency. -package ipamutils diff --git a/testing/deployer/util/internal/ipamutils/utils.go b/testing/deployer/util/internal/ipamutils/utils.go deleted file mode 100644 index 11367cc176bbf..0000000000000 --- a/testing/deployer/util/internal/ipamutils/utils.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -// Package ipamutils provides utility functions for ipam management -package ipamutils - -import ( - "fmt" - "net" - "sync" -) - -var ( - // predefinedLocalScopeDefaultNetworks contains a list of 31 IPv4 private networks with host size 16 and 12 - // (172.17-31.x.x/16, 192.168.x.x/20) which do not overlap with the networks in `PredefinedGlobalScopeDefaultNetworks` - predefinedLocalScopeDefaultNetworks []*net.IPNet - // predefinedGlobalScopeDefaultNetworks contains a list of 64K IPv4 private networks with host size 8 - // (10.x.x.x/24) which do not overlap with the networks in `PredefinedLocalScopeDefaultNetworks` - predefinedGlobalScopeDefaultNetworks []*net.IPNet - mutex sync.Mutex - localScopeDefaultNetworks = []*NetworkToSplit{{"172.17.0.0/16", 16}, {"172.18.0.0/16", 16}, {"172.19.0.0/16", 16}, - {"172.20.0.0/14", 16}, {"172.24.0.0/14", 16}, {"172.28.0.0/14", 16}, - {"192.168.0.0/16", 20}} - globalScopeDefaultNetworks = []*NetworkToSplit{{"10.0.0.0/8", 24}} -) - -// NetworkToSplit represent a network that has to be split in chunks with mask length Size. -// Each subnet in the set is derived from the Base pool. Base is to be passed -// in CIDR format. -// Example: a Base "10.10.0.0/16 with Size 24 will define the set of 256 -// 10.10.[0-255].0/24 address pools -type NetworkToSplit struct { - Base string `json:"base"` - Size int `json:"size"` -} - -func init() { - var err error - if predefinedGlobalScopeDefaultNetworks, err = SplitNetworks(globalScopeDefaultNetworks); err != nil { - panic("failed to initialize the global scope default address pool: " + err.Error()) - } - - if predefinedLocalScopeDefaultNetworks, err = SplitNetworks(localScopeDefaultNetworks); err != nil { - panic("failed to initialize the local scope default address pool: " + err.Error()) - } -} - -// ConfigGlobalScopeDefaultNetworks configures global default pool. -// Ideally this will be called from SwarmKit as part of swarm init -func ConfigGlobalScopeDefaultNetworks(defaultAddressPool []*NetworkToSplit) error { - if defaultAddressPool == nil { - return nil - } - mutex.Lock() - defer mutex.Unlock() - defaultNetworks, err := SplitNetworks(defaultAddressPool) - if err != nil { - return err - } - predefinedGlobalScopeDefaultNetworks = defaultNetworks - return nil -} - -// GetGlobalScopeDefaultNetworks returns a copy of the global-sopce network list. -func GetGlobalScopeDefaultNetworks() []*net.IPNet { - mutex.Lock() - defer mutex.Unlock() - return append([]*net.IPNet(nil), predefinedGlobalScopeDefaultNetworks...) -} - -// GetLocalScopeDefaultNetworks returns a copy of the default local-scope network list. -func GetLocalScopeDefaultNetworks() []*net.IPNet { - return append([]*net.IPNet(nil), predefinedLocalScopeDefaultNetworks...) -} - -// SplitNetworks takes a slice of networks, split them accordingly and returns them -func SplitNetworks(list []*NetworkToSplit) ([]*net.IPNet, error) { - localPools := make([]*net.IPNet, 0, len(list)) - - for _, p := range list { - _, b, err := net.ParseCIDR(p.Base) - if err != nil { - return nil, fmt.Errorf("invalid base pool %q: %v", p.Base, err) - } - ones, _ := b.Mask.Size() - if p.Size <= 0 || p.Size < ones { - return nil, fmt.Errorf("invalid pools size: %d", p.Size) - } - localPools = append(localPools, splitNetwork(p.Size, b)...) - } - return localPools, nil -} - -func splitNetwork(size int, base *net.IPNet) []*net.IPNet { - one, bits := base.Mask.Size() - mask := net.CIDRMask(size, bits) - n := 1 << uint(size-one) - s := uint(bits - size) - list := make([]*net.IPNet, 0, n) - - for i := 0; i < n; i++ { - ip := copyIP(base.IP) - addIntToIP(ip, uint(i<= 0; i-- { - array[i] |= (byte)(ordinal & 0xff) - ordinal >>= 8 - } -} diff --git a/testing/deployer/util/internal/ipamutils/utils_test.go b/testing/deployer/util/internal/ipamutils/utils_test.go deleted file mode 100644 index e91ae258cb913..0000000000000 --- a/testing/deployer/util/internal/ipamutils/utils_test.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ipamutils - -import ( - "net" - "testing" - - "github.com/stretchr/testify/assert" -) - -func initBroadPredefinedNetworks() []*net.IPNet { - pl := make([]*net.IPNet, 0, 31) - mask := []byte{255, 255, 0, 0} - for i := 17; i < 32; i++ { - pl = append(pl, &net.IPNet{IP: []byte{172, byte(i), 0, 0}, Mask: mask}) - } - mask20 := []byte{255, 255, 240, 0} - for i := 0; i < 16; i++ { - pl = append(pl, &net.IPNet{IP: []byte{192, 168, byte(i << 4), 0}, Mask: mask20}) - } - return pl -} - -func initGranularPredefinedNetworks() []*net.IPNet { - pl := make([]*net.IPNet, 0, 256*256) - mask := []byte{255, 255, 255, 0} - for i := 0; i < 256; i++ { - for j := 0; j < 256; j++ { - pl = append(pl, &net.IPNet{IP: []byte{10, byte(i), byte(j), 0}, Mask: mask}) - } - } - return pl -} - -func initGlobalScopeNetworks() []*net.IPNet { - pl := make([]*net.IPNet, 0, 256*256) - mask := []byte{255, 255, 255, 0} - for i := 0; i < 256; i++ { - for j := 0; j < 256; j++ { - pl = append(pl, &net.IPNet{IP: []byte{30, byte(i), byte(j), 0}, Mask: mask}) - } - } - return pl -} - -func TestDefaultNetwork(t *testing.T) { - for _, nw := range GetGlobalScopeDefaultNetworks() { - if ones, bits := nw.Mask.Size(); bits != 32 || ones != 24 { - t.Fatalf("Unexpected size for network in granular list: %v", nw) - } - } - - for _, nw := range GetLocalScopeDefaultNetworks() { - if ones, bits := nw.Mask.Size(); bits != 32 || (ones != 20 && ones != 16) { - t.Fatalf("Unexpected size for network in broad list: %v", nw) - } - } - - originalBroadNets := initBroadPredefinedNetworks() - m := make(map[string]bool) - for _, v := range originalBroadNets { - m[v.String()] = true - } - for _, nw := range GetLocalScopeDefaultNetworks() { - _, ok := m[nw.String()] - assert.True(t, ok) - delete(m, nw.String()) - } - - assert.Empty(t, m) - - originalGranularNets := initGranularPredefinedNetworks() - - m = make(map[string]bool) - for _, v := range originalGranularNets { - m[v.String()] = true - } - for _, nw := range GetGlobalScopeDefaultNetworks() { - _, ok := m[nw.String()] - assert.True(t, ok) - delete(m, nw.String()) - } - - assert.Empty(t, m) -} - -func TestConfigGlobalScopeDefaultNetworks(t *testing.T) { - err := ConfigGlobalScopeDefaultNetworks([]*NetworkToSplit{{"30.0.0.0/8", 24}}) - assert.NoError(t, err) - - originalGlobalScopeNetworks := initGlobalScopeNetworks() - m := make(map[string]bool) - for _, v := range originalGlobalScopeNetworks { - m[v.String()] = true - } - for _, nw := range GetGlobalScopeDefaultNetworks() { - _, ok := m[nw.String()] - assert.True(t, ok) - delete(m, nw.String()) - } - - assert.Empty(t, m) -} diff --git a/testing/deployer/util/net.go b/testing/deployer/util/net.go deleted file mode 100644 index 83ca01761b48c..0000000000000 --- a/testing/deployer/util/net.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package util - -import ( - "github.com/hashicorp/consul/testing/deployer/util/internal/ipamutils" -) - -// GetPossibleDockerNetworkSubnets returns a copy of the global-scope network list. -func GetPossibleDockerNetworkSubnets() map[string]struct{} { - list := ipamutils.GetGlobalScopeDefaultNetworks() - - out := make(map[string]struct{}) - for _, ipnet := range list { - subnet := ipnet.String() - out[subnet] = struct{}{} - } - return out -} diff --git a/testrpc/wait.go b/testrpc/wait.go index ca315d28539e4..acd9524d78f30 100644 --- a/testrpc/wait.go +++ b/testrpc/wait.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package testrpc diff --git a/tlsutil/config.go b/tlsutil/config.go index 5cba2597f19d7..5cdaf7633eca5 100644 --- a/tlsutil/config.go +++ b/tlsutil/config.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tlsutil @@ -857,23 +857,10 @@ func (c *Configurator) IncomingHTTPSConfig() *tls.Config { return config } -// OutgoingTLSConfigForCheck creates a client *tls.Config for executing checks. -// It is RECOMMENDED that the serverName be left unspecified. The crypto/tls -// client will deduce the ServerName (for SNI) from the check address unless -// it's an IP (RFC 6066, Section 3). However, there are two instances where -// supplying a serverName is useful: -// -// 1. When the check address is an IP, a serverName can be supplied for SNI. -// Note: setting serverName will also override the hostname used to verify -// the certificate presented by the server being checked. -// -// 2. When the hostname in the check address won't be present in the SAN -// (Subject Alternative Name) field of the certificate presented by the -// server being checked. Note: setting serverName will also override the -// ServerName used for SNI. -// -// Setting skipVerify will disable verification of the server's certificate -// chain and hostname, which is generally not suitable for production use. +// OutgoingTLSConfigForCheck generates a *tls.Config for outgoing TLS connections +// for checks. This function is separated because there is an extra flag to +// consider for checks. EnableAgentTLSForChecks and InsecureSkipVerify has to +// be checked for checks. func (c *Configurator) OutgoingTLSConfigForCheck(skipVerify bool, serverName string) *tls.Config { c.log("OutgoingTLSConfigForCheck") @@ -888,9 +875,13 @@ func (c *Configurator) OutgoingTLSConfigForCheck(skipVerify bool, serverName str } } + if serverName == "" { + serverName = c.serverNameOrNodeName() + } config := c.internalRPCTLSConfig(false) config.InsecureSkipVerify = skipVerify config.ServerName = serverName + return config } diff --git a/tlsutil/config_test.go b/tlsutil/config_test.go index 8054b08ecd92e..30ebd62c206b7 100644 --- a/tlsutil/config_test.go +++ b/tlsutil/config_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 //go:build !fips // +build !fips @@ -1376,7 +1376,7 @@ func TestConfigurator_OutgoingTLSConfigForCheck(t *testing.T) { }, }, { - name: "agent tls, default consul server name, no override", + name: "agent tls, default server name", conf: func() (*Configurator, error) { return NewConfigurator(Config{ InternalRPC: ProtocolConfig{ @@ -1389,11 +1389,11 @@ func TestConfigurator_OutgoingTLSConfigForCheck(t *testing.T) { }, expected: &tls.Config{ MinVersion: tls.VersionTLS12, - ServerName: "", + ServerName: "servername", }, }, { - name: "agent tls, skip verify, consul node name for server name, no override", + name: "agent tls, skip verify, node name for server name", conf: func() (*Configurator, error) { return NewConfigurator(Config{ InternalRPC: ProtocolConfig{ @@ -1407,7 +1407,7 @@ func TestConfigurator_OutgoingTLSConfigForCheck(t *testing.T) { expected: &tls.Config{ InsecureSkipVerify: true, MinVersion: tls.VersionTLS12, - ServerName: "", + ServerName: "nodename", }, }, { diff --git a/tlsutil/generate.go b/tlsutil/generate.go index 907d7ba99694f..a92f76f9201c8 100644 --- a/tlsutil/generate.go +++ b/tlsutil/generate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tlsutil diff --git a/tlsutil/generate_test.go b/tlsutil/generate_test.go index da3fd29af1f9c..ddceefe2cd5ae 100644 --- a/tlsutil/generate_test.go +++ b/tlsutil/generate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package tlsutil diff --git a/tools/internal-grpc-proxy/main.go b/tools/internal-grpc-proxy/main.go index 5a4218e8fa466..fda3d2f044464 100644 --- a/tools/internal-grpc-proxy/main.go +++ b/tools/internal-grpc-proxy/main.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package main diff --git a/troubleshoot/go.sum b/troubleshoot/go.sum index ee3bf90645d54..18f1c8b90e96f 100644 --- a/troubleshoot/go.sum +++ b/troubleshoot/go.sum @@ -161,7 +161,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/troubleshoot/proxy/certs.go b/troubleshoot/proxy/certs.go index 8f0c09b0293e9..083f1873b528f 100644 --- a/troubleshoot/proxy/certs.go +++ b/troubleshoot/proxy/certs.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/certs_test.go b/troubleshoot/proxy/certs_test.go index e3db4dc009c5a..ec3ead7e02275 100644 --- a/troubleshoot/proxy/certs_test.go +++ b/troubleshoot/proxy/certs_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/stats.go b/troubleshoot/proxy/stats.go index 249dce07db040..0ae4f68c8d102 100644 --- a/troubleshoot/proxy/stats.go +++ b/troubleshoot/proxy/stats.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/troubleshoot_proxy.go b/troubleshoot/proxy/troubleshoot_proxy.go index 4cd422b0d4b89..5dac26752e439 100644 --- a/troubleshoot/proxy/troubleshoot_proxy.go +++ b/troubleshoot/proxy/troubleshoot_proxy.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/upstreams.go b/troubleshoot/proxy/upstreams.go index 62f08572059a3..c42f6b9716650 100644 --- a/troubleshoot/proxy/upstreams.go +++ b/troubleshoot/proxy/upstreams.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/upstreams_test.go b/troubleshoot/proxy/upstreams_test.go index a2f0bf60b08e0..a000738acde0b 100644 --- a/troubleshoot/proxy/upstreams_test.go +++ b/troubleshoot/proxy/upstreams_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/utils.go b/troubleshoot/proxy/utils.go index 78fadaed119e2..b812272942c69 100644 --- a/troubleshoot/proxy/utils.go +++ b/troubleshoot/proxy/utils.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/validateupstream.go b/troubleshoot/proxy/validateupstream.go index 02c355f40e705..64be9d02e1723 100644 --- a/troubleshoot/proxy/validateupstream.go +++ b/troubleshoot/proxy/validateupstream.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/proxy/validateupstream_test.go b/troubleshoot/proxy/validateupstream_test.go index ddeca9b1cd72a..8709c42d9212c 100644 --- a/troubleshoot/proxy/validateupstream_test.go +++ b/troubleshoot/proxy/validateupstream_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package troubleshoot diff --git a/troubleshoot/validate/validate.go b/troubleshoot/validate/validate.go index 93d26bb42ed12..f7c6299f99848 100644 --- a/troubleshoot/validate/validate.go +++ b/troubleshoot/validate/validate.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package validate diff --git a/troubleshoot/validate/validate_test.go b/troubleshoot/validate/validate_test.go index b9e2aeed611f5..9d779c48f466e 100644 --- a/troubleshoot/validate/validate_test.go +++ b/troubleshoot/validate/validate_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package validate diff --git a/types/area.go b/types/area.go index 7cd0af35fb5c0..30207cd2c388d 100644 --- a/types/area.go +++ b/types/area.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/types/checks.go b/types/checks.go index d119319f413e7..172330267db6d 100644 --- a/types/checks.go +++ b/types/checks.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/types/node_id.go b/types/node_id.go index 868dbf52a9a0d..c404b02bea353 100644 --- a/types/node_id.go +++ b/types/node_id.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/types/tls.go b/types/tls.go index e4788819b8c3a..b113c29030a7c 100644 --- a/types/tls.go +++ b/types/tls.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/types/tls_test.go b/types/tls_test.go index a988cfbc9fb7c..a41817af32cd3 100644 --- a/types/tls_test.go +++ b/types/tls_test.go @@ -1,5 +1,5 @@ // Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-License-Identifier: MPL-2.0 package types diff --git a/ui/packages/consul-acls/app/components/consul/acl/selector/index.hbs b/ui/packages/consul-acls/app/components/consul/acl/selector/index.hbs index a13efa37c19d4..afee0962633f4 100644 --- a/ui/packages/consul-acls/app/components/consul/acl/selector/index.hbs +++ b/ui/packages/consul-acls/app/components/consul/acl/selector/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
  • routes({ diff --git a/ui/packages/consul-acls/vendor/consul-acls/services.js b/ui/packages/consul-acls/vendor/consul-acls/services.js index 1654b41eeea71..74e67ac3a2b82 100644 --- a/ui/packages/consul-acls/vendor/consul-acls/services.js +++ b/ui/packages/consul-acls/vendor/consul-acls/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-hcp/app/components/consul/hcp/home/index.hbs b/ui/packages/consul-hcp/app/components/consul/hcp/home/index.hbs index bb5a1fc32a983..55c6531d2be47 100644 --- a/ui/packages/consul-hcp/app/components/consul/hcp/home/index.hbs +++ b/ui/packages/consul-hcp/app/components/consul/hcp/home/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    routes({ diff --git a/ui/packages/consul-hcp/vendor/consul-hcp/services.js b/ui/packages/consul-hcp/vendor/consul-hcp/services.js index d1c7820f7da51..c95daf828c763 100644 --- a/ui/packages/consul-hcp/vendor/consul-hcp/services.js +++ b/ui/packages/consul-hcp/vendor/consul-hcp/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/form/index.hbs b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/form/index.hbs index d84292c72fba9..f7cffddd8b771 100644 --- a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/form/index.hbs +++ b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/form/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    li:not(:first-child) { diff --git a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs index 12c1391161b92..5f2847d11f014 100644 --- a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs +++ b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#if (eq @type 'remove')}} diff --git a/ui/packages/consul-lock-sessions/app/templates/dc/nodes/show/sessions.hbs b/ui/packages/consul-lock-sessions/app/templates/dc/nodes/show/sessions.hbs index 61c679aa2f1f9..6f18f84b2885d 100644 --- a/ui/packages/consul-lock-sessions/app/templates/dc/nodes/show/sessions.hbs +++ b/ui/packages/consul-lock-sessions/app/templates/dc/nodes/show/sessions.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} routes({ diff --git a/ui/packages/consul-lock-sessions/vendor/consul-lock-sessions/services.js b/ui/packages/consul-lock-sessions/vendor/consul-lock-sessions/services.js index 1654b41eeea71..74e67ac3a2b82 100644 --- a/ui/packages/consul-lock-sessions/vendor/consul-lock-sessions/services.js +++ b/ui/packages/consul-lock-sessions/vendor/consul-lock-sessions/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.hbs b/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.hbs index 52b39bd9df59f..6621cf73f8eaf 100644 --- a/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.hbs +++ b/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.js b/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.js index df8978572e59b..42fb75ecdbd90 100644 --- a/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.js +++ b/ui/packages/consul-nspaces/app/components/consul/nspace/form/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from "@glimmer/component"; diff --git a/ui/packages/consul-nspaces/app/components/consul/nspace/list/index.hbs b/ui/packages/consul-nspaces/app/components/consul/nspace/list/index.hbs index b503aefa0efd3..b1677012e108b 100644 --- a/ui/packages/consul-nspaces/app/components/consul/nspace/list/index.hbs +++ b/ui/packages/consul-nspaces/app/components/consul/nspace/list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} () => { diff --git a/ui/packages/consul-nspaces/app/components/consul/nspace/notifications/index.hbs b/ui/packages/consul-nspaces/app/components/consul/nspace/notifications/index.hbs index 67d44210f2073..4f8269aa52a54 100644 --- a/ui/packages/consul-nspaces/app/components/consul/nspace/notifications/index.hbs +++ b/ui/packages/consul-nspaces/app/components/consul/nspace/notifications/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#if (eq @type 'remove')}} diff --git a/ui/packages/consul-nspaces/app/components/consul/nspace/search-bar/index.hbs b/ui/packages/consul-nspaces/app/components/consul/nspace/search-bar/index.hbs index f438d18dce2a2..49819ebb9b91d 100644 --- a/ui/packages/consul-nspaces/app/components/consul/nspace/search-bar/index.hbs +++ b/ui/packages/consul-nspaces/app/components/consul/nspace/search-bar/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} routes({ diff --git a/ui/packages/consul-nspaces/vendor/consul-nspaces/services.js b/ui/packages/consul-nspaces/vendor/consul-nspaces/services.js index 1654b41eeea71..74e67ac3a2b82 100644 --- a/ui/packages/consul-nspaces/vendor/consul-nspaces/services.js +++ b/ui/packages/consul-nspaces/vendor/consul-nspaces/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-partitions/app/components/consul/partition/form/index.hbs b/ui/packages/consul-partitions/app/components/consul/partition/form/index.hbs index 03119b64106dd..b9e16298a014c 100644 --- a/ui/packages/consul-partitions/app/components/consul/partition/form/index.hbs +++ b/ui/packages/consul-partitions/app/components/consul/partition/form/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    ({ diff --git a/ui/packages/consul-partitions/app/components/consul/partition/notifications/index.hbs b/ui/packages/consul-partitions/app/components/consul/partition/notifications/index.hbs index d97ff184f965e..082fcf652cfb7 100644 --- a/ui/packages/consul-partitions/app/components/consul/partition/notifications/index.hbs +++ b/ui/packages/consul-partitions/app/components/consul/partition/notifications/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#if (eq @type 'remove')}} diff --git a/ui/packages/consul-partitions/app/components/consul/partition/search-bar/index.hbs b/ui/packages/consul-partitions/app/components/consul/partition/search-bar/index.hbs index 56fa44084a7b8..77e4d6b27d215 100644 --- a/ui/packages/consul-partitions/app/components/consul/partition/search-bar/index.hbs +++ b/ui/packages/consul-partitions/app/components/consul/partition/search-bar/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} routes({ diff --git a/ui/packages/consul-partitions/vendor/consul-partitions/services.js b/ui/packages/consul-partitions/vendor/consul-partitions/services.js index 1cf59ee066ca7..8c9440bce3cd1 100644 --- a/ui/packages/consul-partitions/vendor/consul-partitions/services.js +++ b/ui/packages/consul-partitions/vendor/consul-partitions/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.hbs index bc6294e015f0a..eccac17174b64 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.scss b/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.scss index 6816f4934f59c..3c4951829bc0b 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.scss +++ b/ui/packages/consul-peerings/app/components/consul/peer/address/list/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ .border-bottom-primary { diff --git a/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs index b0f633718ec23..b949548612b35 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/components/consul/peer/components.scss b/ui/packages/consul-peerings/app/components/consul/peer/components.scss index ad5f5cd296917..1e20d8b236fe6 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/components.scss +++ b/ui/packages/consul-peerings/app/components/consul/peer/components.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %pill-pending::before, diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/chart.xstate.js b/ui/packages/consul-peerings/app/components/consul/peer/form/chart.xstate.js index 2380c523b4cee..af8a7570225a3 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/chart.xstate.js +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/chart.xstate.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ export default { diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs index 1c16d1d533dc3..f5f66960bb486 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.js b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.js index a037015d1d85d..708b52fd8b114 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.js +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@glimmer/component'; diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs index d6493c895c6d0..217818abd2a30 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/index.hbs index 031ffead3ccca..a0e151f2f64e2 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/index.scss b/ui/packages/consul-peerings/app/components/consul/peer/form/index.scss index 830cced098ae0..bca9acedd661a 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/index.scss +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ .consul-peer-form { diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/actions/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/actions/index.hbs index f5f4c4864f4b4..2aba71c1a0b00 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/actions/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/actions/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/token/actions/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/token/actions/index.hbs index feb85bf4a25ea..b3f455833a4ec 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/token/actions/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/token/actions/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
  • Switch to the peer
    - Someone on your team should log into the Datacenter (Community) or Admin Partition (Enterprise) that you want this one to connect with. + Someone on your team should log into the Datacenter (CE) or Admin Partition (Enterprise) that you want this one to connect with.
  • Initiate the peering
    diff --git a/ui/packages/consul-peerings/app/components/consul/peer/index.scss b/ui/packages/consul-peerings/app/components/consul/peer/index.scss index c7e6b20eaf06e..db9d677688a4a 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/index.scss +++ b/ui/packages/consul-peerings/app/components/consul/peer/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './components'; diff --git a/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs index b0d10e1f8a741..a1af71ce11eb4 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/show.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/show.hbs index 843c54adf8ef4..93df6f79c7a14 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/show.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/show.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/show/addresses.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/show/addresses.hbs index 5845f97f5456e..a8d46aeee7dd5 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/show/addresses.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/show/addresses.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/show/exported.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/show/exported.hbs index 35198bfe8df3b..b25af6128fd6a 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/show/exported.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/show/exported.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/show/imported.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/show/imported.hbs index c7d32b3b16dba..05832b1c5480e 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/show/imported.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/show/imported.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/show/index.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/show/index.hbs index 9a077304e400a..acdf7641c14aa 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/show/index.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/show/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-peerings/vendor/consul-peerings/routes.js b/ui/packages/consul-peerings/vendor/consul-peerings/routes.js index 4ce314ba540db..a8748cec3a3e3 100644 --- a/ui/packages/consul-peerings/vendor/consul-peerings/routes.js +++ b/ui/packages/consul-peerings/vendor/consul-peerings/routes.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ ((routes) => diff --git a/ui/packages/consul-peerings/vendor/consul-peerings/services.js b/ui/packages/consul-peerings/vendor/consul-peerings/services.js index afad1c0e84462..2601489b0bcf5 100644 --- a/ui/packages/consul-peerings/vendor/consul-peerings/services.js +++ b/ui/packages/consul-peerings/vendor/consul-peerings/services.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ (services => services({ diff --git a/ui/packages/consul-ui/.docfy-config.js b/ui/packages/consul-ui/.docfy-config.js index 65bfd7401ff5d..c8308a5854c21 100644 --- a/ui/packages/consul-ui/.docfy-config.js +++ b/ui/packages/consul-ui/.docfy-config.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ const path = require('path'); diff --git a/ui/packages/consul-ui/.eslintrc.js b/ui/packages/consul-ui/.eslintrc.js index 114ea2c2f7d37..c8397263b5eaf 100644 --- a/ui/packages/consul-ui/.eslintrc.js +++ b/ui/packages/consul-ui/.eslintrc.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ module.exports = { diff --git a/ui/packages/consul-ui/.istanbul.yml b/ui/packages/consul-ui/.istanbul.yml index 636bf0e77b0a6..45e59c85a1076 100644 --- a/ui/packages/consul-ui/.istanbul.yml +++ b/ui/packages/consul-ui/.istanbul.yml @@ -1,5 +1,5 @@ # Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 +# SPDX-License-Identifier: MPL-2.0 instrumentation: excludes: [ diff --git a/ui/packages/consul-ui/.prettierrc.js b/ui/packages/consul-ui/.prettierrc.js index 4833e3531de51..cd0cb10db33aa 100644 --- a/ui/packages/consul-ui/.prettierrc.js +++ b/ui/packages/consul-ui/.prettierrc.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ 'use strict'; diff --git a/ui/packages/consul-ui/.template-lintrc.js b/ui/packages/consul-ui/.template-lintrc.js index 868e880ed35a8..2acbc36ee99fb 100644 --- a/ui/packages/consul-ui/.template-lintrc.js +++ b/ui/packages/consul-ui/.template-lintrc.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ 'use strict'; diff --git a/ui/packages/consul-ui/app/abilities/acl.js b/ui/packages/consul-ui/app/abilities/acl.js index 32701965184f5..c8667d6e72d01 100644 --- a/ui/packages/consul-ui/app/abilities/acl.js +++ b/ui/packages/consul-ui/app/abilities/acl.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/auth-method.js b/ui/packages/consul-ui/app/abilities/auth-method.js index de92c39c259dd..92e805cc7d262 100644 --- a/ui/packages/consul-ui/app/abilities/auth-method.js +++ b/ui/packages/consul-ui/app/abilities/auth-method.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/base.js b/ui/packages/consul-ui/app/abilities/base.js index c2f58ab7b4851..663b107d63926 100644 --- a/ui/packages/consul-ui/app/abilities/base.js +++ b/ui/packages/consul-ui/app/abilities/base.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import { inject as service } from '@ember/service'; diff --git a/ui/packages/consul-ui/app/abilities/intention.js b/ui/packages/consul-ui/app/abilities/intention.js index 27c7dc50c3e73..0ae68551b9227 100644 --- a/ui/packages/consul-ui/app/abilities/intention.js +++ b/ui/packages/consul-ui/app/abilities/intention.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/kv.js b/ui/packages/consul-ui/app/abilities/kv.js index bfcaca43fd9a2..7b32d1b4d9ca0 100644 --- a/ui/packages/consul-ui/app/abilities/kv.js +++ b/ui/packages/consul-ui/app/abilities/kv.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility, { ACCESS_LIST } from './base'; diff --git a/ui/packages/consul-ui/app/abilities/license.js b/ui/packages/consul-ui/app/abilities/license.js index 82affe7cff2c5..a1cd4f96982a4 100644 --- a/ui/packages/consul-ui/app/abilities/license.js +++ b/ui/packages/consul-ui/app/abilities/license.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/node.js b/ui/packages/consul-ui/app/abilities/node.js index 51b92aa131f2c..aaf63243d52f9 100644 --- a/ui/packages/consul-ui/app/abilities/node.js +++ b/ui/packages/consul-ui/app/abilities/node.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/nspace.js b/ui/packages/consul-ui/app/abilities/nspace.js index 994b51f41de32..b561700b18db2 100644 --- a/ui/packages/consul-ui/app/abilities/nspace.js +++ b/ui/packages/consul-ui/app/abilities/nspace.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/overview.js b/ui/packages/consul-ui/app/abilities/overview.js index 4381ecf537aef..cbd6ecd8606a0 100644 --- a/ui/packages/consul-ui/app/abilities/overview.js +++ b/ui/packages/consul-ui/app/abilities/overview.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/partition.js b/ui/packages/consul-ui/app/abilities/partition.js index b884e058498a3..3dade71b77148 100644 --- a/ui/packages/consul-ui/app/abilities/partition.js +++ b/ui/packages/consul-ui/app/abilities/partition.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from 'consul-ui/abilities/base'; diff --git a/ui/packages/consul-ui/app/abilities/peer.js b/ui/packages/consul-ui/app/abilities/peer.js index 7a52ed4300919..b564c731d5b60 100644 --- a/ui/packages/consul-ui/app/abilities/peer.js +++ b/ui/packages/consul-ui/app/abilities/peer.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from 'consul-ui/abilities/base'; diff --git a/ui/packages/consul-ui/app/abilities/permission.js b/ui/packages/consul-ui/app/abilities/permission.js index 41b2e5a7076ff..8856b4c1bc195 100644 --- a/ui/packages/consul-ui/app/abilities/permission.js +++ b/ui/packages/consul-ui/app/abilities/permission.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/policy.js b/ui/packages/consul-ui/app/abilities/policy.js index 4c7ee5a32d9f3..38c15963ed873 100644 --- a/ui/packages/consul-ui/app/abilities/policy.js +++ b/ui/packages/consul-ui/app/abilities/policy.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/role.js b/ui/packages/consul-ui/app/abilities/role.js index 457fb1bea9cc5..19ab731169ac1 100644 --- a/ui/packages/consul-ui/app/abilities/role.js +++ b/ui/packages/consul-ui/app/abilities/role.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/server.js b/ui/packages/consul-ui/app/abilities/server.js index b6acef100cc7d..55cee3bbd04c5 100644 --- a/ui/packages/consul-ui/app/abilities/server.js +++ b/ui/packages/consul-ui/app/abilities/server.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/service-instance.js b/ui/packages/consul-ui/app/abilities/service-instance.js index 2f00b9857fcbf..e424bb608f744 100644 --- a/ui/packages/consul-ui/app/abilities/service-instance.js +++ b/ui/packages/consul-ui/app/abilities/service-instance.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility, { ACCESS_READ, ACCESS_WRITE } from './base'; diff --git a/ui/packages/consul-ui/app/abilities/session.js b/ui/packages/consul-ui/app/abilities/session.js index dd505eea2d06b..6a9554ae902b2 100644 --- a/ui/packages/consul-ui/app/abilities/session.js +++ b/ui/packages/consul-ui/app/abilities/session.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/token.js b/ui/packages/consul-ui/app/abilities/token.js index e8880daf6c439..d09692e42f5fb 100644 --- a/ui/packages/consul-ui/app/abilities/token.js +++ b/ui/packages/consul-ui/app/abilities/token.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/upstream.js b/ui/packages/consul-ui/app/abilities/upstream.js index 55cf1d0d0ebc8..d8e5090b505c0 100644 --- a/ui/packages/consul-ui/app/abilities/upstream.js +++ b/ui/packages/consul-ui/app/abilities/upstream.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/zervice.js b/ui/packages/consul-ui/app/abilities/zervice.js index 0fadbcb7c6e7a..0b143c5b8fbc8 100644 --- a/ui/packages/consul-ui/app/abilities/zervice.js +++ b/ui/packages/consul-ui/app/abilities/zervice.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/abilities/zone.js b/ui/packages/consul-ui/app/abilities/zone.js index 3f141319f9117..18a1bf4d71b99 100644 --- a/ui/packages/consul-ui/app/abilities/zone.js +++ b/ui/packages/consul-ui/app/abilities/zone.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import BaseAbility from './base'; diff --git a/ui/packages/consul-ui/app/adapters/application.js b/ui/packages/consul-ui/app/adapters/application.js index d0010c784b3aa..1154b24732786 100644 --- a/ui/packages/consul-ui/app/adapters/application.js +++ b/ui/packages/consul-ui/app/adapters/application.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './http'; diff --git a/ui/packages/consul-ui/app/adapters/auth-method.js b/ui/packages/consul-ui/app/adapters/auth-method.js index 97153a3fcbe8f..6d3fbfeb2bf81 100644 --- a/ui/packages/consul-ui/app/adapters/auth-method.js +++ b/ui/packages/consul-ui/app/adapters/auth-method.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/binding-rule.js b/ui/packages/consul-ui/app/adapters/binding-rule.js index 49029ce7a7240..026674c7584c0 100644 --- a/ui/packages/consul-ui/app/adapters/binding-rule.js +++ b/ui/packages/consul-ui/app/adapters/binding-rule.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/coordinate.js b/ui/packages/consul-ui/app/adapters/coordinate.js index fc5eba788cc73..a7a0b286c862e 100644 --- a/ui/packages/consul-ui/app/adapters/coordinate.js +++ b/ui/packages/consul-ui/app/adapters/coordinate.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/discovery-chain.js b/ui/packages/consul-ui/app/adapters/discovery-chain.js index 6ce0020c6e85a..37879323b20c9 100644 --- a/ui/packages/consul-ui/app/adapters/discovery-chain.js +++ b/ui/packages/consul-ui/app/adapters/discovery-chain.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/http.js b/ui/packages/consul-ui/app/adapters/http.js index 5e9acc62fec87..89b7f11da4b7a 100644 --- a/ui/packages/consul-ui/app/adapters/http.js +++ b/ui/packages/consul-ui/app/adapters/http.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import { inject as service } from '@ember/service'; diff --git a/ui/packages/consul-ui/app/adapters/intention.js b/ui/packages/consul-ui/app/adapters/intention.js index b47d179b84462..3ea6925470ae2 100644 --- a/ui/packages/consul-ui/app/adapters/intention.js +++ b/ui/packages/consul-ui/app/adapters/intention.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/kv.js b/ui/packages/consul-ui/app/adapters/kv.js index bb29fff4d9698..e512723702e52 100644 --- a/ui/packages/consul-ui/app/adapters/kv.js +++ b/ui/packages/consul-ui/app/adapters/kv.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/node.js b/ui/packages/consul-ui/app/adapters/node.js index 5ac1a936005a6..be0799a10d6d9 100644 --- a/ui/packages/consul-ui/app/adapters/node.js +++ b/ui/packages/consul-ui/app/adapters/node.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/nspace.js b/ui/packages/consul-ui/app/adapters/nspace.js index 6e9f27dde0a72..3636a363c6551 100644 --- a/ui/packages/consul-ui/app/adapters/nspace.js +++ b/ui/packages/consul-ui/app/adapters/nspace.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/oidc-provider.js b/ui/packages/consul-ui/app/adapters/oidc-provider.js index 6fafe51a85695..c758a49dcd0ac 100644 --- a/ui/packages/consul-ui/app/adapters/oidc-provider.js +++ b/ui/packages/consul-ui/app/adapters/oidc-provider.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/partition.js b/ui/packages/consul-ui/app/adapters/partition.js index b2ec2178de14c..4ba23078afb6f 100644 --- a/ui/packages/consul-ui/app/adapters/partition.js +++ b/ui/packages/consul-ui/app/adapters/partition.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/permission.js b/ui/packages/consul-ui/app/adapters/permission.js index 806ed5a3c3043..23b5a2725075c 100644 --- a/ui/packages/consul-ui/app/adapters/permission.js +++ b/ui/packages/consul-ui/app/adapters/permission.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/policy.js b/ui/packages/consul-ui/app/adapters/policy.js index 6c959df2d8a4d..9d1415f3a3499 100644 --- a/ui/packages/consul-ui/app/adapters/policy.js +++ b/ui/packages/consul-ui/app/adapters/policy.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/proxy.js b/ui/packages/consul-ui/app/adapters/proxy.js index 6f37be6540119..782c9e1b7db95 100644 --- a/ui/packages/consul-ui/app/adapters/proxy.js +++ b/ui/packages/consul-ui/app/adapters/proxy.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/role.js b/ui/packages/consul-ui/app/adapters/role.js index 8773fddeac174..a64d3db366d26 100644 --- a/ui/packages/consul-ui/app/adapters/role.js +++ b/ui/packages/consul-ui/app/adapters/role.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/service-instance.js b/ui/packages/consul-ui/app/adapters/service-instance.js index e61efc8188032..d02295d898de8 100644 --- a/ui/packages/consul-ui/app/adapters/service-instance.js +++ b/ui/packages/consul-ui/app/adapters/service-instance.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/service.js b/ui/packages/consul-ui/app/adapters/service.js index c8e6adf82698e..c3acb927e0ddc 100644 --- a/ui/packages/consul-ui/app/adapters/service.js +++ b/ui/packages/consul-ui/app/adapters/service.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/session.js b/ui/packages/consul-ui/app/adapters/session.js index 3f42ac4bb97c7..c0c2c5437c8a5 100644 --- a/ui/packages/consul-ui/app/adapters/session.js +++ b/ui/packages/consul-ui/app/adapters/session.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/token.js b/ui/packages/consul-ui/app/adapters/token.js index 7e8e46dacb1b3..555b334e5e5b7 100644 --- a/ui/packages/consul-ui/app/adapters/token.js +++ b/ui/packages/consul-ui/app/adapters/token.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/adapters/topology.js b/ui/packages/consul-ui/app/adapters/topology.js index 8ed49fea40fd7..b12ffc3f9dbf3 100644 --- a/ui/packages/consul-ui/app/adapters/topology.js +++ b/ui/packages/consul-ui/app/adapters/topology.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Adapter from './application'; diff --git a/ui/packages/consul-ui/app/app.js b/ui/packages/consul-ui/app/app.js index 43db29bdd35e5..de6711919bb83 100644 --- a/ui/packages/consul-ui/app/app.js +++ b/ui/packages/consul-ui/app/app.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Application from '@ember/application'; diff --git a/ui/packages/consul-ui/app/components/action/index.hbs b/ui/packages/consul-ui/app/components/action/index.hbs index ad405278bfc7e..97119fdd477a2 100644 --- a/ui/packages/consul-ui/app/components/action/index.hbs +++ b/ui/packages/consul-ui/app/components/action/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#if @for~}} diff --git a/ui/packages/consul-ui/app/components/anchors/index.scss b/ui/packages/consul-ui/app/components/anchors/index.scss index 0de89716dbe15..9fe7e5079d42f 100644 --- a/ui/packages/consul-ui/app/components/anchors/index.scss +++ b/ui/packages/consul-ui/app/components/anchors/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './skin'; diff --git a/ui/packages/consul-ui/app/components/anchors/skin.scss b/ui/packages/consul-ui/app/components/anchors/skin.scss index 53fb0d94617ab..a34e5becc9e44 100644 --- a/ui/packages/consul-ui/app/components/anchors/skin.scss +++ b/ui/packages/consul-ui/app/components/anchors/skin.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %anchor-decoration, diff --git a/ui/packages/consul-ui/app/components/anonymous/index.hbs b/ui/packages/consul-ui/app/components/anonymous/index.hbs index 8709fc4b8b770..0566ddf99b461 100644 --- a/ui/packages/consul-ui/app/components/anonymous/index.hbs +++ b/ui/packages/consul-ui/app/components/anonymous/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{yield}} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/anonymous/index.js b/ui/packages/consul-ui/app/components/anonymous/index.js index d99599ac30397..8f027b69f0e03 100644 --- a/ui/packages/consul-ui/app/components/anonymous/index.js +++ b/ui/packages/consul-ui/app/components/anonymous/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@ember/component'; diff --git a/ui/packages/consul-ui/app/components/app-error/index.hbs b/ui/packages/consul-ui/app/components/app-error/index.hbs index ca65502f59392..0c087cdd4d979 100644 --- a/ui/packages/consul-ui/app/components/app-error/index.hbs +++ b/ui/packages/consul-ui/app/components/app-error/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-ui/app/components/app-view/index.hbs b/ui/packages/consul-ui/app/components/app-view/index.hbs index 3b6ebb26e1383..53cf7113b247a 100644 --- a/ui/packages/consul-ui/app/components/app-view/index.hbs +++ b/ui/packages/consul-ui/app/components/app-view/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/auth-form/index.js b/ui/packages/consul-ui/app/components/auth-form/index.js index 0cd05cc4c29b2..4c861ad527cb0 100644 --- a/ui/packages/consul-ui/app/components/auth-form/index.js +++ b/ui/packages/consul-ui/app/components/auth-form/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@glimmer/component'; diff --git a/ui/packages/consul-ui/app/components/auth-form/index.scss b/ui/packages/consul-ui/app/components/auth-form/index.scss index 1a5c5afff9884..49051008b08db 100644 --- a/ui/packages/consul-ui/app/components/auth-form/index.scss +++ b/ui/packages/consul-ui/app/components/auth-form/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './skin'; diff --git a/ui/packages/consul-ui/app/components/auth-form/layout.scss b/ui/packages/consul-ui/app/components/auth-form/layout.scss index 60ea16642b5a0..2889b700d09d3 100644 --- a/ui/packages/consul-ui/app/components/auth-form/layout.scss +++ b/ui/packages/consul-ui/app/components/auth-form/layout.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %auth-form { diff --git a/ui/packages/consul-ui/app/components/auth-form/pageobject.js b/ui/packages/consul-ui/app/components/auth-form/pageobject.js index f3812d638f900..3ad553f2ad10d 100644 --- a/ui/packages/consul-ui/app/components/auth-form/pageobject.js +++ b/ui/packages/consul-ui/app/components/auth-form/pageobject.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ export default (submitable, clickable, attribute) => diff --git a/ui/packages/consul-ui/app/components/auth-form/skin.scss b/ui/packages/consul-ui/app/components/auth-form/skin.scss index 341c0928fc8c8..18ff35fead26d 100644 --- a/ui/packages/consul-ui/app/components/auth-form/skin.scss +++ b/ui/packages/consul-ui/app/components/auth-form/skin.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %auth-form em { diff --git a/ui/packages/consul-ui/app/components/auth-form/tabs.xstate.js b/ui/packages/consul-ui/app/components/auth-form/tabs.xstate.js index e25cc0d3e7196..c0fcf889a92c8 100644 --- a/ui/packages/consul-ui/app/components/auth-form/tabs.xstate.js +++ b/ui/packages/consul-ui/app/components/auth-form/tabs.xstate.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ export default { diff --git a/ui/packages/consul-ui/app/components/auth-modal/index.scss b/ui/packages/consul-ui/app/components/auth-modal/index.scss index 24f3ba363a488..c9d0eac524602 100644 --- a/ui/packages/consul-ui/app/components/auth-modal/index.scss +++ b/ui/packages/consul-ui/app/components/auth-modal/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ /*TODO: This is a different style of modal dialog */ diff --git a/ui/packages/consul-ui/app/components/auth-modal/layout.scss b/ui/packages/consul-ui/app/components/auth-modal/layout.scss index 0f38371bbaa28..dcdcede010720 100644 --- a/ui/packages/consul-ui/app/components/auth-modal/layout.scss +++ b/ui/packages/consul-ui/app/components/auth-modal/layout.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %auth-modal footer { diff --git a/ui/packages/consul-ui/app/components/auth-modal/skin.scss b/ui/packages/consul-ui/app/components/auth-modal/skin.scss index ac930a2dd6193..b88fad1e54c60 100644 --- a/ui/packages/consul-ui/app/components/auth-modal/skin.scss +++ b/ui/packages/consul-ui/app/components/auth-modal/skin.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %auth-modal footer button::after { diff --git a/ui/packages/consul-ui/app/components/auth-profile/index.hbs b/ui/packages/consul-ui/app/components/auth-profile/index.hbs index 324a657bbe433..3a7f4e5256b6d 100644 --- a/ui/packages/consul-ui/app/components/auth-profile/index.hbs +++ b/ui/packages/consul-ui/app/components/auth-profile/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/code-editor/index.js b/ui/packages/consul-ui/app/components/code-editor/index.js index 72e3abf8eb8a0..52203ac22a0e8 100644 --- a/ui/packages/consul-ui/app/components/code-editor/index.js +++ b/ui/packages/consul-ui/app/components/code-editor/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@ember/component'; diff --git a/ui/packages/consul-ui/app/components/code-editor/index.scss b/ui/packages/consul-ui/app/components/code-editor/index.scss index 58c7c66596cc4..559533e42a849 100644 --- a/ui/packages/consul-ui/app/components/code-editor/index.scss +++ b/ui/packages/consul-ui/app/components/code-editor/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './skin'; diff --git a/ui/packages/consul-ui/app/components/code-editor/layout.scss b/ui/packages/consul-ui/app/components/code-editor/layout.scss index b8194d850bc94..285fda57a35f6 100644 --- a/ui/packages/consul-ui/app/components/code-editor/layout.scss +++ b/ui/packages/consul-ui/app/components/code-editor/layout.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %code-editor { diff --git a/ui/packages/consul-ui/app/components/code-editor/skin.scss b/ui/packages/consul-ui/app/components/code-editor/skin.scss index 0a8dafc65dde5..db0f52bc0d297 100644 --- a/ui/packages/consul-ui/app/components/code-editor/skin.scss +++ b/ui/packages/consul-ui/app/components/code-editor/skin.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ $syntax-consul: #69499a; diff --git a/ui/packages/consul-ui/app/components/composite-row/index.scss b/ui/packages/consul-ui/app/components/composite-row/index.scss index e9db145da19d9..255a2a67c6ca6 100644 --- a/ui/packages/consul-ui/app/components/composite-row/index.scss +++ b/ui/packages/consul-ui/app/components/composite-row/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './layout'; diff --git a/ui/packages/consul-ui/app/components/composite-row/layout.scss b/ui/packages/consul-ui/app/components/composite-row/layout.scss index 819c41f9504f0..dfc3860b501fc 100644 --- a/ui/packages/consul-ui/app/components/composite-row/layout.scss +++ b/ui/packages/consul-ui/app/components/composite-row/layout.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %composite-row { diff --git a/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs b/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs index 95f243a89233e..cf5a0c403c674 100644 --- a/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs +++ b/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{yield}} diff --git a/ui/packages/consul-ui/app/components/confirmation-alert/index.js b/ui/packages/consul-ui/app/components/confirmation-alert/index.js index d99599ac30397..8f027b69f0e03 100644 --- a/ui/packages/consul-ui/app/components/confirmation-alert/index.js +++ b/ui/packages/consul-ui/app/components/confirmation-alert/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@ember/component'; diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs b/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs index da4c7660efbf4..07826204afe45 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/index.js b/ui/packages/consul-ui/app/components/confirmation-dialog/index.js index e10782f579d44..b60850d50a264 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/index.js +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ /*eslint ember/closure-actions: "warn"*/ diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/index.scss b/ui/packages/consul-ui/app/components/confirmation-dialog/index.scss index 65914fb025766..67ae530a98eaa 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/index.scss +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ @import './skin'; diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/layout.scss b/ui/packages/consul-ui/app/components/confirmation-dialog/layout.scss index 9538794833b1a..82773a342339e 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/layout.scss +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/layout.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %confirmation-dialog { diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/skin.scss b/ui/packages/consul-ui/app/components/confirmation-dialog/skin.scss index 4509c4b3fdc52..248c7c9950e7d 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/skin.scss +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/skin.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ table div.with-confirmation.confirming { diff --git a/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs b/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs index 23e6271820d2f..77e8dba8fecc1 100644 --- a/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/binding-list/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/binding-list/index.hbs index 44e351e452844..d0ab9b8ae62a1 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/binding-list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/binding-list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/index.scss b/ui/packages/consul-ui/app/components/consul/auth-method/index.scss index 7e6ffe2de8c03..266174687f49a 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/index.scss +++ b/ui/packages/consul-ui/app/components/consul/auth-method/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ // List diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs index 160e38bd9ce5c..2f15936b42cfb 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} () => { diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/nspace-list/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/nspace-list/index.hbs index cb617ad0660f2..ec47712ec380a 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/nspace-list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/nspace-list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs index 63e9f11be2f68..5a0a5949a571e 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs index a21db4f39264a..b28adf8460540 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#let (icon-mapping @item.Type) as |flightIcon|}} diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs index eab0fa48399c2..00b0169679fc6 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
    diff --git a/ui/packages/consul-ui/app/components/consul/bucket/list/index.hbs b/ui/packages/consul-ui/app/components/consul/bucket/list/index.hbs index 21d598d64ff5f..0c82141ca5b07 100644 --- a/ui/packages/consul-ui/app/components/consul/bucket/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/bucket/list/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }} {{#if this.itemsToDisplay.length}} diff --git a/ui/packages/consul-ui/app/components/consul/bucket/list/index.js b/ui/packages/consul-ui/app/components/consul/bucket/list/index.js index 0268cb6d22efd..387d04f1721f4 100644 --- a/ui/packages/consul-ui/app/components/consul/bucket/list/index.js +++ b/ui/packages/consul-ui/app/components/consul/bucket/list/index.js @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ import Component from '@glimmer/component'; diff --git a/ui/packages/consul-ui/app/components/consul/bucket/list/index.scss b/ui/packages/consul-ui/app/components/consul/bucket/list/index.scss index 996323841f587..710f6a3593bf4 100644 --- a/ui/packages/consul-ui/app/components/consul/bucket/list/index.scss +++ b/ui/packages/consul-ui/app/components/consul/bucket/list/index.scss @@ -1,6 +1,6 @@ /** * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 + * SPDX-License-Identifier: MPL-2.0 */ %consul-bucket-list { diff --git a/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs b/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs index 767422e4b9b13..ecc4f51f1a6b1 100644 --- a/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}
  • diff --git a/ui/packages/consul-ui/app/components/consul/discovery-chain/index.hbs b/ui/packages/consul-ui/app/components/consul/discovery-chain/index.hbs index e25096f849cd2..59d5846061744 100644 --- a/ui/packages/consul-ui/app/components/consul/discovery-chain/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/discovery-chain/index.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 + SPDX-License-Identifier: MPL-2.0 }}