diff --git a/command/connect/envoy/envoy.go b/command/connect/envoy/envoy.go index 990a0cb0c8..a9e1785fa5 100644 --- a/command/connect/envoy/envoy.go +++ b/command/connect/envoy/envoy.go @@ -69,6 +69,8 @@ type cmd struct { meshGatewaySvcName string } +const defaultEnvoyVersion = "1.13.1" + func (c *cmd) init() { c.flags = flag.NewFlagSet("", flag.ContinueOnError) @@ -112,7 +114,7 @@ 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.1", + c.flags.StringVar(&c.envoyVersion, "envoy-version", defaultEnvoyVersion, "Sets the envoy-version that the envoy binary has.") c.flags.BoolVar(&c.register, "register", false, diff --git a/command/connect/envoy/envoy_test.go b/command/connect/envoy/envoy_test.go index a3ceaf9e73..2b4228ff08 100644 --- a/command/connect/envoy/envoy_test.go +++ b/command/connect/envoy/envoy_test.go @@ -83,7 +83,7 @@ func TestGenerateConfig(t *testing.T) { Flags: []string{"-proxy-id", "test-proxy"}, Env: []string{}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -100,7 +100,7 @@ func TestGenerateConfig(t *testing.T) { "-token", "c9a52720-bf6c-4aa6-b8bc-66881a5ade95"}, Env: []string{}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -119,7 +119,7 @@ func TestGenerateConfig(t *testing.T) { "CONSUL_HTTP_TOKEN=c9a52720-bf6c-4aa6-b8bc-66881a5ade95", }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -141,7 +141,7 @@ func TestGenerateConfig(t *testing.T) { "token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95", }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -163,7 +163,7 @@ func TestGenerateConfig(t *testing.T) { "token.txt": "c9a52720-bf6c-4aa6-b8bc-66881a5ade95", }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -181,7 +181,7 @@ func TestGenerateConfig(t *testing.T) { "-grpc-addr", "localhost:9999"}, Env: []string{}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -202,7 +202,7 @@ func TestGenerateConfig(t *testing.T) { "CONSUL_GRPC_ADDR=localhost:9999", }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -222,7 +222,7 @@ func TestGenerateConfig(t *testing.T) { "-grpc-addr", "unix:///var/run/consul.sock"}, Env: []string{}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentSocket: "/var/run/consul.sock", @@ -237,7 +237,7 @@ func TestGenerateConfig(t *testing.T) { Flags: []string{"-proxy-id", "test-proxy"}, GRPCPort: 9999, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -256,7 +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", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -275,7 +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", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -291,7 +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", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", // Should resolve IP, note this might not resolve the same way @@ -334,7 +334,7 @@ func TestGenerateConfig(t *testing.T) { }`, }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -367,7 +367,7 @@ func TestGenerateConfig(t *testing.T) { }`, }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -405,7 +405,7 @@ func TestGenerateConfig(t *testing.T) { } , { "name": "fake_sink_2" }`, }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -430,7 +430,7 @@ func TestGenerateConfig(t *testing.T) { }`, }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", @@ -485,7 +485,7 @@ func TestGenerateConfig(t *testing.T) { }`, }, WantArgs: BootstrapTplArgs{ - EnvoyVersion: "1.13.0", + EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", AgentAddress: "127.0.0.1", diff --git a/command/connect/envoy/testdata/access-log-path.golden b/command/connect/envoy/testdata/access-log-path.golden index fc704bd6a5..fc858f99f1 100644 --- a/command/connect/envoy/testdata/access-log-path.golden +++ b/command/connect/envoy/testdata/access-log-path.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/defaults.golden b/command/connect/envoy/testdata/defaults.golden index b81fc2b1e9..b8400de779 100644 --- a/command/connect/envoy/testdata/defaults.golden +++ b/command/connect/envoy/testdata/defaults.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/existing-ca-file.golden b/command/connect/envoy/testdata/existing-ca-file.golden index 264b0dc667..ff77f8deb0 100644 --- a/command/connect/envoy/testdata/existing-ca-file.golden +++ b/command/connect/envoy/testdata/existing-ca-file.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/extra_-multiple.golden b/command/connect/envoy/testdata/extra_-multiple.golden index 845361ec13..93f02898cd 100644 --- a/command/connect/envoy/testdata/extra_-multiple.golden +++ b/command/connect/envoy/testdata/extra_-multiple.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/extra_-single.golden b/command/connect/envoy/testdata/extra_-single.golden index 7ab52ab78e..a02b58a487 100644 --- a/command/connect/envoy/testdata/extra_-single.golden +++ b/command/connect/envoy/testdata/extra_-single.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/grpc-addr-config.golden b/command/connect/envoy/testdata/grpc-addr-config.golden index f51834610f..c5a083d2c5 100644 --- a/command/connect/envoy/testdata/grpc-addr-config.golden +++ b/command/connect/envoy/testdata/grpc-addr-config.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/grpc-addr-env.golden b/command/connect/envoy/testdata/grpc-addr-env.golden index f51834610f..c5a083d2c5 100644 --- a/command/connect/envoy/testdata/grpc-addr-env.golden +++ b/command/connect/envoy/testdata/grpc-addr-env.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/grpc-addr-flag.golden b/command/connect/envoy/testdata/grpc-addr-flag.golden index f51834610f..c5a083d2c5 100644 --- a/command/connect/envoy/testdata/grpc-addr-flag.golden +++ b/command/connect/envoy/testdata/grpc-addr-flag.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/grpc-addr-unix.golden b/command/connect/envoy/testdata/grpc-addr-unix.golden index a302087c92..dfa766fd90 100644 --- a/command/connect/envoy/testdata/grpc-addr-unix.golden +++ b/command/connect/envoy/testdata/grpc-addr-unix.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/stats-config-override.golden b/command/connect/envoy/testdata/stats-config-override.golden index b793637bff..129439fe80 100644 --- a/command/connect/envoy/testdata/stats-config-override.golden +++ b/command/connect/envoy/testdata/stats-config-override.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/token-arg.golden b/command/connect/envoy/testdata/token-arg.golden index 6f5fd0d56a..cd4e958d33 100644 --- a/command/connect/envoy/testdata/token-arg.golden +++ b/command/connect/envoy/testdata/token-arg.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/token-env.golden b/command/connect/envoy/testdata/token-env.golden index 6f5fd0d56a..cd4e958d33 100644 --- a/command/connect/envoy/testdata/token-env.golden +++ b/command/connect/envoy/testdata/token-env.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/token-file-arg.golden b/command/connect/envoy/testdata/token-file-arg.golden index 6f5fd0d56a..cd4e958d33 100644 --- a/command/connect/envoy/testdata/token-file-arg.golden +++ b/command/connect/envoy/testdata/token-file-arg.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/token-file-env.golden b/command/connect/envoy/testdata/token-file-env.golden index 6f5fd0d56a..cd4e958d33 100644 --- a/command/connect/envoy/testdata/token-file-env.golden +++ b/command/connect/envoy/testdata/token-file-env.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": { diff --git a/command/connect/envoy/testdata/zipkin-tracing-config.golden b/command/connect/envoy/testdata/zipkin-tracing-config.golden index ca9a24eb9a..0557269d15 100644 --- a/command/connect/envoy/testdata/zipkin-tracing-config.golden +++ b/command/connect/envoy/testdata/zipkin-tracing-config.golden @@ -13,7 +13,7 @@ "id": "test-proxy", "metadata": { "namespace": "default", - "envoy_version": "1.13.0" + "envoy_version": "1.13.1" } }, "static_resources": {