From 753b1e3a57829940e40c1f0140487785c4a4d8d4 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 6 Nov 2024 12:56:33 +0100 Subject: [PATCH] Enable bootstrap flag in cluster creation Change-Id: Ia0a6bbe84104384adaea27adc96cb4995413956f Signed-off-by: garciadeblas --- osm_lcm/odu_libs/cluster_mgmt.py | 5 +++++ .../launcher-create-crossplane-cluster-and-bootstrap.j2 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.25.1