Use inline-resources macro
This commit is contained in:
parent
93433215c4
commit
63dcc3357a
1 changed files with 2 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
(ns dda.c4k-shynet.shynet
|
(ns dda.c4k-shynet.shynet
|
||||||
(:require
|
(:require
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
#?(:cljs [shadow.resource :as rc])
|
#?(:cljs [dda.c4k-common.macros :refer-macros [inline-resources]])
|
||||||
[dda.c4k-common.yaml :as yaml]
|
[dda.c4k-common.yaml :as yaml]
|
||||||
[dda.c4k-common.common :as cm]
|
[dda.c4k-common.common :as cm]
|
||||||
[dda.c4k-common.predicate :as cp]
|
[dda.c4k-common.predicate :as cp]
|
||||||
|
@ -13,13 +13,7 @@
|
||||||
|
|
||||||
#?(:cljs
|
#?(:cljs
|
||||||
(defmethod yaml/load-resource :shynet [resource-name]
|
(defmethod yaml/load-resource :shynet [resource-name]
|
||||||
(case resource-name
|
(get (inline-resources "shynet") resource-name)))
|
||||||
"shynet/secret.yaml" (rc/inline "shynet/secret.yaml")
|
|
||||||
"shynet/deployments.yaml" (rc/inline "shynet/deployments.yaml")
|
|
||||||
"shynet/service-redis.yaml" (rc/inline "shynet/service-redis.yaml")
|
|
||||||
"shynet/service-webserver.yaml" (rc/inline "shynet/service-webserver.yaml")
|
|
||||||
"shynet/statefulset.yaml" (rc/inline "shynet/statefulset.yaml")
|
|
||||||
(throw (js/Error. "Undefined Resource!")))))
|
|
||||||
|
|
||||||
(defn generate-secret [config]
|
(defn generate-secret [config]
|
||||||
(let [{:keys [fqdn django-secret-key postgres-db-user postgres-db-password]} config]
|
(let [{:keys [fqdn django-secret-key postgres-db-user postgres-db-password]} config]
|
||||||
|
|
Loading…
Reference in a new issue