From dd8b0a65ba96b8c5b79524177cf2f709c68ca4ee Mon Sep 17 00:00:00 2001 From: limon Date: Fri, 28 Oct 2022 10:39:16 +0200 Subject: [PATCH] Fix Bug 2187: Optional atomic flag in helm upgrades Change-Id: I0552ebac311eff509ab601f0e8cdcd49b172c367 Signed-off-by: limon --- osm_lcm/ns.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index a6ef52e..7b59ea8 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -5256,12 +5256,17 @@ class NsLcm(LcmBase): parts = kdu_model.split(sep=":") if len(parts) == 2: kdu_model = parts[0] + if desc_params.get("kdu_atomic_upgrade"): + atomic_upgrade = desc_params.get("kdu_atomic_upgrade").lower() in ("yes", "true", "1") + del desc_params["kdu_atomic_upgrade"] + else: + atomic_upgrade = True detailed_status = await asyncio.wait_for( self.k8scluster_map[kdu["k8scluster-type"]].upgrade( cluster_uuid=kdu.get("k8scluster-uuid"), kdu_instance=kdu.get("kdu-instance"), - atomic=True, + atomic=atomic_upgrade, kdu_model=kdu_model, params=desc_params, db_dict=db_dict, -- 2.25.1