Provides hooks with an ability to patch k8s resources' statuses regardless of a hook execution results so that new status get applied even if a hook fails. Can come in handy in case one wants to set and maintain up-to-date statuses for k8s resources, managed by addon-operator.
What this PR does / why we need it
This pr adds another field StatusCollector to go_hook.Input struct. StatusCollector functionality is based on shell-operator's PatchCollector but limited to patching a resource status.
Go hooks execution logic also was updated to provide a way of patching status in case a go hook fails.
Overview
Provides hooks with an ability to patch k8s resources' statuses regardless of a hook execution results so that new status get applied even if a hook fails. Can come in handy in case one wants to set and maintain up-to-date statuses for k8s resources, managed by
addon-operator
.What this PR does / why we need it
This pr adds another field
StatusCollector
togo_hook.Input
struct.StatusCollector
functionality is based on shell-operator'sPatchCollector
but limited to patching a resource status. Go hooks execution logic also was updated to provide a way of patching status in case a go hook fails.Special notes for your reviewer