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

[processor/k8sattributesprocessor] Add RBAC rules documentation #9365

Merged
merged 4 commits into from
Apr 22, 2022
Merged
Changes from all commits
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
31 changes: 30 additions & 1 deletion processor/k8sattributesprocessor/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,36 @@
//
// RBAC
//
// TODO: mention the required RBAC rules.
// The k8sattributesprocessor needs `get`, `watch` and `list` permissions on both `pods` and `namespaces` resources, for all namespaces and pods included in the configured filters.
// Here is an example of a `ClusterRole` to give a `ServiceAccount` the necessary permissions for all pods and namespaces in the cluster (replace `<OTEL_COL_NAMESPACE>` with a namespace where collector is deployed):
//
// apiVersion: v1
// kind: ServiceAccount
// metadata:
// name: collector
// namespace: <OTEL_COL_NAMESPACE>
// ---
// apiVersion: rbac.authorization.k8s.io/v1
// kind: ClusterRole
// metadata:
// name: otel-collector
// rules:
// - apiGroups: [""]
// resources: ["pods", "namespaces"]
// verbs: ["get", "watch", "list"]
// ---
// apiVersion: rbac.authorization.k8s.io/v1
// kind: ClusterRoleBinding
// metadata:
// name: otel-collector
// subjects:
// - kind: ServiceAccount
// name: collector
// namespace: <OTEL_COL_NAMESPACE>
// roleRef:
// kind: ClusterRole
// name: otel-collector
// apiGroup: rbac.authorization.k8s.io
//
// Config
//
Expand Down