Skip to content

Commit

Permalink
update hints autodiscovery documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Tetiana Kravchenko <[email protected]>
  • Loading branch information
tetianakravchenko committed Apr 26, 2024
1 parent ac60278 commit 049ad09
Showing 1 changed file with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,37 +175,25 @@ providers:
hints.enabled: true
----

Then ensure that the proper volumes and volumeMounts are specified by uncommenting the appropriate sections in the {agent} manifest:

[source,yaml]
----
volumeMounts:
- name: external-inputs
mountPath: /etc/elastic-agent/inputs.d
...
volumes:
- name: external-inputs
emptyDir: {}
...
----

An init container is also required to download the hints templates.
The init container is already defined, so uncomment the respective section:
Then ensure that an init container is specified by uncommenting the respective sections in the {agent} manifest.
An init container is required to download the hints templates.

["source", "yaml", subs="attributes"]
----
initContainers:
- name: k8s-templates-downloader
image: busybox:1.28
command: ['sh']
image: docker.elastic.co/beats/elastic-agent:{branch}
command: ['bash']
args:
- -c
- >-
mkdir -p /etc/elastic-agent/inputs.d &&
wget -O - https://github.com/elastic/elastic-agent/archive/{branch}.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-{branch}/deploy/kubernetes/elastic-agent-standalone/templates.d"
mkdir -p /usr/share/elastic-agent/state/inputs.d &&
curl -sL https://github.com/elastic/elastic-agent/archive/{branch}.tar.gz | tar xz -C /usr/share/elastic-agent/state/inputs.d --strip=5 "elastic-agent-{branch}/deploy/kubernetes/elastic-agent-standalone/templates.d"
securityContext:
runAsUser: 0
volumeMounts:
- name: external-inputs
mountPath: /etc/elastic-agent/inputs.d
- name: elastic-agent-state
mountPath: /usr/share/elastic-agent/state
----


Expand Down

0 comments on commit 049ad09

Please sign in to comment.