Add support to generate Strimzi KafkaTopic
resources YAML to the Topic Enforcer.
#72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.