File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1515 kind : ServiceAccount
1616 name : sa-sample-existing
1717 - name : kubevirt-rb-cluster1
18- namespace : kubevirt
18+ namespace : kube-system
1919 roleRef :
2020 apiGroup : rbac.authorization.k8s.io
2121 kind : Role
Original file line number Diff line number Diff line change 5151 echo " clusterpermission-sample clusterrolebinding not found"
5252 exit 1
5353fi
54+
55+ echo " TEST ClusterPermission with existing roles"
56+ kubectl config use-context kind-hub
57+ kubectl apply -f config/samples/clusterpermission_existing_roles.yaml -n cluster1
58+ sleep 10
59+ work_kubectl_command=$( kubectl -n cluster1 get clusterpermission clusterpermission-existing-role-sample -o yaml | grep kubectl | grep ManifestWork)
60+ if $work_kubectl_command ; then
61+ echo " ManifestWork found"
62+ else
63+ echo " ManifestWork not found"
64+ exit 1
65+ fi
66+
67+ if kubectl -n default get rolebinding default-rb-cluster1; then
68+ echo " default-rb-cluster1 rolebinding found"
69+ else
70+ echo " default-rb-cluster1 rolebinding not found"
71+ exit 1
72+ fi
You can’t perform that action at this time.
0 commit comments