Files
universe/k8s/zoo/exchange-zoo-cloud.yaml
zeekayandHanzo Dev 032f888d1e exchange: a chain's graph is read through the exchange, not around it
The app asks for a chain by name in the path, and only the explorer had a route
per chain — so that request went straight to the raw rows. Its token list named
bridged ether LETH beside a token page calling the same contract ETH, and Zoo's
own coin introduced itself as Wrapped LUX, because only one of those two paths
came through the service that knows what a token is.

exchange-api serves the same shape now and dresses what it forwards with the
registry for the chain in the path rather than the one it is pinned to. That is
the part the explorer cannot do: Lux and Zoo share contract addresses, so the
address alone cannot say which coin is meant and the path is what does.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-14 08:00:46 -07:00

65 lines
2.4 KiB
YAML

# The indexer, reachable from zoo.
#
# Same shape as k8s/lux-ns/exchange-lux-cloud.yaml, for the same reason: one
# explorer indexes every chain and serves each on its own path — /v1/graph/zoo
# here, /v1/graph/cchain for Lux — so the chain belongs in the path and not in a
# deployment. exchange.zoo.cloud had no route to it at all, which is why Zoo was
# still being served by its own exchange-api copy.
#
# An Ingress may only name a backend in its own namespace, so this is an alias in
# zoo for the service in lux-mainnet.
apiVersion: v1
kind: Service
metadata:
name: explorer-graph
namespace: zoo
spec:
type: ExternalName
externalName: explorer.lux-mainnet.svc.cluster.local
ports:
- name: http
port: 80
---
# Only the graph path. The host's `/` still belongs to the exchange-api Ingress
# the app chart declares, and it keeps it until that deployment is retired —
# adding a second rule for `/` would mean two Ingresses claiming one path.
#
# THE TRAILING SLASH IS LOAD-BEARING. This controller matches a Prefix as a
# string rather than by path element, so `/v1/graph` also claims `/v1/graphql` —
# the path the site reads today — and every Explore query on the host 404s the
# moment the rule exists.
#
# secretName is the one the chart's Ingress already holds a valid certificate in.
# Naming a new secret would send this host back through issuance and serve the
# default certificate until it completed.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: exchange-zoo-cloud
namespace: zoo
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: ingress
rules:
- host: exchange.zoo.cloud
http:
paths:
# Dressed on the way out, by the registry for the chain in the PATH.
# Read from the explorer directly, a chain answers with its own
# contracts' names — and Lux and Zoo were deployed from the same
# account in the same order, so they share addresses and bytecode, and
# bytecode carries the name string. Zoo's own coin called itself
# Wrapped LUX. Only the path says which chain is meant.
- path: /v1/graph/
pathType: Prefix
backend:
service:
name: exchange-api
port:
number: 4000
tls:
- hosts:
- exchange.zoo.cloud
secretName: exchange-api-tls