Bugfixes
Spec seems to accept a cert map for an ingress map.
This commit is contained in:
parent
0a3a85d93d
commit
8a97900cda
3 changed files with 7 additions and 14 deletions
|
@ -17,7 +17,7 @@
|
|||
[input]
|
||||
(every? true? (map pred/fqdn-string? input)))
|
||||
|
||||
(s/def ::unique-name pred/fqdn-string?)
|
||||
(s/def ::unique-name string?)
|
||||
(s/def ::issuer pred/letsencrypt-issuer?)
|
||||
(s/def ::authtoken pred/bash-env-string?)
|
||||
(s/def ::fqdns fqdn-list?)
|
||||
|
@ -77,12 +77,6 @@
|
|||
(str/replace % value-to-partly-match value-to-inplace) %)
|
||||
col))
|
||||
|
||||
; generate a list of host-rules from a list of fqdns
|
||||
(defn make-host-rules-from-fqdns
|
||||
[rule fqdns]
|
||||
;function that creates a rule from host names
|
||||
(mapv #(assoc-in rule [:host] %) fqdns))
|
||||
|
||||
#?(:cljs
|
||||
(defmethod yaml/load-resource :website [resource-name]
|
||||
(case resource-name
|
||||
|
@ -115,7 +109,7 @@
|
|||
(let [{:keys [unique-name fqdns]} config]
|
||||
(ing/generate-https-ingress {:fqdns fqdns
|
||||
:cert-name (generate-cert-name unique-name)
|
||||
:ingress-name (generate-http-ingress-name unique-name)
|
||||
:ingress-name (generate-https-ingress-name unique-name)
|
||||
:service-name (generate-service-name unique-name)
|
||||
:service-port 80})))
|
||||
|
||||
|
@ -123,9 +117,9 @@
|
|||
[config websitedata?]
|
||||
(let [{:keys [unique-name issuer fqdns]
|
||||
:or {issuer "staging"}} config]
|
||||
(ing/generate-https-ingress {:fqdns fqdns
|
||||
:cert-name (generate-cert-name unique-name)
|
||||
:issuer issuer})))
|
||||
(ing/generate-certificate {:fqdns fqdns
|
||||
:cert-name (generate-cert-name unique-name)
|
||||
:issuer issuer})))
|
||||
|
||||
(defn-spec generate-nginx-configmap pred/map-or-seq?
|
||||
[config websitedata?]
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
:path "/",
|
||||
:backend
|
||||
{:service {:name "myservice", :port {:number 3000}}}}]}}
|
||||
|
||||
(cut/generate-host-rule "myservice" 3000 "test.com"))))
|
||||
|
||||
|
||||
|
@ -94,7 +93,7 @@
|
|||
(:spec (cut/generate-https-ingress {:issuer "prod"
|
||||
:service-name "test-io-service"
|
||||
:service-port 80
|
||||
:ingress-name "test-io-http-ingress"
|
||||
:ingress-name "test-io-https-ingress"
|
||||
:cert-name "test-io-cert"
|
||||
:fqdns ["test.de" "www.test.de" "test-it.de" "www.test-it.de"]})))))
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{:issuer "staging"
|
||||
:websites
|
||||
[{:unique-name "test.io"
|
||||
[{:unique-name "test.io" ; todo: call this unique-name
|
||||
:fqdns ["test.de" "test.org" "www.test.de" "www.test.org"]
|
||||
:gitea-host "gitlab.de"
|
||||
:gitea-repo "repo"
|
||||
|
|
Loading…
Reference in a new issue