1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-04-16 01:06:58 +00:00

Merge pull request #1854 from marquiz/devel/e2e-podsecurity

test/e2e: drop the pod security admission hack
This commit is contained in:
Kubernetes Prow Robot 2024-08-26 14:56:40 +01:00 committed by GitHub
commit 1fa31a5d32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,6 +200,8 @@ func cleanupCRs(ctx context.Context, cli *nfdclient.Clientset, namespace string)
// Actual test suite
var _ = NFDDescribe(Label("nfd-master"), func() {
f := framework.NewDefaultFramework("node-feature-discovery")
// nfd-worker needs host mounts
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
Context("when deploying a single nfd-master pod", Ordered, func() {
var (
@ -234,14 +236,6 @@ var _ = NFDDescribe(Label("nfd-master"), func() {
})
JustBeforeEach(func(ctx context.Context) {
// Drop the pod security admission label as nfd-worker needs host mounts
if _, ok := f.Namespace.Labels[admissionapi.EnforceLevelLabel]; ok {
framework.Logf("Deleting %s label from the test namespace", admissionapi.EnforceLevelLabel)
delete(f.Namespace.Labels, admissionapi.EnforceLevelLabel)
_, err := f.ClientSet.CoreV1().Namespaces().Update(ctx, f.Namespace, metav1.UpdateOptions{})
Expect(err).NotTo(HaveOccurred())
}
err := testutils.ConfigureRBAC(ctx, f.ClientSet, f.Namespace.Name)
Expect(err).NotTo(HaveOccurred())