From fcdc377d02706a86006d7e9e912ba59b5bbf840f Mon Sep 17 00:00:00 2001 From: GigiaJ Date: Wed, 26 Nov 2025 19:00:53 -0600 Subject: [PATCH] Add config-file and gateway-class --- src/pulumicljs/providers/k8s.cljs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/pulumicljs/providers/k8s.cljs b/src/pulumicljs/providers/k8s.cljs index 3cd977e..9f5175f 100644 --- a/src/pulumicljs/providers/k8s.cljs +++ b/src/pulumicljs/providers/k8s.cljs @@ -35,19 +35,25 @@ {:apiVersion "gateway.networking.k8s.io/v1" :kind "Gateway" :metadata {:name "main-gateway" - :namespace "traefik"} - :spec {:gatewayClassName "traefik" + :namespace app-name} + :spec {:gatewayClassName app-name :listeners - [{:name "http" + [#_{:name "http" :protocol "HTTP" - :port 80} - {:name "https" + :port 8000} + #_{:name "https" :protocol "HTTPS" - :port 443 + :port 8443 :tls {:certificateRefs [{:name (str app-name "-cert") :kind "Secret"}]}}]}}) +(defn gateway-class [{:keys [app-name]}] + {:apiVersion "gateway.networking.k8s.io/v1" + :kind "GatewayClass" + :metadata {:name app-name} + :spec {:controllerName "io.traefik/gateway"}}) + (defn httproute [{:keys [app-name app-namespace host]}] {:apiVersion "gateway.networking.k8s.io/v1" @@ -110,14 +116,21 @@ (defn storage-class [{:keys [app-name]}] {:metadata {:name app-name}}) +(defn config-file + [{:keys [app-name file]}] + {:name app-name + :properties {:file file}}) + (def defaults {:ingress ingress :gateway gateway + :gateway-class gateway-class :httproute httproute :certificate certificate :cluster-issuer cluster-issuer :chart chart :config-map config-map + :config-file config-file :service service :deployment deployment :namespace nspace