From a99f9e325aedf6c37ffcd8e168288f5c7b8e7153 Mon Sep 17 00:00:00 2001 From: Michael Vittrup Larsen Date: Fri, 16 Jun 2023 12:49:09 +0200 Subject: [PATCH 1/2] Document observability --- doc/installing.md | 21 +++++++++++++++++++++ test-data/kube-state-metrics-values.yaml | 2 ++ 2 files changed, 23 insertions(+) diff --git a/doc/installing.md b/doc/installing.md index 34e16302..1e8bb51d 100644 --- a/doc/installing.md +++ b/doc/installing.md @@ -40,3 +40,24 @@ helm upgrade -i bifrost-gateway-controller-helm oci://ghcr.io/tv2-oss/bifrost-ga In addition to the *bifrost-gateway-controller*, you will need blueprints defining datapath implementations. See [Example GatewayClassBlueprints](../blueprints/README.md). + +## Metrics and Observability + +The controller provides [standard controller +metrics](https://book.kubebuilder.io/reference/metrics-reference.html) +and the Helm chart provides a +[ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitor) +for integration with systems that understand these. + +Observability of Gateway-API resources is possbile through [Custom +Resource State +Metrics](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-metrics.md) +through kube-state-metrics. An example configuration for deploying +kube-state-metrics is [provided +here](test-data/kube-state-metrics-values.yaml). Generally, this +configuration provides condition status for `GatewayClass`, `Gateway` +and `HTTPRoute` resources. + +An SLI for e.g. `Gateway` resources can be created from the metric +`gateway_conditions` and watching for `Gateway`s without the +`Programmed` condition. diff --git a/test-data/kube-state-metrics-values.yaml b/test-data/kube-state-metrics-values.yaml index 23cf4ac7..bb3a3448 100644 --- a/test-data/kube-state-metrics-values.yaml +++ b/test-data/kube-state-metrics-values.yaml @@ -1,3 +1,5 @@ +collectors: [] + resources: limits: cpu: 100m From 4e0b9ef12a04fba5b411e898a4c980adfec6df2b Mon Sep 17 00:00:00 2001 From: Michael Vittrup Larsen Date: Thu, 22 Jun 2023 08:21:50 +0200 Subject: [PATCH 2/2] Update doc/installing.md Co-authored-by: Martin Villumsen --- doc/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installing.md b/doc/installing.md index 1e8bb51d..5e3ae5e5 100644 --- a/doc/installing.md +++ b/doc/installing.md @@ -49,7 +49,7 @@ and the Helm chart provides a [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitor) for integration with systems that understand these. -Observability of Gateway-API resources is possbile through [Custom +Observability of Gateway-API resources is possible through [Custom Resource State Metrics](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-metrics.md) through kube-state-metrics. An example configuration for deploying