components-contrib
components-contrib copied to clipboard
Proposal: CRDs add a field to constrain micrologic behavior and improve experience.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: messagebus
spec:
type: pubsub.pulsar
version: v1
validatation:
- name: delieverAfter
value: denied # MicroLogic server can't carry delieverAfter field.
- name: initialOffset
value: required # MicroLogic server must carry initialOffset field.
- name: backOffDuration
value: optional
- name: a, b, c, d
value: optional
- name: e, f, g
value: required
metadata:
- name: brokers
value: localhost:19092,localhost:29092,localhost:39092
- name: delieverAfter
value: 2min # Init setting.
...
if err = config.Client().PublishEvent(ctx, name, topic, data, &runtime.PublishEventRequest{
Metadata: map[string]string{
"deliverAt": deliverAt.Format(time.RFC3339),
},
}); err !=nil{
return err // it must be executed and return err.
}
In the financial sector, we do not want a MicroLogic server to carry a field value such as delieverAt
, and the risk is very high. We want to be able to control it in the CRDs. We will write delieverAfter
= 2min to a CRDs file. And it will be stored to metadata in Init phase.
In the CRDs issued by the control panel, we now encounter a business scenario. We hope that this CRDs can have a new field, the type is kv, the key represents the field name, and the value represents the attribute of the field; for example: Optional, Required, Denied Three properties:
- For Optional,
weak verification
, indicating that the field name is carried into the metadata by micrologic in an optional way; - For Required,
strong verification
, indicating that the field name is carried into metdata by micrologic in the required way. If the user does not pass in this field, the dapr runtime will return an error; - For Denied,
strong verification
, indicating that the field name is microloigc and cannot write this field into the metadata. If the user passes in this field, the dapr runtime will return an error;
/cc @berndverst @ItalyPaleAle @daixiang0 .
Can we move this to the dapr/dapr repo? If it's a CRD change, should be discussed by the STC there first. CC: @yaron2
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.