e2e: retry running kubectl on known errors

By using retryKubectl helper function,
a retry will be done, and the known error
messages will be skipped.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2021-07-28 09:21:18 +05:30
committed by mergify[bot]
parent 2071c535fa
commit 2c66dfc3e4
5 changed files with 32 additions and 25 deletions

View File

@ -17,12 +17,8 @@ import (
func deleteConfigMap(pluginPath string) error {
path := pluginPath + configMap
_, err := framework.RunKubectl(cephCSINamespace, "delete", "-f", path, ns)
if err != nil {
return err
}
return nil
return retryKubectlFile(cephCSINamespace, kubectlDelete, path, deployTimeout)
}
func createConfigMap(pluginPath string, c kubernetes.Interface, f *framework.Framework) error {