-
Notifications
You must be signed in to change notification settings - Fork 198
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
Topic management via CRD #46
Comments
At least it would be a starting point |
Anyone working on this ? |
@baluchicken FWIW I am working on a kafka on Kubernetes implementation right now just using helm's It could probably be easily plugged into this project either also as a sidecar to the clusters, or since it's already go scaffolding for the most part, it could also be lifted into the main operator I think. It currently gets its broker URL and TLS config from environment variables and a mounted secret, but if it were to be brought into the main operator it would probably make more sense to get auth information per event directly from the cluster CRDs and secrets (using a The operator assumes a Maybe we can help each other out and then I could move to using a cluster that is a lot more impressive than my current setup, but still have my CRDs for CI/CD 😛 . I can put the controller on my Github, but I'd probably want to rename the apigroups and stuff first. If you'd like me to submit a PR I'd be open to any design changes you all recommend. |
To follow up, I decided to just fork and give a go at merging my stuff into this operator. I managed to get it working and if you'd be open to a PR I can definitely get one started. The fork is here: https://github.com/tinyzimmer/kafka-operator A few main things to note:
In regards to the additions, here are a few sample CRs for the two new resources I add: apiVersion: banzaicloud.banzaicloud.io/v1alpha1
kind: KafkaTopic
metadata:
name: test-topic
namespace: kafka
spec:
clusterRef:
name: kafka
name: test-topic
partitions: 6
replicationFactor: 2
config:
"retention.ms": "800000"
"cleanup.policy": "delete"
# ... etc, etc
---
apiVersion: banzaicloud.banzaicloud.io/v1alpha1
kind: KafkaUser
metadata:
name: test-kafkauser
namespace: kafka
spec:
clusterRef:
name: kafka
name: test-kafkauser
secretName: test-kafkauser-secret
includeJKS: true
topicGrants:
- topicName: test-topic
accessType: read
- topicName: test-topic
accessType: write If you would be interested in a PR, I'd be happy to make any fixes and changes y'all recommend. I do know I'd want to clean up a few places first. For example, the cruise control resource having it's own topic logic is no longer necessary, and there is some code left over from when I originally ran it as a sidecar to a cluster. |
You should make a PR right away (when you are ready, or create it as WIP). I know this subject is not the top priority right now, but I'm sure there will be someone to review your code (and I will do too). Thanks for your work ! |
I'll clean it up a bit more then open a PR as a WIP. I know at the very least I'll probably need to create some user documentation and stuff to go along with it. |
Thanks for deciding to fork and contribute this. |
Thanks for doing this @tinyzimmer |
Describe the solution you'd like to see
It would be useful if topic management could be configurable via CRD
The text was updated successfully, but these errors were encountered: