From 6e2807a8ff1accc87c4b7a97bb1918416987d930 Mon Sep 17 00:00:00 2001 From: David Kilfoyle Date: Tue, 10 Dec 2024 17:51:22 -0500 Subject: [PATCH 1/8] Update docs to indicate that providers are no longer enabled by default --- .../providers/elastic-agent-providers.asciidoc | 18 ++++++++++-------- ...kubernetes_leaderelection-provider.asciidoc | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index 9bedeb67b..15fd57d88 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -35,8 +35,10 @@ providers: - item: key2 ---- -Explicitly disable a provider by setting `enabled: false`. All providers -are prefixed without name collisions. The name of the provider is in the key in the configuration. +Providers are disabled by default. +Explicitly enable a provider by setting `enabled: true`. +All providers are prefixed without name collisions. +The name of the provider is in the key in the configuration. [source,yaml] ---- @@ -89,19 +91,19 @@ configuration. * <> [discrete] -[[disable-providers-by-default]] -=== Disabling Providers By Default +[[enable-providers-by-default]] +=== Enabling providers By default -All registered providers are enabled by default. +All registered providers are disabled by default. -Disable all providers by default and only enable explicitly configured providers by setting `agent.providers.initial_default: false`. +Enable all providers by default and only disable explicitly configured providers by setting `agent.providers.initial_default: true`. [source,yaml] ---- -agent.providers.initial_default: false +agent.providers.initial_default: true providers: docker: - enabled: true + enabled: false ---- include::local-provider.asciidoc[leveloffset=+1] diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc index ec89d4ef9..fa9c9c577 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc @@ -12,7 +12,7 @@ It can automatically reach the API if it's running in an InCluster environment ( [source,yaml] ---- providers.kubernetes_leaderelection: - #enabled: true + #enabled: false #kube_config: /Users/elastic-agent/.kube/config #kube_client_options: # qps: 5 @@ -23,8 +23,8 @@ providers.kubernetes_leaderelection: #leader_renewdeadline: 10 ---- -`enabled`:: (Optional) Defaults to true. To explicitly disable the LeaderElection provider, -set `enabled: false`. +`enabled`:: (Optional) Defaults to false. To explicitly enable the LeaderElection provider, +set `enabled: true`. `kube_config`:: (Optional) Use the given config file as configuration for the Kubernetes client. If `kube_config` is not set, `KUBECONFIG` environment variable will be checked and will fall back to InCluster if it's not present. From 7595bbc5b4f012b1cb9c87bdd2f60cd6b6d7b1cb Mon Sep 17 00:00:00 2001 From: David Kilfoyle Date: Thu, 2 Jan 2025 13:31:43 -0500 Subject: [PATCH 2/8] Add changes from Blake's review --- .../configuration/providers/elastic-agent-providers.asciidoc | 5 ++--- .../providers/kubernetes_leaderelection-provider.asciidoc | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index 15fd57d88..d4a7915c8 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -35,8 +35,7 @@ providers: - item: key2 ---- -Providers are disabled by default. -Explicitly enable a provider by setting `enabled: true`. +Providers are enabled automatically if a provider is referenced in an {agent} policy. All providers are prefixed without name collisions. The name of the provider is in the key in the configuration. @@ -96,7 +95,7 @@ configuration. All registered providers are disabled by default. -Enable all providers by default and only disable explicitly configured providers by setting `agent.providers.initial_default: true`. +Disable all providers by default and only enable explicitly configured providers by setting `agent.providers.initial_default: false`. [source,yaml] ---- diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc index fa9c9c577..c893062dc 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc @@ -23,8 +23,7 @@ providers.kubernetes_leaderelection: #leader_renewdeadline: 10 ---- -`enabled`:: (Optional) Defaults to false. To explicitly enable the LeaderElection provider, -set `enabled: true`. +`enabled`:: (Optional) Defaults to false. The LeaderElection provider is enabled automatically when the `kubernetes_leaderelection` is referenced anywhere in the {agemt} policy. `kube_config`:: (Optional) Use the given config file as configuration for the Kubernetes client. If `kube_config` is not set, `KUBECONFIG` environment variable will be checked and will fall back to InCluster if it's not present. From d5a915db241e663f93900446a59c3ce9206b169d Mon Sep 17 00:00:00 2001 From: David Kilfoyle Date: Thu, 2 Jan 2025 13:35:28 -0500 Subject: [PATCH 3/8] touchup --- .../providers/kubernetes_leaderelection-provider.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc index c893062dc..229d259ee 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc @@ -23,7 +23,8 @@ providers.kubernetes_leaderelection: #leader_renewdeadline: 10 ---- -`enabled`:: (Optional) Defaults to false. The LeaderElection provider is enabled automatically when the `kubernetes_leaderelection` is referenced anywhere in the {agemt} policy. +`enabled`:: (Optional) Defaults to false. +The LeaderElection provider is enabled automatically when the `kubernetes_leaderelection` is referenced anywhere in the {agemt} policy. `kube_config`:: (Optional) Use the given config file as configuration for the Kubernetes client. If `kube_config` is not set, `KUBECONFIG` environment variable will be checked and will fall back to InCluster if it's not present. From 08ac1233546f4a3c0daf598eefb8c47a86a87ee6 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:11:20 -0500 Subject: [PATCH 4/8] Update docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc Co-authored-by: Blake Rouse --- .../configuration/providers/elastic-agent-providers.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index d4a7915c8..e6ad738fe 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -95,7 +95,7 @@ configuration. All registered providers are disabled by default. -Disable all providers by default and only enable explicitly configured providers by setting `agent.providers.initial_default: false`. +You can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. [source,yaml] ---- From e8c80713aca25f8c0f59e13f29ba1f8781e62951 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:11:27 -0500 Subject: [PATCH 5/8] Update docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc Co-authored-by: Blake Rouse --- .../configuration/providers/elastic-agent-providers.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index e6ad738fe..f093aa25b 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -93,7 +93,7 @@ configuration. [[enable-providers-by-default]] === Enabling providers By default -All registered providers are disabled by default. +All registered providers are disabled by default until they are referenced in a policy. You can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. From c2b3558e371a7efa5df138f1b9f0bf441ba727c3 Mon Sep 17 00:00:00 2001 From: David Kilfoyle Date: Fri, 10 Jan 2025 16:21:59 -0500 Subject: [PATCH 6/8] Address Blake's comments --- .../providers/elastic-agent-providers.asciidoc | 6 ++++-- .../providers/kubernetes_leaderelection-provider.asciidoc | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index f093aa25b..6cd0bde40 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -97,12 +97,14 @@ All registered providers are disabled by default until they are referenced in a You can disable all providers even if they are referenced in a policy by setting `agent.providers.initial_default: false`. +The following configuration disables all providers from running except for the docker provider, if it becomes referenced in the policy: + [source,yaml] ---- -agent.providers.initial_default: true +agent.providers.initial_default: false providers: docker: - enabled: false + enabled: true ---- include::local-provider.asciidoc[leveloffset=+1] diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc index 229d259ee..ec89d4ef9 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes_leaderelection-provider.asciidoc @@ -12,7 +12,7 @@ It can automatically reach the API if it's running in an InCluster environment ( [source,yaml] ---- providers.kubernetes_leaderelection: - #enabled: false + #enabled: true #kube_config: /Users/elastic-agent/.kube/config #kube_client_options: # qps: 5 @@ -23,8 +23,8 @@ providers.kubernetes_leaderelection: #leader_renewdeadline: 10 ---- -`enabled`:: (Optional) Defaults to false. -The LeaderElection provider is enabled automatically when the `kubernetes_leaderelection` is referenced anywhere in the {agemt} policy. +`enabled`:: (Optional) Defaults to true. To explicitly disable the LeaderElection provider, +set `enabled: false`. `kube_config`:: (Optional) Use the given config file as configuration for the Kubernetes client. If `kube_config` is not set, `KUBECONFIG` environment variable will be checked and will fall back to InCluster if it's not present. From 65978e90cb68a13c11772cc439ed50fb4b3a3a00 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:22:53 -0500 Subject: [PATCH 7/8] Update docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc Co-authored-by: Blake Rouse --- .../configuration/providers/elastic-agent-providers.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index 6cd0bde40..4343c65eb 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -91,7 +91,7 @@ configuration. [discrete] [[enable-providers-by-default]] -=== Enabling providers By default +=== Disabling Providers By Default All registered providers are disabled by default until they are referenced in a policy. From e01781182843d04f60a7a7eb17c3b32d988874c6 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:23:32 -0500 Subject: [PATCH 8/8] Update docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc Co-authored-by: Blake Rouse --- .../configuration/providers/elastic-agent-providers.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc index 4343c65eb..396682c44 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/elastic-agent-providers.asciidoc @@ -90,7 +90,7 @@ configuration. * <> [discrete] -[[enable-providers-by-default]] +[[disable-providers-by-default]] === Disabling Providers By Default All registered providers are disabled by default until they are referenced in a policy.