Files
k3s-cluster/platform-engineer/rbac.yaml
2026-07-05 18:15:10 +02:00

42 lines
1.0 KiB
YAML

# Minimal RBAC for the cron-seed Job ONLY.
#
# The Hermes agent itself has NO k8s RBAC — it manages the cluster via git
# commits (→ ArgoCD sync) and reads state via Loki / Prometheus / ArgoCD APIs.
#
# The cron-seed Job needs to `kubectl exec` into the hermes pod to run
# `hermes cron create ...` (the only way to seed Hermes' internal cron).
# Scoped to this namespace, pods/exec on the hermes pod only.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cron-seeder
namespace: platform-engineer
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cron-seeder
namespace: platform-engineer
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cron-seeder
namespace: platform-engineer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cron-seeder
subjects:
- kind: ServiceAccount
name: cron-seeder
namespace: platform-engineer