Files
homelab-frontend/k8s/rbac.yaml
T

46 lines
1.0 KiB
YAML
Raw Normal View History

2026-08-19 20:52:13 -07:00
apiVersion: v1
kind: ServiceAccount
metadata:
name: api-gateway
namespace: api
labels:
app: api-gateway
---
# Role for ServiceAdapter CRD access (read-only, G2 supersession)
# Scoped to exactly: get, list, watch on serviceadapters in gateway.riotpiao.com/v1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: api-gateway-serviceadapter-reader
namespace: api
labels:
app: api-gateway
rules:
- apiGroups:
- gateway.riotpiao.com
resources:
- serviceadapters
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: api-gateway-serviceadapter-reader
namespace: api
labels:
app: api-gateway
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: api-gateway-serviceadapter-reader
subjects:
- kind: ServiceAccount
name: api-gateway
namespace: api
---
2026-08-19 20:52:13 -07:00
# No ClusterRole needed - the gateway has no k8s API access
# G2: The gateway holds no Kubernetes credentials (except read-only ServiceAdapter access above)