mirror of
https://github.com/luxfi/dex.git
synced 2026-10-30 14:45:46 +00:00
99 lines
2.3 KiB
YAML
99 lines
2.3 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lxdex-ingress
|
|
namespace: lxdex-production
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
|
nginx.ingress.kubernetes.io/proxy-body-size: "100m"
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
|
nginx.ingress.kubernetes.io/cors-allow-origin: "https://app.lux.network"
|
|
nginx.ingress.kubernetes.io/rate-limit: "1000"
|
|
nginx.ingress.kubernetes.io/limit-rps: "100"
|
|
nginx.ingress.kubernetes.io/websocket-services: "lxdex-websocket"
|
|
nginx.ingress.kubernetes.io/upstream-hash-by: "$remote_addr"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- api.lux.network
|
|
- ws.lux.network
|
|
secretName: lxdex-tls-cert
|
|
rules:
|
|
- host: api.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: lxdex-http
|
|
port:
|
|
number: 80
|
|
- host: ws.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: lxdex-websocket
|
|
port:
|
|
number: 443
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: lxdex-network-policy
|
|
namespace: lxdex-production
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: lxdex
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
name: lxdex-production
|
|
- podSelector:
|
|
matchLabels:
|
|
app: lxdex
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8080
|
|
- protocol: TCP
|
|
port: 8081
|
|
- protocol: TCP
|
|
port: 50051
|
|
- protocol: TCP
|
|
port: 5555
|
|
- protocol: TCP
|
|
port: 5556
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
name: lxdex-production
|
|
ports:
|
|
- protocol: TCP
|
|
port: 5432 # PostgreSQL
|
|
- protocol: TCP
|
|
port: 6379 # Redis
|
|
- protocol: TCP
|
|
port: 4222 # NATS
|
|
- to:
|
|
- podSelector:
|
|
matchLabels:
|
|
app: lxdex
|
|
ports:
|
|
- protocol: TCP
|
|
port: 5555
|
|
- protocol: TCP
|
|
port: 5556 |