flux2
flux2 copied to clipboard
[RFC] Dedicated API for commit status updates
Proposal for adding a new API kind CommitStatus
to the notification-controller.
Signed-off-by: Somtochi Onyekwere [email protected]
@SomtochiAma I would suggest looking at this discussion. I kind of dropped the ball on implementing this last summer...
https://github.com/fluxcd/flux2/discussions/1529#discussioncomment-880161
@phillebaba I have! It was a very good starting point.
I plan on writing another proposal on adding templating (with you as co-author since you have already written a bulk of it in the discussion) and keeping this proposal on just adding the new CommitStatus
kind.
Is the proposal too sparse?
@phillebaba @SomtochiAma does it make sense to add templating to CommitStatus if the actual message is limited to a couple of characters ? Maybe adding prefix
is enough to solve the multi-cluster issue, it's not like the cluster name is something people can template, there is no such metadata in the payload.
It would be good to take into account that cdevents is shaping.
@SomtochiAma we need to take into account things like https://github.com/fluxcd/notification-controller/pull/369 it's not a commit status but it's not an alert either...
So I have looked this over now and for the most part this looks pretty straight forward. My opinion is that this should only cover CommitStatus as it seems to be a well defined term within most Git providers today. Everything else like Github Workflow dispatch should be covered in another RFC, as it would be to much work dealing with that too.
I would like to push for adding some sort of templating feature to the commit status. Just because there would be so many different needs in the future that we cant really consider. The reasoning for why to have it in the first place is that we want to differ a commit status coming from different environments, but we could consider for example a environment with multiple regions. Does just having a prefix solve this? I am not sure but maybe. One use case which my comment covered was the option to add templating parameters from a configmap which would enable the same commit status to be deployed into multiple clsuters but result in different prefixes. The question is mostly how much of an hassle that work is worth.
My opinion is that this should only cover CommitStatus as it seems to be a well defined term within most Git providers today.
Agreed, I've merged the GitHub dispatch integration for the Alert API.