Provide option to skip ceph-csi plugin deployment

To test helm charts in CI we need to skip the ceph-csi
deployment in E2E, This PR provides an option in E2E
to enable/disable cephcsi deployment.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-02-25 13:30:23 +05:30 committed by mergify[bot]
parent 0f6bceb662
commit 59fe8c1f2f
3 changed files with 16 additions and 4 deletions

View File

@ -71,7 +71,9 @@ var _ = Describe("cephfs", func() {
BeforeEach(func() {
c = f.ClientSet
createConfigMap(cephfsDirPath, f.ClientSet, f)
if deployCephFS {
deployCephfsPlugin()
}
createCephfsSecret(f.ClientSet, f)
})
@ -82,7 +84,9 @@ var _ = Describe("cephfs", func() {
// log node plugin
logsCSIPods("app=csi-cephfsplugin", c)
}
if deployCephFS {
deleteCephfsPlugin()
}
deleteConfigMap(cephfsDirPath)
deleteResource(cephfsExamplePath + "secret.yaml")
deleteResource(cephfsExamplePath + "storageclass.yaml")

View File

@ -16,12 +16,16 @@ import (
var (
deployTimeout int
deployCephFS bool
deployRBD bool
)
func init() {
log.SetOutput(GinkgoWriter)
flag.IntVar(&deployTimeout, "deploy-timeout", 10, "timeout to wait for created kubernetes resources")
flag.BoolVar(&deployCephFS, "deploy-cephfs", true, "deploy cephfs csi driver")
flag.BoolVar(&deployRBD, "deploy-rbd", true, "deploy rbd csi driver")
setDefaultKubeconfig()

View File

@ -74,7 +74,9 @@ var _ = Describe("RBD", func() {
BeforeEach(func() {
c = f.ClientSet
createConfigMap(rbdDirPath, f.ClientSet, f)
if deployRBD {
deployRBDPlugin()
}
createRBDStorageClass(f.ClientSet, f, make(map[string]string))
createRBDSecret(f.ClientSet, f)
deployVault(f.ClientSet, deployTimeout)
@ -87,7 +89,9 @@ var _ = Describe("RBD", func() {
// log node plugin
logsCSIPods("app=csi-rbdplugin", c)
}
if deployRBD {
deleteRBDPlugin()
}
deleteConfigMap(rbdDirPath)
deleteResource(rbdExamplePath + "secret.yaml")
deleteResource(rbdExamplePath + "storageclass.yaml")