mob
This commit is contained in:
parent
a98aae76bf
commit
af57b9dd20
3 changed files with 8 additions and 9 deletions
|
@ -19,12 +19,12 @@
|
||||||
(s/def ::user-name bash-env-string?)
|
(s/def ::user-name bash-env-string?)
|
||||||
(s/def ::user-password string?)
|
(s/def ::user-password string?)
|
||||||
(s/def ::fqdn fqdn-string?)
|
(s/def ::fqdn fqdn-string?)
|
||||||
|
(s/def ::issuer #{:prod :staging})
|
||||||
|
|
||||||
(def config? (s/keys :req-un [::user-name ::user-password ::fqdn]
|
(def config? (s/keys :req-un [::fqdn]
|
||||||
:opt-un [::issuer]))
|
:opt-un [::issuer]))
|
||||||
|
|
||||||
(def auth? any?)
|
(def auth? (s/keys :req-un [::user-name ::user-password]))
|
||||||
(def config? config?)
|
|
||||||
|
|
||||||
(defn generate-config [my-config my-auth]
|
(defn generate-config [my-config my-auth]
|
||||||
(->
|
(->
|
||||||
|
@ -73,12 +73,12 @@
|
||||||
(yaml/from-string (yaml/load-resource "service.yaml")))
|
(yaml/from-string (yaml/load-resource "service.yaml")))
|
||||||
|
|
||||||
(defn-spec generate any?
|
(defn-spec generate any?
|
||||||
[my-config string?
|
[my-config config?
|
||||||
my-auth string?]
|
my-auth auth?]
|
||||||
(cs/join "\n"
|
(cs/join "\n"
|
||||||
[(yaml/to-string (generate-config my-config my-auth))
|
[(yaml/to-string (generate-config my-config my-auth))
|
||||||
"---"
|
"---"
|
||||||
(yaml/to-string (generate-config))
|
(yaml/to-string (generate-certificate))
|
||||||
"---"
|
"---"
|
||||||
(yaml/to-string (generate-ingress))
|
(yaml/to-string (generate-ingress))
|
||||||
"---"
|
"---"
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
{}
|
{:user-name "testuser"
|
||||||
|
:user-password "test1234"}
|
|
@ -1,4 +1,2 @@
|
||||||
{:fqdn "test.de"
|
{:fqdn "test.de"
|
||||||
:user-name "testuser"
|
|
||||||
:user-password "test1234"
|
|
||||||
:issuer :prod}
|
:issuer :prod}
|
Loading…
Reference in a new issue