aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-07-17 23:34:28 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-17 23:34:28 +0000
commit1e6e473f20fd4a5b87115120344fa4e7363b8a76 (patch)
tree63e7f2a3107d806efc49e993b48339238fdbb09e /src/orchestrator
parent38d8eead7c9a62cc25feaccb3cf1f241c3b96967 (diff)
parent97c6ca4bfdfa4f5e367649ebf6a4e2c583e2cb78 (diff)
Merge "Move status tracking CR to rsync"
Diffstat (limited to 'src/orchestrator')
-rw-r--r--src/orchestrator/pkg/module/instantiation.go6
-rw-r--r--src/orchestrator/pkg/module/instantiation_appcontext_helper.go43
2 files changed, 0 insertions, 49 deletions
diff --git a/src/orchestrator/pkg/module/instantiation.go b/src/orchestrator/pkg/module/instantiation.go
index 1f2e1117..f4e75861 100644
--- a/src/orchestrator/pkg/module/instantiation.go
+++ b/src/orchestrator/pkg/module/instantiation.go
@@ -246,12 +246,6 @@ func (c InstantiationClient) Instantiate(p string, ca string, v string, di strin
return pkgerrors.Wrapf(err, "Unable to get the resources for app :: %s", eachApp.Metadata.Name)
}
- statusResource, err := getStatusResource(ctxval.(string), eachApp.Metadata.Name)
- if err != nil {
- return pkgerrors.Wrapf(err, "Unable to generate the status resource for app :: %s", eachApp.Metadata.Name)
- }
- resources = append(resources, statusResource)
-
specData, err := NewAppIntentClient().GetAllIntentsByApp(eachApp.Metadata.Name, p, ca, v, gIntent)
if err != nil {
return pkgerrors.Wrap(err, "Unable to get the intents for app")
diff --git a/src/orchestrator/pkg/module/instantiation_appcontext_helper.go b/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
index a8c6eda7..9ace81b6 100644
--- a/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
+++ b/src/orchestrator/pkg/module/instantiation_appcontext_helper.go
@@ -25,16 +25,12 @@ import (
"encoding/json"
"io/ioutil"
- jyaml "github.com/ghodss/yaml"
-
- rb "github.com/onap/multicloud-k8s/src/monitor/pkg/apis/k8splugin/v1alpha1"
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/appcontext"
gpic "github.com/onap/multicloud-k8s/src/orchestrator/pkg/gpic"
log "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/logutils"
"github.com/onap/multicloud-k8s/src/orchestrator/utils"
"github.com/onap/multicloud-k8s/src/orchestrator/utils/helm"
pkgerrors "github.com/pkg/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// resource consists of name of reource
@@ -99,45 +95,6 @@ func getResources(st []helm.KubernetesResourceTemplate) ([]resource, error) {
return resources, nil
}
-// addStatusResource adds a status monitoring resource to the app
-// which consists of name(name+kind) and content
-func getStatusResource(id, app string) (resource, error) {
-
- var statusCr rb.ResourceBundleState
-
- label := id + "-" + app
- name := app + "-" + id
-
- statusCr.TypeMeta.APIVersion = "k8splugin.io/v1alpha1"
- statusCr.TypeMeta.Kind = "ResourceBundleState"
- statusCr.SetName(name)
-
- labels := make(map[string]string)
- labels["emco/deployment-id"] = label
- statusCr.SetLabels(labels)
-
- labelSelector, err := metav1.ParseToLabelSelector("emco/deployment-id = " + label)
- if err != nil {
- log.Info(":: ERROR Parsing Label Selector ::", log.Fields{"Error": err})
- } else {
- statusCr.Spec.Selector = labelSelector
- }
-
- // Marshaling to json then convert to yaml works better than marshaling to yaml
- // The 'apiVersion' attribute was marshaling to 'apiversion'
- // y, _ := yaml.Marshal(&statusCr)
- j, _ := json.Marshal(&statusCr)
- y, _ := jyaml.JSONToYAML(j)
- log.Info(":: RESULTING STATUS CR ::", log.Fields{"StatusCR": y})
-
- statusResource := resource{
- name: name + "+" + "ResourceBundleState",
- filecontent: string(y),
- }
-
- return statusResource, nil
-}
-
func addResourcesToCluster(ct appcontext.AppContext, ch interface{}, resources []resource) error {
var resOrderInstr struct {