fix isuer name
This commit is contained in:
parent
42a2c58f89
commit
3a2a6f2a28
3 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@
|
|||
|
||||
(defn generate-certificate [config]
|
||||
(let [{:keys [fqdn issuer]} config
|
||||
letsencrypt-issuer (str "letsencrypt-" (name issuer) "-issuer")]
|
||||
letsencrypt-issuer (name issuer)]
|
||||
(->
|
||||
(yaml/from-string (yaml/load-resource "shynet/certificate.yaml"))
|
||||
(assoc-in [:spec :commonName] fqdn)
|
||||
|
@ -55,7 +55,7 @@
|
|||
(defn generate-ingress [config]
|
||||
(let [{:keys [fqdn issuer]
|
||||
:or {issuer :staging}} config
|
||||
letsencrypt-issuer (str "letsencrypt-" (name issuer) "-issuer")]
|
||||
letsencrypt-issuer (name issuer)]
|
||||
(->
|
||||
(yaml/from-string (yaml/load-resource "shynet/ingress.yaml"))
|
||||
(assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer)
|
||||
|
|
|
@ -9,5 +9,5 @@ spec:
|
|||
dnsNames:
|
||||
- fqdn
|
||||
issuerRef:
|
||||
name: letsencrypt-staging-issuer
|
||||
name: REPLACEME
|
||||
kind: ClusterIssuer
|
|
@ -56,7 +56,7 @@
|
|||
{:secretName "shynet-secret"
|
||||
:commonName "test.com"
|
||||
:dnsNames ["test.com"]
|
||||
:issuerRef {:name "letsencrypt-staging-issuer", :kind "ClusterIssuer"}}}
|
||||
:issuerRef {:name "staging", :kind "ClusterIssuer"}}}
|
||||
(cut/generate-certificate {:fqdn "test.com" :issuer :staging}))))
|
||||
|
||||
(deftest should-generate-ingress
|
||||
|
@ -68,7 +68,7 @@
|
|||
{:ingress.kubernetes.io/force-ssl-redirect "true"
|
||||
:ingress.kubernetes.io/ssl-redirect "true"
|
||||
:cert-manager.io/cluster-issuer
|
||||
"letsencrypt-staging-issuer"}}
|
||||
"staging"}}
|
||||
:spec
|
||||
{:tls [{:hosts ["test.com"], :secretName "shynet-secret"}]
|
||||
:rules
|
||||
|
|
Loading…
Reference in a new issue