kdu_model: str,
paths: dict,
env: dict,
+ kdu_instance: str,
atomic: bool = True,
timeout: float = 300,
params: dict = None,
version = str(parts[1])
kdu_model = parts[0]
- # generate a name for the release. Then, check if already exists
- kdu_instance = None
- while kdu_instance is None:
- kdu_instance = self._generate_release_name(kdu_model)
- try:
- result = await self._status_kdu(
- cluster_id=cluster_id,
- kdu_instance=kdu_instance,
- namespace=namespace,
- show_error_log=False,
- )
- if result is not None:
- # instance already exists: generate a new one
- kdu_instance = None
- except K8sException:
- pass
-
command = self._get_install_command(kdu_model, kdu_instance, namespace,
params_str, version, atomic, timeout)
self.log.error(msg)
raise K8sException(msg)
- return kdu_instance
-
async def upgrade(
self,
cluster_uuid: str,
return params_str
@staticmethod
- def _generate_release_name(chart_name: str):
+ def generate_kdu_instance_name(**kwargs):
+ chart_name = kwargs["kdu_model"]
# check embeded chart (file or dir)
if chart_name.startswith("/"):
# extract file or directory name