From: garciadeblas Date: Wed, 6 Nov 2024 11:56:33 +0000 (+0100) Subject: Enable bootstrap flag in cluster creation X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F04%2F14704%2F2;p=osm%2FLCM.git Enable bootstrap flag in cluster creation Change-Id: Ia0a6bbe84104384adaea27adc96cb4995413956f Signed-off-by: garciadeblas --- diff --git a/osm_lcm/odu_libs/cluster_mgmt.py b/osm_lcm/odu_libs/cluster_mgmt.py index 4ef8a49..974afa5 100644 --- a/osm_lcm/odu_libs/cluster_mgmt.py +++ b/osm_lcm/odu_libs/cluster_mgmt.py @@ -75,6 +75,10 @@ async def create_cluster(self, op_id, op_params, content): vim_account_id = db_cluster["vim_account"] providerconfig_name = f"{vim_account_id}-config" vim_type = db_vim_account["vim_type"] + if db_cluster.get("bootstrap", True): + skip_bootstrap = "false" + else: + skip_bootstrap = "true" if vim_type == "azure": cluster_type = "aks" elif vim_type == "aws": @@ -113,6 +117,7 @@ async def create_cluster(self, op_id, op_params, content): cluster_location=db_cluster["region_name"], osm_project_name=osm_project_name, rg_name=db_cluster["resource_group"], + skip_bootstrap=skip_bootstrap, workflow_debug=self._workflow_debug, workflow_dry_run=self._workflow_dry_run, ) diff --git a/osm_lcm/odu_libs/templates/launcher-create-crossplane-cluster-and-bootstrap.j2 b/osm_lcm/odu_libs/templates/launcher-create-crossplane-cluster-and-bootstrap.j2 index c2d58ea..c965eff 100644 --- a/osm_lcm/odu_libs/templates/launcher-create-crossplane-cluster-and-bootstrap.j2 +++ b/osm_lcm/odu_libs/templates/launcher-create-crossplane-cluster-and-bootstrap.j2 @@ -79,7 +79,7 @@ spec: # Advanced parameters - Recommended to keep defaults - name: skip_bootstrap - value: "false" + value: "{{ skip_bootstrap }}" - name: mgmt_cluster_name value: "_management" - name: base_templates_path