rate-limit #3

Merged
patdyn merged 23 commits from rate-limit into main 2024-01-23 09:02:07 +00:00
Showing only changes of commit 13e718ca37 - Show all commits

View file

@ -125,15 +125,13 @@
(defn-spec generate-rate-limit-ingress-and-cert pred/map-or-seq? (defn-spec generate-rate-limit-ingress-and-cert pred/map-or-seq?
[config config?] [config config?]
(let [{:keys [fqdn average burst period]} config]
(-> (->
(generate-ingress-and-cert config) (generate-ingress-and-cert config) ; returns a vector
(#(cm/replace-key-value % (#(assoc-in % ; Attention: heavily relying on the output order of ing/generate-ingress-and-cert
:traefik.ingress.kubernetes.io/router.middlewares [1 :metadata :annotations :traefik.ingress.kubernetes.io/router.middlewares]
(str (str
(:traefik.ingress.kubernetes.io/router.middlewares (-> (second %) :metadata :annotations :traefik.ingress.kubernetes.io/router.middlewares)
(:annotations (:metadata %))) ", default-ratelimit@kubernetescrd")))))
", default-ratelimit@kubernetescrd")))))) ; ToDo: Rate Limit Konfig Optionen
(defn-spec generate-data-volume pred/map-or-seq? (defn-spec generate-data-volume pred/map-or-seq?
[config vol?] [config vol?]