diff --git a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml index a551a6f1d74..e8db85281c3 100644 --- a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml @@ -692,16 +692,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:8.15.0 + # 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-standalone/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-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 containers: - name: elastic-agent-standalone image: docker.elastic.co/beats/elastic-agent:8.15.0 @@ -725,8 +727,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 @@ -760,9 +760,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 @@ -793,9 +790,6 @@ spec: configMap: defaultMode: 0640 name: agent-node-datastreams - # Uncomment if using hints feature - #- name: external-inputs - # emptyDir: {} - name: proc hostPath: path: /proc diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml index 674ab8425dd..f5c86a0d4a0 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml @@ -28,16 +28,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/%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 containers: - name: elastic-agent-standalone image: docker.elastic.co/beats/elastic-agent:%VERSION% @@ -61,8 +63,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 @@ -96,9 +96,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 @@ -129,9 +126,6 @@ spec: configMap: defaultMode: 0640 name: agent-node-datastreams - # Uncomment if using hints feature - #- name: external-inputs - # emptyDir: {} - name: proc hostPath: path: /proc