mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
cleanup: Move common files to deploy folder
Few common files related to deployments were kept in the examples folder initially. Moving them to deploy folder and updating the relevant files. Signed-off-by: karthik-us <ksubrahm@redhat.com>
This commit is contained in:
@ -67,6 +67,7 @@ func deleteCephfsPlugin() {
|
||||
}
|
||||
|
||||
func createORDeleteCephfsResources(action kubectlAction) {
|
||||
cephConfigFile := getConfigFile(deployPath + cephConfconfigMap)
|
||||
resources := []ResourceDeployer{
|
||||
// shared resources
|
||||
&yamlResource{
|
||||
@ -74,7 +75,7 @@ func createORDeleteCephfsResources(action kubectlAction) {
|
||||
allowMissing: true,
|
||||
},
|
||||
&yamlResource{
|
||||
filename: examplePath + cephConfconfigMap,
|
||||
filename: cephConfigFile,
|
||||
allowMissing: true,
|
||||
},
|
||||
// dependencies for provisioner
|
||||
|
@ -79,6 +79,7 @@ func deleteNFSPlugin() {
|
||||
}
|
||||
|
||||
func createORDeleteNFSResources(f *framework.Framework, action kubectlAction) {
|
||||
cephConfigFile := getConfigFile(deployPath + cephConfconfigMap)
|
||||
resources := []ResourceDeployer{
|
||||
// shared resources
|
||||
&yamlResource{
|
||||
@ -86,7 +87,7 @@ func createORDeleteNFSResources(f *framework.Framework, action kubectlAction) {
|
||||
allowMissing: true,
|
||||
},
|
||||
&yamlResource{
|
||||
filename: examplePath + cephConfconfigMap,
|
||||
filename: cephConfigFile,
|
||||
allowMissing: true,
|
||||
},
|
||||
// dependencies for provisioner
|
||||
|
@ -44,7 +44,8 @@ var (
|
||||
configMap = "csi-config-map.yaml"
|
||||
cephConfconfigMap = "ceph-conf.yaml"
|
||||
csiDriverObject = "csidriver.yaml"
|
||||
rbdDirPath = "../deploy/rbd/kubernetes/"
|
||||
deployPath = "../deploy/"
|
||||
rbdDirPath = deployPath + "/rbd/kubernetes/"
|
||||
examplePath = "../examples/"
|
||||
rbdExamplePath = examplePath + "/rbd/"
|
||||
e2eTemplatesPath = "../e2e/templates/"
|
||||
@ -129,6 +130,7 @@ func deleteRBDPlugin() {
|
||||
}
|
||||
|
||||
func createORDeleteRbdResources(action kubectlAction) {
|
||||
cephConfigFile := getConfigFile(deployPath + cephConfconfigMap)
|
||||
resources := []ResourceDeployer{
|
||||
// shared resources
|
||||
&yamlResource{
|
||||
@ -136,7 +138,7 @@ func createORDeleteRbdResources(action kubectlAction) {
|
||||
allowMissing: true,
|
||||
},
|
||||
&yamlResource{
|
||||
filename: examplePath + cephConfconfigMap,
|
||||
filename: cephConfigFile,
|
||||
allowMissing: true,
|
||||
},
|
||||
// dependencies for provisioner
|
||||
|
10
e2e/utils.go
10
e2e/utils.go
@ -1732,3 +1732,13 @@ func rwopMayFail(err error) bool {
|
||||
|
||||
return !rwopSupported
|
||||
}
|
||||
|
||||
// getConfigFile returns the passed config file location if it exists, else
|
||||
// returns the old location of the config file under 'examples/' directory.
|
||||
func getConfigFile(configFile string) string {
|
||||
if _, err := os.Stat(configFile); os.IsNotExist(err) {
|
||||
configFile = examplePath + cephConfconfigMap
|
||||
}
|
||||
|
||||
return configFile
|
||||
}
|
||||
|
Reference in New Issue
Block a user