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 to generate Strimzi KafkaTopic resources YAML to the Topic Enforcer. #72

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

shk3
Copy link
Contributor

@shk3 shk3 commented Dec 8, 2024

We are adding a new command under the Topic Enforcer to allow generating the KafkaTopic resources in YAML out of the enforcer configs. This is useful if the user wants to use Strimzi Kafka operator. It's worth noting that the generated resource metadata names start with the Strimzi Kafka cluster name to avoid ambiguity, followed by the topic names that are converted to conform RFC 1123 as required by k8s. To avoid potential naming conflicts caused by this conversion, we also append a short hashing string of the original actual topic name to the resource names.

In a Bazel-powered monorepo setup, users can use this feature combined with Bazel's genrule to generate the KafkaTopic resources that can be used by Strimzi Topic operator, while keeping the enforcer configs as the source of truth and for other Kafka related systems.

For simple setups, the users can also use this tool to migrate out and use Kubernetes CRDs as the source of truth with the Strimzi operator.

This PR also updates the Bazel workspace dependency to import the Strimzi API Java package and directs command logs to stderr instead of stdout for all enforcers.

@shk3 shk3 merged commit 3ee3f4d into master Dec 11, 2024
2 checks passed
@shk3 shk3 deleted the strimzi-export branch December 11, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants