Skip to content

Commit

Permalink
Merge pull request #991 from arunvthangaraj/feature/add-cluster-role-…
Browse files Browse the repository at this point in the history
…for-otel

bugfix: Adds cluster role for otel daemonset deployment mode
  • Loading branch information
shapirov103 authored May 17, 2024
2 parents cead426 + 93bd778 commit ff31f6a
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 ff31f6a

Please sign in to comment.