add aggregated view clusterroles for default k8s roles (view, edit and admin)
@@ -495,13 +495,27 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
- name: kyverno:policyviolations
+ name: kyverno:view-policyviolations
+ labels:
+ rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: ["kyverno.io"]
resources:
- policyviolations
verbs: ["get", "list", "watch"]
---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+ name: kyverno:view-clusterpolicyviolations
+ labels:
+ rbac.authorization.k8s.io/aggregate-to-admin: "true"
+rules:
+- apiGroups: ["kyverno.io"]
+ resources:
+ - clusterpolicyviolations
+ verbs: ["get", "list", "watch"]
+---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
