From 50bcf23ee655624224bf9b8c98fcc3ac73ee55ed Mon Sep 17 00:00:00 2001 From: jerger Date: Sat, 21 May 2022 13:11:33 +0200 Subject: [PATCH] fix new k3s issuer convention --- src/main/cljc/dda/c4k_jira/jira.cljc | 4 ++-- src/main/resources/jira/certificate.yaml | 2 +- src/test/cljc/dda/c4k_jira/jira_test.cljc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/cljc/dda/c4k_jira/jira.cljc b/src/main/cljc/dda/c4k_jira/jira.cljc index 4b2d2cd..1d23622 100644 --- a/src/main/cljc/dda/c4k_jira/jira.cljc +++ b/src/main/cljc/dda/c4k_jira/jira.cljc @@ -30,7 +30,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 "jira/certificate.yaml")) (assoc-in [:spec :commonName] fqdn) @@ -45,7 +45,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 "jira/ingress.yaml")) (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer) diff --git a/src/main/resources/jira/certificate.yaml b/src/main/resources/jira/certificate.yaml index f8e7860..b4df853 100644 --- a/src/main/resources/jira/certificate.yaml +++ b/src/main/resources/jira/certificate.yaml @@ -9,5 +9,5 @@ spec: dnsNames: - fqdn issuerRef: - name: letsencrypt-staging-issuer + name: staging kind: ClusterIssuer \ No newline at end of file diff --git a/src/test/cljc/dda/c4k_jira/jira_test.cljc b/src/test/cljc/dda/c4k_jira/jira_test.cljc index b000ac1..97e0012 100644 --- a/src/test/cljc/dda/c4k_jira/jira_test.cljc +++ b/src/test/cljc/dda/c4k_jira/jira_test.cljc @@ -13,7 +13,7 @@ :commonName "xx" :dnsNames ["xx"] :issuerRef - {:name "letsencrypt-prod-issuer", :kind "ClusterIssuer"}}} + {:name "prod", :kind "ClusterIssuer"}}} (cut/generate-certificate {:fqdn "xx" :issuer :prod})))) (deftest should-generate-pvc @@ -33,7 +33,7 @@ {:name "ingress-jira" :annotations {:cert-manager.io/cluster-issuer - "letsencrypt-staging-issuer" + "staging" :nginx.ingress.kubernetes.io/proxy-body-size "256m" :nginx.ingress.kubernetes.io/ssl-redirect "true" :nginx.ingress.kubernetes.io/rewrite-target "/"