Skip to content

Commit

Permalink
Extend metrics with source revision labels
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
  • Loading branch information
stefanprodan committed Aug 18, 2023
1 parent 3d838ba commit be97c92
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions monitoring/controllers/kube-prometheus-stack/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,7 @@ spec:
labelsFromPath:
exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ]
- name: "kustomization_revision_info"
help: "The revision information of a Kustomization resource."
each:
type: Info
info:
labelsFromPath:
revision: [ status, lastAppliedRevision ]
labelsFromPath:
name: [ metadata, name ]
exported_namespace: [ metadata, namespace ]
revision: [ status, lastAppliedRevision ]
source_name: [ spec, sourceRef, name ]
- groupVersionKind:
group: helm.toolkit.fluxcd.io
Expand All @@ -109,18 +100,9 @@ spec:
labelsFromPath:
exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ]
- name: "helmrelease_revision_info"
help: "The revision information of a HelmRelease resource."
each:
type: Info
info:
labelsFromPath:
revision: [ status, lastAppliedRevision ]
labelsFromPath:
name: [ metadata, name ]
exported_namespace: [ metadata, namespace ]
revision: [ status, lastAppliedRevision ]
chart_name: [ spec, chart, spec, chart ]
- &metric
- &sourcemetric
groupVersionKind:
group: source.toolkit.fluxcd.io
version: "v1"
Expand All @@ -137,27 +119,29 @@ spec:
labelsFromPath:
exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ]
- <<: *metric
revision: [ status, artifact, revision ]
url: [ spec, url ]
- <<: *sourcemetric
groupVersionKind:
group: source.toolkit.fluxcd.io
version: "v1beta2"
kind: Bucket
- <<: *metric
- <<: *sourcemetric
groupVersionKind:
group: source.toolkit.fluxcd.io
version: "v1beta2"
kind: HelmRepository
- <<: *metric
- <<: *sourcemetric
groupVersionKind:
group: source.toolkit.fluxcd.io
version: "v1beta2"
kind: HelmChart
- <<: *metric
- <<: *sourcemetric
groupVersionKind:
group: source.toolkit.fluxcd.io
version: "v1beta2"
kind: OCIRepository
- <<: *metric
- &metric
groupVersionKind:
group: image.toolkit.fluxcd.io
version: "v1beta2"
Expand Down

0 comments on commit be97c92

Please sign in to comment.