Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommened roles for Elastic Agent on Kubernetes #8188

Merged
merged 5 commits into from
Nov 22, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ rules:
- statefulsets
- deployments
- replicasets
- daemonsets
verbs:
- "get"
- "list"
Expand All @@ -281,10 +282,23 @@ rules:
- nodes/stats
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get
- apiGroups:
- "batch"
resources:
- jobs
- cronjobs
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "storage.k8s.io"
resources:
- storageclasses
verbs:
- "get"
- "list"
Expand Down
14 changes: 14 additions & 0 deletions config/recipes/elastic-agent/fleet-kubernetes-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ rules:
- statefulsets
- deployments
- replicasets
- daemonsets
verbs:
- "get"
- "list"
Expand All @@ -211,10 +212,23 @@ rules:
- nodes/stats
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get
- apiGroups:
- "batch"
resources:
- jobs
- cronjobs
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "storage.k8s.io"
resources:
- storageclasses
verbs:
- "get"
- "list"
Expand Down
20 changes: 20 additions & 0 deletions config/recipes/elastic-agent/kubernetes-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,33 @@ rules:
- get
- list
- watch
- apiGroups:
- "apps"
resources:
- statefulsets
- deployments
- replicasets
- daemonsets
verbs:
- "get"
- "list"
- "watch"
- apiGroups: ["batch"]
resources:
- jobs
- cronjobs
verbs:
- get
- list
- watch
- apiGroups:
- "storage.k8s.io"
resources:
- storageclasses
verbs:
- "get"
- "list"
- "watch"
---
apiVersion: v1
kind: ServiceAccount
Expand Down
120 changes: 67 additions & 53 deletions deploy/eck-stack/charts/eck-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,57 +127,71 @@ clusterRoleBinding:
clusterRole:
name: elastic-agent
rules:
- apiGroups: [""]
resources:
- pods
- nodes
- namespaces
- events
- services
- configmaps
verbs:
- get
- watch
- list
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs:
- get
- create
- update
- nonResourceURLs:
- "/metrics"
verbs:
- get
- apiGroups: ["extensions"]
resources:
- replicasets
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "apps"
resources:
- statefulsets
- deployments
- apiGroups: [""]
resources:
- pods
- nodes
- namespaces
- events
- services
- configmaps
verbs:
- get
- watch
- list
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs:
- get
- create
- update
- nonResourceURLs:
- "/metrics"
verbs:
- get
- apiGroups: ["extensions"]
resources:
pebrc marked this conversation as resolved.
Show resolved Hide resolved
- replicasets
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- "get"
- "list"
- "watch"
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "apps"
resources:
- statefulsets
- deployments
- replicasets
- daemonsets
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get
- apiGroups:
- "batch"
resources:
- jobs
- cronjobs
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "storage.k8s.io"
resources:
- storageclasses
verbs:
- "get"
- "list"
- "watch"
pebrc marked this conversation as resolved.
Show resolved Hide resolved