{"action":"created","issue":{"url":"https://api.github.com/repos/kyma-project/community/issues/166","repository_url":"https://api.github.com/repos/kyma-project/community","labels_url":"https://api.github.com/repos/kyma-project/community/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/kyma-project/community/issues/166/comments","events_url":"https://api.github.com/repos/kyma-project/community/issues/166/events","html_url":"https://github.com/kyma-project/community/issues/166","id":391804805,"node_id":"MDU6SXNzdWUzOTE4MDQ4MDU=","number":166,"title":"Proposal - Run kyma-eventing on top of knative-eventing","user":{"login":"marcobebway","id":24314423,"node_id":"MDQ6VXNlcjI0MzE0NDIz","avatar_url":"https://avatars3.githubusercontent.com/u/24314423?v=4","gravatar_id":"","url":"https://api.github.com/users/marcobebway","html_url":"https://github.com/marcobebway","followers_url":"https://api.github.com/users/marcobebway/followers","following_url":"https://api.github.com/users/marcobebway/following{/other_user}","gists_url":"https://api.github.com/users/marcobebway/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobebway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobebway/subscriptions","organizations_url":"https://api.github.com/users/marcobebway/orgs","repos_url":"https://api.github.com/users/marcobebway/repos","events_url":"https://api.github.com/users/marcobebway/events{/privacy}","received_events_url":"https://api.github.com/users/marcobebway/received_events","type":"User","site_admin":false},"labels":[{"id":1034395166,"node_id":"MDU6TGFiZWwxMDM0Mzk1MTY2","url":"https://api.github.com/repos/kyma-project/community/labels/area/eventing","name":"area/eventing","color":"3cba12","default":false},{"id":1143330738,"node_id":"MDU6TGFiZWwxMTQzMzMwNzM4","url":"https://api.github.com/repos/kyma-project/community/labels/wg/knative","name":"wg/knative","color":"e99695","default":false}],"state":"open","locked":false,"assignee":{"login":"marcobebway","id":24314423,"node_id":"MDQ6VXNlcjI0MzE0NDIz","avatar_url":"https://avatars3.githubusercontent.com/u/24314423?v=4","gravatar_id":"","url":"https://api.github.com/users/marcobebway","html_url":"https://github.com/marcobebway","followers_url":"https://api.github.com/users/marcobebway/followers","following_url":"https://api.github.com/users/marcobebway/following{/other_user}","gists_url":"https://api.github.com/users/marcobebway/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobebway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobebway/subscriptions","organizations_url":"https://api.github.com/users/marcobebway/orgs","repos_url":"https://api.github.com/users/marcobebway/repos","events_url":"https://api.github.com/users/marcobebway/events{/privacy}","received_events_url":"https://api.github.com/users/marcobebway/received_events","type":"User","site_admin":false},"assignees":[{"login":"marcobebway","id":24314423,"node_id":"MDQ6VXNlcjI0MzE0NDIz","avatar_url":"https://avatars3.githubusercontent.com/u/24314423?v=4","gravatar_id":"","url":"https://api.github.com/users/marcobebway","html_url":"https://github.com/marcobebway","followers_url":"https://api.github.com/users/marcobebway/followers","following_url":"https://api.github.com/users/marcobebway/following{/other_user}","gists_url":"https://api.github.com/users/marcobebway/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobebway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobebway/subscriptions","organizations_url":"https://api.github.com/users/marcobebway/orgs","repos_url":"https://api.github.com/users/marcobebway/repos","events_url":"https://api.github.com/users/marcobebway/events{/privacy}","received_events_url":"https://api.github.com/users/marcobebway/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kyma-project/community/milestones/76","html_url":"https://github.com/kyma-project/community/milestone/76","labels_url":"https://api.github.com/repos/kyma-project/community/milestones/76/labels","id":3932708,"node_id":"MDk6TWlsZXN0b25lMzkzMjcwOA==","number":76,"title":"Sprint_Malones_14","description":"","creator":{"login":"abbi-gaurav","id":4436741,"node_id":"MDQ6VXNlcjQ0MzY3NDE=","avatar_url":"https://avatars1.githubusercontent.com/u/4436741?v=4","gravatar_id":"","url":"https://api.github.com/users/abbi-gaurav","html_url":"https://github.com/abbi-gaurav","followers_url":"https://api.github.com/users/abbi-gaurav/followers","following_url":"https://api.github.com/users/abbi-gaurav/following{/other_user}","gists_url":"https://api.github.com/users/abbi-gaurav/gists{/gist_id}","starred_url":"https://api.github.com/users/abbi-gaurav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbi-gaurav/subscriptions","organizations_url":"https://api.github.com/users/abbi-gaurav/orgs","repos_url":"https://api.github.com/users/abbi-gaurav/repos","events_url":"https://api.github.com/users/abbi-gaurav/events{/privacy}","received_events_url":"https://api.github.com/users/abbi-gaurav/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2019-01-02T08:44:42Z","updated_at":"2019-01-02T08:46:14Z","due_on":"2019-01-11T08:00:00Z","closed_at":null},"comments":8,"created_at":"2018-12-17T17:01:01Z","updated_at":"2019-01-04T13:15:45Z","closed_at":null,"author_association":"NONE","body":"|Created on| Created by|\r\n|-|-|\r\n|2018-12-17|Marco Bebway (@marcobebway)|\r\n\r\n**Purpose**\r\n\r\nHaving the option to run **kyma-eventing** on top of **knative-eventing**.\r\n\r\n**Use-cases**\r\n\r\n1. Kyma runs by default with the **event-bus** and **nats-streaming** messaging system.\r\n2. Kyma runs on top of **knative** and **knative-eventing** when the **knative** flag is provided to the kyma installer.\r\n\r\n**Design**\r\n\r\nKyma is installed on top of Knative and using knative-eventing abstraction to publish and deliver messages:\r\n- The Publisher sends messages to the Publish app. Each message should contain the event-type and source-id.\r\n- The Kyma Publish app receives the publish request from the publisher and sends the message to the corresponding knative channel related to the event-type provided with the publish request.\r\n- The Knative Dispatcher stores messages to the underlying messaging system backend.\r\n- The Kyma SubscriptionController app acts upon events coming from Kubernetes for the Kyma subscription-crd and the Kyma event-activation-crd, and it creates a knative-subscription for a specific Knative channel.\r\n- The Knative Provisioner Controller manages subscriptions on the underlying messaging system backend.\r\n- The Knative Provisioner Dispatcher delivers messages to the subscriber endpoint.\r\n\r\n![design](https://user-images.githubusercontent.com/24314423/50688731-1e527480-1027-11e9-8fe2-adf500bdccf5.png)\r\n\r\n - Kyma EventBus sends messages to multiple Knative channels each of which can be tied to different Knative Provisioner.\r\n\r\n![design-pluggability](https://user-images.githubusercontent.com/24314423/50688738-26aaaf80-1027-11e9-87e4-871472492764.png)\r\n\r\n**Development**\r\n\r\n- Create two new apps inside the **event-bus** component codebase, one for the **publish-knative** app and the other for **subscription-controller-knative** app.\r\n\r\n  > Note: The **publish-knative** app should expose a publish API to publish messages from kyma to knative-eventing. The publish API should expect two required parameters the **event-type** and the **source-id**.\r\n\r\n  > Note: The **subscription-controller-knative** app should act upon the events coming from Kubernetes regarding the Kyma **subscription-crd** and the Kyma **event-activation-crd**, and it should create a corresponding Knative **subscription**. In addition, it should send requests to the Knative provisioner controller to store the subscriptions in the underlying messaging system backend.\r\n\r\n  > Note: We need to come up with a convention to map kyma-subscription(s) to knative-subscription(s).\r\n\r\n**Deployment**\r\n\r\n- Move **event-bus** helm chart from **kyma/resources/core/charts/event-bus/** to **kyma/resources/event-bus**.\r\n\r\n- Create a new helm chart for **event-bus-knative** component inside **kyma/resources/event-bus-knative**.\r\n\r\n- Move **nats-streaming** helm chart from **kyma/resources/core/charts/event-bus/charts/nats-streaming** to **kyma/resources/nats-streaming**. As a constraint by Knative, the **nats-streaming** messaging system should **not** be installed in the **knative-eventing** namespace. Also it should be installed in a namespace which is **istio-injection** enabled. In general, it can be installed in the **kyma-system** namespace which is **istio-injection** enabled.\r\n\r\n- Create a new helm chart for **nats-streaming-provisioner** under **kyma/resources/nats-streaming-provisioner**. As a constraint by Knative, the **nats-streaming-provisioner** **must** be installed in the **knative-eventing** namespace. Also it should have a dependency entry in the **kyma/resources/core/charts/event-bus-eventing/requirements.yaml** to install it when Kyma runs on top of Knative.\r\n\r\n  The new directory structure should look like this:\r\n  ```\r\n  .\r\n  ├── kyma/\r\n  │   └── resources/\r\n  │       ├── .\r\n  │       ├── event-bus/\r\n  │       ├── event-bus-knative/\r\n  │       ├── nats-streaming/\r\n  │       ├── nats-streaming-provisioner/\r\n  │       ├── .\r\n  ```\r\n\r\n- Update the template files **kyma/installation/resources/installer-cr.yaml.tpl** and **kyma/installation/resources/installer-cr-cluster.yaml.tpl** to include the components **nats-streaming** and **event-bus** under the **spec/components**.\r\n\r\n- Update the template files **kyma/installation/resources/installer-cr-knative.yaml.tpl** and **kyma/installation/resources/installer-cr-cluster-knative.yaml.tpl** to include the components **nats-streaming**, **nats-streaming-provisioner** and **event-bus-knative** under the **spec/components**.\r\n\r\n- Update the knative charts inside **kyma/resources/knative/** to use the proper knative version that has the **nats-streaming-provisioner** supported.\r\n\r\n**Design decisions**\r\n\r\n- There are two separate helm charts for **event-bus** and **event-bus-knative**, because both are serving two different purposes.\r\n- There is one **nats-streaming** helm chart which is used for both **event-bus** and **event-bus-knative**, because the deployment of the **nats-streaming** messaging system remain the same for the two use-cases. The only constraint in case of Kyma is running on top of Knative, is **not** to install **nats-streaming** in the **knative-eventing** namespace. Also it has to be installed in a namespace that is **istio-injection** enabled.\r\n- There is a separate chart for **nats-streaming-provisioner**, because it will be installed only in case of Kyma running on top of Knative.\r\n- There are two new apps **publish-knative** and **subscription-controller-knative** introduced inside the **event-bus** component codebase for clear separation of concerns and responsibilities.\r\n\r\n**Installation**\r\n\r\n- Run Kyma installer and provide the **knative** flag to install **knative**, **knative-eventing** and **nats-streaming-provisioner**.\r\n- Installing multiple Provisioners on a running kyma cluster should be applicable using helm charts by putting the provisioners under the **kyma/resources/** directory.\r\n"},"comment":{"url":"https://api.github.com/repos/kyma-project/community/issues/comments/451440554","html_url":"https://github.com/kyma-project/community/issues/166#issuecomment-451440554","issue_url":"https://api.github.com/repos/kyma-project/community/issues/166","id":451440554,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTQ0MDU1NA==","user":{"login":"marcobebway","id":24314423,"node_id":"MDQ6VXNlcjI0MzE0NDIz","avatar_url":"https://avatars3.githubusercontent.com/u/24314423?v=4","gravatar_id":"","url":"https://api.github.com/users/marcobebway","html_url":"https://github.com/marcobebway","followers_url":"https://api.github.com/users/marcobebway/followers","following_url":"https://api.github.com/users/marcobebway/following{/other_user}","gists_url":"https://api.github.com/users/marcobebway/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobebway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobebway/subscriptions","organizations_url":"https://api.github.com/users/marcobebway/orgs","repos_url":"https://api.github.com/users/marcobebway/repos","events_url":"https://api.github.com/users/marcobebway/events{/privacy}","received_events_url":"https://api.github.com/users/marcobebway/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T13:15:45Z","updated_at":"2019-01-04T13:15:45Z","author_association":"NONE","body":"@davy-hybris thanks for your feedback.\r\n\r\nI updated the proposal according to your comments."}}
{"actor":{"display_login":"marcobebway"}}