aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/k8splugin/csar/parser.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/k8splugin/csar/parser.go b/src/k8splugin/csar/parser.go
index 6cb07fc2..c0dd6a79 100644
--- a/src/k8splugin/csar/parser.go
+++ b/src/k8splugin/csar/parser.go
@@ -23,7 +23,7 @@ import (
"k8s.io/client-go/kubernetes"
pkgerrors "github.com/pkg/errors"
- "gopkg.in/yaml.v2"
+ yaml "gopkg.in/yaml.v2"
"k8splugin/krd"
)
@@ -46,7 +46,7 @@ func ensuresNamespace(namespace string, kubeclient kubernetes.Interface) error {
}
ns, err := symGetNamespaceFunc.(func(string, string, kubernetes.Interface) (string, error))(
- namespace, "", kubeclient)
+ namespace, namespace, kubeclient)
if err != nil {
return pkgerrors.Wrap(err, "An error ocurred during the get namespace execution")
}
@@ -57,9 +57,12 @@ func ensuresNamespace(namespace string, kubeclient kubernetes.Interface) error {
if err != nil {
return pkgerrors.Wrap(err, "Error fetching create namespace plugin")
}
+ namespaceResource := &krd.ResourceData{
+ Namespace: namespace,
+ }
- err = symGetNamespaceFunc.(func(string, kubernetes.Interface) error)(
- namespace, kubeclient)
+ _, err = symGetNamespaceFunc.(func(*krd.ResourceData, kubernetes.Interface) (string, error))(
+ namespaceResource, kubeclient)
if err != nil {
return pkgerrors.Wrap(err, "Error creating "+namespace+" namespace")
}