From f1cdd85b0e6fa7d130c4353e701ea816cecb29f5 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Fri, 21 May 2021 11:26:20 +0200 Subject: [PATCH] mob2 --- src/main/cljc/dda/k8s_keycloak/core.cljc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/cljc/dda/k8s_keycloak/core.cljc b/src/main/cljc/dda/k8s_keycloak/core.cljc index d32f09e..88ca09d 100644 --- a/src/main/cljc/dda/k8s_keycloak/core.cljc +++ b/src/main/cljc/dda/k8s_keycloak/core.cljc @@ -20,8 +20,13 @@ (defn generate-deployment [] (yaml/from-string (yaml/load-resource "deployment.yaml"))) -(defn generate-ingress [fqdn string?] - (yaml/from-string (yaml/load-resource "ingress.yaml"))) +(defn generate-ingress [config] + (let [{:keys [fqdn issuer] + :or {issuer :staging}} config + letsencrypt-issuer (str "letsencrypt-" (name issuer) "-issuer")] + (-> + (yaml/from-string (yaml/load-resource "ingress.yaml")) + (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer)))) (defn-spec generate any? [my-config string?