From 2f516412e7229f0ae73242cd51e6e5b4dda6c66f Mon Sep 17 00:00:00 2001 From: Joe Monk Date: Mon, 9 Sep 2024 19:51:11 +0100 Subject: [PATCH] Add prometheus --- .../monitoring/grafana/helmrelease.yaml | 2 +- clusters/kairos/monitoring/helmrepo.yaml | 10 +++++++++- .../kairos/monitoring/loki/helmrelease.yaml | 2 +- .../monitoring/prometheus/helmrelease.yaml | 19 +++++++++++++++++++ .../monitoring/prometheus/kustomization.yaml | 4 ++++ .../monitoring/promtail/helmrelease.yaml | 2 +- 6 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 clusters/kairos/monitoring/prometheus/helmrelease.yaml create mode 100644 clusters/kairos/monitoring/prometheus/kustomization.yaml diff --git a/clusters/kairos/monitoring/grafana/helmrelease.yaml b/clusters/kairos/monitoring/grafana/helmrelease.yaml index e831168..1e051bf 100644 --- a/clusters/kairos/monitoring/grafana/helmrelease.yaml +++ b/clusters/kairos/monitoring/grafana/helmrelease.yaml @@ -11,7 +11,7 @@ spec: kind: HelmRepository name: grafana-repo version: 8.4.1 - interval: 1m0s + interval: 15m targetNamespace: monitoring values: persistence: diff --git a/clusters/kairos/monitoring/helmrepo.yaml b/clusters/kairos/monitoring/helmrepo.yaml index 1101eb5..d1580d0 100644 --- a/clusters/kairos/monitoring/helmrepo.yaml +++ b/clusters/kairos/monitoring/helmrepo.yaml @@ -3,5 +3,13 @@ kind: HelmRepository metadata: name: grafana-repo spec: - interval: 1m0s + interval: 15m url: https://grafana.github.io/helm-charts +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: prometheus-repo +spec: + interval: 15m + url: https://prometheus-community.github.io/helm-charts diff --git a/clusters/kairos/monitoring/loki/helmrelease.yaml b/clusters/kairos/monitoring/loki/helmrelease.yaml index 98a323c..46d0984 100644 --- a/clusters/kairos/monitoring/loki/helmrelease.yaml +++ b/clusters/kairos/monitoring/loki/helmrelease.yaml @@ -11,7 +11,7 @@ spec: kind: HelmRepository name: grafana-repo version: 6.7.4 - interval: 1m0s + interval: 15m targetNamespace: monitoring values: loki: diff --git a/clusters/kairos/monitoring/prometheus/helmrelease.yaml b/clusters/kairos/monitoring/prometheus/helmrelease.yaml new file mode 100644 index 0000000..0a0974f --- /dev/null +++ b/clusters/kairos/monitoring/prometheus/helmrelease.yaml @@ -0,0 +1,19 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: prometheus +spec: + chart: + spec: + chart: prometheus + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: prometheus-repo + version: 6.7.4 + interval: 15m + targetNamespace: monitoring + values: + server: + persistentVolume: + storageClass: local-path \ No newline at end of file diff --git a/clusters/kairos/monitoring/prometheus/kustomization.yaml b/clusters/kairos/monitoring/prometheus/kustomization.yaml new file mode 100644 index 0000000..eb5482e --- /dev/null +++ b/clusters/kairos/monitoring/prometheus/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- helmrelease.yaml \ No newline at end of file diff --git a/clusters/kairos/monitoring/promtail/helmrelease.yaml b/clusters/kairos/monitoring/promtail/helmrelease.yaml index 9c43413..c6864e3 100644 --- a/clusters/kairos/monitoring/promtail/helmrelease.yaml +++ b/clusters/kairos/monitoring/promtail/helmrelease.yaml @@ -11,7 +11,7 @@ spec: kind: HelmRepository name: grafana-repo version: 6.16.4 - interval: 1m0s + interval: 15m targetNamespace: monitoring values: config: