Skip to content

Commit 1fa31a5

Browse files
authored
Merge pull request #1854 from marquiz/devel/e2e-podsecurity
test/e2e: drop the pod security admission hack
2 parents 8c3cb31 + 94bda00 commit 1fa31a5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/e2e/node_feature_discovery_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ func cleanupCRs(ctx context.Context, cli *nfdclient.Clientset, namespace string)
200200
// Actual test suite
201201
var _ = NFDDescribe(Label("nfd-master"), func() {
202202
f := framework.NewDefaultFramework("node-feature-discovery")
203+
// nfd-worker needs host mounts
204+
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
203205

204206
Context("when deploying a single nfd-master pod", Ordered, func() {
205207
var (
@@ -234,14 +236,6 @@ var _ = NFDDescribe(Label("nfd-master"), func() {
234236
})
235237

236238
JustBeforeEach(func(ctx context.Context) {
237-
// Drop the pod security admission label as nfd-worker needs host mounts
238-
if _, ok := f.Namespace.Labels[admissionapi.EnforceLevelLabel]; ok {
239-
framework.Logf("Deleting %s label from the test namespace", admissionapi.EnforceLevelLabel)
240-
delete(f.Namespace.Labels, admissionapi.EnforceLevelLabel)
241-
_, err := f.ClientSet.CoreV1().Namespaces().Update(ctx, f.Namespace, metav1.UpdateOptions{})
242-
Expect(err).NotTo(HaveOccurred())
243-
}
244-
245239
err := testutils.ConfigureRBAC(ctx, f.ClientSet, f.Namespace.Name)
246240
Expect(err).NotTo(HaveOccurred())
247241

0 commit comments

Comments
 (0)