- step = "Adding repo to cluster: {}".format(k8scluster["cluster-uuid"])
- self.logger.debug(logging_text + step)
- task = asyncio.ensure_future(self.k8srepo.repo_add(cluster_uuid=k8scluster["cluster-uuid"],
- name=db_k8srepo["name"], url=db_k8srepo["url"],
- repo_type="chart"))
- task_list.append(task)
- db_k8srepo_update["_admin.cluster-inserted"].append(k8scluster["cluster-uuid"])
+ hc_id = deep_get(k8scluster, ("_admin", "helm-chart", "id"))
+ if hc_id:
+ step = "Adding repo to cluster: {}".format(hc_id)
+ self.logger.debug(logging_text + step)
+ task = asyncio.ensure_future(self.k8srepo.repo_add(cluster_uuid=hc_id,
+ name=db_k8srepo["name"], url=db_k8srepo["url"],
+ repo_type="chart"))
+ task_list.append(task)
+ db_k8srepo_update["_admin.cluster-inserted"].append(hc_id)