---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: gateway-permissions
  labels:
    projectcapsule.dev/aggregate-to-controller: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io"]
  resources: ["*"]
  verbs: ["get", "create", "update", "patch", "watch", "list", "delete"]
# Fix Kubernetes 1.34
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: admin-patch
rules:
- apiGroups: [""]
  resources: ["namespaces"]
  verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-patch
subjects:
- kind: User
  name: admin
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: admin-patch
  apiGroup: rbac.authorization.k8s.io
