Closed stefanprodan closed 1 year ago
This PR extends the gotk_resource_info metric with metadata specific to each GitOps Toolkit resource kind.
gotk_resource_info
suspended
url
revision
bucket_name
endpoint
chart_name
chart_version
source_name
chart_source_name
webhook_path
image
⚠️ Given that revision can result in high cardinality metrics, we should instruct user how to remove this label if they don't have a use for it.
Kustomization:
gotk_resource_info{ customresource_group="kustomize.toolkit.fluxcd.io", customresource_kind="Kustomization", customresource_version="v1", exported_namespace="flux-system", name="monitoring-controllers", source_name="monitoring", revision="metrics@sha1:63f64aa7109ed7cd6ff76be3dc0d0a1580a38c9b", ready="True" }
GitRepositry:
gotk_resource_info{ customresource_group="source.toolkit.fluxcd.io", customresource_kind="GitRepository", customresource_version="v1", exported_namespace="flux-system", name="monitoring", revision="metrics@sha1:e8f85cc9ac1a17f6224d3046d4f714e8ff8b539c", url="https://github.com/fluxcd/flux2-monitoring-example.git", ready="True" }
HelmRelease:
gotk_resource_info{ customresource_group="helm.toolkit.fluxcd.io", customresource_kind="HelmRelease", customresource_version="v2beta1", exported_namespace="monitoring", name="loki-stack", chart_source_name="grafana-charts", chart_name="loki-stack", revision="2.9.11", ready="True" }
HelmChart:
gotk_resource_info{ customresource_group="source.toolkit.fluxcd.io", customresource_kind="HelmChart", customresource_version="v1beta2", exported_namespace="monitoring", name="monitoring-loki-stack", chart_name="loki-stack", chart_version="2.x", revision="2.9.11", ready="True" }
HelmRepository:
gotk_resource_info{ customresource_group="source.toolkit.fluxcd.io", customresource_kind="HelmRepository", customresource_version="v1beta2", exported_namespace="monitoring", name="grafana-charts", revision="sha256:c10ae0b0798a616b1aa494128294f223e5c36047e35508fbab57d0a30f0a834f", url="https://grafana.github.io/helm-charts", ready="True" }
This PR extends the
gotk_resource_info
metric with metadata specific to each GitOps Toolkit resource kind.Changes
suspended
labels to all info metricsurl
andrevision
labels to GitRepository, OCIRepository, HelmRepository metricsbucket_name
,endpoint
andrevision
labels to Bucket metricschart_name
,chart_version
andrevision
labels to HelmChart metricssource_name
andrevision
labels to Kustomization objectschart_source_name
,chart_name
andrevision
labels to HelmRelease objectswebhook_path
labels to Receiver metricsimage
labels to ImageRepository metricssource_name
labels to ImagePolicy metrics⚠️ Given that
revision
can result in high cardinality metrics, we should instruct user how to remove this label if they don't have a use for it.Examples
Kustomization:
GitRepositry:
HelmRelease:
HelmChart:
HelmRepository: