summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/krd/plugins.go
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-12-19 00:15:17 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-19 00:15:17 +0000
commit881691b184661e460d3f6973d535a231e5d089de (patch)
tree5be4044e32e26a09e692dfe6685bb891f2baaf00 /src/k8splugin/krd/plugins.go
parent2da9b6c0498528a6eac478fa7b334906457f7b82 (diff)
parenta1abd829315d72adb258da20470eaa2445cf3e32 (diff)
Merge "Add Network and OVN4NFV Plugins"
Diffstat (limited to 'src/k8splugin/krd/plugins.go')
-rw-r--r--src/k8splugin/krd/plugins.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/k8splugin/krd/plugins.go b/src/k8splugin/krd/plugins.go
index 9ccb04fa..1086a2bb 100644
--- a/src/k8splugin/krd/plugins.go
+++ b/src/k8splugin/krd/plugins.go
@@ -37,7 +37,7 @@ type ResourceData struct {
}
// DecodeYAML reads a YAMl file to extract the Kubernetes object definition
-var DecodeYAML = func(path string) (runtime.Object, error) {
+var DecodeYAML = func(path string, into runtime.Object) (runtime.Object, error) {
if _, err := os.Stat(path); err != nil {
if os.IsNotExist(err) {
return nil, pkgerrors.New("File " + path + " not found")
@@ -54,7 +54,7 @@ var DecodeYAML = func(path string) (runtime.Object, error) {
log.Println("Decoding deployment YAML")
decode := scheme.Codecs.UniversalDeserializer().Decode
- obj, _, err := decode(rawBytes, nil, nil)
+ obj, _, err := decode(rawBytes, nil, into)
if err != nil {
return nil, pkgerrors.Wrap(err, "Deserialize YAML error")
}