kustomize-controller
kustomize-controller copied to clipboard
Feature request: more status metrics
Currently the metrics on the kustomize-controller can't reliably be used to eg. automatically set a maintenance window during a deploy.
An idea to fix this would be to add some more possibilities:
gotk_reconcile_condition{type="Ready", status="BuildError"}
, in case of an error building the kustomization -> no actual changes were done
gotk_reconcile_condition{type="Ready", status="Progressing"}
, reconcile will be started but health check haven't passed yet (timeout wasn't reached yet) -> would be set before the actual reconcile starts
would these metrics be acceptable? If so I might implement them myself
There is a discussion here on custom metrics https://github.com/fluxcd/flux2/discussions/3769#discussioncomment-5548442
There is a discussion here on custom metrics fluxcd/flux2#3769 (comment)
Feature flag for such metrics would indeed be a good idea to not increase data too much, I just can really use some more detailed metrics in order to set our maintenance windows but don't want to start implementation if it won't be accepted.
@YentlFrickx depending on the feedback from other maintainers, if we agree that this is a good idea, we'll have to create an RFC. The RFC must document all the custom metics that each controller should expose, only after the RFC is approved we can start working on the implementation.
Adding the status reason to metrics and basically any other field from status is now possible. Docs here: https://fluxcd.io/flux/monitoring/custom-metrics/