mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: update e2e deployment for ceph conf
updated e2e deployment code to create and delete the ceph conf configmap. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
cfc070b169
commit
5a53a9ad76
@ -28,7 +28,7 @@ var (
|
|||||||
cephfsDeamonSetName = "csi-cephfsplugin"
|
cephfsDeamonSetName = "csi-cephfsplugin"
|
||||||
cephfsContainerName = "csi-cephfsplugin"
|
cephfsContainerName = "csi-cephfsplugin"
|
||||||
cephfsDirPath = "../deploy/cephfs/kubernetes/"
|
cephfsDirPath = "../deploy/cephfs/kubernetes/"
|
||||||
cephfsExamplePath = "../examples/cephfs/"
|
cephfsExamplePath = examplePath + "cephfs/"
|
||||||
subvolumegroup = "e2e"
|
subvolumegroup = "e2e"
|
||||||
fileSystemName = "myfs"
|
fileSystemName = "myfs"
|
||||||
)
|
)
|
||||||
@ -76,6 +76,19 @@ func createORDeleteCephfsResources(action kubectlAction) {
|
|||||||
e2elog.Failf("failed to %s CSIDriver object with error %v", action, err)
|
e2elog.Failf("failed to %s CSIDriver object with error %v", action, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cephConf, err := ioutil.ReadFile(examplePath + cephConfconfigMap)
|
||||||
|
if err != nil {
|
||||||
|
// createORDeleteCephfsResources is used for upgrade testing as cephConfConfigmap is
|
||||||
|
// newly added, discarding file not found error.
|
||||||
|
if !os.IsNotExist(err) {
|
||||||
|
e2elog.Failf("failed to read content from %s with error %v", examplePath+cephConfconfigMap, err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
err = retryKubectlInput(cephCSINamespace, action, string(cephConf), deployTimeout)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("failed to %s ceph-conf configmap object with error %v", action, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
data, err := replaceNamespaceInTemplate(cephfsDirPath + cephfsProvisioner)
|
data, err := replaceNamespaceInTemplate(cephfsDirPath + cephfsProvisioner)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to read content from %s with error %v", cephfsDirPath+cephfsProvisioner, err)
|
e2elog.Failf("failed to read content from %s with error %v", cephfsDirPath+cephfsProvisioner, err)
|
||||||
|
17
e2e/rbd.go
17
e2e/rbd.go
@ -28,9 +28,11 @@ var (
|
|||||||
rbdNodePluginRBAC = "csi-nodeplugin-rbac.yaml"
|
rbdNodePluginRBAC = "csi-nodeplugin-rbac.yaml"
|
||||||
rbdNodePluginPSP = "csi-nodeplugin-psp.yaml"
|
rbdNodePluginPSP = "csi-nodeplugin-psp.yaml"
|
||||||
configMap = "csi-config-map.yaml"
|
configMap = "csi-config-map.yaml"
|
||||||
|
cephConfconfigMap = "ceph-conf.yaml"
|
||||||
csiDriverObject = "csidriver.yaml"
|
csiDriverObject = "csidriver.yaml"
|
||||||
rbdDirPath = "../deploy/rbd/kubernetes/"
|
rbdDirPath = "../deploy/rbd/kubernetes/"
|
||||||
rbdExamplePath = "../examples/rbd/"
|
examplePath = "../examples/"
|
||||||
|
rbdExamplePath = examplePath + "/rbd/"
|
||||||
rbdDeploymentName = "csi-rbdplugin-provisioner"
|
rbdDeploymentName = "csi-rbdplugin-provisioner"
|
||||||
rbdDaemonsetName = "csi-rbdplugin"
|
rbdDaemonsetName = "csi-rbdplugin"
|
||||||
defaultRBDPool = "replicapool"
|
defaultRBDPool = "replicapool"
|
||||||
@ -102,6 +104,19 @@ func createORDeleteRbdResources(action kubectlAction) {
|
|||||||
e2elog.Failf("failed to %s CSIDriver object with error %v", action, err)
|
e2elog.Failf("failed to %s CSIDriver object with error %v", action, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cephConf, err := ioutil.ReadFile(examplePath + cephConfconfigMap)
|
||||||
|
if err != nil {
|
||||||
|
// createORDeleteRbdResources is used for upgrade testing as cephConf Configmap is
|
||||||
|
// newly added, discarding file not found error.
|
||||||
|
if !os.IsNotExist(err) {
|
||||||
|
e2elog.Failf("failed to read content from %s with error %v", examplePath+cephConfconfigMap, err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
err = retryKubectlInput(cephCSINamespace, action, string(cephConf), deployTimeout)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("failed to %s ceph-conf configmap object with error %v", action, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
data, err := replaceNamespaceInTemplate(rbdDirPath + rbdProvisioner)
|
data, err := replaceNamespaceInTemplate(rbdDirPath + rbdProvisioner)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to read content from %s with error %v", rbdDirPath+rbdProvisioner, err)
|
e2elog.Failf("failed to read content from %s with error %v", rbdDirPath+rbdProvisioner, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user