General eventing and kafka updates#4028
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abrennan89 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
✔️ Deploy Preview for knative ready! 🔨 Explore the source changes: 504226c 🔍 Inspect the deploy log: https://app.netlify.com/sites/knative/deploys/610af415edde5a00089f20f1 😎 Browse the preview: https://deploy-preview-4028--knative.netlify.app/development/developer/eventing/sources |
|
/hold |
|
If this PR looks like an improvement and doesn't break anything / make anything incorrect, I'd like to get it merged and not hold it up too much on trying to make it perfect. I'd like to move these samples into the main dev/admin guides and just wanted to try to clean it up a bit first. |
|
Added a bunch of reviewers but for now I think this just needs and SME review and possibly a lgtm when it's ready. |
xtreme-sameer-vohra
left a comment
There was a problem hiding this comment.
Thanks Ashleigh. Added few comments
Disclaimer: I didn't check the auth sections (TLS, etc)
| The following example uses a ApiServerSource to publish events to the Broker, and a Trigger that routes events to a Knative Service. | ||
| <!--TODO: Not sure this example makes sense, why would you have an event source AND channels?--> | ||
|
|
||
| 1. Create a Broker that uses Kafka Channels by default: |
There was a problem hiding this comment.
There is some missing config as the broker was using InMmemoryChannel and it had an annotation of MTChannelBasedBroker
See Set as default broker implementation > https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/
There was a problem hiding this comment.
See above comment - idk if we should even keep this and try to fix it or remove for now
There was a problem hiding this comment.
When I was trying this sample a week ago, I actually liked that all of these pieces are in one place, so that I can just follow the steps and see the complete picture without switching in different tabs and getting confused. Even though its not kafka related as you mentioned in your comment above, I think its better to justify with examples here that kafka is actually being used to do these things - just my opinion.
If the broker example stays, I think this is the configmap change that has to go in before the broker is even created as @xtreme-sameer-vohra mentioned, because otherwise it had InMemoryChannel in there which would essentially create imc for all the brokers. But now since we have already changed the default Channel to be a Kafka channel in earlier steps, we can just simply put Kind: Channel
kubectl apply -f - <<EOF
---
apiVersion: v1
kind: ConfigMap
metadata:
name: config-br-default-channel
namespace: knative-eventing
data:
channelTemplateSpec: |
apiVersion: messaging.knative.dev/v1
kind: Channel
EOF
And related to this, I think you removed both the steps - This will give you two pods, such as: and Inside the Apache Kafka cluster you should see two new topics, such as:. Here I think deleting the pods part makes sense, but about topic creation, it should stay but it should be changed to:
Inside the Apache Kafka cluster you should see one new topic, such as:
knative-messaging-kafka.default.default-kne-trigger
There was a problem hiding this comment.
I've decided to remove all of the broker stuff from this section, period.
It's too far out of scope to start adding even more ConfigMap details here, particularly when the topic is Kafka Channels, not configuring Brokers.
The plan is to move all of these types of topics to the admin guide anyway, e.g. https://knative.dev/docs/admin/eventing/broker-configuration/, so we'd be duplicating information here to have to clean it up again later.
This was supposed to be a quick PR to do some cleanup, not an entire rewrite of this sample, so I think we should try to get the changes merged so that we have some improvement for now, and we can follow it up with more PRs later to flesh out the full use cases and which other topics need to be included or referenced.
|
Hehe not sure why prow assigned me 😁 |
| The `config-kafka` ConfigMap allows for a variety of Channel options such as: | ||
|
|
||
| - CPU and Memory requests and limits for the dispatcher (and receiver for | ||
| the distributed channel type) deployments created by the controller |
There was a problem hiding this comment.
A lot of parentheses in this section. Not sure if they are all necessary.
There was a problem hiding this comment.
Probably not, I'd say none of them are, but per my comment above #4028 (comment) I'm not trying to edit this to perfection in this PR - the primary reason for it is to fix the three issues linked, so for things that need additional rewriting like this or the kubectl commands as you mention in the other comment below, I'd prefer if you could raise another issue for us to clean up that stuff later so we're not blocking this PR on it. That OK?
|
/assign |
Co-authored-by: Samia Nneji <snneji@vmware.com>
Co-authored-by: Samia Nneji <snneji@vmware.com>
d6ce557 to
2611d81
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
@xinydev good call, removing these since they're basically outdated Strimzi install instructions |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
FYI for reviewers: let's err on the side of removing things that are outdated and doing basic cleanup for now, and then following this PR with other PRs to add more changes. There is a lot of reorg and rewriting that needs to happen with the Kafka content in general - let's not block one PR in the hopes that everything is included at once, please, because it just won't happen. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
@snneji I think you need to add consent for the cla bot, alternatively @thisisnotapril can you override it please? 🙏🏻 |
|
/lgtm |
Fixes #3783
Fixes #3078
Proposed Changes