main already had the canonical per-env layout (gateway-{mainnet,testnet,devnet},
image 0.1.0, -c /etc/gateway/gateway.json). The feat-branch merge regressed it to
the obsolete single 2.14.1 deploy; this restores the per-env version. 0 krakend refs.
341 lines
7.9 KiB
YAML
341 lines
7.9 KiB
YAML
---
|
|
# Gateway - Mainnet
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gateway-mainnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-mainnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: mainnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
app.kubernetes.io/managed-by: kubectl
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
selector:
|
|
matchLabels:
|
|
app: gateway-mainnet
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gateway-mainnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: mainnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
containers:
|
|
- name: gateway
|
|
image: ghcr.io/hanzoai/gateway:0.1.0
|
|
command:
|
|
- /usr/bin/gateway
|
|
args:
|
|
- run
|
|
- -c
|
|
- /etc/gateway/gateway.json
|
|
- -d
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: GATEWAY_PORT
|
|
value: "8080"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/gateway
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 512Mi
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: gateway-mainnet-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gateway-mainnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-mainnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: mainnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
selector:
|
|
app: gateway-mainnet
|
|
---
|
|
# Gateway - Testnet
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gateway-testnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-testnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: testnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
app.kubernetes.io/managed-by: kubectl
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
selector:
|
|
matchLabels:
|
|
app: gateway-testnet
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gateway-testnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: testnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
containers:
|
|
- name: gateway
|
|
image: ghcr.io/hanzoai/gateway:0.1.0
|
|
command:
|
|
- /usr/bin/gateway
|
|
args:
|
|
- run
|
|
- -c
|
|
- /etc/gateway/gateway.json
|
|
- -d
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: GATEWAY_PORT
|
|
value: "8080"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/gateway
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: gateway-testnet-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gateway-testnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-testnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: testnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
selector:
|
|
app: gateway-testnet
|
|
---
|
|
# Gateway - Devnet
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gateway-devnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-devnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: devnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
app.kubernetes.io/managed-by: kubectl
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
selector:
|
|
matchLabels:
|
|
app: gateway-devnet
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gateway-devnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: devnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
containers:
|
|
- name: gateway
|
|
image: ghcr.io/hanzoai/gateway:0.1.0
|
|
command:
|
|
- /usr/bin/gateway
|
|
args:
|
|
- run
|
|
- -c
|
|
- /etc/gateway/gateway.json
|
|
- -d
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: GATEWAY_PORT
|
|
value: "8080"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/gateway
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /__health
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: gateway-devnet-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gateway-devnet
|
|
namespace: lux-gateway
|
|
labels:
|
|
app: gateway-devnet
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/component: devnet
|
|
app.kubernetes.io/part-of: lux-platform
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
selector:
|
|
app: gateway-devnet
|
|
---
|
|
# Ingress for all API gateways
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: gateway-ingress
|
|
namespace: lux-gateway
|
|
labels:
|
|
app.kubernetes.io/name: gateway
|
|
app.kubernetes.io/part-of: lux-platform
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
spec:
|
|
ingressClassName: hanzo
|
|
tls:
|
|
- hosts:
|
|
- api.lux.network
|
|
secretName: api-lux-network-tls
|
|
- hosts:
|
|
- api.testnet.lux.network
|
|
secretName: api-testnet-lux-network-tls
|
|
- hosts:
|
|
- api.devnet.lux.network
|
|
secretName: api-devnet-lux-network-tls
|
|
rules:
|
|
- host: api.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: gateway-mainnet
|
|
port:
|
|
number: 80
|
|
- host: api.testnet.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: gateway-testnet
|
|
port:
|
|
number: 80
|
|
- host: api.devnet.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: gateway-devnet
|
|
port:
|
|
number: 80
|