From c7f54bdb35d3011a009fd10ae089bc8d58f1fcc7 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 2 May 2024 15:40:50 +0100 Subject: [PATCH] Update kubernetes templates for elastic-agent (#182359) Automated by https://buildkite.com/elastic/elastic-agent/builds/8631 --- .../server/services/elastic_agent_manifest.ts | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts index 912bc637120be..a97f578cfadf8 100644 --- a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts +++ b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @@ -36,16 +36,18 @@ spec: # Uncomment if using hints feature #initContainers: # - name: k8s-templates-downloader - # image: busybox:1.28 - # command: ['sh'] + # image: docker.elastic.co/beats/elastic-agent:VERSION + # command: ['bash'] # args: # - -c # - >- - # mkdir -p /etc/elastic-agent/inputs.d && - # wget -O - https://github.com/elastic/elastic-agent/archive/8.15.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-8.15/deploy/kubernetes/elastic-agent/templates.d" + # mkdir -p /usr/share/elastic-agent/state/inputs.d && + # curl -sL https://github.com/elastic/elastic-agent/archive/8.15.tar.gz | tar xz -C /usr/share/elastic-agent/state/inputs.d --strip=5 "elastic-agent-8.15/deploy/kubernetes/elastic-agent/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 containers: - name: elastic-agent image: docker.elastic.co/beats/elastic-agent:VERSION @@ -66,8 +68,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - - name: STATE_PATH - value: "/etc/elastic-agent" # The following ELASTIC_NETINFO:false variable will disable the netinfo.enabled option of add-host-metadata processor. This will remove fields host.ip and host.mac. # For more info: https://www.elastic.co/guide/en/beats/metricbeat/current/add-host-metadata.html - name: ELASTIC_NETINFO @@ -101,9 +101,6 @@ spec: mountPath: /etc/elastic-agent/agent.yml readOnly: true subPath: agent.yml - # Uncomment if using hints feature - #- name: external-inputs - # mountPath: /etc/elastic-agent/inputs.d - name: proc mountPath: /hostfs/proc readOnly: true @@ -134,9 +131,6 @@ spec: configMap: defaultMode: 0640 name: agent-node-datastreams - # Uncomment if using hints feature - #- name: external-inputs - # emptyDir: {} - name: proc hostPath: path: /proc