Files
universe/k8s/lux-k8s/api-gateway/ingresses.yaml
T

163 lines
7.0 KiB
YAML

# Public ingresses for the per-network Lux API gateways.
#
# Each lux-{mainnet,testnet,devnet} namespace already runs an
# `api-gateway-gateway` Gateway deployment alongside its luxd validators.
# This file exposes them publicly through the lux-k8s ingress controller
# (lux-system/hanzo-ingress LB → 134.199.138.27).
#
# Hosts:
# api.lux.network → lux-mainnet/api-gateway-gateway
# api.lux-test.network → lux-testnet/api-gateway-gateway
# api.lux-dev.network → lux-devnet/api-gateway-gateway
#
# Endpoints exposed per network (no `/mainnet/...` prefix — host implies env):
# /v1/chain/C/rpc, /v1/chain/C/ws — primary-network EVM
# /v1/chain/P, /v1/chain/X — P-Chain, X-Chain
# /v1/info, /v1/health — node info / liveness
# /v1/chain/hanzo/rpc — Hanzo app chain EVM (chainID 36963/36964)
# /v1/chain/zoo/rpc — Zoo app chain EVM
# /v1/chain/pars/rpc — Pars app chain EVM
# /v1/chain/spc/rpc — SPC app chain EVM
# /api/indexer/indexer-<sub> — indexer REST per app chain EVM
#
# Notes:
# - Mainnet hanzo app chain EVM IS bootstrapped (blockchain id
# `y5HBrn6EWRMysSmH4nHA2sgpwgcjChJjQ7upSjWSwsrPeg4Cc`, chainID 0x9063).
# - Testnet app chain EVMs (verified 2026-06-01, blocks reported via
# api.lux-test.network):
# hanzo blockchain id 2ZUpGYPyaDsmuwnMUrhkcP3C24RYHvGWTZZYPaNr4oPPdUmnh3
# chainID 0x9062 (37090) current height ~0x2ac (684)
# zoo blockchain id ZAKwMk5cPp5B6RkHbxxoZWh2xBGMqd7TBR8UPBdAkaV7MGKWU
# chainID 0x30e09 (200201) current height ~0x2a8 (680)
# pars blockchain id 26a3qkQ5VzTwFDBerz2a9kte8GPqS1wJpguc9x4BHz26YXrtL9
# chainID 0x78d66 (494950) current height ~0x179 (377)
# spc blockchain id Sd9bKzGu5Mzh6nafNecxicWJLdDmc9DB2aQPN6EUb1KfknReh
# chainID 0x902e (36910) current height ~0x187 (391)
# Note: LXuiihy... is now the live "zoo" backing chain (alias
# resolution via chain-aliases ConfigMap).
# - Devnet hanzo app chain EVM is NOT yet bootstrapped — gateway routes
# exist but luxd will 404 until CreateChainTx is submitted.
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-lux-network
namespace: lux-mainnet
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
# Pin each client to ONE gateway replica for the life of its address.
#
# Rotation across validators is what we want and already have (the gateway
# fans out to luxd-0..4). What we do NOT want is a single client's requests
# landing on different backends, because an RPC caller's steps are not
# independent: it broadcasts a transaction and then polls for the receipt,
# and a node that has not seen the broadcast truthfully answers "not found".
# Round-robin therefore manufactures spurious "receipt not mined in time"
# against a perfectly healthy chain — 1700 of them on the traffic bot before
# it was pinned. Same failure, one layer up.
#
# Hashing on the client address keeps a caller consistent while still
# spreading the population over every replica, so this costs no capacity and
# no redundancy: if a replica dies its clients rehash onto the survivors.
nginx.ingress.kubernetes.io/upstream-hash-by: "$binary_remote_addr"
spec:
ingressClassName: ingress
rules:
- host: api.lux.network
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-gateway-gateway
port:
number: 80
tls:
- hosts: [api.lux.network]
secretName: api-lux-network-tls
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-lux-test-network
namespace: lux-testnet
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
# Pin each client to ONE gateway replica for the life of its address.
#
# Rotation across validators is what we want and already have (the gateway
# fans out to luxd-0..4). What we do NOT want is a single client's requests
# landing on different backends, because an RPC caller's steps are not
# independent: it broadcasts a transaction and then polls for the receipt,
# and a node that has not seen the broadcast truthfully answers "not found".
# Round-robin therefore manufactures spurious "receipt not mined in time"
# against a perfectly healthy chain — 1700 of them on the traffic bot before
# it was pinned. Same failure, one layer up.
#
# Hashing on the client address keeps a caller consistent while still
# spreading the population over every replica, so this costs no capacity and
# no redundancy: if a replica dies its clients rehash onto the survivors.
nginx.ingress.kubernetes.io/upstream-hash-by: "$binary_remote_addr"
spec:
ingressClassName: ingress
rules:
- host: api.lux-test.network
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-gateway-gateway
port:
number: 80
tls:
- hosts: [api.lux-test.network]
secretName: api-lux-test-network-tls
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-lux-dev-network
namespace: lux-devnet
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
# Pin each client to ONE gateway replica for the life of its address.
#
# Rotation across validators is what we want and already have (the gateway
# fans out to luxd-0..4). What we do NOT want is a single client's requests
# landing on different backends, because an RPC caller's steps are not
# independent: it broadcasts a transaction and then polls for the receipt,
# and a node that has not seen the broadcast truthfully answers "not found".
# Round-robin therefore manufactures spurious "receipt not mined in time"
# against a perfectly healthy chain — 1700 of them on the traffic bot before
# it was pinned. Same failure, one layer up.
#
# Hashing on the client address keeps a caller consistent while still
# spreading the population over every replica, so this costs no capacity and
# no redundancy: if a replica dies its clients rehash onto the survivors.
nginx.ingress.kubernetes.io/upstream-hash-by: "$binary_remote_addr"
spec:
ingressClassName: ingress
rules:
- host: api.lux-dev.network
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-gateway-gateway
port:
number: 80
tls:
- hosts: [api.lux-dev.network]
secretName: api-lux-dev-network-tls