mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
Added PodSecurityPolicy support
This commit is contained in:
committed by
mergify[bot]
parent
7ec8e68b67
commit
aadce54b2f
@ -13,8 +13,10 @@ import (
|
||||
var (
|
||||
cephfsProvisioner = "csi-cephfsplugin-provisioner.yaml"
|
||||
cephfsProvisionerRBAC = "csi-provisioner-rbac.yaml"
|
||||
cephfsProvisionerPSP = "csi-provisioner-psp.yaml"
|
||||
cephfsNodePlugin = "csi-cephfsplugin.yaml"
|
||||
cephfsNodePluginRBAC = "csi-nodeplugin-rbac.yaml"
|
||||
cephfsNodePluginPSP = "csi-nodeplugin-psp.yaml"
|
||||
cephfsDeploymentName = "csi-cephfsplugin-provisioner"
|
||||
cephfsDeamonSetName = "csi-cephfsplugin"
|
||||
cephfsDirPath = "../deploy/cephfs/kubernetes/"
|
||||
@ -28,9 +30,11 @@ func deployCephfsPlugin() {
|
||||
// deploy provisioner
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsProvisioner)
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsProvisionerRBAC)
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsProvisionerPSP)
|
||||
// deploy nodeplugin
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsNodePlugin)
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsNodePluginRBAC)
|
||||
framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsNodePluginPSP)
|
||||
}
|
||||
|
||||
func deleteCephfsPlugin() {
|
||||
@ -42,6 +46,10 @@ func deleteCephfsPlugin() {
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs provisioner rbac %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", cephfsDirPath+cephfsProvisionerPSP)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs provisioner psp %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", cephfsDirPath+cephfsNodePlugin)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs nodeplugin %v", err)
|
||||
@ -50,6 +58,10 @@ func deleteCephfsPlugin() {
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs nodeplugin rbac %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", cephfsDirPath+cephfsNodePluginPSP)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs nodeplugin psp %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
var _ = Describe("cephfs", func() {
|
||||
|
12
e2e/rbd.go
12
e2e/rbd.go
@ -13,8 +13,10 @@ import (
|
||||
var (
|
||||
rbdProvisioner = "csi-rbdplugin-provisioner.yaml"
|
||||
rbdProvisionerRBAC = "csi-provisioner-rbac.yaml"
|
||||
rbdProvisionerPSP = "csi-provisioner-psp.yaml"
|
||||
rbdNodePlugin = "csi-rbdplugin.yaml"
|
||||
rbdNodePluginRBAC = "csi-nodeplugin-rbac.yaml"
|
||||
rbdNodePluginPSP = "csi-nodeplugin-psp.yaml"
|
||||
configMap = "csi-config-map.yaml"
|
||||
rbdDirPath = "../deploy/rbd/kubernetes/"
|
||||
rbdExamplePath = "../examples/rbd/"
|
||||
@ -30,9 +32,11 @@ func deployRBDPlugin() {
|
||||
// deploy provisioner
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdProvisioner)
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdProvisionerRBAC)
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdProvisionerPSP)
|
||||
// deploy nodeplugin
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdNodePlugin)
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdNodePluginRBAC)
|
||||
framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdNodePluginPSP)
|
||||
}
|
||||
|
||||
func deleteRBDPlugin() {
|
||||
@ -44,6 +48,10 @@ func deleteRBDPlugin() {
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete provisioner rbac %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", rbdDirPath+rbdProvisionerPSP)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete provisioner psp %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", rbdDirPath+rbdNodePlugin)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete nodeplugin %v", err)
|
||||
@ -52,6 +60,10 @@ func deleteRBDPlugin() {
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete nodeplugin rbac %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-f", rbdDirPath+rbdNodePluginPSP)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete nodeplugin psp %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
var _ = Describe("RBD", func() {
|
||||
|
Reference in New Issue
Block a user