SGS portal: nginx login gate — rate-limit /api/portal/login (12r/m, burst 6)
This commit is contained in:
parent
c77b5a6e80
commit
5036d853bf
5 changed files with 146 additions and 0 deletions
53
apps/base/sirius-growth/deployment-portal-gate.yaml
Normal file
53
apps/base/sirius-growth/deployment-portal-gate.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sirius-growth-portal-gate
|
||||
namespace: sirius-growth
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sirius-growth-portal-gate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sirius-growth-portal-gate
|
||||
spec:
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Exists
|
||||
effect: PreferNoSchedule
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: siriussec
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.27-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: conf
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
readOnly: true
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 16Mi
|
||||
limits:
|
||||
memory: 64Mi
|
||||
volumes:
|
||||
- name: conf
|
||||
configMap:
|
||||
name: sirius-growth-portal-gate
|
||||
Loading…
Reference in a new issue