mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-08 20:15:03 +10:00
28 lines
689 B
YAML
28 lines
689 B
YAML
---
|
|
# ClusterRole for read-only access across all namespaces
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: ai-bot-readonly-all-namespaces
|
|
rules:
|
|
- apiGroups: ["*"]
|
|
resources: ["*"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["pods/log", "pods/status"]
|
|
verbs: ["get", "list"]
|
|
---
|
|
# ClusterRoleBinding to grant ai-bot read access everywhere
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: ai-bot-readonly-all-namespaces-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: ai-bot
|
|
namespace: ai
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: ai-bot-readonly-all-namespaces
|
|
apiGroup: rbac.authorization.k8s.io
|