remodel components
This commit is contained in:
parent
ae53a2977f
commit
c5cec0bfd5
4 changed files with 41 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -28,3 +28,4 @@ auth.edn
|
|||
config.edn
|
||||
out.yaml
|
||||
.eastwood
|
||||
tmp/
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
[dda.c4k-jitsi.jitsi :as jitsi]
|
||||
[dda.c4k-common.namespace :as ns]))
|
||||
|
||||
(def config-defaults {:issuer "staging", :namespace "jitsi"})
|
||||
(def config-defaults {:issuer "staging",
|
||||
:namespace "jitsi"})
|
||||
|
||||
(s/def ::mon-cfg ::mon/mon-cfg)
|
||||
(s/def ::mon-auth ::mon/mon-auth)
|
||||
|
@ -26,25 +27,27 @@
|
|||
|
||||
(defn-spec config-objects cp/map-or-seq?
|
||||
[config config?]
|
||||
(map yaml/to-string
|
||||
(filter
|
||||
#(not (nil? %))
|
||||
(cm/concat-vec
|
||||
(ns/generate config)
|
||||
[(jitsi/generate-jvb-service config)
|
||||
(jitsi/generate-web-service config)
|
||||
(jitsi/generate-etherpad-service config)
|
||||
(jitsi/generate-excalidraw-backend-service config)
|
||||
(jitsi/generate-modelector-service config)
|
||||
(jitsi/generate-deployment config)
|
||||
(jitsi/generate-excalidraw-deployment config)
|
||||
(jitsi/generate-modelector-deployment config)]
|
||||
(jitsi/generate-ingress-web config)
|
||||
(jitsi/generate-ingress-etherpad config)
|
||||
(jitsi/generate-ingress-excalidraw-backend config)
|
||||
(jitsi/generate-ingress-modelector config)
|
||||
(when (:contains? config :mon-cfg)
|
||||
(mon/generate-config))))))
|
||||
(let [resolved-config (merge config-defaults config)]
|
||||
(map yaml/to-string
|
||||
(filter
|
||||
#(not (nil? %))
|
||||
(cm/concat-vec
|
||||
(ns/generate resolved-config)
|
||||
(jitsi/prosody resolved-config)
|
||||
;; [(jitsi/generate-jvb-service config)
|
||||
;; (jitsi/generate-web-service config)
|
||||
;; (jitsi/generate-etherpad-service config)
|
||||
;; (jitsi/generate-excalidraw-backend-service config)
|
||||
;; (jitsi/generate-modelector-service config)
|
||||
;; (jitsi/generate-deployment config)
|
||||
;; (jitsi/generate-excalidraw-deployment config)
|
||||
;; (jitsi/generate-modelector-deployment config)]
|
||||
;; (jitsi/generate-ingress-web config)
|
||||
;; (jitsi/generate-ingress-etherpad config)
|
||||
;; (jitsi/generate-ingress-excalidraw-backend config)
|
||||
;; (jitsi/generate-ingress-modelector config)
|
||||
(when (:contains? resolved-config :mon-cfg)
|
||||
(mon/generate-config)))))))
|
||||
|
||||
(defn-spec auth-objects cp/map-or-seq?
|
||||
[config config?
|
||||
|
|
|
@ -137,3 +137,11 @@
|
|||
(->
|
||||
(yaml/load-as-edn "jitsi/modelector-deployment.yaml")
|
||||
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||
|
||||
(defn-spec prosody cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn namespace]} config]
|
||||
[(->
|
||||
(yaml/load-as-edn "jitsi/prosody-sa.yaml")
|
||||
(cm/replace-all-matching "NAMESPACE" namespace))]))
|
||||
|
||||
|
|
9
src/main/resources/jitsi/prosody-sa.yaml
Normal file
9
src/main/resources/jitsi/prosody-sa.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: prosody
|
||||
namespace: NAMESPACE
|
||||
labels:
|
||||
helm.sh/chart: prosody-1.4.1
|
||||
app.kubernetes.io/name: prosody
|
||||
app.kubernetes.io/version: "stable-9646"
|
Loading…
Add table
Reference in a new issue