Skip to content

Commit

Permalink
Merge pull request kubearmor#1835 from Aryan-sharma11/crio-fix
Browse files Browse the repository at this point in the history
fix: crio tests in CI
  • Loading branch information
DelusionalOptimist authored Aug 13, 2024
2 parents 0501772 + 68bf042 commit 7e7b1c3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions contribution/self-managed-k8s/crio/install_crio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ echo "deb [signed-by=/etc/apt/keyrings/cri-o-apt-keyring.gpg] https://pkgs.k8s.i
# install
sudo apt-get update
sudo apt-get install -y cri-o
sudo dpkg -i --force-overwrite /var/cache/apt/archives/cri-o_*.deb

# this option is not supported in ubuntu 18.04
if [ "$VERSION_ID" == "18.04" ]; then
Expand Down
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 7e7b1c3

Please sign in to comment.