Skip to content

Commit

Permalink
Adjust elastic-agent roles to recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
pebrc committed Nov 11, 2024
1 parent ee0de26 commit d748b58
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 53 deletions.
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:
- 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"

0 comments on commit d748b58

Please sign in to comment.