fix ns for secrets

This commit is contained in:
Michael Jerger 2025-02-14 13:49:17 +01:00
parent b79956fe77
commit 13c5ac14c9
3 changed files with 9 additions and 5 deletions
src
main/cljc/dda/c4k_jitsi
test/cljc/dda/c4k_jitsi

View file

@ -52,12 +52,12 @@
(defn-spec auth-objects cp/map-or-seq?
[config config?
auth auth?]
(let [resolved-config (merge config-defaults config)]
(map yaml/to-string
(filter
#(not (nil? %))
(cm/concat-vec
(jitsi/prosody-auth auth)
(jitsi/prosody-auth config auth)
;[(jitsi/generate-secret-jitsi config auth)]
(when (:contains? config :mon-cfg)
(mon/generate-auth (:mon-cfg config) (:mon-auth auth)))))))
(mon/generate-auth (:mon-cfg config) (:mon-auth auth))))))))

View file

@ -159,8 +159,10 @@
(load-and-adjust-namespace "jitsi/prosody-config-test-deployment.yaml" namespace)]))
(defn-spec prosody-auth cp/map-or-seq?
[auth auth?]
(let [{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} auth]
[config config?
auth auth?]
(let [{:keys [namespace]} config
{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} auth]
[(load-and-adjust-namespace "jitsi/prosody-auth-secret.yaml" namespace)
(load-and-adjust-namespace "jitsi/prosody-auth-jibri-secret.yaml" namespace)
(->

View file

@ -340,6 +340,8 @@
:namespace "jitsi"}))))
(is (= 5
(count (cut/prosody-auth
{:fqdn "xy.xy.xy"
:namespace "jitsi"}
{:jvb-auth-password "jvb-auth"
:jicofo-auth-password "jicofo-auth"
:jicofo-component-secret "jicofo-comp"})))))