Skip to content

Commit

Permalink
chore: setup rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
valosnah committed Sep 30, 2024
1 parent 7ad01b8 commit f267c8a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploy/demo/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: catalog-admin-service
annotations:
nginx.ingress.kubernetes.io/limit-rps: '6'
nginx.ingress.kubernetes.io/limit-burst-multiplier: '2'
nginx.ingress.kubernetes.io/limit-whitelist: '10.0.0.0/8'
nginx.ingress.kubernetes.io/server-snippet: |
server_tokens off;
location ~ ^/(ping|ready|prometheus) {
deny all;
return 404;
}
spec:
ingressClassName: nginx
rules:
Expand Down
10 changes: 10 additions & 0 deletions deploy/prod/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: catalog-admin-service
annotations:
nginx.ingress.kubernetes.io/limit-rps: '6'
nginx.ingress.kubernetes.io/limit-burst-multiplier: '2'
nginx.ingress.kubernetes.io/limit-whitelist: '10.0.0.0/8'
nginx.ingress.kubernetes.io/server-snippet: |
server_tokens off;
location ~ ^/(ping|ready|prometheus) {
deny all;
return 404;
}
spec:
ingressClassName: nginx
rules:
Expand Down
10 changes: 10 additions & 0 deletions deploy/staging/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: catalog-admin-service
annotations:
nginx.ingress.kubernetes.io/limit-rps: '6'
nginx.ingress.kubernetes.io/limit-burst-multiplier: '2'
nginx.ingress.kubernetes.io/limit-whitelist: '10.0.0.0/8'
nginx.ingress.kubernetes.io/server-snippet: |
server_tokens off;
location ~ ^/(ping|ready|prometheus) {
deny all;
return 404;
}
spec:
ingressClassName: nginx
rules:
Expand Down

0 comments on commit f267c8a

Please sign in to comment.