diff --git a/deployments/get/objects.go b/deployments/get/objects.go index 6bf47d059e..41fe81e37a 100644 --- a/deployments/get/objects.go +++ b/deployments/get/objects.go @@ -51,6 +51,11 @@ func GetClusterRole() *rbacv1.ClusterRole { Resources: []string{"deployments", "replicasets", "daemonsets", "statefulsets"}, Verbs: []string{"get", "patch", "list", "watch", "update"}, }, + { + APIGroups: []string{"batch"}, + Resources: []string{"jobs", "cronjobs"}, + Verbs: []string{"get"}, + }, { APIGroups: []string{"security.kubearmor.com"}, Resources: []string{"kubearmorpolicies", "kubearmorhostpolicies"}, diff --git a/deployments/helm/KubeArmor/templates/RBAC/roles.yaml b/deployments/helm/KubeArmor/templates/RBAC/roles.yaml index 093e8e9cc3..c556f66b7e 100644 --- a/deployments/helm/KubeArmor/templates/RBAC/roles.yaml +++ b/deployments/helm/KubeArmor/templates/RBAC/roles.yaml @@ -29,6 +29,13 @@ rules: - list - watch - update +- apiGroups: + - batch + resources: + - jobs + - cronjobs + verbs: + - get - apiGroups: - security.kubearmor.com resources: diff --git a/deployments/helm/KubeArmorOperator/templates/clusterrole-rbac.yaml b/deployments/helm/KubeArmorOperator/templates/clusterrole-rbac.yaml index e85d25b260..a16899dec2 100644 --- a/deployments/helm/KubeArmorOperator/templates/clusterrole-rbac.yaml +++ b/deployments/helm/KubeArmorOperator/templates/clusterrole-rbac.yaml @@ -122,6 +122,13 @@ rules: - list - watch - update +- apiGroups: + - batch + resources: + - jobs + - cronjobs + verbs: + - get - apiGroups: - security.kubearmor.com resources: diff --git a/pkg/KubeArmorOperator/config/rbac/clusterrole.yaml b/pkg/KubeArmorOperator/config/rbac/clusterrole.yaml index 40da60d27d..156e279516 100644 --- a/pkg/KubeArmorOperator/config/rbac/clusterrole.yaml +++ b/pkg/KubeArmorOperator/config/rbac/clusterrole.yaml @@ -123,6 +123,13 @@ rules: - list - watch - update +- apiGroups: + - batch + resources: + - jobs + - cronjobs + verbs: + - get - apiGroups: - security.kubearmor.com resources: