Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ 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 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.

[source,yaml]
----
Expand Down Expand Up @@ -89,19 +90,19 @@ configuration.
* <<kubernetes-provider,Kubernetes Provider>>

[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`.

[source,yaml]
----
agent.providers.initial_default: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be change.

agent.providers.initial_default: true
providers:
docker:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could possibly provide context on what this configuration is doing.

This disables all provides from running except for the docker provider (if it becomes referenced in the policy).

enabled: false
----

include::local-provider.asciidoc[leveloffset=+1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change.

#enabled: false
#kube_config: /Users/elastic-agent/.kube/config
#kube_client_options:
# qps: 5
Expand All @@ -23,8 +23,8 @@ providers.kubernetes_leaderelection:
#leader_renewdeadline: 10
----

`enabled`:: (Optional) Defaults to true. To explicitly disable the LeaderElection provider,
set `enabled: false`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change this.

It is still on, if its referenced. Setting to enabled: false would turn it off completely, even if it was referenced.

`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.
Expand Down