From 9801ef8eb15db3d2babb096455f49456302f5ee9 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Thu, 1 Oct 2020 09:19:14 -0500 Subject: [PATCH] agent: enable enable_central_service_config by default (#8746) --- .changelog/8746.txt | 3 ++ agent/agent_endpoint_test.go | 24 ++++++------- agent/agent_test.go | 36 +++++++++---------- agent/config/default.go | 1 + agent/config/runtime_test.go | 6 ++-- agent/routine-leak-checker/leak_test.go | 1 - agent/service_manager_test.go | 14 ++++---- .../envoy/case-centralconf/config_entries.hcl | 9 +++-- .../primary/config_entries.hcl | 2 -- .../primary/config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- .../config_entries.hcl | 10 +++--- .../config_entries.hcl | 8 ++--- .../config_entries.hcl | 8 ++--- .../config_entries.hcl | 4 +-- .../config_entries.hcl | 8 ++--- .../primary/config_entries.hcl | 10 +++--- .../config_entries.hcl | 2 -- .../config_entries.hcl | 2 -- website/pages/docs/agent/options.mdx | 1 + .../pages/docs/upgrading/upgrade-specific.mdx | 5 +++ 28 files changed, 71 insertions(+), 101 deletions(-) create mode 100644 .changelog/8746.txt diff --git a/.changelog/8746.txt b/.changelog/8746.txt new file mode 100644 index 0000000000..ae12a53b48 --- /dev/null +++ b/.changelog/8746.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +agent: The `enable_central_service_config` option now defaults to true. +``` diff --git a/agent/agent_endpoint_test.go b/agent/agent_endpoint_test.go index db9704a8d7..5f8600a934 100644 --- a/agent/agent_endpoint_test.go +++ b/agent/agent_endpoint_test.go @@ -2694,7 +2694,7 @@ func TestAgent_UpdateCheck_ACLDeny(t *testing.T) { func TestAgent_RegisterService(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService(t, "") + testAgent_RegisterService(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2780,7 +2780,7 @@ func testAgent_RegisterService(t *testing.T, extraHCL string) { func TestAgent_RegisterService_ReRegister(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ReRegister(t, "") + testAgent_RegisterService_ReRegister(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2856,7 +2856,7 @@ func testAgent_RegisterService_ReRegister(t *testing.T, extraHCL string) { func TestAgent_RegisterService_ReRegister_ReplaceExistingChecks(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t, "") + testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2931,7 +2931,7 @@ func testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t *testing.T, ex func TestAgent_RegisterService_TranslateKeys(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ACLDeny(t, "") + testAgent_RegisterService_ACLDeny(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3147,7 +3147,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) { func TestAgent_RegisterService_ACLDeny(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ACLDeny(t, "") + testAgent_RegisterService_ACLDeny(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3197,7 +3197,7 @@ func testAgent_RegisterService_ACLDeny(t *testing.T, extraHCL string) { func TestAgent_RegisterService_InvalidAddress(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_UnmanagedConnectProxy(t, "") + testAgent_RegisterService_InvalidAddress(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3241,7 +3241,7 @@ func testAgent_RegisterService_InvalidAddress(t *testing.T, extraHCL string) { func TestAgent_RegisterService_UnmanagedConnectProxy(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_UnmanagedConnectProxy(t, "") + testAgent_RegisterService_UnmanagedConnectProxy(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3375,7 +3375,7 @@ func testCreatePolicy(t *testing.T, a *TestAgent, name, rules string) string { func TestAgent_RegisterServiceDeregisterService_Sidecar(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterServiceDeregisterService_Sidecar(t, "") + testAgent_RegisterServiceDeregisterService_Sidecar(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3871,7 +3871,7 @@ func testAgent_RegisterServiceDeregisterService_Sidecar(t *testing.T, extraHCL s func TestAgent_RegisterService_UnmanagedConnectProxyInvalid(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_UnmanagedConnectProxyInvalid(t, "") + testAgent_RegisterService_UnmanagedConnectProxyInvalid(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3914,7 +3914,7 @@ func testAgent_RegisterService_UnmanagedConnectProxyInvalid(t *testing.T, extraH func TestAgent_RegisterService_ConnectNative(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ConnectNative(t, "") + testAgent_RegisterService_ConnectNative(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3959,7 +3959,7 @@ func testAgent_RegisterService_ConnectNative(t *testing.T, extraHCL string) { func TestAgent_RegisterService_ScriptCheck_ExecDisable(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ScriptCheck_ExecDisable(t, "") + testAgent_RegisterService_ScriptCheck_ExecDisable(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -4005,7 +4005,7 @@ func testAgent_RegisterService_ScriptCheck_ExecDisable(t *testing.T, extraHCL st func TestAgent_RegisterService_ScriptCheck_ExecRemoteDisable(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RegisterService_ScriptCheck_ExecRemoteDisable(t, "") + testAgent_RegisterService_ScriptCheck_ExecRemoteDisable(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() diff --git a/agent/agent_test.go b/agent/agent_test.go index 283e90c147..73dc829604 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -255,7 +255,7 @@ func TestAgent_ReconnectConfigWanDisabled(t *testing.T) { func TestAgent_AddService(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_AddService(t, "") + testAgent_AddService(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -451,7 +451,7 @@ func testAgent_AddService(t *testing.T, extraHCL string) { func TestAgent_AddServices_AliasUpdateCheckNotReverted(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_AddServices_AliasUpdateCheckNotReverted(t, "") + testAgent_AddServices_AliasUpdateCheckNotReverted(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -669,7 +669,7 @@ func TestAgent_CheckAliasRPC(t *testing.T) { func TestAgent_AddServiceNoExec(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_AddServiceNoExec(t, "") + testAgent_AddServiceNoExec(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -711,7 +711,7 @@ func testAgent_AddServiceNoExec(t *testing.T, extraHCL string) { func TestAgent_AddServiceNoRemoteExec(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_AddServiceNoRemoteExec(t, "") + testAgent_AddServiceNoRemoteExec(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -977,7 +977,7 @@ func TestAddServiceIPv6TaggedSet(t *testing.T) { func TestAgent_RemoveService(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RemoveService(t, "") + testAgent_RemoveService(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -1088,7 +1088,7 @@ func testAgent_RemoveService(t *testing.T, extraHCL string) { func TestAgent_RemoveServiceRemovesAllChecks(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_RemoveServiceRemovesAllChecks(t, "") + testAgent_RemoveServiceRemovesAllChecks(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2009,7 +2009,7 @@ func TestAgent_updateTTLCheck(t *testing.T) { func TestAgent_PersistService(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_PersistService(t, "") + testAgent_PersistService(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2108,7 +2108,7 @@ func testAgent_PersistService(t *testing.T, extraHCL string) { func TestAgent_persistedService_compat(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_persistedService_compat(t, "") + testAgent_persistedService_compat(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2162,7 +2162,7 @@ func testAgent_persistedService_compat(t *testing.T, extraHCL string) { func TestAgent_PurgeService(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_PurgeService(t, "") + testAgent_PurgeService(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2217,7 +2217,7 @@ func testAgent_PurgeService(t *testing.T, extraHCL string) { func TestAgent_PurgeServiceOnDuplicate(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_PurgeServiceOnDuplicate(t, "") + testAgent_PurgeServiceOnDuplicate(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2501,7 +2501,7 @@ func TestAgent_unloadChecks(t *testing.T) { func TestAgent_loadServices_token(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_loadServices_token(t, "") + testAgent_loadServices_token(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2531,7 +2531,7 @@ func testAgent_loadServices_token(t *testing.T, extraHCL string) { func TestAgent_loadServices_sidecar(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_loadServices_sidecar(t, "") + testAgent_loadServices_sidecar(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2572,7 +2572,7 @@ func testAgent_loadServices_sidecar(t *testing.T, extraHCL string) { func TestAgent_loadServices_sidecarSeparateToken(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_loadServices_sidecarSeparateToken(t, "") + testAgent_loadServices_sidecarSeparateToken(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2611,7 +2611,7 @@ func testAgent_loadServices_sidecarSeparateToken(t *testing.T, extraHCL string) func TestAgent_loadServices_sidecarInheritMeta(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_loadServices_sidecarInheritMeta(t, "") + testAgent_loadServices_sidecarInheritMeta(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2655,7 +2655,7 @@ func testAgent_loadServices_sidecarInheritMeta(t *testing.T, extraHCL string) { func TestAgent_loadServices_sidecarOverrideMeta(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_loadServices_sidecarOverrideMeta(t, "") + testAgent_loadServices_sidecarOverrideMeta(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2703,7 +2703,7 @@ func testAgent_loadServices_sidecarOverrideMeta(t *testing.T, extraHCL string) { func TestAgent_unloadServices(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_unloadServices(t, "") + testAgent_unloadServices(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -2905,7 +2905,7 @@ func TestAgent_Service_NoReap(t *testing.T) { func TestAgent_AddService_restoresSnapshot(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_AddService_restoresSnapshot(t, "") + testAgent_AddService_restoresSnapshot(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() @@ -3399,7 +3399,7 @@ func TestAgent_ReloadConfigOutgoingRPCConfig(t *testing.T) { func TestAgent_ReloadConfigAndKeepChecksStatus(t *testing.T) { t.Run("normal", func(t *testing.T) { t.Parallel() - testAgent_ReloadConfigAndKeepChecksStatus(t, "") + testAgent_ReloadConfigAndKeepChecksStatus(t, "enable_central_service_config = false") }) t.Run("service manager", func(t *testing.T) { t.Parallel() diff --git a/agent/config/default.go b/agent/config/default.go index 347bc09c28..632c96414a 100644 --- a/agent/config/default.go +++ b/agent/config/default.go @@ -45,6 +45,7 @@ func DefaultSource() Source { disable_host_node_id = true disable_remote_exec = true domain = "consul." + enable_central_service_config = true encrypt_verify_incoming = true encrypt_verify_outgoing = true log_level = "INFO" diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 9b2da792ff..a16eb6f5bc 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -4686,7 +4686,7 @@ func TestFullConfig(t *testing.T) { }, "enable_acl_replication": true, "enable_agent_tls_for_checks": true, - "enable_central_service_config": true, + "enable_central_service_config": false, "enable_debug": true, "enable_script_checks": true, "enable_local_script_checks": true, @@ -5351,7 +5351,7 @@ func TestFullConfig(t *testing.T) { } enable_acl_replication = true enable_agent_tls_for_checks = true - enable_central_service_config = true + enable_central_service_config = false enable_debug = true enable_script_checks = true enable_local_script_checks = true @@ -6106,7 +6106,7 @@ func TestFullConfig(t *testing.T) { DiscardCheckOutput: true, DiscoveryMaxStale: 5 * time.Second, EnableAgentTLSForChecks: true, - EnableCentralServiceConfig: true, + EnableCentralServiceConfig: false, EnableDebug: true, EnableRemoteScriptChecks: true, EnableLocalScriptChecks: true, diff --git a/agent/routine-leak-checker/leak_test.go b/agent/routine-leak-checker/leak_test.go index fc3ea42f19..4c601da0de 100644 --- a/agent/routine-leak-checker/leak_test.go +++ b/agent/routine-leak-checker/leak_test.go @@ -77,7 +77,6 @@ func setupPrimaryServer(t *testing.T) *agent.TestAgent { server = true datacenter = "primary" primary_datacenter = "primary" - enable_central_service_config = true connect { enabled = true diff --git a/agent/service_manager_test.go b/agent/service_manager_test.go index 8cb3ce2a24..7cf213d633 100644 --- a/agent/service_manager_test.go +++ b/agent/service_manager_test.go @@ -17,7 +17,7 @@ import ( func TestServiceManager_RegisterService(t *testing.T) { require := require.New(t) - a := NewTestAgent(t, "enable_central_service_config = true") + a := NewTestAgent(t, "") defer a.Shutdown() testrpc.WaitForLeader(t, a.RPC, "dc1") @@ -64,7 +64,7 @@ func TestServiceManager_RegisterService(t *testing.T) { func TestServiceManager_RegisterSidecar(t *testing.T) { require := require.New(t) - a := NewTestAgent(t, "enable_central_service_config = true") + a := NewTestAgent(t, "") defer a.Shutdown() testrpc.WaitForLeader(t, a.RPC, "dc1") @@ -151,7 +151,7 @@ func TestServiceManager_RegisterSidecar(t *testing.T) { func TestServiceManager_RegisterMeshGateway(t *testing.T) { require := require.New(t) - a := NewTestAgent(t, "enable_central_service_config = true") + a := NewTestAgent(t, "") defer a.Shutdown() testrpc.WaitForLeader(t, a.RPC, "dc1") @@ -207,7 +207,7 @@ func TestServiceManager_RegisterMeshGateway(t *testing.T) { func TestServiceManager_RegisterTerminatingGateway(t *testing.T) { require := require.New(t) - a := NewTestAgent(t, "enable_central_service_config = true") + a := NewTestAgent(t, "") defer a.Shutdown() testrpc.WaitForLeader(t, a.RPC, "dc1") @@ -268,7 +268,7 @@ func TestServiceManager_PersistService_API(t *testing.T) { require := require.New(t) // Launch a server to manage the config entries. - serverAgent := NewTestAgent(t, `enable_central_service_config = true`) + serverAgent := NewTestAgent(t, "") defer serverAgent.Shutdown() testrpc.WaitForLeader(t, serverAgent.RPC, "dc1") @@ -293,7 +293,6 @@ func TestServiceManager_PersistService_API(t *testing.T) { // Now launch a single client agent cfg := ` - enable_central_service_config = true server = false bootstrap = false ` @@ -481,7 +480,7 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) { t.Parallel() // Launch a server to manage the config entries. - serverAgent := NewTestAgent(t, `enable_central_service_config = true`) + serverAgent := NewTestAgent(t, "") defer serverAgent.Shutdown() testrpc.WaitForLeader(t, serverAgent.RPC, "dc1") @@ -526,7 +525,6 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) { ` cfg := ` - enable_central_service_config = true server = false bootstrap = false ` + serviceSnippet diff --git a/test/integration/connect/envoy/case-centralconf/config_entries.hcl b/test/integration/connect/envoy/case-centralconf/config_entries.hcl index 73db1d30da..993ad5ecb2 100644 --- a/test/integration/connect/envoy/case-centralconf/config_entries.hcl +++ b/test/integration/connect/envoy/case-centralconf/config_entries.hcl @@ -1,4 +1,3 @@ -enable_central_service_config = true config_entries { bootstrap { kind = "proxy-defaults" @@ -8,13 +7,13 @@ config_entries { } } bootstrap { - kind = "service-defaults" - name = "s1" + kind = "service-defaults" + name = "s1" protocol = "http" } bootstrap { - kind = "service-defaults" - name = "s2" + kind = "service-defaults" + name = "s2" protocol = "http" } } diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/config_entries.hcl index 89b7c4c1ea..55441ae3d0 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-none/primary/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "service-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/config_entries.hcl index 9f0653fc77..2a4d06ce31 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-dc-failover-gateways-remote/primary/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "service-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/config_entries.hcl index e61e6bda98..80c6489671 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-defaultsubset/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-features/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-features/config_entries.hcl index b68750a790..17a3002ec1 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-features/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-features/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/config_entries.hcl index 7e4a3cd918..e4b047726f 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-subset-onlypassing/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/config_entries.hcl index f67283a457..56972b3926 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-failover/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-failover/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/config_entries.hcl index f5f3312d2b..549db0c60e 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-http/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/config_entries.hcl b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/config_entries.hcl index f98df5e44c..4cc1777abb 100644 --- a/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-router-features/config_entries.hcl b/test/integration/connect/envoy/case-cfg-router-features/config_entries.hcl index f72b5e47c9..da8b8c751d 100644 --- a/test/integration/connect/envoy/case-cfg-router-features/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-router-features/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-cfg-splitter-features/config_entries.hcl b/test/integration/connect/envoy/case-cfg-splitter-features/config_entries.hcl index 584619831a..c95c2f1c85 100644 --- a/test/integration/connect/envoy/case-cfg-splitter-features/config_entries.hcl +++ b/test/integration/connect/envoy/case-cfg-splitter-features/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "proxy-defaults" diff --git a/test/integration/connect/envoy/case-ingress-gateway-grpc/config_entries.hcl b/test/integration/connect/envoy/case-ingress-gateway-grpc/config_entries.hcl index fc4cfc697d..1d20009408 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-grpc/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-grpc/config_entries.hcl @@ -1,9 +1,7 @@ -enable_central_service_config = true - config_entries { bootstrap { - kind = "service-defaults" - name = "s1" + kind = "service-defaults" + name = "s1" protocol = "grpc" } bootstrap { @@ -12,11 +10,11 @@ config_entries { listeners = [ { - port = 9999 + port = 9999 protocol = "grpc" services = [ { - name = "s1" + name = "s1" hosts = ["localhost:9999"] } ] diff --git a/test/integration/connect/envoy/case-ingress-gateway-http/config_entries.hcl b/test/integration/connect/envoy/case-ingress-gateway-http/config_entries.hcl index f6d0bac6de..c11c0ecf7a 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-http/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-http/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap = [ { @@ -15,7 +13,7 @@ config_entries { listeners = [ { - port = 9999 + port = 9999 protocol = "http" services = [ { @@ -40,7 +38,7 @@ config_entries { } destination { - service = "s1" + service = "s1" prefix_rewrite = "/" } }, @@ -52,7 +50,7 @@ config_entries { } destination { - service = "s2" + service = "s2" prefix_rewrite = "/" } } diff --git a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/config_entries.hcl b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/config_entries.hcl index 0d3177f415..b5fbaf2241 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-multiple-services/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-multiple-services/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap = [ { @@ -15,7 +13,7 @@ config_entries { listeners = [ { - port = 9999 + port = 9999 protocol = "http" services = [ { @@ -24,11 +22,11 @@ config_entries { ] }, { - port = 9998 + port = 9998 protocol = "http" services = [ { - name = "s1" + name = "s1" hosts = ["test.example.com"] } ] diff --git a/test/integration/connect/envoy/case-ingress-gateway-simple/config_entries.hcl b/test/integration/connect/envoy/case-ingress-gateway-simple/config_entries.hcl index 94f0973a67..dfc7bc7b93 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-simple/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-simple/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "ingress-gateway" @@ -7,7 +5,7 @@ config_entries { listeners = [ { - port = 9999 + port = 9999 protocol = "tcp" services = [ { diff --git a/test/integration/connect/envoy/case-ingress-gateway-tls/config_entries.hcl b/test/integration/connect/envoy/case-ingress-gateway-tls/config_entries.hcl index 2cde25a7c5..66e3bf1add 100644 --- a/test/integration/connect/envoy/case-ingress-gateway-tls/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-gateway-tls/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap = [ { @@ -19,7 +17,7 @@ config_entries { listeners = [ { - port = 9998 + port = 9998 protocol = "http" services = [ { @@ -28,11 +26,11 @@ config_entries { ] }, { - port = 9999 + port = 9999 protocol = "http" services = [ { - name = "s1" + name = "s1" hosts = ["test.example.com"] } ] diff --git a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/config_entries.hcl b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/config_entries.hcl index cec14adcbf..20d449c4e6 100644 --- a/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/config_entries.hcl +++ b/test/integration/connect/envoy/case-ingress-mesh-gateways-resolver/primary/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "ingress-gateway" @@ -8,7 +6,7 @@ config_entries { listeners = [ { protocol = "tcp" - port = 9999 + port = 9999 services = [ { name = "s2" @@ -17,7 +15,7 @@ config_entries { }, { protocol = "tcp" - port = 10000 + port = 10000 services = [ { name = "s1" @@ -39,7 +37,7 @@ config_entries { kind = "service-resolver" name = "s2" redirect { - service = "s2" + service = "s2" datacenter = "secondary" } } @@ -56,7 +54,7 @@ config_entries { kind = "service-resolver" name = "s1" redirect { - service = "s1" + service = "s1" datacenter = "secondary" } } diff --git a/test/integration/connect/envoy/case-terminating-gateway-hostnames/config_entries.hcl b/test/integration/connect/envoy/case-terminating-gateway-hostnames/config_entries.hcl index 103049da18..54d471acc4 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-hostnames/config_entries.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-hostnames/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "terminating-gateway" diff --git a/test/integration/connect/envoy/case-terminating-gateway-simple/config_entries.hcl b/test/integration/connect/envoy/case-terminating-gateway-simple/config_entries.hcl index 4626dee571..0f4309d6de 100644 --- a/test/integration/connect/envoy/case-terminating-gateway-simple/config_entries.hcl +++ b/test/integration/connect/envoy/case-terminating-gateway-simple/config_entries.hcl @@ -1,5 +1,3 @@ -enable_central_service_config = true - config_entries { bootstrap { kind = "terminating-gateway" diff --git a/website/pages/docs/agent/options.mdx b/website/pages/docs/agent/options.mdx index b9b08a6c0b..a369400a8f 100644 --- a/website/pages/docs/agent/options.mdx +++ b/website/pages/docs/agent/options.mdx @@ -1464,6 +1464,7 @@ Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'." - `enable_central_service_config` When set, the Consul agent will look for any centralized service configurations that match a registering service instance. If it finds any, the agent will merge the centralized defaults with the service instance configuration. This allows for things like service protocol or proxy configuration to be defined centrally and inherited by any affected service registrations. + This defaults to `false` in versions of Consul prior to 1.9.0, and defaults to `true` in Consul 1.9.0 and later. - `enable_debug` When set, enables some additional debugging features. Currently, this is only used to access runtime profiling HTTP endpoints, which are available with an `operator:read` ACL regardless of the value of `enable_debug`. diff --git a/website/pages/docs/upgrading/upgrade-specific.mdx b/website/pages/docs/upgrading/upgrade-specific.mdx index 4db4016080..570e291ce9 100644 --- a/website/pages/docs/upgrading/upgrade-specific.mdx +++ b/website/pages/docs/upgrading/upgrade-specific.mdx @@ -15,6 +15,11 @@ provided for their upgrades as a result of new features or changed behavior. This page is used to document those details separately from the standard upgrade flow. +## Consul 1.9.0 + +The [`enable_central_service_config`](/docs/agent/options#enable_central_service_config) +configuration now defaults to `true`. + ## Consul 1.8.0 The [`acl_enforce_version_8`](/docs/agent/options#acl_enforce_version_8)