-
Notifications
You must be signed in to change notification settings - Fork 80
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
CDEvents proposal #229
base: main
Are you sure you want to change the base?
CDEvents proposal #229
Conversation
1701b3f
to
8c214ad
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.
looks great to me :)
@chlins can you take a look please |
|
||
### Supported Events | ||
|
||
Harbor events support today are documented in the [webhook notification documentation][harbor-webhook]. |
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.
Some events here are defined based on the functional scenarios of Harbor. CDEvents seem to have some differences compared to CloudEvents. CloudEvents only standardizes the structure of payload data without restricting event types, while CDEvents appear to have events associated with types. This means that some events in question may not be within the scope of CDEvents currently or in the future. Therefore, should we consider implementing restrictions on the frontend, allowing only specific event subscriptions for CDEvents? For example, currently, only PUSH events are supported.
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.
Thanks @chlins - that's a great point. I think only allowing users to select available events via the UI sounds like a good option. I'm not very experienced with front-end development, so I could probably use some help there.
Another question I have related to this is whether Harbor provides users with an alternative way of configuring webhooks, i.e. not via the UI, some configuration file or API. If so, the restriction would have to be applied there too.
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.
Yes, this is where it is not suitable at present. The original design of harbor only supports custom extensions to the payload data structure, but does not limit the event type. If only such restrictions are applied to CDEvents, it feels too specific.
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.
Perhaps we could alter GetSupportedEventTypes
to be PayloadFormat
specific.
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.
@chlins we plan to work to expand the list of events in CDEvents, but it may not match the list of events from Harbor. To that end, I will propose to the CDEvents community to introduce support in the SDKs for custom types.
In the meanwhile, given that Habor supports configuring multiple webhooks, it seems acceptable that the CDEvents ones won't send all event types, as long as we make it clear to users that only a subset of events will be sent. Would this be enough for you to move forward? Please let me know if there is any more changes I shall make to let this proposal move forward.
Proposal to implement CDEvents (cdevents.dev) notifications for Harbor. Signed-off-by: Andrea Frittoli <[email protected]>
8c214ad
to
5da03a1
Compare
Due to the current limitation of CDEvents, only the "artifact.published" event is supported at the moment. Therefore, I would like to hold on this proposal for now. In order to introduce a new format of webhook, Harbor requires that there are no disruptive changes to user behavior, both from the UI and API perspectives, and that consistency is maintained. The dependency here is that either CDEvents should support all types of events defined on the Harbor side or provide a general method for Harbor to define customized events, whether through annotations or attributes. |
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.
It needs to discuss
Thanks @wy65701436 - I'm happy to discuss about this - what is your preferred forum for discussion? Would that be the Harbor working group or here on the proposal or else? |
@wy65701436 @afrittoli did you manage to figure out what is needed |
@afrittoli what's the progress of this one do you need anything from our side? |
Hi @OrlinVasilev, thanks for asking. I've been working with the CDEvents community to add:
The two features will allow covering all existing Harbor events through CDEvents, as requested. Feel free to review the custom events proposal https://hackmd.io/LftfRirGRbKuAcLg9pdOag - I used Harbor as a case study for that. |
An update on this. Support for custom events was just merged in CDEvents https://github.com/cdevents/spec/tree/main/custom. We'll probably cut a release after KubeCon and then I will be able to update the proposal and implementation with support for all existing Harbor events as requested. |
The registry: maintainers of the specifications of CDEvents custom events are encouraged to add their specification to the shared registry @wy65701436 @chlins @OrlinVasilev can we agree upon supporting or not supporting this feature and let @afrittoli know before more time is wasted? |
Since Harbor already supports clouddevents, it may already meet the needs of most cloud-native users. For cdevents, it is more likely to be focused on the area of continuous deployment, and the Harbor community hasn't received too many requests for cdevents support yet, so I'm not sure if this is really valuable or or applicable scenarios to harbor users , so I think we can hold it for a while and wait for more user feedback, and at the same time we can monitor whether there are other artifact registries supports the cdevents. |
Proposal to implement CDEvents (cdevents.dev) notifications for Harbor.
This proposal is not 100% complete yet, the "Implementation Design" section is TBD, and there are a few open questions.