akuity / kargo

Application lifecycle orchestration
https://kargo.akuity.io/
Apache License 2.0
1.52k stars 132 forks source link

Event: Move event recording in ValidatingWebhook to controller #1844

Open devholic opened 5 months ago

devholic commented 5 months ago

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,

  1. MutatingWebhook annotates event payload to target resources
  2. Controller records event in initial phase of reconciliation loop if payload presents in annotation and clear from annotations

References

krancour commented 4 months ago

Agreed.

krancour commented 4 months ago

@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.

devholic commented 4 months ago

@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.

github-actions[bot] commented 3 weeks ago

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.