|
7 | 7 |
|
8 | 8 | g "github.com/onsi/ginkgo/v2" |
9 | 9 | o "github.com/onsi/gomega" |
10 | | - apierrors "k8s.io/apimachinery/pkg/api/errors" |
11 | | - |
12 | 10 | corev1 "k8s.io/api/core/v1" |
13 | 11 | rbacv1 "k8s.io/api/rbac/v1" |
14 | 12 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
@@ -126,8 +124,7 @@ var ( |
126 | 124 | rbacv1helpers.NewRule("list", "watch").Groups(projectGroup, legacyProjectGroup).Resources("projects").RuleOrDie(), |
127 | 125 |
|
128 | 126 | rbacv1helpers.NewRule("use").Groups(security.GroupName).Resources("securitycontextconstraints").Names("restricted-v2").RuleOrDie(), |
129 | | - // TODO: Uncomment this once https://github.com/openshift/cluster-kube-apiserver-operator/pull/1944 is merged. |
130 | | - // rbacv1helpers.NewRule("use").Groups(security.GroupName).Resources("securitycontextconstraints").Names("restricted-v3").RuleOrDie(), |
| 127 | + rbacv1helpers.NewRule("use").Groups(security.GroupName).Resources("securitycontextconstraints").Names("restricted-v3").RuleOrDie(), |
131 | 128 |
|
132 | 129 | // TODO: remove when openshift-apiserver has removed these |
133 | 130 | rbacv1helpers.NewRule("get").URLs( |
@@ -246,18 +243,6 @@ var _ = g.Describe("[sig-auth][Feature:OpenShiftAuthorization] The default clust |
246 | 243 | exutil.FatalErr("failed to sync RBAC cache") |
247 | 244 | } |
248 | 245 |
|
249 | | - // Temporary fix for https://github.com/openshift/cluster-kube-apiserver-operator/pull/1944 |
250 | | - // Add a rule for restricted-v3 to the list in case the associated ClusterRoleBinding exists. |
251 | | - // TODO: Remove the following block once merged. |
252 | | - if _, err := kubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Get("system:openshift:scc:restricted-v3"); err != nil { |
253 | | - if !apierrors.IsNotFound(err) { |
254 | | - o.Expect(err).NotTo(o.HaveOccurred()) |
255 | | - } |
256 | | - } else { |
257 | | - allAuthenticatedRules = append(allAuthenticatedRules, |
258 | | - rbacv1helpers.NewRule("use").Groups(security.GroupName).Resources("securitycontextconstraints").Names("restricted-v3").RuleOrDie()) |
259 | | - } |
260 | | - |
261 | 246 | namespaces, err := oc.AdminKubeClient().CoreV1().Namespaces().List(ctx, metav1.ListOptions{}) |
262 | 247 | if err != nil { |
263 | 248 | exutil.FatalErr(err) |
|
0 commit comments