Fix podLabels when kdur can't be found during helm operations
Change-Id: I2f8515538c6535cf33bf4825271853139d67c159
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
diff --git a/n2vc/k8s_helm_base_conn.py b/n2vc/k8s_helm_base_conn.py
index 8c364be..fb5aa09 100644
--- a/n2vc/k8s_helm_base_conn.py
+++ b/n2vc/k8s_helm_base_conn.py
@@ -1976,8 +1976,12 @@
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: