This PR adds additional patch_option for Filter/Patch operations named IgnoreHookError and some execution logic around it.
What this PR does / why we need it
If IgnoreHookError is set to true for a Filter/Patch operation and WithSubresource equals to /status, such an operation will be applied even in case of the hook failure.
It can come in handy in a situation when a hook operates around some kubernetes resource and one wants to make it more obvious when the resource was noticied/processed/etc by the hook last time by means of status fields.
This way we could provide some meaningful statuses or a feedback loop on what happens when a hook is executed.
Overview
This PR adds additional patch_option for Filter/Patch operations named
IgnoreHookError
and some execution logic around it.What this PR does / why we need it
If
IgnoreHookError
is set to true for a Filter/Patch operation andWithSubresource
equals to/status
, such an operation will be applied even in case of the hook failure. It can come in handy in a situation when a hook operates around some kubernetes resource and one wants to make it more obvious when the resource was noticied/processed/etc by the hook last time by means of status fields.This way we could provide some meaningful statuses or a feedback loop on what happens when a hook is executed.
Special notes for your reviewer