Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Jul 4, 2024
1 parent 3b48303 commit 9ffdce6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@
"properties": {
"imageTag": {
"default": "latest",
"description": "Docker image tag of the Kafka Streams app.",
"title": "Imagetag",
"type": "string"
},
Expand Down Expand Up @@ -1280,6 +1281,7 @@
},
"imageTag": {
"default": "latest",
"description": "Docker image tag of the Kafka Streams app.",
"title": "Imagetag",
"type": "string"
},
Expand Down Expand Up @@ -1430,6 +1432,7 @@
"properties": {
"imageTag": {
"default": "latest",
"description": "Docker image tag of the Kafka Streams app.",
"title": "Imagetag",
"type": "string"
},
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/schema/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@
"properties": {
"imageTag": {
"default": "latest",
"description": "Docker image tag of the Kafka Streams app.",
"title": "Imagetag",
"type": "string"
},
Expand Down Expand Up @@ -948,6 +949,7 @@
},
"imageTag": {
"default": "latest",
"description": "Docker image tag of the Kafka Streams app.",
"title": "Imagetag",
"type": "string"
},
Expand Down
11 changes: 5 additions & 6 deletions kpops/components/streams_bootstrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 9ffdce6

Please sign in to comment.