Exemplo n.º 1
0
 def _get_bcs_variables(self):
     sys_variables = bcs_variable.collect_system_variable(
         access_token=self.access_token, project_id=self.project_id, namespace_id=self.namespace_info["id"]
     )
     bcs_variables = bcs_variable.get_bcs_variables(
         self.project_id, self.namespace_info["cluster_id"], self.namespace_info["id"]
     )
     sys_variables.update(bcs_variables)
     return sys_variables
Exemplo n.º 2
0
 def _get_bcs_variables(self) -> Dict[str, str]:
     res_ctx = self.res_ctx
     namespace_id = res_ctx.namespace_id
     sys_variables = bcs_variable.collect_system_variable(
         access_token=res_ctx.access_token,
         project_id=res_ctx.project_id,
         namespace_id=namespace_id,
     )
     bcs_variables = bcs_variable.get_bcs_variables(res_ctx.project_id,
                                                    res_ctx.cluster_id,
                                                    namespace_id)
     sys_variables.update(bcs_variables)
     return sys_variables
Exemplo n.º 3
0
 def generate_valuesyaml(self, project_id, namespace_id, cluster_id):
     """ valuefile + bcs namespace variables """
     sys_variables = self.app.sys_variables
     bcs_variables = get_bcs_variables(project_id, cluster_id, namespace_id)
     return merge_valuefile_with_bcs_variables(self.valuefile,
                                               bcs_variables, sys_variables)