Skip to content

Commit

Permalink
fix: Update relay clusterrole to watch pods
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag Rajawat <[email protected]>
  • Loading branch information
anurag-rajawat authored and Aryan-sharma11 committed Aug 30, 2024
1 parent fa32cc6 commit 8f8669b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions deployments/get/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ package deployments
import (
"strconv"

cfg "github.com/kubearmor/KubeArmor/KubeArmor/config"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

cfg "github.com/kubearmor/KubeArmor/KubeArmor/config"
)

// GetServiceAccount Function
Expand Down Expand Up @@ -220,7 +221,7 @@ func GetRelayClusterRole() *rbacv1.ClusterRole {
{
APIGroups: []string{""},
Resources: []string{"pods"},
Verbs: []string{"get", "list"},
Verbs: []string{"list", "watch"},
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion deployments/helm/KubeArmor/templates/RBAC/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ rules:
resources:
- pods
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit 8f8669b

Please sign in to comment.