Skip to content

Commit

Permalink
Merge pull request kubearmor#1762 from Prateeknandle/job-rbac
Browse files Browse the repository at this point in the history
chore(deployment):update rbac rules for jobs/cronjobs for kubearmor clusterRole
  • Loading branch information
rksharma95 authored May 24, 2024
2 parents d9522a9 + 312aca6 commit 0eaec66
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 0eaec66

Please sign in to comment.