Enable bootstrap flag in cluster creation 04/14704/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 6 Nov 2024 11:56:33 +0000 (12:56 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 8 Nov 2024 14:51:45 +0000 (15:51 +0100)
Change-Id: Ia0a6bbe84104384adaea27adc96cb4995413956f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_lcm/odu_libs/cluster_mgmt.py
osm_lcm/odu_libs/templates/launcher-create-crossplane-cluster-and-bootstrap.j2

index 4ef8a49..974afa5 100644 (file)
@@ -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,
     )
index c2d58ea..c965eff 100644 (file)
@@ -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