From 0d2061b37e158891499d1ec8be5e446686a357ec Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 21 May 2021 12:12:41 +0200 Subject: [PATCH] ingress now works --- src/main/cljc/dda/k8s_keycloak/core.cljc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/cljc/dda/k8s_keycloak/core.cljc b/src/main/cljc/dda/k8s_keycloak/core.cljc index 88ca09d..e344b04 100644 --- a/src/main/cljc/dda/k8s_keycloak/core.cljc +++ b/src/main/cljc/dda/k8s_keycloak/core.cljc @@ -25,9 +25,12 @@ :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)))) - + (yaml/from-string (yaml/load-resource "ingress.yaml")) + (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer) + (assoc-in [:spec :tls] [{:hosts [fqdn], :secretName "keycloak-secret"}]) + (assoc-in [:spec :rules] [{:host fqdn + :http {:paths [{:backend {:serviceName "keycloak" + :servicePort 8080}}]}}])))) (defn-spec generate any? [my-config string? my-auth string?]