improve uberjar
This commit is contained in:
parent
7ebad4d1d6
commit
81e3e8ed05
3 changed files with 18 additions and 22 deletions
|
@ -11,5 +11,5 @@
|
|||
jitsi/config?
|
||||
jitsi/auth?
|
||||
core/config-defaults
|
||||
core/generate
|
||||
core/k8s-objects
|
||||
cmd-args))
|
||||
|
|
|
@ -4,27 +4,21 @@
|
|||
[clojure.spec.alpha :as s]
|
||||
#?(:clj [orchestra.core :refer [defn-spec]]
|
||||
:cljs [orchestra.core :refer-macros [defn-spec]])
|
||||
[dda.c4k-common.common :as cm]
|
||||
[dda.c4k-common.yaml :as yaml]
|
||||
[dda.c4k-jitsi.jitsi :as jitsi]))
|
||||
|
||||
(def config-defaults {:issuer :staging})
|
||||
(def config-defaults {:issuer "staging"})
|
||||
|
||||
(defn k8s-objects [config]
|
||||
(defn k8s-objects [config auth]
|
||||
(map yaml/to-string
|
||||
[(jitsi/generate-secret-jitsi config)
|
||||
(jitsi/generate-certificate-jitsi config)
|
||||
(jitsi/generate-certificate-etherpad config)
|
||||
(jitsi/generate-jvb-service)
|
||||
(jitsi/generate-web-service)
|
||||
(jitsi/generate-etherpad-service)
|
||||
(jitsi/generate-ingress-jitsi config)
|
||||
(jitsi/generate-ingress-etherpad config)
|
||||
(jitsi/generate-deployment config)]))
|
||||
|
||||
(defn-spec generate any?
|
||||
[my-config jitsi/config?
|
||||
my-auth jitsi/auth?]
|
||||
(cm/concat-vec
|
||||
(map yaml/to-string
|
||||
(filter #(not (nil? %))
|
||||
(merge config-defaults my-config my-auth)))))
|
||||
(filter
|
||||
#(not (nil? %))
|
||||
(cm/concat-vec
|
||||
[(jitsi/generate-secret-jitsi auth)
|
||||
(jitsi/generate-jvb-service)
|
||||
(jitsi/generate-web-service)
|
||||
(jitsi/generate-etherpad-service)
|
||||
(jitsi/generate-deployment config)]
|
||||
(jitsi/generate-ingress-web config)
|
||||
(jitsi/generate-ingress-etherpad config)))))
|
||||
|
|
|
@ -57,9 +57,11 @@
|
|||
(.getElementById "generate-button")
|
||||
(.addEventListener "click"
|
||||
#(do (validate-all!)
|
||||
(-> (core/generate
|
||||
(-> (cm/generate-common
|
||||
(config-from-document)
|
||||
(br/get-content-from-element "auth" :deserializer edn/read-string))
|
||||
(br/get-content-from-element "auth" :deserializer edn/read-string)
|
||||
{}
|
||||
core/k8s-objects)
|
||||
(br/set-output!)))))
|
||||
(add-validate-listener "fqdn")
|
||||
(add-validate-listener "issuer")
|
||||
|
|
Loading…
Reference in a new issue