Occasionally hooks such as a PreSyncHook which had hook-delete-policy: BeforeHookCreation could get into a situation where the hook was forever stuck in "Pending deletion". This is despite the fact that the actual resource (e.g. Job) had successfully been deleted. This was intermittent and would only get stuck once in a while.
This change reworks the sync logic slightly such that we allow the Sync() logic to progress further down the method, into the portion of code that handles hook lifecycle. By doing so, we will attempt to manage a hook's lifecycle (deleted/created/etc...)
Occasionally hooks such as a PreSyncHook which had
hook-delete-policy: BeforeHookCreation
could get into a situation where the hook was forever stuck in "Pending deletion". This is despite the fact that the actual resource (e.g. Job) had successfully been deleted. This was intermittent and would only get stuck once in a while.This change reworks the sync logic slightly such that we allow the Sync() logic to progress further down the method, into the portion of code that handles hook lifecycle. By doing so, we will attempt to manage a hook's lifecycle (deleted/created/etc...)
This is still being tested fully.
Signed-off-by: Jesse Suen jesse@akuity.io