From 5c96ab1d0ed06833fd2b305288b2fa48f5b74064 Mon Sep 17 00:00:00 2001 From: Woohyung Han Date: Wed, 11 Dec 2019 17:48:36 +0900 Subject: [PATCH] Fix to use `kubectl create` not `kubectl apply` in the e2e Signed-off-by: Woohyung Han --- e2e/cephfs.go | 7 +++++-- e2e/rbd.go | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/e2e/cephfs.go b/e2e/cephfs.go index efc6c667b..5bd1c0929 100644 --- a/e2e/cephfs.go +++ b/e2e/cephfs.go @@ -28,12 +28,15 @@ func updateCephfsDirPath(c clientset.Interface) { } func deployCephfsPlugin() { + // delete objects deployed by rook + framework.RunKubectlOrDie("delete", "--ignore-not-found=true", "-f", cephfsDirPath+cephfsProvisionerRBAC) + framework.RunKubectlOrDie("delete", "--ignore-not-found=true", "-f", cephfsDirPath+cephfsNodePluginRBAC) // deploy provisioner framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsProvisioner) - framework.RunKubectlOrDie("apply", "-f", cephfsDirPath+cephfsProvisionerRBAC) + framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsProvisionerRBAC) // deploy nodeplugin framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsNodePlugin) - framework.RunKubectlOrDie("apply", "-f", cephfsDirPath+cephfsNodePluginRBAC) + framework.RunKubectlOrDie("create", "-f", cephfsDirPath+cephfsNodePluginRBAC) } func deleteCephfsPlugin() { diff --git a/e2e/rbd.go b/e2e/rbd.go index 10db46e15..000911fb4 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -30,12 +30,15 @@ func updaterbdDirPath(c clientset.Interface) { } func deployRBDPlugin() { + // delete objects deployed by rook + framework.RunKubectlOrDie("delete", "--ignore-not-found=true", "-f", rbdDirPath+rbdProvisionerRBAC) + framework.RunKubectlOrDie("delete", "--ignore-not-found=true", "-f", rbdDirPath+rbdNodePluginRBAC) // deploy provisioner framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdProvisioner) - framework.RunKubectlOrDie("apply", "-f", rbdDirPath+rbdProvisionerRBAC) + framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdProvisionerRBAC) // deploy nodeplugin framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdNodePlugin) - framework.RunKubectlOrDie("apply", "-f", rbdDirPath+rbdNodePluginRBAC) + framework.RunKubectlOrDie("create", "-f", rbdDirPath+rbdNodePluginRBAC) } func deleteRBDPlugin() {