Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for streams-bootstrap v3 #519

Merged
merged 25 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions kpops/components/streams_bootstrap_v3/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pydantic import AliasChoices, ConfigDict, Field
from typing_extensions import override

from kpops.component_handlers import get_handlers
from kpops.component_handlers.helm_wrapper.model import HelmRepoConfig
from kpops.components.base_components.cleaner import Cleaner
from kpops.components.base_components.helm_app import HelmApp, HelmAppValues
Expand Down Expand Up @@ -80,6 +81,17 @@ class StreamsBootstrapV3(HelmApp, ABC):
description=describe_attr("version", __doc__),
)

@override
async def deploy(self, dry_run: bool) -> None:
raminqaf marked this conversation as resolved.
Show resolved Hide resolved
if self.to:
for topic in self.to.kafka_topics:
await get_handlers().topic_handler.create_topic(topic, dry_run=dry_run)

if schema_handler := get_handlers().schema_handler:
await schema_handler.submit_schemas(to_section=self.to, dry_run=dry_run)

await super().deploy(dry_run)

@pydantic.model_validator(mode="after")
def warning_for_latest_image_tag(self) -> Self:
if self.validate_ and self.values.image_tag == "latest":
Expand Down
Loading