Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inventory metrics: helm release version #3175

Closed
1 task done
gberche-orange opened this issue Oct 5, 2022 · 2 comments
Closed
1 task done

Add inventory metrics: helm release version #3175

gberche-orange opened this issue Oct 5, 2022 · 2 comments

Comments

@gberche-orange
Copy link

Describe the bug

As a developer, in order to watch version bumps propagate on systems, I need fluxcd to provide helm related inventory in prometheus metrics.

This is similar to #3106

Steps to reproduce

Currently the gotk_reconcile_condition provides the HelmRelease name, but not its version.

Workaround is to install a distinct exporter such as https://github.com/sstarcher/helm-exporter with the following drawbacks

  • from a UX point of view, this provides duplicated/inconsistent metrics
  • from a performance perspective, this additional exporter adds loads on the cluster whereas flux helm controller has the data available
  • from a security perspective, this implies giving permissions to an additional exporter to inspect helm releases, whereas flux already has the permissions

Expected behavior

Similar to kube_pod_container_info exposed by K8S that includes the image as label, the helm chart version is needed for each flux HelmRelease CR

More details about the kube_pod_container_info below:
see https://github.com/kubernetes/kube-state-metrics/blob/master/docs/pod-metrics.md

container=
pod=
namespace=
image=
image_id=
image_spec=
container_id=
uid=

kube_pod_container_info{container="alertmanager", container_id="containerd://37d82c840c7148233120bb250a059ceec13e86ec586ab5ef51402df8e6f15794", image="quay.io/prometheus/alertmanager:v0.24.0", image_id="quay.io/prometheus/alertmanager@sha256:088464f949de8065b9da7dfce7302a633d700e9d598e2bebc03310712f083b31", image_spec="quay.io/prometheus/alertmanager:v0.24.0", instance="10.42.7.20:8080", pod="alertmanager-alertmanager-2", service="kube-prometheus-stack-kube-state-metrics", uid="c731ad41-af52-46d9-b156-931f80524151"}

Screenshots and recordings

No response

OS / Distro

n/A

Flux version

n/a

Flux check

n/A

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mtparet
Copy link

mtparet commented May 5, 2023

Needed here too, so we can plug it into our current system. Weavegitops is great to understand and dig into details but we need to have an overview in a monitoring system to be able managing it.

@stefanprodan
Copy link
Member

You can extend the Flux metrics and add the chart version, example here: https://fluxcd.io/flux/monitoring/custom-metrics/#adding-custom-metrics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants