From d3984b84492e88b0ef974b21614e58563585fb94 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Tue, 21 May 2024 16:03:56 +0200 Subject: [PATCH] Add computed field for Helm release name and name override --- kpops/components/base_components/helm_app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kpops/components/base_components/helm_app.py b/kpops/components/base_components/helm_app.py index 94fa3e8cd..39c96b79e 100644 --- a/kpops/components/base_components/helm_app.py +++ b/kpops/components/base_components/helm_app.py @@ -5,7 +5,7 @@ from typing import Annotated, Any import pydantic -from pydantic import Field, SerializationInfo, model_serializer +from pydantic import Field, SerializationInfo, computed_field, model_serializer from typing_extensions import override from kpops.component_handlers.helm_wrapper.dry_run_handler import DryRunHandler @@ -103,11 +103,13 @@ def dry_run_handler(self) -> DryRunHandler: helm_diff = HelmDiff(self.config.helm_diff_config) return DryRunHandler(self.helm, helm_diff, self.namespace) + @computed_field @property def helm_release_name(self) -> str: """The name for the Helm release.""" return create_helm_release_name(self.full_name) + @computed_field @property def helm_name_override(self) -> str: """Helm chart name override."""