X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fappmgr%2Fhelm.go;h=578dcf0ea8c48ccc4418e130507ceeacb8ce6a13;hb=059775ccd9e7c5482747729890800f7a7d507a94;hp=388fb5c1e7c45cf1291eea1c8645bb76531a8c93;hpb=2d70448ee0d4ea44be1bf81fab9056abb01c28f0;p=ric-plt%2Fappmgr.git diff --git a/cmd/appmgr/helm.go b/cmd/appmgr/helm.go index 388fb5c..578dcf0 100755 --- a/cmd/appmgr/helm.go +++ b/cmd/appmgr/helm.go @@ -149,7 +149,9 @@ func (h *Helm) Install(m XappDeploy) (xapp Xapp, err error) { } var cm interface{} - if err = h.cm.ReadConfigMap(m.Name, m.Namespace, &cm); err != nil { + m.Namespace = getNamespace(m.Namespace) + + if err = h.cm.GetConfigMap(m, &cm); err != nil { out, err = h.Run(getInstallArgs(m, false)) if err != nil { return @@ -357,23 +359,22 @@ func getNamespace(namespace string) string { } func getInstallArgs(x XappDeploy, cmOverride bool) (args string) { - x.Namespace = getNamespace(x.Namespace) args = args + " --namespace=" + x.Namespace if x.ImageRepo != "" { - args = args + " --set image.repository=" + x.ImageRepo + args = args + " --set global.repository=" + x.ImageRepo } if x.ServiceName != "" { - args = args + " --set service.name=" + x.ServiceName + args = args + " --set ricapp.service.name=" + x.ServiceName } if x.Hostname != "" { - args = args + " --set hostname=" + x.Hostname + args = args + " --set ricapp.hostname=" + x.Hostname } if cmOverride == true { - args = args + " --set appconfig.override=true" + args = args + " --set ricapp.appconfig.override=" + x.Name + "-appconfig" } rname := viper.GetString("helm.repo-name")