-
Notifications
You must be signed in to change notification settings - Fork 403
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
Document Subscription custom resource #1277
Conversation
- Add documentation - Update the cli refernce documentation
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.
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: |
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.
- Create an event trigger for lamba/microservice >
Create an event trigger for lambda or microservice
- events will be delivered >
events are delivered
- 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. | |
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.
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. | |
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.
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. | |
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.
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. | ||
|
||
``` |
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.
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. | |
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.
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` | |
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.
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. | |
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.
After the timeout has expired, events are redelivered.
@bszwarc I applied the feedback. Please have a look. |
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.
One small change (in code sample formatting)
|
||
This is a sample resource that creates an event trigger for a lambda with `order.created` event. | ||
|
||
``` ) |
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.
``` yaml
(at the beginning of the code sample)
e242510
to
2f010b2
Compare
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.
Approved.
Description
Related issue(s)
See also #1121