This commit is contained in:
allard
2025-12-03 11:20:20 +01:00
parent 5beef5748e
commit b5b4d705cb

View File

@@ -5,28 +5,59 @@ metadata:
namespace: backstage namespace: backstage
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: ClusterRole
metadata: metadata:
name: backstage name: backstage-k8s-reader
namespace: backstage
rules: rules:
# Core API group
- apiGroups: [""] - apiGroups: [""]
resources: ["pods", "services", "configmaps", "endpoints", "secrets"] resources:
- pods
- services
- configmaps
- endpoints
- resourcequotas
- limitranges
- namespaces
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
# Apps
- apiGroups: ["apps"] - apiGroups: ["apps"]
resources: ["deployments", "replicasets", "statefulsets"] resources:
- deployments
- statefulsets
- daemonsets
- replicasets
verbs: ["get", "list", "watch"]
# Batch
- apiGroups: ["batch"]
resources:
- jobs
- cronjobs
verbs: ["get", "list", "watch"]
# Autoscaling
- apiGroups: ["autoscaling"]
resources:
- horizontalpodautoscalers
verbs: ["get", "list", "watch"]
# Networking
- apiGroups: ["networking.k8s.io"]
resources:
- ingresses
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: ClusterRoleBinding
metadata: metadata:
name: backstage name: backstage-k8s-reader-binding
namespace: backstage
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: backstage name: backstage
namespace: backstage namespace: backstage
roleRef: roleRef:
kind: Role kind: ClusterRole
name: backstage name: backstage-k8s-reader
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io