WIP: Add defn-spec for rate-limiting ingress
This commit is contained in:
parent
1ed850aea2
commit
c5e777c9c5
1 changed files with 12 additions and 0 deletions
|
@ -119,6 +119,18 @@
|
|||
:fqdns [fqdn]}
|
||||
config))))
|
||||
|
||||
(defn-spec generate-rate-limit-ingress-and-cert pred/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn average burst period]} config]
|
||||
(->
|
||||
(generate-ingress-and-cert config)
|
||||
(#(cm/replace-key-value %
|
||||
:traefik.ingress.kubernetes.io/router.middlewares
|
||||
(str
|
||||
(:traefik.ingress.kubernetes.io/router.middlewares
|
||||
(:annotations (:metadata %)))
|
||||
", default-ratelimit@kubernetescrd"))))))
|
||||
|
||||
(defn-spec generate-data-volume pred/map-or-seq?
|
||||
[config vol?]
|
||||
(let [{:keys [volume-total-storage-size]} config
|
||||
|
|
Loading…
Reference in a new issue