You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: cmd/otel-allocator/README.md
+21-21
Original file line number
Diff line number
Diff line change
@@ -148,27 +148,6 @@ If you omit the `ServiceAccount` name, the TargetAllocator creates a `ServiceAcc
148
148
149
149
The role below will provide the minimum access required for the Target Allocator to query all the targets it needs based on any Prometheus configurations:
150
150
151
-
```yaml
152
-
apiVersion: rbac.authorization.k8s.io/v1
153
-
kind: ClusterRole
154
-
metadata:
155
-
name: opentelemetry-targetallocator-cr-role
156
-
rules:
157
-
- apiGroups:
158
-
- monitoring.coreos.com
159
-
resources:
160
-
- servicemonitors
161
-
- podmonitors
162
-
verbs:
163
-
- '*'
164
-
- apiGroups: [""]
165
-
resources:
166
-
- namespaces
167
-
verbs: ["get", "list", "watch"]
168
-
```
169
-
170
-
If you enable the the `prometheusCR` (set `spec.targetAllocator.prometheusCR.enabled` to `true`) in the `OpenTelemetryCollector` CR, you will also need to define the following roles. These give the TargetAllocator access to the `PodMonitor` and `ServiceMonitor` CRs. It also gives namespace access to the `PodMonitor` and `ServiceMonitor`.
171
-
172
151
```yaml
173
152
apiVersion: rbac.authorization.k8s.io/v1
174
153
kind: ClusterRole
@@ -201,6 +180,27 @@ rules:
201
180
verbs: ["get"]
202
181
```
203
182
183
+
If you enable the the `prometheusCR` (set `spec.targetAllocator.prometheusCR.enabled` to `true`) in the `OpenTelemetryCollector` CR, you will also need to define the following roles. These give the TargetAllocator access to the `PodMonitor` and `ServiceMonitor` CRs. It also gives namespace access to the `PodMonitor` and `ServiceMonitor`.
184
+
185
+
```yaml
186
+
apiVersion: rbac.authorization.k8s.io/v1
187
+
kind: ClusterRole
188
+
metadata:
189
+
name: opentelemetry-targetallocator-cr-role
190
+
rules:
191
+
- apiGroups:
192
+
- monitoring.coreos.com
193
+
resources:
194
+
- servicemonitors
195
+
- podmonitors
196
+
verbs:
197
+
- '*'
198
+
- apiGroups: [""]
199
+
resources:
200
+
- namespaces
201
+
verbs: ["get", "list", "watch"]
202
+
```
203
+
204
204
> ✨ The above roles can be combined into a single role.
0 commit comments