Fix podLabels when kdur can't be found during helm operations 87/14487/1
authorGabriel Cuba <gcuba@whitestack.com>
Thu, 11 Jul 2024 14:55:43 +0000 (09:55 -0500)
committerGabriel Cuba <gcuba@whitestack.com>
Thu, 11 Jul 2024 14:55:43 +0000 (09:55 -0500)
Change-Id: I2f8515538c6535cf33bf4825271853139d67c159
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
n2vc/k8s_helm_base_conn.py

index 8c364be..fb5aa09 100644 (file)
@@ -1976,8 +1976,12 @@ class K8sHelmBaseConnector(K8sConnector):
         for index, kdu in enumerate(db_nsr["_admin"]["deployed"]["K8s"]):
             if kdu["kdu-instance"] == kdu_instance:
                 db_kdur = kdu
-                kdu_name = kdu["kdu-name"]
                 break
+        else:
+            # No kdur found, could be the case of an EE chart
+            return {}
+
+        kdu_name = db_kdur["kdu-name"]
         member_vnf_index = db_kdur["member-vnf-index"]
         # get the vnf registry
         try: