-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch all client nodes in dc2 to dataplane [NET-4299] #18608
Changes from 16 commits
868b727
f13b60e
7324ad6
2972b7e
7016acb
946fa73
c6ac290
0b0b9ba
d176eda
17f6ef5
fcb531d
ee3df2a
6355264
a511e11
54424a1
cc85121
fb1cf05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,13 +309,107 @@ jobs: | |
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/[email protected] | ||
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 | ||
- peering_commontopo-integration-test | ||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
if: ${{ always() }} | ||
steps: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -318,13 +318,45 @@ func serviceToCatalogRegistration( | |
Address: node.LocalAddress(), | ||
}, | ||
} | ||
if svc.IsMeshGateway { | ||
reg.Service.Kind = api.ServiceKindMeshGateway | ||
reg.Service.Proxy = &api.AgentServiceConnectProxyConfig{ | ||
Config: map[string]interface{}{ | ||
"envoy_gateway_no_default_bind": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I don't know what these do or if they're necessary, but There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The no default bind one will not bind to the main service address and the bind tagged addrs one then instructs it to bind envoy listeners to all the tagged addrs instead. You could omit the main service addr form the tagged addresses and use the combination by not specifying the no default bind attribute. Or if you are in k8s then you just bind to the services addr (pod address) and ignore all the tagged addrs. Basically, the binding of a mgw to specific addrs and ports is very flexible and controlled by these proxy config settings. |
||
"envoy_gateway_bind_tagged_addresses": true, | ||
}, | ||
MeshGateway: api.MeshGatewayConfig{ | ||
Mode: api.MeshGatewayModeLocal, | ||
}, | ||
} | ||
} | ||
if node.HasPublicAddress() { | ||
reg.TaggedAddresses = map[string]string{ | ||
"lan": node.LocalAddress(), | ||
"lan_ipv4": node.LocalAddress(), | ||
"wan": node.PublicAddress(), | ||
"wan_ipv4": node.PublicAddress(), | ||
} | ||
// TODO: not sure what the difference is between these, but with just the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was it being set in agentful mode? Looking at the proxy config code I would expect node tagged addresses to generally be ignored for all proxies. I think the only way to use tagged addresses for service mesh is to set the services tagged addresses like you have done here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compared with an agentful mgw in DC1, I see that it has both |
||
// top-level set, it appeared to not get set in either :/ | ||
reg.Service.TaggedAddresses = map[string]api.ServiceAddress{ | ||
"lan": { | ||
Address: node.LocalAddress(), | ||
Port: svc.Port, | ||
}, | ||
"lan_ipv4": { | ||
Address: node.LocalAddress(), | ||
Port: svc.Port, | ||
}, | ||
"wan": { | ||
Address: node.PublicAddress(), | ||
Port: svc.Port, | ||
}, | ||
"wan_ipv4": { | ||
Address: node.PublicAddress(), | ||
Port: svc.Port, | ||
}, | ||
} | ||
} | ||
if cluster.Enterprise { | ||
reg.Partition = svc.ID.Partition | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,14 @@ import ( | |
"github.com/hashicorp/consul/testing/deployer/topology" | ||
) | ||
|
||
func (g *Generator) generateAgentHCL(node *topology.Node) (string, error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are all unrecoverable errors, so I just panic |
||
func (g *Generator) generateAgentHCL(node *topology.Node) string { | ||
if !node.IsAgent() { | ||
return "", fmt.Errorf("not an agent") | ||
panic("generateAgentHCL only applies to agents") | ||
} | ||
|
||
cluster, ok := g.topology.Clusters[node.Cluster] | ||
if !ok { | ||
return "", fmt.Errorf("no such cluster: %s", node.Cluster) | ||
panic(fmt.Sprintf("no such cluster: %s", node.Cluster)) | ||
} | ||
|
||
var b HCLBuilder | ||
|
@@ -167,7 +167,7 @@ func (g *Generator) generateAgentHCL(node *topology.Node) (string, error) { | |
} | ||
} | ||
|
||
return b.String(), nil | ||
return b.String() | ||
} | ||
|
||
type HCLBuilder struct { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 1.16.x test runs on large runner here, perhaps this should be changed to large as well?