akuity / kargo

Application lifecycle orchestration

Home Page:https://kargo.akuity.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event: Move event recording in ValidatingWebhook to controller

devholic opened this issue · 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

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.