mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
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:
parent
0f6bceb662
commit
59fe8c1f2f
@ -71,7 +71,9 @@ var _ = Describe("cephfs", func() {
|
|||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
c = f.ClientSet
|
c = f.ClientSet
|
||||||
createConfigMap(cephfsDirPath, f.ClientSet, f)
|
createConfigMap(cephfsDirPath, f.ClientSet, f)
|
||||||
|
if deployCephFS {
|
||||||
deployCephfsPlugin()
|
deployCephfsPlugin()
|
||||||
|
}
|
||||||
createCephfsSecret(f.ClientSet, f)
|
createCephfsSecret(f.ClientSet, f)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -82,7 +84,9 @@ var _ = Describe("cephfs", func() {
|
|||||||
// log node plugin
|
// log node plugin
|
||||||
logsCSIPods("app=csi-cephfsplugin", c)
|
logsCSIPods("app=csi-cephfsplugin", c)
|
||||||
}
|
}
|
||||||
|
if deployCephFS {
|
||||||
deleteCephfsPlugin()
|
deleteCephfsPlugin()
|
||||||
|
}
|
||||||
deleteConfigMap(cephfsDirPath)
|
deleteConfigMap(cephfsDirPath)
|
||||||
deleteResource(cephfsExamplePath + "secret.yaml")
|
deleteResource(cephfsExamplePath + "secret.yaml")
|
||||||
deleteResource(cephfsExamplePath + "storageclass.yaml")
|
deleteResource(cephfsExamplePath + "storageclass.yaml")
|
||||||
|
@ -16,12 +16,16 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
deployTimeout int
|
deployTimeout int
|
||||||
|
deployCephFS bool
|
||||||
|
deployRBD bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.SetOutput(GinkgoWriter)
|
log.SetOutput(GinkgoWriter)
|
||||||
|
|
||||||
flag.IntVar(&deployTimeout, "deploy-timeout", 10, "timeout to wait for created kubernetes resources")
|
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()
|
setDefaultKubeconfig()
|
||||||
|
|
||||||
|
@ -74,7 +74,9 @@ var _ = Describe("RBD", func() {
|
|||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
c = f.ClientSet
|
c = f.ClientSet
|
||||||
createConfigMap(rbdDirPath, f.ClientSet, f)
|
createConfigMap(rbdDirPath, f.ClientSet, f)
|
||||||
|
if deployRBD {
|
||||||
deployRBDPlugin()
|
deployRBDPlugin()
|
||||||
|
}
|
||||||
createRBDStorageClass(f.ClientSet, f, make(map[string]string))
|
createRBDStorageClass(f.ClientSet, f, make(map[string]string))
|
||||||
createRBDSecret(f.ClientSet, f)
|
createRBDSecret(f.ClientSet, f)
|
||||||
deployVault(f.ClientSet, deployTimeout)
|
deployVault(f.ClientSet, deployTimeout)
|
||||||
@ -87,7 +89,9 @@ var _ = Describe("RBD", func() {
|
|||||||
// log node plugin
|
// log node plugin
|
||||||
logsCSIPods("app=csi-rbdplugin", c)
|
logsCSIPods("app=csi-rbdplugin", c)
|
||||||
}
|
}
|
||||||
|
if deployRBD {
|
||||||
deleteRBDPlugin()
|
deleteRBDPlugin()
|
||||||
|
}
|
||||||
deleteConfigMap(rbdDirPath)
|
deleteConfigMap(rbdDirPath)
|
||||||
deleteResource(rbdExamplePath + "secret.yaml")
|
deleteResource(rbdExamplePath + "secret.yaml")
|
||||||
deleteResource(rbdExamplePath + "storageclass.yaml")
|
deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
|
Loading…
Reference in New Issue
Block a user