feature/namespace #2

Merged
jem merged 15 commits from feature/namespace into master 2024-02-20 17:24:37 +00:00
2 changed files with 16 additions and 3 deletions
Showing only changes of commit c1f2cefd14 - Show all commits

View file

@ -64,9 +64,14 @@
(defn-spec generate-secret map? (defn-spec generate-secret map?
[config pg-config? ([auth pg-auth?]
auth pg-auth?] (let [final-config default-config]
(int/generate-secret config auth)) (int/generate-secret final-config auth)))
([config pg-config?
auth pg-auth?]
(let [final-config (merge default-config
config)]
(int/generate-secret final-config auth))))
(defn-spec generate-service map? (defn-spec generate-service map?

View file

@ -39,6 +39,14 @@
:resources {:requests {:storage "10Gi"}}}} :resources {:requests {:storage "10Gi"}}}}
(cut/generate-pvc {})))) (cut/generate-pvc {}))))
(deftest should-generate-secret
(is (= {:apiVersion "v1",
:kind "Secret",
:metadata {:name "postgres-secret", :namespace "default"},
:type "Opaque",
:data {:postgres-user "eHgtdXM=", :postgres-password "eHgtcHc="}}
(cut/generate-secret {:postgres-db-user "xx-us" :postgres-db-password "xx-pw"}))))
(deftest should-generate (deftest should-generate
(is (= 6 (is (= 6