Skip to content

feat(provisioners): Add default in-cluster kafka-topic provisioner#314

Open
ShantKhatri wants to merge 1 commit into
score-spec:mainfrom
ShantKhatri:provisionor-kafka-topic
Open

feat(provisioners): Add default in-cluster kafka-topic provisioner#314
ShantKhatri wants to merge 1 commit into
score-spec:mainfrom
ShantKhatri:provisionor-kafka-topic

Conversation

@ShantKhatri
Copy link
Copy Markdown

Description

Implements a default kafka-topic provisioner for score-k8s that mirrors the score-compose implementation. This allows users to deploy the same Score file on both score-compose and score-k8s targets without modification.

What does this PR do?

  • Adds a new kafka-topic resource provisioner to internal/provisioners/default/zz-default.provisioners.yaml
  • Generates three Kubernetes resources: StatefulSet (single-node KRaft Kafka broker), Service (networking), and Job (idempotent topic creation)
  • Updates README.md provisioner support table with kafka-topic entry
  • Follows shared broker model: multiple kafka-topic resources reuse the same Kafka instance within a provision request

Fixes #67

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

…nd resource management

Signed-off-by: Prashantkumar Khatri <prashantkhatri202@gmail.com>
@ShantKhatri
Copy link
Copy Markdown
Author

Hey @mathieu-benoit, tested this locally before raising the PR. Here's what the generation output looks like:

image

Generated resources look correct. StatefulSet + Service (kafka-IqfavV) and Job (kafka-IqfavV-topic-XIqtRF-init) with the idempotent describe-or-create pattern. KRaft config, security context, and PVC all in place. Deployment picks up all four outputs (host, port, name, num_partitions) as env vars as expected.

Happy to address any feedback. Could you take a look when you get a chance? 🙏

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.

[feature request] Add a default in-cluster kafka-topic provisioner

1 participant