diff --git a/src/main/cljc/dda/c4k_shynet/shynet.cljc b/src/main/cljc/dda/c4k_shynet/shynet.cljc index ba8e6d5..b0dd2b1 100644 --- a/src/main/cljc/dda/c4k_shynet/shynet.cljc +++ b/src/main/cljc/dda/c4k_shynet/shynet.cljc @@ -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) diff --git a/src/main/resources/shynet/certificate.yaml b/src/main/resources/shynet/certificate.yaml index 630e7f9..93e7336 100644 --- a/src/main/resources/shynet/certificate.yaml +++ b/src/main/resources/shynet/certificate.yaml @@ -9,5 +9,5 @@ spec: dnsNames: - fqdn issuerRef: - name: letsencrypt-staging-issuer + name: REPLACEME kind: ClusterIssuer \ No newline at end of file diff --git a/src/test/cljc/dda/c4k_shynet/shynet_test.cljc b/src/test/cljc/dda/c4k_shynet/shynet_test.cljc index 1a517e5..293e236 100644 --- a/src/test/cljc/dda/c4k_shynet/shynet_test.cljc +++ b/src/test/cljc/dda/c4k_shynet/shynet_test.cljc @@ -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