Skip to content

Commit

Permalink
adds cluster role for otel daemonset deployment mode
Browse files Browse the repository at this point in the history
  • Loading branch information
arunvthangaraj committed Apr 23, 2024
1 parent 350d562 commit 93bd778
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion lib/addons/amp/collector-config-amp-daemonset.ytpl
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,72 @@ spec:
metrics:
receivers: [prometheus]
processors: [batch/metrics]
exporters: [awsprometheusremotewrite]
exporters: [awsprometheusremotewrite]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-prometheus-role
namespace: "{{namespace}}"
rules:
- apiGroups:
- ""
resources:
- nodes
- namespaces
- pods/logs
- nodes/proxy
- services
- endpoints
- pods
- events
- namespaces/status
- nodes/spec
- pods/status
- replicationcontrollers
- replicationcontrollers/status
- resourcequotas
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- ingresses
- daemonsets
- deployments
- replicasets
verbs:
- get
- list
- watch
- nonResourceURLs:
- /metrics
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-prometheus-role-binding
namespace: "{{namespace}}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otel-prometheus-role
subjects:
- kind: ServiceAccount
name: adot-collector
namespace: "{{namespace}}"

0 comments on commit 93bd778

Please sign in to comment.