mirror of
https://code.forgejo.org/infrastructure/documentation
synced 2024-11-28 21:31:10 +00:00
traefik: apply forgejo-ratelimit once
This commit is contained in:
parent
e0f3e624bc
commit
f5861bf000
|
@ -199,6 +199,7 @@ function setup_k8s_apply() {
|
|||
function setup_k8s_traefik() {
|
||||
# https://github.com/traefik/traefik-helm-chart?tab=readme-ov-file#deploying-traefik
|
||||
$SELF_DIR/subst.sh traefik.yml | helm upgrade --install --namespace kube-system traefik -f - --set installCRDs=true --version $TRAEFIK_VERSION oci://ghcr.io/traefik/helm/traefik
|
||||
setup_k8s_apply traefik-rate-limit.yml
|
||||
}
|
||||
|
||||
function setup_k8s_nfs() {
|
||||
|
|
9
k3s-host/traefik-rate-limit.yml
Normal file
9
k3s-host/traefik-rate-limit.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: forgejo-ratelimit
|
||||
spec:
|
||||
# https://doc.traefik.io/traefik/v3.1/middlewares/http/ratelimit/
|
||||
rateLimit:
|
||||
average: 10
|
||||
burst: 20
|
|
@ -24,15 +24,6 @@ service:
|
|||
port: 2222
|
||||
|
||||
extraDeploy:
|
||||
- apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: forgejo-ratelimit
|
||||
spec:
|
||||
# https://doc.traefik.io/traefik/v3.1/middlewares/http/ratelimit/
|
||||
rateLimit:
|
||||
average: 10
|
||||
burst: 20
|
||||
# Route from traefik to forgejo
|
||||
- apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
|
|
Loading…
Reference in a new issue