Skip to content

Commit

Permalink
Update kubernetes templates for elastic-agent (#139630)
Browse files Browse the repository at this point in the history
* [Automated PR] Publish kubernetes templates for elastic-agent

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: obscloudnativemonitoring <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2022
1 parent 0a16588 commit 7bdb6bf
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ spec:
labels:
app: elastic-agent
spec:
# Tolerations are needed to run Elastic Agent on Kubernetes master nodes.
# Agents running on master nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes
# Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes.
# Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
serviceAccountName: elastic-agent
Expand All @@ -37,7 +39,6 @@ spec:
args: [
"-c", "/etc/agent.yml",
"-e",
"-d", "'*'",
]
env:
# The basic authentication username used to connect to Elasticsearch
Expand All @@ -59,10 +60,10 @@ spec:
runAsUser: 0
resources:
limits:
memory: 500Mi
memory: 700Mi
requests:
cpu: 100m
memory: 200Mi
memory: 400Mi
volumeMounts:
- name: datastreams
mountPath: /etc/agent.yml
Expand All @@ -71,12 +72,6 @@ spec:
- name: proc
mountPath: /hostfs/proc
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: cgroup
mountPath: /hostfs/sys/fs/cgroup
readOnly: true
Expand All @@ -86,6 +81,12 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
Expand All @@ -103,6 +104,15 @@ spec:
- name: proc
hostPath:
path: /proc
- name: cgroup
hostPath:
path: /sys/fs/cgroup
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: varlog
hostPath:
path: /var/log
# Needed for cloudbeat
- name: etc-kubernetes
hostPath:
Expand All @@ -119,15 +129,6 @@ spec:
- name: group
hostPath:
path: /etc/group
- name: cgroup
hostPath:
path: /sys/fs/cgroup
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: varlog
hostPath:
path: /var/log
# Needed for cloudbeat
- name: etcsysmd
hostPath:
Expand Down Expand Up @@ -234,7 +235,7 @@ rules:
- rolebindings
- roles
verbs: ["get", "list", "watch"]
# Needed for cloudbeat
# Needed for cloudbeat
- apiGroups: ["policy"]
resources:
- podsecuritypolicies
Expand Down Expand Up @@ -298,9 +299,11 @@ spec:
labels:
app: elastic-agent
spec:
# Tolerations are needed to run Elastic Agent on Kubernetes master nodes.
# Agents running on master nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes
# Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes.
# Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
serviceAccountName: elastic-agent
Expand Down Expand Up @@ -355,12 +358,6 @@ spec:
- name: proc
mountPath: /hostfs/proc
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: cgroup
mountPath: /hostfs/sys/fs/cgroup
readOnly: true
Expand All @@ -370,6 +367,12 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
Expand Down

0 comments on commit 7bdb6bf

Please sign in to comment.