Skip to content

Document Subscription custom resource #1277

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

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

abbi-gaurav
Copy link
Member

Description

  • Add documentation
  • Update the cli refernce documentation

Related issue(s)
See also #1121

- Add documentation
- Update the cli refernce documentation
@abbi-gaurav abbi-gaurav added area/documentation Issues or PRs related to documentation area/eventing Issues or PRs related to eventing labels Oct 15, 2018
Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments. Additionally, the file name should be changed to reflect the naming convention: {000}-cr-{CDR-kind}.md.
So instead 030-subscription-custom-resource it should be 030-cr-subscription.md.

type: Custom Resource
---

The `subscriptions.eventing.kyma.cx` Custom Resource Definition (CRD) is a detailed description of the kind of data and the format used to create an event trigger for lambda/microservice in Kyma. After creating a new custom resource, the event trigger is registered in the event bus and events will be delivered to the endpoint specified in the custom resource. To get the up-to-date CRD and show the output in the `yaml` format, run this command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Create an event trigger for lamba/microservice > Create an event trigger for lambda or microservice
  2. events will be delivered > events are delivered
  3. The last sentence: To get the up-to-date... should be in a new line.

| **spec.endpoint** | **YES** | The HTTP endpoint to which events will be delivered as a POST request. |
| **spec.push_request_timeout_ms** | **YES** | The HTTP request timeout. After the timeout expires, event will be redelivered. |
| **spec.max_inflight** | **YES** | The max concurrent HTTP requests to deliver events. |
| **spec.include_subscription_name_header** | **YES** | Boolean flag to indicate if the name of the subscription should be included in the HTTP headers while delivering the event. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boolean flag to indicate > The Boolean flag indicating

| **spec.include_subscription_name_header** | **YES** | Boolean flag to indicate if the name of the subscription should be included in the HTTP headers while delivering the event. |
| **spec.event_type** | **YES** | The event type to which the event trigger will be registered. e.g. `order.created` |
| **spec.event_type_version** | **YES** | The version of the event type. |
| **spec.source_id** | **YES** | This field identifies the external solution from which the event was sent to Kyma. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field identifies the external... > Identifies the external the external solution which sent the event to Kyma.

Omitting "this field" at the beginning of the sentence makes it coherent with the first sentence in the table. Also we can avoid the passive voice here.

| **metadata.name** | **YES** | Specifies the name of the CR. |
| **spec.endpoint** | **YES** | The HTTP endpoint to which events will be delivered as a POST request. |
| **spec.push_request_timeout_ms** | **YES** | The HTTP request timeout. After the timeout expires, event will be redelivered. |
| **spec.max_inflight** | **YES** | The max concurrent HTTP requests to deliver events. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max concurrent requests > The maximum number of concurrent requests


This is a sample resource that creates an event trigger for a lambda with `order.created` event.

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use yaml formatting (by adding yaml after ```) to make the output look clearer. Example:

apiVersion: eventing.kyma.cx/v1alpha1
kind: Subscription
metadata:
  name: hello-with-data-subscription
  ...

| Parameter | Mandatory | Description |
|:-----------------------------------------:|:---------:|:----------------------------------------------------------------------------------------------------------------------------|
| **metadata.name** | **YES** | Specifies the name of the CR. |
| **spec.endpoint** | **YES** | The HTTP endpoint to which events will be delivered as a POST request. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTTP endpoint to which events are delivered as a POST request.

| **spec.push_request_timeout_ms** | **YES** | The HTTP request timeout. After the timeout expires, event will be redelivered. |
| **spec.max_inflight** | **YES** | The max concurrent HTTP requests to deliver events. |
| **spec.include_subscription_name_header** | **YES** | Boolean flag to indicate if the name of the subscription should be included in the HTTP headers while delivering the event. |
| **spec.event_type** | **YES** | The event type to which the event trigger will be registered. e.g. `order.created` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event type to which the event trigger is registered.

|:-----------------------------------------:|:---------:|:----------------------------------------------------------------------------------------------------------------------------|
| **metadata.name** | **YES** | Specifies the name of the CR. |
| **spec.endpoint** | **YES** | The HTTP endpoint to which events will be delivered as a POST request. |
| **spec.push_request_timeout_ms** | **YES** | The HTTP request timeout. After the timeout expires, event will be redelivered. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the timeout has expired, events are redelivered.

@abbi-gaurav
Copy link
Member Author

@bszwarc I applied the feedback. Please have a look.

Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change (in code sample formatting)


This is a sample resource that creates an event trigger for a lambda with `order.created` event.

``` )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

``` yaml

(at the beginning of the code sample)

Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@abbi-gaurav abbi-gaurav merged commit 2bf2590 into kyma-project:master Oct 16, 2018
@abbi-gaurav abbi-gaurav deleted the docu-subscription-cr branch October 16, 2018 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation area/eventing Issues or PRs related to eventing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants