64 lines
1.2 KiB
YAML
64 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: backstage
|
|
namespace: backstage
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: backstage-k8s-reader
|
|
rules:
|
|
# Core API group
|
|
- apiGroups: [""]
|
|
resources:
|
|
- pods
|
|
- services
|
|
- configmaps
|
|
- endpoints
|
|
- resourcequotas
|
|
- limitranges
|
|
- namespaces
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
# Apps
|
|
- apiGroups: ["apps"]
|
|
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"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: backstage-k8s-reader-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: backstage
|
|
namespace: backstage
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: backstage-k8s-reader
|
|
apiGroup: rbac.authorization.k8s.io
|