"""Install a helm chart
:param cluster_uuid str: The UUID of the cluster to install to
- :param kdu_model str: The name or path of a bundle to install
+ :param kdu_model str: chart/reference (string), which can be either
+ of these options:
+ - a name of chart available via the repos known by OSM
+ (e.g. stable/openldap, stable/openldap:1.2.4)
+ - a path to a packaged chart (e.g. mychart.tgz)
+ - a path to an unpacked chart directory or a URL (e.g. mychart)
:param kdu_instance: Kdu instance name
:param atomic bool: If set, waits until the model is active and resets
the cluster on failure.
return True
+ def _is_helm_chart_a_file(self, chart_name: str):
+ return chart_name.count("/") > 1
+
async def _install_impl(
self,
cluster_id: str,
def _split_version(self, kdu_model: str) -> (str, str):
version = None
- if ":" in kdu_model:
+ if not self._is_helm_chart_a_file(kdu_model) and ":" in kdu_model:
parts = kdu_model.split(sep=":")
if len(parts) == 2:
version = str(parts[1])
happen before any _initial-config-primitive_of the VNF is called).
:param cluster_uuid: UUID of a K8s cluster known by OSM
- :param kdu_model: chart/ reference (string), which can be either
+ :param kdu_model: chart/reference (string), which can be either
of these options:
- a name of chart available via the repos known by OSM
- - a path to a packaged chart
- - a path to an unpacked chart directory or a URL
+ (e.g. stable/openldap, stable/openldap:1.2.4)
+ - a path to a packaged chart (e.g. mychart.tgz)
+ - a path to an unpacked chart directory or a URL (e.g. mychart)
:param kdu_instance: Kdu instance name
:param atomic: If set, installation process purges chart/bundle on fail, also
will wait until all the K8s objects are active