Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add envoy version 1.12.2 and 1.13.0 to the matrix #7240

Merged
merged 8 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,13 @@ jobs:
- store_test_results:
path: ui-v2/test-results

# Envoy integration tests. Require docker dev binary to be built already
envoy-integration-test-1.8.0:
envoy-integration-test-1.10.0:
docker:
# We only really need bash and docker-compose which is installed on all
# Circle images but pick Go since we have to pick one of them.
- image: *GOLANG_IMAGE
environment:
ENVOY_VERSIONS: "1.8.0"
ENVOY_VERSIONS: "1.10.0"
steps: &ENVOY_INTEGRATION_TEST_STEPS
- checkout
# Get go binary from workspace
Expand All @@ -536,25 +535,25 @@ jobs:
path: ./test/integration/connect/envoy/workdir/logs
destination: container-logs

envoy-integration-test-1.9.1:
envoy-integration-test-1.11.2:
docker:
- image: *GOLANG_IMAGE
environment:
ENVOY_VERSIONS: "1.9.1"
ENVOY_VERSIONS: "1.11.2"
steps: *ENVOY_INTEGRATION_TEST_STEPS

envoy-integration-test-1.10.0:
envoy-integration-test-1.12.2:
docker:
- image: *GOLANG_IMAGE
environment:
ENVOY_VERSIONS: "1.10.0"
ENVOY_VERSIONS: "1.12.2"
steps: *ENVOY_INTEGRATION_TEST_STEPS

envoy-integration-test-1.11.1:
envoy-integration-test-1.13.0:
docker:
- image: *GOLANG_IMAGE
environment:
ENVOY_VERSIONS: "1.11.1"
ENVOY_VERSIONS: "1.13.0"
steps: *ENVOY_INTEGRATION_TEST_STEPS

# run tests on vault ca provider integration tests
Expand Down Expand Up @@ -640,16 +639,16 @@ workflows:
- nomad-integration-0_8:
requires:
- dev-build
- envoy-integration-test-1.8.0:
- envoy-integration-test-1.10.0:
requires:
- dev-build
- envoy-integration-test-1.9.1:
- envoy-integration-test-1.11.2:
requires:
- dev-build
- envoy-integration-test-1.10.0:
- envoy-integration-test-1.12.2:
requires:
- dev-build
- envoy-integration-test-1.11.1:
- envoy-integration-test-1.13.0:
requires:
- dev-build
- vault-ca-provider:
Expand Down
21 changes: 20 additions & 1 deletion command/connect/envoy/bootstrap_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ type BootstrapTplArgs struct {
// Namespace is the Consul Enterprise Namespace of the proxy service instance as
// registered with the Consul agent.
Namespace string

// EnvoyVersion is the envoy version, which is necessary to generate the
// correct configuration.
EnvoyVersion string
hanshasselberg marked this conversation as resolved.
Show resolved Hide resolved
}

