[Skip-CI] Use ratelimit ingress
This commit is contained in:
parent
1d22c20da9
commit
ce9d51e1cd
2 changed files with 13 additions and 10 deletions
|
@ -40,7 +40,7 @@
|
|||
(postgres/generate-config config)
|
||||
[(kc/generate-service config)
|
||||
(kc/generate-deployment config)]
|
||||
(kc/generate-ingress config)
|
||||
(kc/generate-ratelimit-ingress config)
|
||||
(when (contains? config :mon-cfg)
|
||||
(mon/generate-config))))))
|
||||
|
||||
|
|
|
@ -25,15 +25,18 @@
|
|||
#?(:cljs
|
||||
(defmethod yaml/load-resource :keycloak [resource-name]
|
||||
(get (inline-resources "keycloak") resource-name)))
|
||||
; TODO: Use rate-limit ingress
|
||||
(defn-spec generate-ingress cp/map-or-seq?
|
||||
|
||||
(defn-spec generate-ratelimit-ingress seq?
|
||||
[config config?]
|
||||
(ing/generate-ingress-and-cert
|
||||
(merge
|
||||
{:service-name "keycloak"
|
||||
:service-port 80
|
||||
:fqdns [(:fqdn config)]}
|
||||
config)))
|
||||
(let [{:keys [fqdn max-rate max-concurrent-requests namespace]} config]
|
||||
(ing/generate-simple-ingress (merge
|
||||
{:service-name "forgejo-service"
|
||||
:service-port 3000
|
||||
:fqdns [fqdn]
|
||||
:average-rate max-rate
|
||||
:burst-rate max-concurrent-requests
|
||||
:namespace namespace}
|
||||
config))))
|
||||
|
||||
(defn-spec generate-secret cp/map-or-seq?
|
||||
[config config?
|
||||
|
@ -52,7 +55,7 @@
|
|||
(->
|
||||
(yaml/load-as-edn "keycloak/service.yaml")
|
||||
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||
|
||||
; TODO: Fix test
|
||||
(defn-spec generate-deployment cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn namespace]} config]
|
||||
|
|
Loading…
Reference in a new issue