From 05f71869efc26d40a1e392a88ef0437f817eb86f Mon Sep 17 00:00:00 2001
From: Pablo Vigo <pvigo@collabora.com>
Date: Tue, 16 Apr 2024 14:00:49 +0200
Subject: [PATCH] Add extravolumes to Helm Chart

It is necessary to add a new block to allow new volumes from the
values file without modifying the original Helm chart.

Signed-off-by: Pablo Vigo <pvigo@collabora.com>
---
 chart/templates/statefulset.yaml | 3 +++
 chart/values.yaml                | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/chart/templates/statefulset.yaml b/chart/templates/statefulset.yaml
index 0272e01a..230ba93b 100644
--- a/chart/templates/statefulset.yaml
+++ b/chart/templates/statefulset.yaml
@@ -121,6 +121,9 @@ spec:
         {{- else }}
             claimName: {{ include "aptly.fullname" . }}-data
         {{- end }}
+        {{- if .Values.extraVolumes }}
+          {{- toYaml .Values.extraVolumes | nindent 8 }}
+        {{- end }}
       {{- with .Values.nodeSelector }}
       nodeSelector:
         {{- toYaml . | nindent 8 }}
diff --git a/chart/values.yaml b/chart/values.yaml
index 83081975..1980a0a3 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -68,6 +68,8 @@ gpg:
   # Expects a list of armored GPG private key strings.
   keys: []
 
+extraVolumes: []
+
 extraVolumeMounts: []
 
 serviceAccount:
-- 
GitLab