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?
[config pg-config?
([auth pg-auth?]
(let [final-config default-config]
(int/generate-secret final-config auth)))
([config pg-config?
auth pg-auth?]
(int/generate-secret config auth))
(let [final-config (merge default-config
config)]
(int/generate-secret final-config auth))))
(defn-spec generate-service map?

View file

@ -39,6 +39,14 @@
:resources {:requests {:storage "10Gi"}}}}
(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
(is (= 6