From 992d226216aba59096b4a95bdf708112aec90ed1 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Fri, 5 Aug 2022 12:05:24 +0200 Subject: [PATCH] Resolve TODO for volume-total-storage-size schema --- project.clj | 2 +- src/main/cljc/dda/c4k_gitea/gitea.cljc | 7 ++----- src/main/resources/gitea/appini-env-configmap.yaml | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/project.clj b/project.clj index 2a71112..eb5a10c 100644 --- a/project.clj +++ b/project.clj @@ -5,7 +5,7 @@ :url "https://www.apache.org/licenses/LICENSE-2.0.html"} :dependencies [[org.clojure/clojure "1.10.3"] [org.clojure/tools.reader "1.3.6"] - [org.domaindrivenarchitecture/c4k-common-clj "3.0.0"] + [org.domaindrivenarchitecture/c4k-common-clj "3.0.1"] [hickory "0.7.1"]] :target-path "target/%s/" :source-paths ["src/main/cljc" diff --git a/src/main/cljc/dda/c4k_gitea/gitea.cljc b/src/main/cljc/dda/c4k_gitea/gitea.cljc index 6da1beb..23c829d 100644 --- a/src/main/cljc/dda/c4k_gitea/gitea.cljc +++ b/src/main/cljc/dda/c4k_gitea/gitea.cljc @@ -21,7 +21,7 @@ (s/def ::mailer-user pred/bash-env-string?) (s/def ::mailer-pw pred/bash-env-string?) (s/def ::issuer pred/letsencrypt-issuer?) -(s/def ::volume-total-storage-size int?) ;TODO extend this for checking lower size limits +(s/def ::volume-total-storage-size (partial pred/int-gt-n? 5)) (def config-defaults {:issuer "staging"}) @@ -47,10 +47,7 @@ (defn data-storage-by-volume-size [total root] - (cond - (and (<= total 20) (> total 5)) (- total root) - (and (<= total 100) (> total 20)) (- total root) - (> total 100) (- total root))) + (- total root)) #?(:cljs diff --git a/src/main/resources/gitea/appini-env-configmap.yaml b/src/main/resources/gitea/appini-env-configmap.yaml index 000a63e..55827e6 100644 --- a/src/main/resources/gitea/appini-env-configmap.yaml +++ b/src/main/resources/gitea/appini-env-configmap.yaml @@ -38,7 +38,7 @@ data: GITEA__mailer__ENABLED: "true" GITEA__mailer__FROM: FROM GITEA__mailer__MAILER_TYPE: smtp+startls - # TODO: jem 2022-08-02: outdated, use SMTP_ADDR & SMTP_PORT instead + # TODO: jem 2022-08-02: outdated with v1.18, use SMTP_ADDR & SMTP_PORT instead GITEA__mailer__HOST: HOSTANDPORT #[oauth2]