From a63f170ace42dc16ec8d7b7b970056729c1501ba Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 17 Jan 2024 11:36:43 +0100 Subject: [PATCH] Generate ingress with rate limit conditionally --- src/main/cljc/dda/c4k_forgejo/core.cljc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/cljc/dda/c4k_forgejo/core.cljc b/src/main/cljc/dda/c4k_forgejo/core.cljc index 356751f..ba9e12a 100644 --- a/src/main/cljc/dda/c4k_forgejo/core.cljc +++ b/src/main/cljc/dda/c4k_forgejo/core.cljc @@ -49,8 +49,11 @@ (forgejo/generate-service-ssh) (forgejo/generate-data-volume config) (forgejo/generate-appini-env config) - (forgejo/generate-secrets auth)] - (forgejo/generate-ingress-and-cert config) + (forgejo/generate-secrets auth)] + (if (contains? config :average) + (do (forgejo/generate-rate-limit-ingress-and-cert config) + (forgejo/generate-rate-limit-middleware config)) + (forgejo/generate-ingress-and-cert config)) (when (contains? config :restic-repository) [(backup/generate-config config) (backup/generate-secret auth)