diff --git a/docs/docs/schema/defaults.json b/docs/docs/schema/defaults.json index 69ca8ffa7..2c08e0089 100644 --- a/docs/docs/schema/defaults.json +++ b/docs/docs/schema/defaults.json @@ -922,6 +922,7 @@ "properties": { "imageTag": { "default": "latest", + "description": "Docker image tag of the Kafka Streams app.", "title": "Imagetag", "type": "string" }, @@ -1280,6 +1281,7 @@ }, "imageTag": { "default": "latest", + "description": "Docker image tag of the Kafka Streams app.", "title": "Imagetag", "type": "string" }, @@ -1430,6 +1432,7 @@ "properties": { "imageTag": { "default": "latest", + "description": "Docker image tag of the Kafka Streams app.", "title": "Imagetag", "type": "string" }, diff --git a/docs/docs/schema/pipeline.json b/docs/docs/schema/pipeline.json index 0d98c4e7e..ba40f0292 100644 --- a/docs/docs/schema/pipeline.json +++ b/docs/docs/schema/pipeline.json @@ -590,6 +590,7 @@ "properties": { "imageTag": { "default": "latest", + "description": "Docker image tag of the Kafka Streams app.", "title": "Imagetag", "type": "string" }, @@ -948,6 +949,7 @@ }, "imageTag": { "default": "latest", + "description": "Docker image tag of the Kafka Streams app.", "title": "Imagetag", "type": "string" }, diff --git a/kpops/components/streams_bootstrap/__init__.py b/kpops/components/streams_bootstrap/__init__.py index f026a77dc..a28a82b59 100644 --- a/kpops/components/streams_bootstrap/__init__.py +++ b/kpops/components/streams_bootstrap/__init__.py @@ -25,7 +25,9 @@ class StreamsBootstrapValues(HelmAppValues): :param image_tag: Docker image tag of the Kafka Streams app. """ - image_tag: str = Field(default="latest") + image_tag: str = Field( + default="latest", description=describe_attr("image_tag", __doc__) + ) @pydantic.field_validator("image_tag", mode="before") @classmethod @@ -58,11 +60,8 @@ class StreamsBootstrap(HelmApp, ABC): @pydantic.model_validator(mode="after") def warning_for_latest_image_tag(self) -> Self: - if self.app.image_tag == "latest" and self.is_substituted(): + if self.validate_ and self.app.image_tag == "latest": log.warning( - f"The imageTag for component '{self.name}' is not set and defaults to 'latest'. Please, consider providing a stable imageTag." + f"The imageTag for component '{self.name}' is set or defaulted to 'latest'. Please, consider providing a stable imageTag." ) return self - - def is_substituted(self): - return "$" not in self.name