e2e: set privileged as pod security enforcement level

setting privileged as pod security enforcement level
to run test on kubernetes 1.25

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 607c654263)
This commit is contained in:
Madhu Rajanna 2022-09-02 10:33:48 +05:30 committed by mergify[bot]
parent 739e8575f4
commit 8e55583c27
5 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/pod-security-admission/api"
)
var (
@ -146,6 +147,7 @@ func validateSubvolumePath(f *framework.Framework, pvcName, pvcNamespace, fileSy
var _ = Describe(cephfsType, func() {
f := framework.NewDefaultFramework(cephfsType)
f.NamespacePodSecurityEnforceLevel = api.LevelPrivileged
var c clientset.Interface
// deploy CephFS CSI
BeforeEach(func() {

View File

@ -32,6 +32,7 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/pod-security-admission/api"
)
var (
@ -236,6 +237,7 @@ func unmountNFSVolume(f *framework.Framework, appName, pvcName string) error {
var _ = Describe("nfs", func() {
f := framework.NewDefaultFramework("nfs")
f.NamespacePodSecurityEnforceLevel = api.LevelPrivileged
var c clientset.Interface
// deploy CephFS CSI
BeforeEach(func() {

View File

@ -33,6 +33,7 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/pod-security-admission/api"
)
var (
@ -234,6 +235,7 @@ func checkClusternameInMetadata(f *framework.Framework, ns, pool, image string)
var _ = Describe("RBD", func() {
f := framework.NewDefaultFramework(rbdType)
f.NamespacePodSecurityEnforceLevel = api.LevelPrivileged
var c clientset.Interface
var kernelRelease string
// deploy RBD CSI

View File

@ -30,10 +30,12 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/pod-security-admission/api"
)
var _ = Describe("CephFS Upgrade Testing", func() {
f := framework.NewDefaultFramework("upgrade-test-cephfs")
f.NamespacePodSecurityEnforceLevel = api.LevelPrivileged
var (
c clientset.Interface
pvc *v1.PersistentVolumeClaim

View File

@ -30,10 +30,12 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/pod-security-admission/api"
)
var _ = Describe("RBD Upgrade Testing", func() {
f := framework.NewDefaultFramework("upgrade-test-rbd")
f.NamespacePodSecurityEnforceLevel = api.LevelPrivileged
var (
// cwd stores the initial working directory.
cwd string