From 0c0745e74a2149d59360e40f2a3f98457ce2399c Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Thu, 29 Jun 2023 11:51:56 +0200 Subject: [PATCH 1/7] Adding DRAFT for blog post on improved event discovery Signed-off-by: Matthias Wessendorf --- .../articles/new_event_discovery_features.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 blog/docs/articles/new_event_discovery_features.md diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md new file mode 100644 index 0000000000..afc89e1193 --- /dev/null +++ b/blog/docs/articles/new_event_discovery_features.md @@ -0,0 +1,78 @@ +# Better Developer experience with improved event discovery in Knative + +**Authors: David Simansky, Senior Software Engineer @ Red Hat, Matthias Weßendorf, Senior Principal Software Engineer @ Red Hat** + +**Date: 2023-07-26** + +_In this blog post you will learn about the new enhancements in Knative Eventing around event discovery._ + +Event discovery is an important part of event-driven applications, since it allows developers to better understand system dynamics and what events to consume. It does enable a more efficient and robust application design. + +### Knative Event Type API enhancements + +With the latest 1.11 release of Knative Eventing there were a few improvements related to improved Event discovery: + +* `EventType`` API bumped to `v1beta2` +* Making use of `reference`s to point to any Resource like Channels or Sinks, not just brokers +* Enhance build-in Sources to create eventypes for any binding, not just brokers. +* Automatic EvenType creation for Brokers + +#### EventType API changes and version bump + +After a couple of years being on version `v1beta1` the `EventType` API in Knative has changed and was bumped to `v1beta2`. The version bump did not come alone, it was combined with an overhaul for improved developer experience. It is now possible to point to any resource from an Event type object, instead of being only restricted to broker objects. + +### Referencing other resources + +The new version is marking the `broker` field as deprecated and it will be removed in a future release, instead we now have the `reference` field which takes any `KReference` API type, being able to point to any sink, channel or the broker as well. Let's take a look at the new `EventType` object: + +```yaml +apiVersion: eventing.knative.dev/v1beta2 +kind: EventType +metadata: + name: dev.knative.source.github.push-sss34cnb + namespace: default +spec: + type: dev.knative.source.github.push + source: https://github.com/knative/eventing + reference: + apiVersion: messaging.knative.dev/v1 + kind: InMemoryChannel + name: testchannel +``` + +The status was also changed, since we do just require the reference to be existing, instead of being also ready itself + +#### Duck Sources + +The above enhencement did allow an additional change for the build-in sources, or any source that is compliant to the Sources Duck type. For instance until previous releases `EventType` objects where only created automatically when the source was pointing to a broker, because of the above restriction. Now those are created for any referenced sink, on the source, like: + +```yaml +apiVersion: sources.knative.dev/v1 +kind: PingSource +metadata: + name: ping-source-broker2 +spec: + schedule: "*/1 * * * *" + data: '{"message": "Hello world!"}' + sink: + ref: + apiVersion: v1 + kind: Service + name: log-receiver +``` + +This results in an auto-created event type, like: + +```bash +k get eventtypes.eventing.knative.dev -A +NAMESPACE NAME TYPE SOURCE SCHEMA REFERENCE NAME REFERENCE KIND DESCRIPTION READY REASON +default 93774a924a741245a94313745d78e69f dev.knative.sources.ping /apis/v1/namespaces/default/pingsources/ping-source-broker2 log-receiver Service True +``` +#### Auto Event Type creation + +tbd + + +### Conclusion + +tbd. From 30ba9195089489b8d2c8836bcbf22ef49ab7f451 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Wed, 26 Jul 2023 13:44:24 +0200 Subject: [PATCH 2/7] Fix typos --- blog/docs/articles/new_event_discovery_features.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md index afc89e1193..7615869f3e 100644 --- a/blog/docs/articles/new_event_discovery_features.md +++ b/blog/docs/articles/new_event_discovery_features.md @@ -40,11 +40,11 @@ spec: name: testchannel ``` -The status was also changed, since we do just require the reference to be existing, instead of being also ready itself +The status was also changed, since we do just require the reference to be existing, instead of being also ready itself. #### Duck Sources -The above enhencement did allow an additional change for the build-in sources, or any source that is compliant to the Sources Duck type. For instance until previous releases `EventType` objects where only created automatically when the source was pointing to a broker, because of the above restriction. Now those are created for any referenced sink, on the source, like: +The above enhancement did allow an additional change for the build-in sources, or any source that is compliant to the Sources Duck type. For instance until previous releases `EventType` objects where only created automatically when the source was pointing to a broker, because of the above restriction. Now those are created for any referenced sink, on the source, like: ```yaml apiVersion: sources.knative.dev/v1 From 286373e958a91b2413784c15a416657ebe4eb613 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Wed, 26 Jul 2023 13:50:56 +0200 Subject: [PATCH 3/7] Add content to EventType auto create section --- blog/docs/articles/new_event_discovery_features.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md index 7615869f3e..f513ed1e7c 100644 --- a/blog/docs/articles/new_event_discovery_features.md +++ b/blog/docs/articles/new_event_discovery_features.md @@ -70,7 +70,8 @@ default 93774a924a741245a94313745d78e69f dev.knative.sources.ping /apis/ ``` #### Auto Event Type creation -tbd +Furthermore to improve the experience with `EventTypes` consumption and creation, there's a new experimental feature to automatically create `EventTypes` objects based on processed events on the broker ingress. Instead of manually creating them as yaml manifests along the application code that talks to the Broker API. This behaviour can be enabled by feature flag `eventtype-auto-creation` in `config-features` ConfigMap. For futher details and examples pleaase refer to [the documentation](https://knative.dev/docs/eventing/experimental-features/eventtype-auto-create/). + ### Conclusion From 68a74052dff5a30b9c158022e67a3391b10cc2f3 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Wed, 26 Jul 2023 14:02:27 +0200 Subject: [PATCH 4/7] Fix typo --- blog/docs/articles/new_event_discovery_features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md index f513ed1e7c..2efc42e684 100644 --- a/blog/docs/articles/new_event_discovery_features.md +++ b/blog/docs/articles/new_event_discovery_features.md @@ -70,7 +70,7 @@ default 93774a924a741245a94313745d78e69f dev.knative.sources.ping /apis/ ``` #### Auto Event Type creation -Furthermore to improve the experience with `EventTypes` consumption and creation, there's a new experimental feature to automatically create `EventTypes` objects based on processed events on the broker ingress. Instead of manually creating them as yaml manifests along the application code that talks to the Broker API. This behaviour can be enabled by feature flag `eventtype-auto-creation` in `config-features` ConfigMap. For futher details and examples pleaase refer to [the documentation](https://knative.dev/docs/eventing/experimental-features/eventtype-auto-create/). +Furthermore to improve the experience with `EventTypes` consumption and creation, there's a new experimental feature to automatically create `EventTypes` objects based on processed events on the broker ingress. Instead of manually creating them as yaml manifests along the application code that talks to the Broker API. This behaviour can be enabled by feature flag `eventtype-auto-creation` in `config-features` ConfigMap. For futher details and examples please refer to [the documentation](https://knative.dev/docs/eventing/experimental-features/eventtype-auto-create/). From 4aa7f573f5adf8ebc8cfdf81170f7e0b4025c040 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Tue, 1 Aug 2023 09:07:48 +0200 Subject: [PATCH 5/7] Add mention of channels and conclusion --- blog/docs/articles/new_event_discovery_features.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md index 2efc42e684..1b53dd348a 100644 --- a/blog/docs/articles/new_event_discovery_features.md +++ b/blog/docs/articles/new_event_discovery_features.md @@ -70,10 +70,12 @@ default 93774a924a741245a94313745d78e69f dev.knative.sources.ping /apis/ ``` #### Auto Event Type creation -Furthermore to improve the experience with `EventTypes` consumption and creation, there's a new experimental feature to automatically create `EventTypes` objects based on processed events on the broker ingress. Instead of manually creating them as yaml manifests along the application code that talks to the Broker API. This behaviour can be enabled by feature flag `eventtype-auto-creation` in `config-features` ConfigMap. For futher details and examples please refer to [the documentation](https://knative.dev/docs/eventing/experimental-features/eventtype-auto-create/). +Furthermore to improve the experience with consumption and creation of `EventTypes`, there's a new experimental feature to automatically create `EventTypes` objects based on processed events on the broker ingress and in-memory channels. Instead of manually creating them as yaml manifests along the application code that talks to the Broker or Channel API. This behaviour can be enabled by feature flag `eventtype-auto-creation` in `config-features` ConfigMap. For futher details and examples please refer to [the documentation](https://knative.dev/docs/eventing/experimental-features/eventtype-auto-create/). ### Conclusion -tbd. +This blog post introduced new features and improvements to `EventType` discoroverability. The main motivation is to harden the position of developer's insight into the event-driven applications to ease up the discovery and speed up development. + +We look forward from the community to further enhance `EventType` API and discoverability. Please reach out on the CNCF Slack's #knative-eventing or GitHub issues. From e8ed4c8b8d83645ca613da36154b5a3ba60469b0 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Tue, 1 Aug 2023 09:17:47 +0200 Subject: [PATCH 6/7] Add links to slack channel and gh issues --- blog/docs/articles/new_event_discovery_features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/new_event_discovery_features.md b/blog/docs/articles/new_event_discovery_features.md index 1b53dd348a..70932f0e1d 100644 --- a/blog/docs/articles/new_event_discovery_features.md +++ b/blog/docs/articles/new_event_discovery_features.md @@ -78,4 +78,4 @@ Furthermore to improve the experience with consumption and creation of `EventTyp This blog post introduced new features and improvements to `EventType` discoroverability. The main motivation is to harden the position of developer's insight into the event-driven applications to ease up the discovery and speed up development. -We look forward from the community to further enhance `EventType` API and discoverability. Please reach out on the CNCF Slack's #knative-eventing or GitHub issues. +We look forward from the community to further enhance `EventType` API and discoverability. Please reach out on the CNCF Slack's [#knative-eventing](https://cloud-native.slack.com/archives/C04LMU33V1S) or GitHub [issues](https://github.com/knative/eventing/issues). From df7c7dd5912c633a94168ca0e1c6b86581528598 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Tue, 1 Aug 2023 15:24:11 +0200 Subject: [PATCH 7/7] adding link to new blog post Signed-off-by: Matthias Wessendorf --- blog/config/nav.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/blog/config/nav.yml b/blog/config/nav.yml index 587167b31a..61575471b6 100644 --- a/blog/config/nav.yml +++ b/blog/config/nav.yml @@ -45,6 +45,7 @@ nav: - releases/announcing-knative-v0-3-release.md - releases/announcing-knative-v0-2-release.md - Articles: + - articles/new_event_discovery_features.md - articles/getting-started-blog-p1.md - articles/getting-started-blog-p0.md - articles/improved-ha-configuration.md