add fluxcd prometheus scrapping
This commit is contained in:
@@ -23,3 +23,10 @@ helm upgrade flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-opera
|
|||||||
--create-namespace
|
--create-namespace
|
||||||
kubectl apply -f ./deploy/fluxsystem.yaml
|
kubectl apply -f ./deploy/fluxsystem.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Allow prometheus scrapping:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f deploy/monitoring
|
||||||
|
kubectl label ns flux-system prometheus-monitoring=enabled
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: flux-system
|
||||||
|
namespace: flux-system
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: flux
|
||||||
|
app.kubernetes.io/component: monitoring
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- flux-system
|
||||||
|
selector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- helm-controller
|
||||||
|
- source-controller
|
||||||
|
- kustomize-controller
|
||||||
|
- notification-controller
|
||||||
|
- image-automation-controller
|
||||||
|
- image-reflector-controller
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: http-prom
|
||||||
@@ -9,8 +9,13 @@ spec:
|
|||||||
prometheus-monitoring: enabled
|
prometheus-monitoring: enabled
|
||||||
|
|
||||||
podMonitorSelector:
|
podMonitorSelector:
|
||||||
matchLabels:
|
matchExpressions:
|
||||||
release: prometheus
|
- key: release
|
||||||
|
operator: In
|
||||||
|
values: ["prometheus"]
|
||||||
|
- key: prometheus.io/scrape
|
||||||
|
operator: In
|
||||||
|
values: ["true"]
|
||||||
|
|
||||||
serviceMonitorNamespaceSelector:
|
serviceMonitorNamespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|||||||
Reference in New Issue
Block a user