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 <anuragsinghrajawat22@gmail.com>
  • Loading branch information
anurag-rajawat committed Aug 23, 2024
1 parent bed86b5 commit f7293f7
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 f7293f7

Please sign in to comment.