From c8042f5d61a022bd245fed81494029e1ba6d55d2 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sat, 22 Jan 2022 23:55:04 +0100
Subject: [PATCH] feat(monitoring): Move prometheus to monitoring-system

---
 infrastructure/kustomization.yaml                            | 2 +-
 infrastructure/{prometheus => monitoring}/kustomization.yaml | 2 +-
 infrastructure/{prometheus => monitoring}/namespace.yaml     | 4 ++--
 infrastructure/{prometheus => monitoring}/release.yaml       | 5 +++--
 infrastructure/{prometheus => monitoring}/repository.yaml    | 1 +
 5 files changed, 8 insertions(+), 6 deletions(-)
 rename infrastructure/{prometheus => monitoring}/kustomization.yaml (81%)
 rename infrastructure/{prometheus => monitoring}/namespace.yaml (64%)
 rename infrastructure/{prometheus => monitoring}/release.yaml (99%)
 rename infrastructure/{prometheus => monitoring}/repository.yaml (85%)

diff --git a/infrastructure/kustomization.yaml b/infrastructure/kustomization.yaml
index ddfd7ed6f..dca11f724 100644
--- a/infrastructure/kustomization.yaml
+++ b/infrastructure/kustomization.yaml
@@ -10,4 +10,4 @@ resources:
   - cert-manager
   - nginx-system
   - longhorn
-  - prometheus
+  - monitoring
diff --git a/infrastructure/prometheus/kustomization.yaml b/infrastructure/monitoring/kustomization.yaml
similarity index 81%
rename from infrastructure/prometheus/kustomization.yaml
rename to infrastructure/monitoring/kustomization.yaml
index 920eff148..8fcc611e7 100644
--- a/infrastructure/prometheus/kustomization.yaml
+++ b/infrastructure/monitoring/kustomization.yaml
@@ -1,6 +1,6 @@
 apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
-namespace: monitoring
+namespace: monitoring-system
 resources:
   - namespace.yaml
   - repository.yaml
diff --git a/infrastructure/prometheus/namespace.yaml b/infrastructure/monitoring/namespace.yaml
similarity index 64%
rename from infrastructure/prometheus/namespace.yaml
rename to infrastructure/monitoring/namespace.yaml
index 14d23d817..da40b2df0 100644
--- a/infrastructure/prometheus/namespace.yaml
+++ b/infrastructure/monitoring/namespace.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Namespace
 metadata:
-  name: monitoring
+  name: monitoring-system
   labels:
-    name: monitoring
+    name: monitoring-system
     kyverno.shivering-isles.com/class: "system"
diff --git a/infrastructure/prometheus/release.yaml b/infrastructure/monitoring/release.yaml
similarity index 99%
rename from infrastructure/prometheus/release.yaml
rename to infrastructure/monitoring/release.yaml
index bd1e87cfc..7c705b594 100644
--- a/infrastructure/prometheus/release.yaml
+++ b/infrastructure/monitoring/release.yaml
@@ -2,15 +2,16 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1
 kind: HelmRelease
 metadata:
   name: kube-prometheus
-  namespace: monitoring
+  namespace: monitoring-system
 spec:
-  releaseName: monitoring
+  releaseName: kube-prometheus-stack
   chart:
     spec:
       chart: kube-prometheus-stack
       sourceRef:
         kind: HelmRepository
         name: prometheus-community
+        namespace: monitoring-system
       # renovate: helmRepo=https://prometheus-community.github.io/helm-charts depName=kube-prometheus-stack
       version: 30.0.1
   interval: 5m
diff --git a/infrastructure/prometheus/repository.yaml b/infrastructure/monitoring/repository.yaml
similarity index 85%
rename from infrastructure/prometheus/repository.yaml
rename to infrastructure/monitoring/repository.yaml
index 64a1a415e..94277421c 100644
--- a/infrastructure/prometheus/repository.yaml
+++ b/infrastructure/monitoring/repository.yaml
@@ -2,6 +2,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
 kind: HelmRepository
 metadata:
   name: prometheus-community
+  namespace: monitoring-system
 spec:
   interval: 30m
   url: https://prometheus-community.github.io/helm-charts
-- 
GitLab