From f029695449aa23e6e11602ec63dde82f7366c6a8 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Thu, 3 Feb 2022 19:26:53 +0100
Subject: [PATCH] fix(monitoring): Limit prometheus retention by disk size

This patch adjusts the retention to be either 15 days or 15GB of
straoge, which should help to keep data growth under control.

It might be an idea, to prodive a more longterm metrics storage later
on for a selected subset.

The patch also adjust the pvc size once more to account of the size
settings and makes sure there are 2 GiB of additional headspace.

References:
https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
---
 infrastructure/monitoring/release.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/infrastructure/monitoring/release.yaml b/infrastructure/monitoring/release.yaml
index c393517da..d020f3d80 100644
--- a/infrastructure/monitoring/release.yaml
+++ b/infrastructure/monitoring/release.yaml
@@ -175,7 +175,7 @@ spec:
         probeSelector: {}
         probeNamespaceSelector: {}
         retention: 14d
-        retentionSize: ""
+        retentionSize: 15GB
         walCompression: false
         paused: false
         replicas: 1
@@ -191,7 +191,7 @@ spec:
               accessModes: ["ReadWriteOnce"]
               resources:
                 requests:
-                  storage: 10Gi
+                  storage: 17Gi
         securityContext:
           runAsGroup: 2000
           runAsNonRoot: true
-- 
GitLab