[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)
|
(postgres/generate-config config)
|
||||||
[(kc/generate-service config)
|
[(kc/generate-service config)
|
||||||
(kc/generate-deployment config)]
|
(kc/generate-deployment config)]
|
||||||
(kc/generate-ingress config)
|
(kc/generate-ratelimit-ingress config)
|
||||||
(when (contains? config :mon-cfg)
|
(when (contains? config :mon-cfg)
|
||||||
(mon/generate-config))))))
|
(mon/generate-config))))))
|
||||||
|
|
||||||
|
|
|
@ -25,15 +25,18 @@
|
||||||
#?(:cljs
|
#?(:cljs
|
||||||
(defmethod yaml/load-resource :keycloak [resource-name]
|
(defmethod yaml/load-resource :keycloak [resource-name]
|
||||||
(get (inline-resources "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?]
|
[config config?]
|
||||||
(ing/generate-ingress-and-cert
|
(let [{:keys [fqdn max-rate max-concurrent-requests namespace]} config]
|
||||||
(merge
|
(ing/generate-simple-ingress (merge
|
||||||
{:service-name "keycloak"
|
{:service-name "forgejo-service"
|
||||||
:service-port 80
|
:service-port 3000
|
||||||
:fqdns [(:fqdn config)]}
|
:fqdns [fqdn]
|
||||||
config)))
|
:average-rate max-rate
|
||||||
|
:burst-rate max-concurrent-requests
|
||||||
|
:namespace namespace}
|
||||||
|
config))))
|
||||||
|
|
||||||
(defn-spec generate-secret cp/map-or-seq?
|
(defn-spec generate-secret cp/map-or-seq?
|
||||||
[config config?
|
[config config?
|
||||||
|
@ -52,7 +55,7 @@
|
||||||
(->
|
(->
|
||||||
(yaml/load-as-edn "keycloak/service.yaml")
|
(yaml/load-as-edn "keycloak/service.yaml")
|
||||||
(cm/replace-all-matching "NAMESPACE" namespace))))
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
; TODO: Fix test
|
||||||
(defn-spec generate-deployment cp/map-or-seq?
|
(defn-spec generate-deployment cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
(let [{:keys [fqdn namespace]} config]
|
(let [{:keys [fqdn namespace]} config]
|
||||||
|
|
Loading…
Reference in a new issue