Closed cstruck closed 6 months ago
I've confirmed it works out of the box with the default install commands 👍 .
Here's how I tested it:
minikube start
git clone https://github.com/prometheus-operator/kube-prometheus.git
cd kube-prometheus
kubectl create -f manifests/setup
# Wait until the "servicemonitors" CRD is created. The message "No resources found" means success in this context.
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo "";
kubectl create -f manifests/
then, install OpenFGA with the service monitor enabled.
cd <openfga-helm-repo>/charts/openfga
helm install openfga . --set telemetry.metrics.serviceMonitor.enabled=true
Port-forward to the Prometheus dashboard:
kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090
Visit the Prometheus Dashboard by going to http://localhost:9090. After the scrape interval you'll see OpenFGA metrics show up.
For those not familiar with the Prometheus Operator, you can find more on their official website: https://prometheus-operator.dev/
This PR adds the possibility to use the ServiceMonitor custom resource from the prometheus-operator to scrape the
/metrics
endpointDescription
The changes enable an user of the Chart to deploy a ServiceMonitor custom resource. This is needed if the user wants to use the prometheus-operator to scrape the metrics endpoint
References
Review Checklist
main