kargo
kargo copied to clipboard
Event: Move event recording in ValidatingWebhook to controller
Background
As @hiddeco pointed out, recording Events on ValidatingWebhook doesn't guarantee that the given event is really happened or not because other ValidatingWebhook in cluster can affect the result of validation.
Proposal
Instead of recording events in ValidatingWebhook,
- MutatingWebhook annotates event payload to target resources
- Controller records event in initial phase of reconciliation loop if payload presents in annotation and clear from annotations
References
Agreed.
@devholic I'll leave it up to you whether this needs to be changed in the v0.6.0 timeline or if the current behavior is acceptable for now, making this lower priority. Your call.
@krancour Focusing on event tracking itself has higher priority for v0.6.0, so I think we can do this after v0.6.0 is released.
This issue has been automatically marked as stale because it had no activity for 90 days. It will be closed if no activity occurs in the next 30 days but can be reopened if it becomes relevant again.