aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin')
-rw-r--r--src/k8splugin/internal/app/client.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/k8splugin/internal/app/client.go b/src/k8splugin/internal/app/client.go
index 78477a82..d3e5081a 100644
--- a/src/k8splugin/internal/app/client.go
+++ b/src/k8splugin/internal/app/client.go
@@ -15,6 +15,7 @@ package app
import (
"os"
+ "strings"
"time"
"github.com/onap/multicloud-k8s/src/k8splugin/internal/connection"
@@ -116,7 +117,9 @@ func (k *KubernetesClient) ensureNamespace(namespace string) error {
},
}, namespace, k)
- if err != nil {
+ // Check for errors getting the namespace while ignoring errors where the namespace does not exist
+ // Error message when namespace does not exist: "namespaces "namespace-name" not found"
+ if err != nil && strings.Contains(err.Error(), "not found") == false {
log.Error("Error checking for namespace", log.Fields{
"error": err,
"namespace": namespace,