Update kube-prometheus-stack chart to v35

- Automate kube-prometheus-stack helm release upgrades for the v35.x range
- Remove deprecated Grafana settings
- Set Prometheus retention to 24h
- Label Flux dashboards and PodMonitors with `app.kubernetes.io/component: monitoring`
- Change the `podMonitorSelector` to match the label `app.kubernetes.io/component: monitoring`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
pull/2782/head
Stefan Prodan 3 years ago
parent 2ba0c4435e
commit 8128fc190d
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF

@ -2,3 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
name: monitoring
labels:
app.kubernetes.io/component: monitoring

@ -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://github.com/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

@ -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,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

@ -5,6 +5,7 @@ metadata:
namespace: flux-system
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
spec:
namespaceSelector:
matchNames:

Loading…
Cancel
Save