From a4a8c3b319a99edb05add57b6f4f67a9e784a6c3 Mon Sep 17 00:00:00 2001 From: Michael Jerger <michael.jerger@meissa-gmbh.de> Date: Fri, 14 Feb 2025 09:03:39 +0100 Subject: [PATCH] introduce first prosody secret --- src/main/cljc/dda/c4k_jitsi/core.cljc | 5 +++-- src/main/cljc/dda/c4k_jitsi/jitsi.cljc | 7 ++++++- src/main/resources/jitsi/prosody-secret.yaml | 9 +++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/jitsi/prosody-secret.yaml diff --git a/src/main/cljc/dda/c4k_jitsi/core.cljc b/src/main/cljc/dda/c4k_jitsi/core.cljc index e5ba9f4..78ca942 100644 --- a/src/main/cljc/dda/c4k_jitsi/core.cljc +++ b/src/main/cljc/dda/c4k_jitsi/core.cljc @@ -33,7 +33,7 @@ #(not (nil? %)) (cm/concat-vec (ns/generate resolved-config) - (jitsi/prosody resolved-config) + (jitsi/prosody-config resolved-config) ;; [(jitsi/generate-jvb-service config) ;; (jitsi/generate-web-service config) ;; (jitsi/generate-etherpad-service config) @@ -56,7 +56,8 @@ (filter #(not (nil? %)) (cm/concat-vec - [(jitsi/generate-secret-jitsi config auth)] + (jitsi/prosody-secret auth) + ;[(jitsi/generate-secret-jitsi config auth)] (when (:contains? config :mon-cfg) (mon/generate-auth (:mon-cfg config) (:mon-auth auth))))))) diff --git a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc index 342ce61..bdd47d9 100644 --- a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc +++ b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc @@ -138,7 +138,7 @@ (yaml/load-as-edn "jitsi/modelector-deployment.yaml") (cm/replace-all-matching "NAMESPACE" namespace)))) -(defn-spec prosody cp/map-or-seq? +(defn-spec prosody-config cp/map-or-seq? [config config?] (let [{:keys [fqdn namespace]} config] [(-> @@ -167,3 +167,8 @@ (yaml/load-as-edn "jitsi/prosody-test-deployment.yaml") (cm/replace-all-matching "NAMESPACE" namespace))])) +(defn-spec prosody-secret cp/map-or-seq? + [auth auth?] + [(-> + (yaml/load-as-edn "jitsi/prosody-secret.yaml") + (cm/replace-all-matching "NAMESPACE" namespace))]) diff --git a/src/main/resources/jitsi/prosody-secret.yaml b/src/main/resources/jitsi/prosody-secret.yaml new file mode 100644 index 0000000..4cda16f --- /dev/null +++ b/src/main/resources/jitsi/prosody-secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: prosody + namespace: NAMESPACE + labels: + app.kubernetes.io/name: prosody +type: Opaque +data: \ No newline at end of file