Files
Hanzo AI 320f061bda k8s: collapse zoo-operator to zoo-system, migrate to CR-driven bring-up
Operator topology fix:
- base/operator.yaml: pin ghcr.io/zooai/operator:v0.1.1 (was :main floating).
  Add OPERATOR_NAMESPACE env via fieldRef: metadata.namespace so the
  leader-election Lease lock is namespace-scoped, not racing in a single
  hardcoded 'zoo-system' literal. imagePullPolicy: Always → IfNotPresent
  (semver tag is immutable).
- zoo-system/patches.yaml: zoo-operator replicas → 2 (HA, leader-election
  picks one). Drop the stale zoo-explorer raw-Deployment patch (operator
  emits it now via ZooExplorer CR).
- zoo-{mainnet,testnet,devnet}/network-patch.yaml: scale per-env
  zoo-operator → 0. Single zoo-system operator watches every namespace
  (--namespace '' default); per-env operators were thrashing the same
  Lease and never becoming leader.

CR migration (away from raw manifests):
- base/network.yaml: full rewrite as ZooNetwork + ZooChain + ZooExplorer
  + ZooGateway base CRs (CRDs already installed: zoonetworks /
  zoochains / zooexplorers / zoogateways).
- base/explorer.yaml: emptied — ZooExplorer CR replaces the raw
  Deployment; operator renders zoo-explorer-explorer Deployment + Svc.
- base/gateway.yaml: Service-only — ZooGateway moved to network.yaml.
- base/ingress.yaml: kind: Ingress → 4 kind: IngressRoute
  (hanzo.ai/v1alpha1). Traefik proxy Deployment kept (it IS the
  hanzoai/ingress L7 proxy on this cluster).
- zoo-{mainnet,testnet}/network-patch.yaml: env-specific patches —
  validators (mainnet=5, testnet=3), bootstrap IPs+IDs from live Lux
  mainnet+testnet svcs, TRACK_CHAINS = Zoo blockchainID per env.
- zoo-{testnet,devnet}/ingressroute.yaml: new — api.test.zoo.network,
  explore.test.zoo.network, api-explore.test.zoo.network (and dev.*
  variants).
- zoo-{system,testnet,devnet}/kustomization.yaml: include new
  ingressroute.yaml resource + strip mainnet-only IngressRoutes via
  $patch: delete pattern.
- zoo-mainnet/zoo-industries.yaml: kind: Ingress → IngressRoute.

Blockers surfaced (separate followups):
1. Operator does NOT translate `spec.config` env keys to lqd CLI
   flags. Rendered StatefulSet sets ZOO_BOOTSTRAP_IPS etc., but
   luxd reads LUXD_*-prefixed env. Operator controller.rs needs to
   render as CLI args. BLOCKS validators joining Lux primary.
2. hanzo.ai/v1alpha1 IngressRoute CRDs not registered on
   do-sfo3-zoo-k8s — current ingress is traefik:v3.3 with
   traefik.io/v1alpha1 native. Either install hanzoai/ingress CRDs
   OR migrate IngressRoutes to traefik.io group.
3. ZooNetwork operator doesn't emit per-pod LoadBalancer Services
   needed for validators to be reachable as external bootstrap peers.
4. Validator staking keys: operator only takes secret_prefix; doesn't
   derive from a KMS mnemonic. Need 5 Secrets per env OR operator
   extension.
2026-06-10 09:13:57 -07:00

113 lines
2.8 KiB
YAML

# zoo.industries — static marketing site (hanzoai/spa runtime + content
# image at ghcr.io/zooai/zoo-industries).
#
# Lives on lux-k8s zoo-mainnet (NOT do-sfo3-zoo-k8s — Zoo brand sites
# run alongside Zoo L2 validators on the Lux cluster).
#
# Renovate auto-updates the image tag on each new sha-* push from
# zooai/zoo-industries.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zoo-industries
namespace: zoo-mainnet
labels:
app.kubernetes.io/name: zoo-industries
app.kubernetes.io/part-of: zoo
app.kubernetes.io/component: marketing-site
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/name: zoo-industries
template:
metadata:
labels:
app.kubernetes.io/name: zoo-industries
app.kubernetes.io/part-of: zoo
spec:
imagePullSecrets:
- name: ghcr-secret
- name: hanzo
- name: ghcr-credentials-hanzodev
containers:
- name: spa
# Content image built from the zoo.industries repo Dockerfile
# (FROM ghcr.io/hanzoai/spa:1.2.0 + COPY out/ /public/).
# Bump the tag to roll a new deploy.
image: ghcr.io/zooai/zoo-industries:1.0.5-amd64
imagePullPolicy: Always
ports:
- name: http
containerPort: 3000
env:
- name: SPA_API_HOST
value: https://api.zoo.ngo
- name: SPA_IAM_HOST
value: https://zoo.id
- name: SPA_ENV
value: prod
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 256Mi
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 2
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
periodSeconds: 15
---
apiVersion: v1
kind: Service
metadata:
name: zoo-industries
namespace: zoo-mainnet
labels:
app.kubernetes.io/name: zoo-industries
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: zoo-industries
ports:
- name: http
port: 80
targetPort: 3000
---
apiVersion: hanzo.ai/v1alpha1
kind: IngressRoute
metadata:
name: zoo-industries
namespace: zoo-mainnet
labels:
app.kubernetes.io/name: zoo-industries
spec:
entryPoints:
- websecure
routes:
- match: Host(`zoo.industries`) || Host(`www.zoo.industries`)
kind: Rule
services:
- name: zoo-industries
port: 80
tls:
certResolver: letsencrypt
domains:
- main: zoo.industries
- main: www.zoo.industries