kargo icon indicating copy to clipboard operation
kargo copied to clipboard

Event: Move event recording in ValidatingWebhook to controller

Open devholic opened this issue 1 year ago • 4 comments

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

devholic avatar Apr 15 '24 18:04 devholic

Agreed.

krancour avatar Apr 16 '24 13:04 krancour

@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 avatar Apr 16 '24 13:04 krancour

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

devholic avatar Apr 16 '24 15:04 devholic

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.

github-actions[bot] avatar Aug 20 '24 11:08 github-actions[bot]