Skip to content

Commit

Permalink
update rbac rules for jobs/cronjobs for kubearmor clusterRole
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Nandle <[email protected]>
  • Loading branch information
Prateeknandle committed May 23, 2024
1 parent d9522a9 commit 312aca6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployments/get/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
7 changes: 7 additions & 0 deletions deployments/helm/KubeArmor/templates/RBAC/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ rules:
- list
- watch
- update
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- apiGroups:
- security.kubearmor.com
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ rules:
- list
- watch
- update
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- apiGroups:
- security.kubearmor.com
resources:
Expand Down
7 changes: 7 additions & 0 deletions pkg/KubeArmorOperator/config/rbac/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ rules:
- list
- watch
- update
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- apiGroups:
- security.kubearmor.com
resources:
Expand Down

0 comments on commit 312aca6

Please sign in to comment.