Implement rate limit ingress
This commit is contained in:
parent
52e43fe23c
commit
13e718ca37
1 changed files with 7 additions and 9 deletions
|
@ -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) ; returns a vector
|
||||||
(generate-ingress-and-cert config)
|
(#(assoc-in % ; Attention: heavily relying on the output order of ing/generate-ingress-and-cert
|
||||||
(#(cm/replace-key-value %
|
[1 :metadata :annotations :traefik.ingress.kubernetes.io/router.middlewares]
|
||||||
:traefik.ingress.kubernetes.io/router.middlewares
|
(str
|
||||||
(str
|
(-> (second %) :metadata :annotations :traefik.ingress.kubernetes.io/router.middlewares)
|
||||||
(:traefik.ingress.kubernetes.io/router.middlewares
|
", default-ratelimit@kubernetescrd")))))
|
||||||
(:annotations (:metadata %)))
|
|
||||||
", 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?]
|
||||||
|
|
Loading…
Reference in a new issue