Split generation of config- and auth-objects #5

Merged
gec merged 7 commits from split-config-auth into main 2024-07-19 09:29:31 +00:00
Showing only changes of commit 2c3a031081 - Show all commits

View file

@ -65,15 +65,14 @@
(when (contains? config :mon-cfg) (when (contains? config :mon-cfg)
(mon/generate-config))))))) (mon/generate-config)))))))
; REVIEW gec: In general, how do we handle config and auth for auth-objects? (defn auth-objects [config auth]
(defn auth-objects [config] ; ToDo: ADR for generate functions - vector or no vector?
(map yaml/to-string (map yaml/to-string
(filter #(not (nil? %)) (filter #(not (nil? %))
(cm/concat-vec (cm/concat-vec
(ns/generate config) (ns/generate config)
[(postgres/generate-secret config config) ; "config config" seems not right [(postgres/generate-secret config auth)
(forgejo/generate-secrets config)] (forgejo/generate-secrets config)]
(when (contains? config :restic-repository) (when (contains? config :restic-repository)
[(backup/generate-secret config)]) [(backup/generate-secret config)])
(when (contains? config :mon-cfg) (when (contains? config :mon-cfg)
(mon/generate-auth (:mon-cfg config) (:mon-auth config))))))) ; Here also "config config" seems not right (mon/generate-auth (:mon-cfg config) (:mon-auth auth)))))))