diff --git a/manifests/monitoring/kube-prometheus-stack/namespace.yaml b/manifests/monitoring/kube-prometheus-stack/namespace.yaml index d3252360..78abcfce 100644 --- a/manifests/monitoring/kube-prometheus-stack/namespace.yaml +++ b/manifests/monitoring/kube-prometheus-stack/namespace.yaml @@ -2,3 +2,5 @@ apiVersion: v1 kind: Namespace metadata: name: monitoring + labels: + app.kubernetes.io/component: monitoring diff --git a/manifests/monitoring/kube-prometheus-stack/release.yaml b/manifests/monitoring/kube-prometheus-stack/release.yaml index d5985433..13aa4952 100644 --- a/manifests/monitoring/kube-prometheus-stack/release.yaml +++ b/manifests/monitoring/kube-prometheus-stack/release.yaml @@ -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 diff --git a/manifests/monitoring/kube-prometheus-stack/repository.yaml b/manifests/monitoring/kube-prometheus-stack/repository.yaml index 258f4087..49355b53 100644 --- a/manifests/monitoring/kube-prometheus-stack/repository.yaml +++ b/manifests/monitoring/kube-prometheus-stack/repository.yaml @@ -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 diff --git a/manifests/monitoring/grafana/dashboards/cluster.json b/manifests/monitoring/monitoring-config/dashboards/cluster.json similarity index 100% rename from manifests/monitoring/grafana/dashboards/cluster.json rename to manifests/monitoring/monitoring-config/dashboards/cluster.json diff --git a/manifests/monitoring/grafana/dashboards/control-plane.json b/manifests/monitoring/monitoring-config/dashboards/control-plane.json similarity index 100% rename from manifests/monitoring/grafana/dashboards/control-plane.json rename to manifests/monitoring/monitoring-config/dashboards/control-plane.json diff --git a/manifests/monitoring/monitoring-config/kustomization.yaml b/manifests/monitoring/monitoring-config/kustomization.yaml index 11467e33..9f036a57 100644 --- a/manifests/monitoring/monitoring-config/kustomization.yaml +++ b/manifests/monitoring/monitoring-config/kustomization.yaml @@ -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 diff --git a/manifests/monitoring/monitoring-config/podmonitor.yaml b/manifests/monitoring/monitoring-config/podmonitor.yaml index 7838272a..d375e0d9 100644 --- a/manifests/monitoring/monitoring-config/podmonitor.yaml +++ b/manifests/monitoring/monitoring-config/podmonitor.yaml @@ -5,6 +5,7 @@ metadata: namespace: flux-system labels: app.kubernetes.io/part-of: flux + app.kubernetes.io/component: monitoring spec: namespaceSelector: matchNames: