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

Policy attachment metrics #36

Merged
merged 5 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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