Skip to content

Commit

Permalink
Merge pull request #36 from Ygnas/policy-attachment-metrics
Browse files Browse the repository at this point in the history
Policy attachment metrics
  • Loading branch information
david-martin committed Oct 25, 2023
2 parents 9feda75 + fca9562 commit 22a18c0
Show file tree
Hide file tree
Showing 25 changed files with 2,590 additions and 1 deletion.
152 changes: 151 additions & 1 deletion config/default/custom-resource-state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -457,4 +457,154 @@ spec:
parent_name: ["parentRef", "name"]
parent_namespace: ["parentRef", "namespace"]
parent_section_name: ["parentRef", "sectionName"]
parent_port: ["parentRef", "port"]
parent_port: ["parentRef", "port"]
- groupVersionKind:
group: kuadrant.io
kind: "TLSPolicy"
version: "v1alpha1"
metricNamePrefix: gatewayapi_tlspolicy
labelsFromPath:
name:
- metadata
- name
namespace:
- metadata
- namespace
metrics:
- name: "labels"
help: "Kubernetes labels converted to Prometheus labels."
each:
type: Info
info:
path: [metadata]
labelsFromPath:
"*": [labels]
- name: "created"
help: "created timestamp"
each:
type: Gauge
gauge:
path: [metadata, creationTimestamp]
- name: "deleted"
help: "deletion timestamp"
each:
type: Gauge
gauge:
path: [metadata, deletionTimestamp]
- name: "target_info"
help: "Target references that the tlspolicy wants to be attached to"
each:
type: Info
info:
path: [spec, targetRef]
labelsFromPath:
target_group: ["group"]
target_kind: ["kind"]
target_name: ["name"]
target_namespace: ["namespace"]
- name: "status"
help: "status condition"
each:
type: Gauge
gauge:
path: [status, conditions]
labelsFromPath:
type: ["type"]
valueFrom: ["status"]
- groupVersionKind:
group: kuadrant.io
kind: "RateLimitPolicy"
version: "v1beta2"
metricNamePrefix: gatewayapi_ratelimitpolicy
labelsFromPath:
name:
- metadata
- name
namespace:
- metadata
- namespace
metrics:
- name: "labels"
help: "Kubernetes labels converted to Prometheus labels."
each:
type: Info
info:
path: [metadata]
labelsFromPath:
"*": [labels]
- name: "created"
help: "created timestamp"
each:
type: Gauge
gauge:
path: [metadata, creationTimestamp]
- name: "deleted"
help: "deletion timestamp"
each:
type: Gauge
gauge:
path: [metadata, deletionTimestamp]
- name: "target_info"
help: "Target references that the tlspolicy wants to be attached to"
each:
type: Info
info:
path: [spec, targetRef]
labelsFromPath:
target_group: ["group"]
target_kind: ["kind"]
target_name: ["name"]
target_namespace: ["namespace"]
- name: "status"
help: "status condition"
each:
type: Gauge
gauge:
path: [status, conditions]
labelsFromPath:
type: ["type"]
valueFrom: ["status"]
- groupVersionKind:
group: gateway.networking.k8s.io
kind: "BackendTLSPolicy"
version: "v1alpha2"
metricNamePrefix: gatewayapi_backendtlspolicy
labelsFromPath:
name:
- metadata
- name
namespace:
- metadata
- namespace
metrics:
- name: "labels"
help: "Kubernetes labels converted to Prometheus labels."
each:
type: Info
info:
path: [metadata]
labelsFromPath:
"*": [labels]
- name: "created"
help: "created timestamp"
each:
type: Gauge
gauge:
path: [metadata, creationTimestamp]
- name: "deleted"
help: "deletion timestamp"
each:
type: Gauge
gauge:
path: [metadata, deletionTimestamp]
- name: "target_info"
help: "Target references that the backendtlspolicy wants to be attached to"
each:
type: Info
info:
path: [spec, targetRef]
labelsFromPath:
target_group: ["group"]
target_kind: ["kind"]
target_name: ["name"]
target_namespace: ["namespace"]
4 changes: 4 additions & 0 deletions config/examples/dashboards/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ configMapGenerator:
namespace: monitoring
files:
- ./udproutes.json
- name: grafana-policies
namespace: monitoring
files:
- ./policies.json
Loading

0 comments on commit 22a18c0

Please sign in to comment.