Skip to content

Commit

Permalink
update permissions required by kubearmor daemonset
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan-sharma11 <[email protected]>
  • Loading branch information
Aryan-sharma11 committed Aug 13, 2024
1 parent 8b414d5 commit 68bf042
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
13 changes: 9 additions & 4 deletions deployments/get/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,23 @@ func GetClusterRole() *rbacv1.ClusterRole {
Rules: []rbacv1.PolicyRule{
{
APIGroups: []string{""},
Resources: []string{"pods", "nodes", "namespaces", "configmaps"},
Verbs: []string{"get", "patch", "list", "watch", "update"},
Resources: []string{"namespaces"},
Verbs: []string{"get", "list", "watch", "update"},
},
{
APIGroups: []string{""},
Resources: []string{"pods", "nodes", "configmaps"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{"apps"},
Resources: []string{"deployments", "replicasets", "daemonsets", "statefulsets"},
Verbs: []string{"get", "patch", "list", "watch", "update"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{"batch"},
Resources: []string{"jobs", "cronjobs"},
Verbs: []string{"get", "patch", "list", "watch", "update"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{"security.kubearmor.com"},
Expand Down
16 changes: 9 additions & 7 deletions deployments/helm/KubeArmor/templates/RBAC/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ kind: ClusterRole
metadata:
name: kubearmor-clusterrole
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- update
- apiGroups:
- ""
resources:
- pods
- nodes
- namespaces
- configmaps
verbs:
- get
- patch
- list
- watch
- update
- apiGroups:
- apps
resources:
Expand All @@ -25,21 +31,17 @@ rules:
- statefulsets
verbs:
- get
- patch
- list
- watch
- update
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- patch
- list
- watch
- update
- apiGroups:
- security.kubearmor.com
resources:
Expand Down

0 comments on commit 68bf042

Please sign in to comment.