-
Notifications
You must be signed in to change notification settings - Fork 81
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
bucket notifications - facilitate notif conf to override connection #8932
base: master
Are you sure you want to change the base?
Conversation
391fe76
to
b32378a
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.
I think we should follow the arn structure format, see comments posted above.
src/util/notifications_util.js
Outdated
const filename_parts = connect_filename_with_overrides.split('?'); | ||
const connect_filename_no_overrides = filename_parts[0]; | ||
const overrides_str = filename_parts[1]; |
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.
I think this ad hoc arn structure is not a good idea, we should try to map it to an arn format.
For kafka I expect the kafka arn format like in aws where ClusterName is our connection name, ClusterUuid should match the kafka cluster uuid , and TopicName would be optional:
arn:aws:kafka:::cluster/${ClusterName}/${ClusterUuid}
arn:aws:kafka:::topic/${ClusterName}/${ClusterUuid}/${TopicName}
For http webhook there is no matching arn in aws, however there is api-gateway or lambda. I would go with something in the spirit of api-gateway execute-api arn where ApiId is our connection name, Stage is less relevant as we do not manage the webhook lifecycle but I would still keep it as part of the arn structure, and finally method and path are very relevant:
arn:aws:execute-api:::${ApiId}/${Stage}/${Method}/${ApiSpecificResourcePath}
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.
I've made the topic for kafka to optionally be "kafka:::topic".
Still haven't found any mention of cluster UUID in the client.
Note that using '/' separator in containerized is somewhat confusing because I also need secret name in addition to connection name (currently, at least).
Signed-off-by: Amit Prinz Setter <[email protected]>
Signed-off-by: Amit Prinz Setter <[email protected]>
b32378a
to
5d5ee14
Compare
Describe the Problem
We want to allow user to describe an external server in a single connection file, but allow to specify spec per notification configuration.
Specifically, this will allow to have a single connection file for a single external Kafka server, but allow each notification to have it's own Kafka topic.
Explain the Changes
Each notification can have an "override" object that will take precedence over data from connection file.
The "effective" connect file is the original connect file merged (ie, overridden) with the override object.
Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
Create a connection file for kafka (with or without topic field).
{
"notification_protocol": "kafka",
"name": "k",
"topic": "mytopic",
"kafka_options_object": "{"metadata.broker.list":"localhost:9092"}"
}
Configure a notification with override object:
{
"TopicConfigurations": [
{
"Id": "first",
"TopicArn": "k?{"topic":"override"}",
"Events": []
}
]
}
Create an event (ie upload object to bucket with notification). The notification will be sent with topic "override".