mirror of https://github.com/fluxcd/flux2.git
Use kube-prometheus-stack for monitoring
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>pull/1399/head
parent
17e3c57d7e
commit
3b91e14f6d
@ -0,0 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- repository.yaml
|
||||
- release.yaml
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
@ -0,0 +1,25 @@
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: kube-prometheus-stack
|
||||
spec:
|
||||
interval: 5m
|
||||
chart:
|
||||
spec:
|
||||
chart: kube-prometheus-stack
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: prometheus-community
|
||||
interval: 1m
|
||||
values:
|
||||
alertmanager:
|
||||
enabled: false
|
||||
grafana:
|
||||
sidecar:
|
||||
dashboards:
|
||||
searchNamespace: ALL
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
podMonitorSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/part-of: flux
|
@ -0,0 +1,7 @@
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: prometheus-community
|
||||
spec:
|
||||
interval: 1m
|
||||
url: https://prometheus-community.github.io/helm-charts
|
@ -0,0 +1,13 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: flux-system
|
||||
resources:
|
||||
- podmonitor.yaml
|
||||
configMapGenerator:
|
||||
- name: flux-grafana-dashboards
|
||||
files:
|
||||
- ../grafana/dashboards/control-plane.json
|
||||
- ../grafana/dashboards/cluster.json
|
||||
options:
|
||||
labels:
|
||||
grafana_dashboard: flux-system
|
@ -0,0 +1,24 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
labels:
|
||||
app.kubernetes.io/part-of: flux
|
||||
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:
|
||||
- targetPort: http-prom
|
Loading…
Reference in New Issue