Skip to content

Commit

Permalink
Add kustomization_revision_info metric
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 26865c6 commit 3d838ba
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions monitoring/controllers/kube-prometheus-stack/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,33 @@ spec:
config:
spec:
resources:
- groupVersionKind:
group: kustomize.toolkit.fluxcd.io
version: "v1"
kind: Kustomization
metricNamePrefix: gotk
metrics:
- name: "resource_info"
help: "The current state of a GitOps Toolkit resource."
each:
type: Info
info:
labelsFromPath:
name: [ metadata, name ]
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 ]
source_name: [ spec, sourceRef, name ]
- groupVersionKind:
group: helm.toolkit.fluxcd.io
version: "v2beta1"
Expand Down Expand Up @@ -130,11 +157,6 @@ spec:
group: source.toolkit.fluxcd.io
version: "v1beta2"
kind: OCIRepository
- <<: *metric
groupVersionKind:
group: kustomize.toolkit.fluxcd.io
version: "v1"
kind: Kustomization
- <<: *metric
groupVersionKind:
group: image.toolkit.fluxcd.io
Expand Down

0 comments on commit 3d838ba

Please sign in to comment.