Files
homelab/cluster/applications/the-hub/rbac.yaml
2026-05-24 17:04:49 -05:00

58 lines
1.2 KiB
YAML

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: the-hub
namespace: the-hub
labels:
app.kubernetes.io/name: the-hub
app.kubernetes.io/part-of: mk-labs
---
# ClusterRole grants read-only access to cluster resources
# required for the Glance Kubernetes community widget
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: the-hub
labels:
app.kubernetes.io/name: the-hub
app.kubernetes.io/part-of: mk-labs
rules:
- apiGroups: [""]
resources:
- nodes
- pods
- services
- namespaces
- persistentvolumes
- persistentvolumeclaims
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources:
- deployments
- replicasets
- statefulsets
- daemonsets
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources:
- nodes
- pods
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: the-hub
labels:
app.kubernetes.io/name: the-hub
app.kubernetes.io/part-of: mk-labs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: the-hub
subjects:
- kind: ServiceAccount
name: the-hub
namespace: the-hub