Skip to content

Commit

Permalink
Fixup obs for v1 (#1016)
Browse files Browse the repository at this point in the history
* Fix escaping of podmonitor in bash cmd

Signed-off-by: David Martin <[email protected]>

* Bump gateway-api-state-metrics version to use v1 of kaudrant apis for metrics

Signed-off-by: David Martin <[email protected]>

---------

Signed-off-by: David Martin <[email protected]>
  • Loading branch information
david-martin authored Nov 13, 2024
1 parent d1fd5dc commit da2d8ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Kustomization

resources:
- github.com/prometheus-operator/kube-prometheus?ref=release-0.13
- github.com/Kuadrant/gateway-api-state-metrics/config/kuadrant?ref=0.5.0
- github.com/Kuadrant/gateway-api-state-metrics/config/kuadrant?ref=0.6.0
# We're using the additionalScrapeConfigs field of the Prometheus CR
# here to read existing prometheus scrape annotations on pods.
# Ideally this would be done via another PodMonitor or ServicMonitor,
Expand Down
2 changes: 1 addition & 1 deletion doc/install/install-openshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ To scrape these additional metrics, you can install a `kube-state-metrics` insta

```bash
kubectl apply -f https://raw.githubusercontent.com/Kuadrant/kuadrant-operator/main/config/observability/openshift/kube-state-metrics.yaml
kubectl apply -k https://github.com/Kuadrant/gateway-api-state-metrics/config/kuadrant?ref=0.5.0
kubectl apply -k https://github.com/Kuadrant/gateway-api-state-metrics/config/kuadrant?ref=0.6.0
```

To enable request metrics in Istio and scrape them, create the following resource:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spec:
["__meta_kubernetes_pod_annotationpresent_prometheus_io_scrape"]
- action: replace
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
replacement: "[$2]:$1"
replacement: "[\$2]:\$1"
sourceLabels:
[
"__meta_kubernetes_pod_annotation_prometheus_io_port",
Expand All @@ -201,7 +201,7 @@ spec:
targetLabel: "__address__"
- action: replace
regex: (\d+);((([0-9]+?)(\.|$)){4})
replacement: "$2:$1"
replacement: "\$2:\$1"
sourceLabels:
[
"__meta_kubernetes_pod_annotation_prometheus_io_port",
Expand Down

0 comments on commit da2d8ce

Please sign in to comment.