diff --git a/project.clj b/project.clj index f03099a..2eee50e 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 "1.1.1-SNAPSHOT"]] + [org.domaindrivenarchitecture/c4k-common-clj "2.0.0-SNAPSHOT"]] :target-path "target/%s/" :source-paths ["src/main/cljc" "src/main/clj"] diff --git a/src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc b/src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc index df5c85f..651ef23 100644 --- a/src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc +++ b/src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc @@ -10,14 +10,8 @@ [dda.c4k-common.common :as cm] [dda.c4k-common.postgres :as postgres])) -; TODO: Replace method in c4k-common.predicate and update all c4k modules. -(defn letsencrypt-issuer? - [input] - (contains? #{"prod" "staging"} input)) -; TODO: Remove (name ...) function calls, when issuer is no longer a keyword (also in c4k-common) - (s/def ::fqdn cp/fqdn-string?) -(s/def ::issuer letsencrypt-issuer?) ;cp/letsencrypt-issuer? +(s/def ::issuer cp/letsencrypt-issuer?) (s/def ::restic-repository string?) (s/def ::nextcloud-data-volume-path string?) (s/def ::nextcloud-admin-user cp/bash-env-string?) @@ -44,7 +38,7 @@ (defn generate-certificate [config] (let [{:keys [fqdn issuer]} config - letsencrypt-issuer (name issuer)] + letsencrypt-issuer issuer] (-> (yaml/from-string (yaml/load-resource "nextcloud/certificate.yaml")) (assoc-in [:spec :commonName] fqdn) @@ -59,7 +53,7 @@ (defn generate-ingress [config] (let [{:keys [fqdn issuer] :or {issuer "staging"}} config - letsencrypt-issuer (name issuer)] + letsencrypt-issuer issuer] (-> (yaml/from-string (yaml/load-resource "nextcloud/ingress.yaml")) (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer)