Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ data:
providers.kubernetes:
node: ${NODE_NAME}
scope: node
#Uncomment to enable hints' support
#hints.enabled: true
inputs:
- name: kubernetes-cluster-metrics
condition: ${kubernetes_leaderelection.leader} == true
Expand Down Expand Up @@ -651,11 +653,23 @@ spec:
serviceAccountName: elastic-agent-standalone
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
#initContainers:
# - name: k8s-templates-downloader
# image: busybox:1.28
# command: ['sh']
# args:
# - -c
# - >-
# mkdir -p /etc/elastic-agent/inputs.d &&
# wget -O - https://github.com/elastic/elastic-agent/archive/8.3.0.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-main/deploy/kubernetes/elastic-agent-standalone/templates.d" &&
# volumeMounts:
# - name: external-inputs
# mountPath: /etc/elastic-agent/inputs.d
containers:
- name: elastic-agent-standalone
image: docker.elastic.co/beats/elastic-agent:8.3.0
args: [
"-c", "/etc/agent.yml",
"-c", "/etc/elastic-agent/agent.yml",
"-e",
]
env:
Expand All @@ -677,6 +691,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: STATE_PATH
value: "/etc/elastic-agent"
securityContext:
runAsUser: 0
resources:
Expand All @@ -687,9 +703,12 @@ spec:
memory: 400Mi
volumeMounts:
- name: datastreams
mountPath: /etc/agent.yml
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
Expand Down Expand Up @@ -722,6 +741,10 @@ spec:
configMap:
defaultMode: 0640
name: agent-node-datastreams
# Uncomment if using hints feature
#- name: external-inputs
# hostPath:
# path: /etc/elastic-agent/inputs.d
- name: proc
hostPath:
path: /proc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ data:
providers.kubernetes:
node: ${NODE_NAME}
scope: node
#Uncomment to enable hints' support
#hints.enabled: true
inputs:
- name: kubernetes-cluster-metrics
condition: ${kubernetes_leaderelection.leader} == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,23 @@ spec:
serviceAccountName: elastic-agent-standalone
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
#initContainers:
Copy link
Contributor

Choose a reason for hiding this comment

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

should the following be uncommented for hints? or any other reason?

Copy link
Member Author

Choose a reason for hiding this comment

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

Missed to add the explanation yeah...Thanks!

# - name: k8s-templates-downloader
# image: busybox:1.28
# command: ['sh']
# args:
# - -c
# - >-
# mkdir -p /etc/elastic-agent/inputs.d &&
# wget -O - https://github.com/elastic/elastic-agent/archive/%VERSION%.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-main/deploy/kubernetes/elastic-agent-standalone/templates.d" &&
# volumeMounts:
# - name: external-inputs
# mountPath: /etc/elastic-agent/inputs.d
containers:
- name: elastic-agent-standalone
image: docker.elastic.co/beats/elastic-agent:%VERSION%
args: [
"-c", "/etc/agent.yml",
"-c", "/etc/elastic-agent/agent.yml",
"-e",
]
env:
Expand All @@ -51,6 +63,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: STATE_PATH
value: "/etc/elastic-agent"
securityContext:
runAsUser: 0
resources:
Expand All @@ -61,9 +75,12 @@ spec:
memory: 400Mi
volumeMounts:
- name: datastreams
mountPath: /etc/agent.yml
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
Expand Down Expand Up @@ -96,6 +113,10 @@ spec:
configMap:
defaultMode: 0640
name: agent-node-datastreams
# Uncomment if using hints feature
#- name: external-inputs
# hostPath:
# path: /etc/elastic-agent/inputs.d
- name: proc
hostPath:
path: /proc
Expand Down