Skip to content

Commit

Permalink
Merge pull request #2782 from fluxcd/monitoring-refactoring
Browse files Browse the repository at this point in the history
Refactor Flux Prometheus monitoring stack
  • Loading branch information
stefanprodan authored May 30, 2022
2 parents b816471 + 4acef9d commit bcef28e
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 307 deletions.
18 changes: 0 additions & 18 deletions manifests/monitoring/grafana/datasources.yaml

This file was deleted.

60 changes: 0 additions & 60 deletions manifests/monitoring/grafana/deployment.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions manifests/monitoring/grafana/kustomization.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions manifests/monitoring/grafana/providers.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions manifests/monitoring/grafana/service.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions manifests/monitoring/kube-prometheus-stack/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
name: monitoring
labels:
app.kubernetes.io/component: monitoring
17 changes: 10 additions & 7 deletions manifests/monitoring/kube-prometheus-stack/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,28 @@ spec:
interval: 5m
chart:
spec:
version: 34.7.0
version: "35.x"
chart: kube-prometheus-stack
sourceRef:
kind: HelmRepository
name: prometheus-community
interval: 1m
interval: 60m
install:
crds: Create
upgrade:
crds: CreateReplace
# https:/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml
values:
alertmanager:
enabled: false
grafana:
sidecar:
dashboards:
searchNamespace: ALL
prometheus:
prometheusSpec:
retention: 24h
resources:
requests:
cpu: 200m
memory: 200Mi
podMonitorNamespaceSelector: {}
podMonitorSelector:
matchLabels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
4 changes: 2 additions & 2 deletions manifests/monitoring/kube-prometheus-stack/repository.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: source.toolkit.fluxcd.io/v1beta1
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: prometheus-community
spec:
interval: 1m
interval: 120m
url: https://prometheus-community.github.io/helm-charts
6 changes: 0 additions & 6 deletions manifests/monitoring/kustomization.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"iconColor": "red",
"name": "flux events",
"target": {
"limit": 100,
"matchAny": false,
"tags": [
"flux"
],
"type": "tags"
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"iconColor": "red",
"name": "flux events",
"target": {
"limit": 100,
"matchAny": false,
"tags": [
"flux"
],
"type": "tags"
}
}
]
},
Expand Down
6 changes: 4 additions & 2 deletions manifests/monitoring/monitoring-config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ resources:
configMapGenerator:
- name: flux-grafana-dashboards
files:
- ../grafana/dashboards/control-plane.json
- ../grafana/dashboards/cluster.json
- dashboards/control-plane.json
- dashboards/cluster.json
options:
labels:
grafana_dashboard: "1"
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
1 change: 1 addition & 0 deletions manifests/monitoring/monitoring-config/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: flux-system
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
spec:
namespaceSelector:
matchNames:
Expand Down
5 changes: 0 additions & 5 deletions manifests/monitoring/prometheus/account.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions manifests/monitoring/prometheus/deployment.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions manifests/monitoring/prometheus/kustomization.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions manifests/monitoring/prometheus/prometheus.yml

This file was deleted.

Loading

0 comments on commit bcef28e

Please sign in to comment.