const bootstrapTemplate = `{
Expand All @@ -112,7 +116,8 @@ const bootstrapTemplate = `{
"cluster": "{{ .ProxyCluster }}",
"id": "{{ .ProxyID }}",
"metadata": {
"namespace": "{{if ne .Namespace ""}}{{ .Namespace }}{{else}}default{{end}}"
"namespace": "{{if ne .Namespace ""}}{{ .Namespace }}{{else}}default{{end}}",
"envoy_version": "{{ .EnvoyVersion }}"
}
},
"static_resources": {
Expand Down Expand Up @@ -190,6 +195,20 @@ const bootstrapTemplate = `{
}
}
}
{{- if ne .EnvoyVersion "1.10.0"}}
},
"layered_runtime":{
"layers": [
{
"name": "static_layer",
hanshasselberg marked this conversation as resolved.
Show resolved Hide resolved
"static_layer": {
"envoy.deprecated_features:envoy.api.v2.Cluster.tls_context": true,
"envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true,
"envoy.deprecated_features:envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name": true
}
}
]
{{- end }}
}
}
`
5 changes: 5 additions & 0 deletions command/connect/envoy/envoy.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type cmd struct {
bootstrap bool
disableCentralConfig bool
grpcAddr string
envoyVersion string

// mesh gateway registration information
register bool
Expand Down Expand Up @@ -110,6 +111,9 @@ func (c *cmd) init() {
"Set the agent's gRPC address and port (in http(s)://host:port format). "+
"Alternatively, you can specify CONSUL_GRPC_ADDR in ENV.")

c.flags.StringVar(&c.envoyVersion, "envoy-version", "1.13.0",
hanshasselberg marked this conversation as resolved.
Show resolved Hide resolved
"Sets the envoy-version that the envoy binary has.")

c.flags.BoolVar(&c.register, "register", false,
"Register a new Mesh Gateway service before configuring and starting Envoy")

Expand Down Expand Up @@ -519,6 +523,7 @@ func (c *cmd) templateArgs() (*BootstrapTplArgs, error) {
Token: httpCfg.Token,
LocalAgentClusterName: xds.LocalAgentClusterName,
Namespace: httpCfg.Namespace,
EnvoyVersion: c.envoyVersion,
}, nil
}

Expand Down
17 changes: 17 additions & 0 deletions command/connect/envoy/envoy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -99,6 +100,7 @@ func TestGenerateConfig(t *testing.T) {
"-token", "c9a52720-bf6c-4aa6-b8bc-66881a5ade95"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -117,6 +119,7 @@ func TestGenerateConfig(t *testing.T) {
"CONSUL_HTTP_TOKEN=c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -138,6 +141,7 @@ func TestGenerateConfig(t *testing.T) {
"token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -159,6 +163,7 @@ func TestGenerateConfig(t *testing.T) {
"token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -176,6 +181,7 @@ func TestGenerateConfig(t *testing.T) {
"-grpc-addr", "localhost:9999"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -196,6 +202,7 @@ func TestGenerateConfig(t *testing.T) {
"CONSUL_GRPC_ADDR=localhost:9999",
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -215,6 +222,7 @@ func TestGenerateConfig(t *testing.T) {
"-grpc-addr", "unix:///var/run/consul.sock"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentSocket: "/var/run/consul.sock",
Expand All @@ -229,6 +237,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy"},
GRPCPort: 9999,
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -247,6 +256,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-admin-access-log-path", "/some/path/access.log"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -265,6 +275,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-ca-file", "some/path"},
Env: []string{},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand All @@ -280,6 +291,7 @@ func TestGenerateConfig(t *testing.T) {
Flags: []string{"-proxy-id", "test-proxy", "-ca-file", "../../../test/ca/root.cer"},
Env: []string{"CONSUL_HTTP_SSL=1"},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
// Should resolve IP, note this might not resolve the same way
Expand Down Expand Up @@ -322,6 +334,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -354,6 +367,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -391,6 +405,7 @@ func TestGenerateConfig(t *testing.T) {
} , { "name": "fake_sink_2" }`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand All @@ -415,6 +430,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down Expand Up @@ -469,6 +485,7 @@ func TestGenerateConfig(t *testing.T) {
}`,
},
WantArgs: BootstrapTplArgs{
EnvoyVersion: "1.13.0",
ProxyCluster: "test-proxy",
ProxyID: "test-proxy",
AgentAddress: "127.0.0.1",
Expand Down
15 changes: 14 additions & 1 deletion command/connect/envoy/testdata/access-log-path.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"cluster": "test-proxy",
"id": "test-proxy",
"metadata": {
"namespace": "default"
"namespace": "default",
"envoy_version": "1.13.0"
}
},
"static_resources": {
Expand Down Expand Up @@ -99,5 +100,17 @@
}
}
}
},
"layered_runtime": {
"layers": [
{
"name": "static_layer",
"static_layer": {
"envoy.deprecated_features:envoy.api.v2.Cluster.tls_context": true,
"envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true,
"envoy.deprecated_features:envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name": true
}
}
]
}
}
15 changes: 14 additions & 1 deletion command/connect/envoy/testdata/defaults.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"cluster": "test-proxy",
"id": "test-proxy",
"metadata": {
"namespace": "default"
"namespace": "default",
"envoy_version": "1.13.0"
}
},
"static_resources": {
Expand Down Expand Up @@ -99,5 +100,17 @@
}
}
}
},
"layered_runtime": {
"layers": [
{
"name": "static_layer",
"static_layer": {
"envoy.deprecated_features:envoy.api.v2.Cluster.tls_context": true,
"envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true,
"envoy.deprecated_features:envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name": true
}
}
]
}
}
15 changes: 14 additions & 1 deletion command/connect/envoy/testdata/existing-ca-file.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"cluster": "test-proxy",
"id": "test-proxy",
"metadata": {
"namespace": "default"
"namespace": "default",
"envoy_version": "1.13.0"
}
},
"static_resources": {
Expand Down Expand Up @@ -108,5 +109,17 @@
}
}
}
},
"layered_runtime": {
"layers": [
{
"name": "static_layer",
"static_layer": {
"envoy.deprecated_features:envoy.api.v2.Cluster.tls_context": true,
"envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true,
"envoy.deprecated_features:envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name": true
}
}
]
}
}
15 changes: 14 additions & 1 deletion command/connect/envoy/testdata/extra_-multiple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"cluster": "test-proxy",
"id": "test-proxy",
"metadata": {
"namespace": "default"
"namespace": "default",
"envoy_version": "1.13.0"
}
},
"static_resources": {
Expand Down Expand Up @@ -121,5 +122,17 @@
}
}
}
},
"layered_runtime": {
"layers": [
{
"name": "static_layer",
"static_layer": {
"envoy.deprecated_features:envoy.api.v2.Cluster.tls_context": true,
"envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true,
"envoy.deprecated_features:envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name": true
}
}
]
}
}
Loading