Skip to content

Commit

Permalink
inline method
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Jul 10, 2024
1 parent 499490b commit 3bf42a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 0 additions & 7 deletions kpops/components/base_components/helm_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,3 @@ def print_helm_diff(self, stdout: str) -> None:
@model_serializer(mode="wrap", when_used="always")
def serialize_model(self, handler, info: SerializationInfo) -> dict[str, Any]:
return exclude_by_name(handler(self), "helm", "helm_diff")

async def fetch_values_from_cluster(self) -> dict[str, Any] | None:
"""Fetch the released streams-bootstrap values from the cluster using the 'helm get values' command.
:return: dict of Helm values or None if no release was found
"""
return await self.helm.get_values(self.namespace, self.helm_release_name)
4 changes: 3 additions & 1 deletion kpops/components/base_components/kafka_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ async def clean(self, dry_run: bool) -> None:

async def update_cleaner_with_cluster_values(self) -> None:
"""Update cleaner with cluster values if the release exists."""
cluster_values = await self.fetch_values_from_cluster()
cluster_values = await self.helm.get_values(
self.namespace, self.helm_release_name
)
if cluster_values:
self.app = self.app.__class__.model_validate(cluster_values)
self.app.name_override = self.helm_name_override
Expand Down

0 comments on commit 3bf42a2

Please sign in to comment.