mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-22 15:41:47 +00:00
Add example podMonitor resource
This commit is contained in:
parent
84e2cb4c1f
commit
2c8d89fd41
1 changed files with 21 additions and 0 deletions
|
|
@ -55,6 +55,27 @@ If you wish to use your own Prometheus and Grafana instances, then you can impor
|
||||||
!!! hint
|
!!! hint
|
||||||
Note that the toolkit controllers expose the `/metrics` endpoint on port `8080`.
|
Note that the toolkit controllers expose the `/metrics` endpoint on port `8080`.
|
||||||
When using Prometheus Operator you should create `PodMonitor` objects to configure scraping.
|
When using Prometheus Operator you should create `PodMonitor` objects to configure scraping.
|
||||||
|
|
||||||
|
Below is an example `PodMonitor`:
|
||||||
|
|
||||||
|
````
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
name: kustomize-controller
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- targetPort: 8080
|
||||||
|
honorLabels: true
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- flux-system
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: kustomize-controller
|
||||||
|
````
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue