One-job nginx pod (sirius-growth-portal-gate) sits in front of the portal API for the login path only, so credential attempts are refused by nginx before uvicorn. HTTPRoute gains a /api/portal/login rule above the /api/portal catch, co-located on siriussec with the Envoy gateway. real_ip resolves the caller through Envoy's X-Forwarded-For chain, so the limit key is the client IP, not ingress. Over-limit answers 429 with a JSON body and Cache-Control: no-store.
41 lines
948 B
YAML
41 lines
948 B
YAML
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: sirius-growth
|
|
namespace: sirius-growth
|
|
spec:
|
|
parentRefs:
|
|
- name: public
|
|
namespace: gateway-system
|
|
hostnames:
|
|
- siriusgrowthsolutions.com
|
|
- www.siriusgrowthsolutions.com
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /api/contact
|
|
backendRefs:
|
|
- name: sirius-growth-contact
|
|
port: 8090
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /api/portal/login
|
|
backendRefs:
|
|
- name: sirius-growth-portal-gate
|
|
port: 8080
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /api/portal
|
|
backendRefs:
|
|
- name: sirius-growth-portal
|
|
port: 8091
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
backendRefs:
|
|
- name: sirius-growth-site
|
|
port: 80
|