From daf2b6e7ef50ee75425d51a2cd4d3a1943f6d536 Mon Sep 17 00:00:00 2001
From: Andrej Shadura <andrew.shadura@collabora.co.uk>
Date: Mon, 2 May 2022 18:42:37 +0100
Subject: [PATCH] helm: Add a configmap entry for aptly.conf

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
---
 .../charts/backend/templates/configmap.yaml                  | 1 +
 .../charts/backend/templates/statefulset.yaml                | 3 +++
 helm/open-build-service/charts/backend/values.yaml           | 5 ++++-
 helm/open-build-service/values.yaml                          | 3 +++
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/helm/open-build-service/charts/backend/templates/configmap.yaml b/helm/open-build-service/charts/backend/templates/configmap.yaml
index 5eb34bb349..b350201c0b 100644
--- a/helm/open-build-service/charts/backend/templates/configmap.yaml
+++ b/helm/open-build-service/charts/backend/templates/configmap.yaml
@@ -8,3 +8,4 @@ data:
         default "" .Values.global.backend.extraConfig
       ) | quote
     }}
+  aptly.conf: {{ default "" .Values.global.backend.aptly | toPrettyJson | quote }}
diff --git a/helm/open-build-service/charts/backend/templates/statefulset.yaml b/helm/open-build-service/charts/backend/templates/statefulset.yaml
index 24e3002d81..79a94215d0 100644
--- a/helm/open-build-service/charts/backend/templates/statefulset.yaml
+++ b/helm/open-build-service/charts/backend/templates/statefulset.yaml
@@ -75,6 +75,9 @@ spec:
             - name: backend-extraconfig
               mountPath: /etc/obs/BSConfig.local.pm
               subPath: BSConfig.local.pm
+            - name: backend-extraconfig
+              mountPath: /etc/obs/aptly.conf
+              subPath: aptly.conf
         {{- $logs := list
           "dispatcher"
           "dodup"
diff --git a/helm/open-build-service/charts/backend/values.yaml b/helm/open-build-service/charts/backend/values.yaml
index b77e20ba29..19c5ca6e0b 100644
--- a/helm/open-build-service/charts/backend/values.yaml
+++ b/helm/open-build-service/charts/backend/values.yaml
@@ -13,8 +13,11 @@ image:
 global:
   frontend: {}
     # host: frontend
-  backend: {}
+  backend:
     # architectures: ["x86_64", "aarch64"]
+    aptly:
+      rootDir: /srv/obs/aptly
+      ppaDistributorID: ""
 
 imagePullSecrets: []
 nameOverride: ""
diff --git a/helm/open-build-service/values.yaml b/helm/open-build-service/values.yaml
index e8c1f8e7f0..424b844d85 100644
--- a/helm/open-build-service/values.yaml
+++ b/helm/open-build-service/values.yaml
@@ -28,6 +28,9 @@ global:
     # host: backend
     # extraConfig: |
     #   $ipaccess->{"10.*"} = "rw";
+    # aptly:
+    #   rootDir: /srv/obs/aptly
+    #   ppaDistributorID: ""
 
 imagePullSecrets: []
 nameOverride: ""
-- 
GitLab