flant / addon-operator

A system to manage additional components for Kubernetes cluster in a simple, consistent and automated way.
https://flant.github.io/addon-operator/
Apache License 2.0
483 stars 27 forks source link

add update status #414

Closed miklezzzz closed 12 months ago

miklezzzz commented 1 year ago

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

Special notes for your reviewer