From b88c627102c90235e4db4003d748c105c71830c1 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Fri, 16 Jul 2021 15:49:43 +0200 Subject: [PATCH] Changed restic-repo to not base64 encoded string --- src/main/cljc/dda/c4k_jira/backup.cljc | 2 +- src/main/resources/backup/config.yaml | 2 +- src/test/cljc/dda/c4k_jira/backup_test.cljc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/cljc/dda/c4k_jira/backup.cljc b/src/main/cljc/dda/c4k_jira/backup.cljc index ffc7fa8..5668c0e 100644 --- a/src/main/cljc/dda/c4k_jira/backup.cljc +++ b/src/main/cljc/dda/c4k_jira/backup.cljc @@ -23,7 +23,7 @@ (let [{:keys [restic-repository]} my-conf] (-> (yaml/from-string (yaml/load-resource "backup/config.yaml")) - (cm/replace-key-value :restic-repository (b64/encode restic-repository))))) + (cm/replace-key-value :restic-repository restic-repository)))) (defn generate-cron [] (yaml/from-string (yaml/load-resource "backup/cron.yaml"))) diff --git a/src/main/resources/backup/config.yaml b/src/main/resources/backup/config.yaml index 64b775d..01d0edf 100644 --- a/src/main/resources/backup/config.yaml +++ b/src/main/resources/backup/config.yaml @@ -5,5 +5,5 @@ metadata: labels: app.kubernetes.io/name: backup app.kubernetes.io/part-of: jira -data: +stringData: restic-repository: restic-repository \ No newline at end of file diff --git a/src/test/cljc/dda/c4k_jira/backup_test.cljc b/src/test/cljc/dda/c4k_jira/backup_test.cljc index bde26e1..60fb9b5 100644 --- a/src/test/cljc/dda/c4k_jira/backup_test.cljc +++ b/src/test/cljc/dda/c4k_jira/backup_test.cljc @@ -20,9 +20,9 @@ :metadata {:name "backup-config" :labels {:app.kubernetes.io/name "backup" :app.kubernetes.io/part-of "jira"}} - :data - {:restic-repository "cmVzdGljLXJlcG9zaXRvcnk="}} - (cut/generate-config {:restic-repository "restic-repository"})))) + :stringData + {:restic-repository "s3:restic-repository"}} + (cut/generate-config {:restic-repository "s3:restic-repository"})))) (deftest should-generate-cron (is (= {:apiVersion "batch/v1beta1"