From: Gabriel Cuba Date: Tue, 22 Mar 2022 16:12:12 +0000 (-0500) Subject: Feature 10904: Make all deployment methods optional for K8s cluster X-Git-Tag: v12.0.0rc1~13 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=1b2b840cfdc739e2c7dcd49dafd38577124c58b2;p=osm%2FLCM.git Feature 10904: Make all deployment methods optional for K8s cluster Change-Id: I0901d946096bb07d38efbba8b5bbd3c24f36cd2d Signed-off-by: Gabriel Cuba --- diff --git a/osm_lcm/vim_sdn.py b/osm_lcm/vim_sdn.py index f0b8f9c..c81969a 100644 --- a/osm_lcm/vim_sdn.py +++ b/osm_lcm/vim_sdn.py @@ -1155,7 +1155,14 @@ class K8sClusterLcm(LcmBase): task2name = {} init_target = deep_get(db_k8scluster, ("_admin", "init")) step = "Launching k8scluster init tasks" - for task_name in ("helm-chart", "juju-bundle", "helm-chart-v3"): + + k8s_deploy_methods = db_k8scluster.get("deployment_methods", {}) + # for backwards compatibility and all-false case + if not any(k8s_deploy_methods.values()): + k8s_deploy_methods = {"helm-chart": True, "juju-bundle": True, "helm-chart-v3": True} + deploy_methods = tuple(filter(k8s_deploy_methods.get, k8s_deploy_methods)) + + for task_name in deploy_methods: if init_target and task_name not in init_target: continue task = asyncio.ensure_future(