# Grant ai-bot ServiceAccount (ai namespace) FULL ADMIN ownership of home-apps namespace.
# This makes ai-bot the owner of all resources in home-apps, enabling ArgoCD to manage
# EndpointSlices and any other resources for services exposed via Ingress.
#
# Apply: kubectl apply -f adhoc-config/hermes-dashboard-rbac.yaml
#
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: home-apps-admin
  namespace: home-apps
rules:
  - apiGroups: ["*"]
    resources: ["*"]
    verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: home-apps-admin
  namespace: home-apps
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: home-apps-admin
subjects:
  - kind: ServiceAccount
    name: ai-bot
    namespace: ai
