chg staging type to string

This commit is contained in:
ansgarz 2022-06-10 15:24:32 +02:00
parent a8dc496f03
commit 98b53c6509
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
[dda.c4k-common.postgres :as postgres] [dda.c4k-common.postgres :as postgres]
[dda.c4k-gitea.gitea :as gitea])) [dda.c4k-gitea.gitea :as gitea]))
(def config-defaults {:issuer :staging}) (def config-defaults {:issuer "staging"})
(def config? (s/keys :req-un [::gitea/fqdn] (def config? (s/keys :req-un [::gitea/fqdn]
:opt-un [::gitea/issuer])) :opt-un [::gitea/issuer]))

View file

@ -34,7 +34,7 @@
(defn generate-ingress [config] (defn generate-ingress [config]
(let [{:keys [fqdn issuer] (let [{:keys [fqdn issuer]
:or {issuer :staging}} config :or {issuer "staging"}} config
letsencrypt-issuer (name issuer)] letsencrypt-issuer (name issuer)]
(-> (->
(yaml/load-as-edn "gitea/ingress.yaml") (yaml/load-as-edn "gitea/ingress.yaml")

View file

@ -46,7 +46,7 @@
:persistentVolumeClaim {:claimName "gitea-root-pvc"}} :persistentVolumeClaim {:claimName "gitea-root-pvc"}}
{:name "gitea-data-volume", {:name "gitea-data-volume",
:persistentVolumeClaim {:claimName "gitea-data-pvc"}}]}}}} :persistentVolumeClaim {:claimName "gitea-data-pvc"}}]}}}}
(cut/generate-deployment {:fqdn "test.com" :issuer :staging :postgres-db-user "pg-user" :postgres-db-password "pg-pw"})))) (cut/generate-deployment {:fqdn "test.com" :issuer "staging" :postgres-db-user "pg-user" :postgres-db-password "pg-pw"}))))
(deftest should-generate-ingress (deftest should-generate-ingress
@ -68,4 +68,4 @@
:path "/", :path "/",
:backend :backend
{:service {:name "gitea-service", :port {:number 3000}}}}]}}]}} {:service {:name "gitea-service", :port {:number 3000}}}}]}}]}}
(cut/generate-ingress {:fqdn "test.com" :issuer :staging})))) (cut/generate-ingress {:fqdn "test.com" :issuer "staging"}))))