Fix namespace creation 08/82508/4
authorRitu Sood <ritu.sood@intel.com>
Fri, 15 Mar 2019 21:42:52 +0000 (14:42 -0700)
committerRitu Sood <ritu.sood@intel.com>
Mon, 25 Mar 2019 23:34:39 +0000 (16:34 -0700)
Namespace is being created by k8splugin
if it doesn't exist. This is done  before
other resources are created in kubernetes.
This patch removes check that failed if
namespace didn't exist

Change-Id: I8c5b2409ad1cf77d5f529f601870fcf87e8e8760
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Issue-ID: MULTICLOUD-462

kud/tests/plugin.sh
src/k8splugin/internal/app/vnfhelper.go

index 6cf93ce..d632f84 100755 (executable)
@@ -18,7 +18,7 @@ source _functions.sh
 
 base_url="http://localhost:8081"
 cloud_region_id="kud"
-namespace="default"
+namespace="testNS"
 csar_id="94e414f6-9ca4-11e8-bb6a-52540067263b"
 rbd_csar_id="7eb09e38-4363-9942-1234-3beb2e95fd85"
 definition_id="9d117af8-30b8-11e9-af94-525400277b3d"
index f7c4596..5984bbd 100644 (file)
@@ -47,11 +47,8 @@ func ensuresNamespace(namespace string, kubeclient kubernetes.Interface) error {
                return pkgerrors.Wrap(err, "Error fetching get namespace function")
        }
 
-       ns, err := symGetNamespaceFunc.(func(string, string, kubernetes.Interface) (string, error))(
+       ns,  := symGetNamespaceFunc.(func(string, string, kubernetes.Interface) (string, error))(
                namespace, namespace, kubeclient)
-       if err != nil {
-               return pkgerrors.Wrap(err, "An error ocurred during the get namespace execution")
-       }
 
        if ns == "" {
                log.Println("Creating " + namespace + " namespace")