Skip to content

Commit

Permalink
Fix kubernetes provider documentation (#817)
Browse files Browse the repository at this point in the history
* fix namespace fields; add information about the deployment and cronjob settings in add_resource_metadata

Signed-off-by: Tetiana Kravchenko <[email protected]>

* Update docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc

Co-authored-by: David Kilfoyle <[email protected]>

* Update docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc

Co-authored-by: Andrew Gizas <[email protected]>

* Update docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc

Co-authored-by: Andrew Gizas <[email protected]>

---------

Signed-off-by: Tetiana Kravchenko <[email protected]>
Co-authored-by: David Kilfoyle <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>
  • Loading branch information
3 people committed Jan 18, 2024
1 parent 3c38991 commit 5d565eb
Showing 1 changed file with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,17 @@ will be excluded from the event.
By default it is `true`.
`annotations.dedot`:: (Optional) If set to be `true` in the provider config, then `.` in annotations will be replaced
with `_`. By default it is `true`.
`add_resource_metadata`:: (Optional) Specify labels and annotations filters for the extra metadata coming from node and namespace.
`add_resource_metadata` can be done for `node` or `namespace`. By default all labels are included
while annotations are not. These settings are useful when storing labels and annotations
that require special handling to avoid overloading the storage output. The enrichment of `node` or `namespace` metadata
can be individually disabled by setting `enabled: false`.
Example:

`add_resource_metadata`:: (Optional) Specify filters and configration for the extra metadata, that will be added to the event.
Configuration parameters:
* `node` or `namespace`: Specify labels and annotations filters for the extra metadata coming from node and namespace. By default
all labels are included while annotations are not. To change the default behaviour `include_labels`, `exclude_labels` and `include_annotations`
can be defined. These settings are useful when storing labels and annotations that require special handling to avoid overloading the storage output.
Note: wildcards are not supported for those settings.
The enrichment of `node` or `namespace` metadata can be individually disabled by setting `enabled: false`.
* `deployment`: If resource is `pod` and it is created from a `deployment`, by default the deployment name isn't added, this can be enabled by setting `deployment: true`.
* `cronjob`: If resource is `pod` and it is created from a `cronjob`, by default the cronjob name isn't added, this can be enabled by setting `cronjob: true`.
Example:

["source","yaml",subs="attributes"]
-------------------------------------------------------------------------------------
Expand All @@ -83,6 +88,8 @@ Example:
node:
include_labels: ["nodelabel2"]
include_annotations: ["nodeannotation1"]
#deployment: false
#cronjob: false
-------------------------------------------------------------------------------------


Expand All @@ -94,29 +101,29 @@ The available keys are:
|===
|Key |Type |Description

|`kubernetes.namespace.name`
|`kubernetes.namespace`
|`string`
|Namespace of the Pod

|`kubernetes.namespace.uuid`
|`kubernetes.namespace_uid`
|`string`
|UUID of the Namespace of the Pod
|UID of the Namespace of the Pod

|`kubernetes.namespace.labels.*`
|`kubernetes.namespace_labels.*`
|`object`
|Labels of the Namespace of the Pod

|`kubernetes.namespace.annotations.*`
|`kubernetes.namespace_annotations.*`
|`object`
|Annotations of the Namespace of the Pod

|`kubernetes.pod.name`
|`string`
|Name of the Pod

|`kubernetes.pod.uuid`
|`kubernetes.pod.uid`
|`string`
|UUID of the Pod
|UID of the Pod

|`kubernetes.pod.ip`
|`string`
Expand All @@ -128,7 +135,7 @@ The available keys are:

|`kubernetes.annotations.*`
|`object`
|Object of labels of the Pod
|Object of annotations of the Pod

|`kubernetes.container.name`
|`string`
Expand Down Expand Up @@ -295,19 +302,19 @@ The available keys are:
|===
|Key |Type |Description

|`kubernetes.namespace.name`
|`kubernetes.namespace`
|`string`
|Namespace of the Service

|`kubernetes.namespace.uuid`
|`kubernetes.namespace_uid`
|`string`
|UUID of the Namespace of the Service
|UID of the Namespace of the Service

|`kubernetes.namespace.labels.*`
|`kubernetes.namespace_labels.*`
|`object`
|Labels of the Namespace of the Service

|`kubernetes.namespace.annotations.*`
|`kubernetes.namespace_annotations.*`
|`object`
|Annotations of the Namespace of the Service

Expand All @@ -333,4 +340,4 @@ The available keys are:
|===

Refer to <<elastic-agent-kubernetes-autodiscovery,kubernetes autodiscovery with Elastic Agent>>
for more information about shaping dynamic inputs for autodiscovery.
for more information about shaping dynamic inputs for autodiscovery.

0 comments on commit 5d565eb

Please sign in to comment.