Adapt prometheus template to use EE dedicated namespace 00/13500/1 release-v14.0-start
authorGabriel Cuba <gcuba@whitestack.com>
Sat, 3 Jun 2023 00:27:43 +0000 (19:27 -0500)
committerGabriel Cuba <gcuba@whitestack.com>
Sat, 3 Jun 2023 00:27:43 +0000 (19:27 -0500)
Change-Id: I6b436202f5d1862acd132eebfa36abfabe9379cc
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
osm_lcm/ns.py

index 999aee6..7a73326 100644 (file)
@@ -7713,10 +7713,11 @@ class NsLcm(LcmBase):
                         f"Timeout waiting KDU with name={kdu_name} and index={kdu_index} to be intantiated"
                     )
 
-        # TODO get_service
         if ee_id is not None:
-            _, _, service = ee_id.partition(".")  # remove prefix   "namespace."
-            host_name = "{}-{}".format(service, ee_config_descriptor["metric-service"])
+            _, namespace, helm_id = get_ee_id_parts(
+                ee_id
+            )  # get namespace and EE gRPC service name
+            host_name = f'{helm_id}-{ee_config_descriptor["metric-service"]}.{namespace}.svc'  # svc_name.namespace.svc
             host_port = "80"
             vnfr_id = vnfr_id.replace("-", "")
             variables = {