-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Apache Kafka Broker #2740
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 Apache Kafka Broker #2740
Conversation
4328108 to
24ccc79
Compare
|
Once this is in, I'll follow up with an example to put here: https://knative.dev/development/eventing/samples/kafka/ |
e7e5053 to
d6aa651
Compare
|
/retest |
d6aa651 to
231e503
Compare
|
/retest |
docs/eventing/broker/kafka-broker.md
Outdated
| This page shows how to install and configure the | ||
| [Kafka Broker](https://github.com/knative-sandbox/eventing-kafka-broker). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the user story for this, i.e. why would someone use this over the default Knative broker?
This would probably be a good place for some introductory content, not so much about what the Kafka broker is (we could include the link from earlier here again maybe), but why as a user would you want to install or use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this https://github.com/knative/docs/pull/2740/files#diff-20631ccdd823c2921c4d6bda9b486bfaR7-R17, please, let me know if it helps.
| ## Create a Kafka Broker | ||
|
|
||
| A Kafka Broker object looks like this: | ||
|
|
||
| ```yaml | ||
| apiVersion: eventing.knative.dev/v1 | ||
| kind: Broker | ||
| metadata: | ||
| annotations: | ||
| # case-sensitive | ||
| eventing.knative.dev/broker.class: Kafka | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| # Configuration specific to this broker. | ||
| config: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: kafka-broker-config | ||
| namespace: knative-eventing | ||
| # Optional dead letter sink, you can specify either: | ||
| # - deadLetterSink.ref, which is a reference to a Callable | ||
| # - deadLetterSink.uri, which is an absolute URI to a Callable (It can potentially be out of the Kubernetes cluster) | ||
| delivery: | ||
| deadLetterSink: | ||
| ref: | ||
| apiVersion: serving.knative.dev/v1 | ||
| kind: Service | ||
| name: dlq-service | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to the beginning of the doc instead and use it to explain what's required and why in a kafka broker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above the installation?
| `spec.config` should reference any `ConfigMap` that looks like the following: | ||
|
|
||
| ```yaml | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: kafka-broker-config | ||
| namespace: knative-eventing | ||
| data: | ||
| # Number of topic partitions | ||
| default.topic.partitions: "10" | ||
| # Replication factor of topic messages. | ||
| default.topic.replication.factor: "1" | ||
| # A comma separated list of bootstrap servers. (It can be in or out the k8s cluster) | ||
| bootstrap.servers: "my-cluster-kafka-bootstrap.kafka:9092" | ||
| ``` | ||
|
|
||
| The above `ConfigMap` is installed in the cluster, and you can edit | ||
| the configurations or create a new one with the same shape | ||
| depending on your needs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's be more prescriptive than this. Is it specifically yhe kafka-broker-config ConfigMap that needs to be referenced?
If we're going to talk about a previously unmentioned ConfigMap in the docs, it should probably be explained properly in its own section, as it is for the default broker: https://knative.dev/development/eventing/broker/config-br-defaults/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting to create another page for this config map?
ce38303 to
34fc316
Compare
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
@abrennan89 Thank you for the review, I left some questions and addressed most of your comments. |
|
Thanks @mpetason! |
|
|
@macruzbar @carieshmarie can one of you add this manually please, Thanks. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abrennan89, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
d52b231 to
45e1263
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
/lgtm |
/cc @abrennan89 @slinkydeveloper