Files
hips/HIPs/hip-0400-service-crd.md
zeekayandHanzo Dev 7a9dcac628 What each runtime implements of the Hanzo corpus
An audit read the code and found the proposal that specifies it. Go reaches
all 122 capability proposals and 64 of the 121 other Standards Track ones;
Rust has 35, mostly the operator and the CLI; C++ has three, because the
complete original C++ in the estate is a ZAP handler, a bot nothing specifies,
and authored kernels inside forked CUDA and Metal crates.

    | | shipped | partial | none | not assessed |
    | Go   | 146 | 33 | 1 |  80 |
    | C++  |   1 |  2 | 0 | 257 |
    | Rust |  10 | 25 | 1 | 224 |

The large "not assessed" columns are the point rather than a gap. The model and
training specs are Python, the frontend and design-system proposals are
TypeScript, and recording `none` against those would read as a search that
came up empty when the honest statement is that the runtime was never the
question. Governance, Meta and Process are not graded at all.

Six proposals are Final with nothing found in Go and are left unwritten rather
than demoted: 0065, 0089, 0098, 0103, 0521 and 0902. HIP-0521 answers itself,
its own section reading "Not yet implemented". Three of the others name a
canonical Go file in consensus/protocol/auth that nobody wrote, in a package
where the four neighbouring proposals' files all exist with tests beside them.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-05 19:18:13 -07:00

3.4 KiB

hip, title, author, type, category, status, implementation-rust, created
hip title author type category status implementation-rust created
0400 Service CRD Hanzo Platform Team Standards Track Operator Final shipped 2026-05-19

HIP-0400: Service CRD

Abstract

The Service CRD models a generic stateless workload backed by a container image. It is the default abstraction for any HTTP/gRPC service that does not need persistent storage. The operator materializes a Service CR into a Deployment, a Service, and optionally an Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, NetworkPolicy, and KMSSecret. The Service Kind is the canonical replacement for the legacy HanzoService (v1alpha1) alias.

Specification

Group + version

hanzo.ai/v1 (also lux.cloud/v1, zoo.cloud/v1, osage.cloud/v1 when the operator is installed with --api-group).

Spec fields

Field Type Description
image ImageSpec repository, tag, pullPolicy
replicas int desired Pod count
ports []ServicePort name, containerPort, servicePort
env []EnvVar environment variables (load-bearing — must be honored)
envFrom []EnvFromSource secret/configmap-derived envs
volumes []Volume Pod volumes (load-bearing)
volumeMounts []VolumeMount container mounts (load-bearing)
resources ResourceRequirements requests/limits
livenessProbe ProbeSpec liveness probe
readinessProbe ProbeSpec readiness probe
ingress IngressSpec optional Ingress
autoscaling AutoscalingSpec optional HPA
pdb PodDisruptionBudgetSpec optional PDB
networkPolicy NetworkPolicySpec optional NetworkPolicy
serviceMonitor ServiceMonitorSpec optional Prometheus scrape
kmsSecrets []KMSSecretRef KMS-sourced secret mounts
sidecars []Container sidecar containers
initContainers []Container init containers
imagePullSecrets []LocalObjectReference registry creds
serviceAccountName string SA name
strategy string RollingUpdate / Recreate
command, args []string entrypoint overrides

Example CR

apiVersion: hanzo.ai/v1
kind: Service
metadata:
  name: example
  namespace: hanzo
spec:
  image:
    repository: ghcr.io/hanzoai/example
    tag: v1.2.3
  replicas: 2
  ports:
    - name: http
      containerPort: 8080
      servicePort: 80
  env:
    - name: LOG_LEVEL
      value: info
  resources:
    requests: { cpu: 100m, memory: 256Mi }
    limits:   { cpu: 1,    memory: 1Gi }

Generated K8s resources

  • Deployment
  • Service (ClusterIP)
  • Ingress (if spec.ingress)
  • HorizontalPodAutoscaler (if spec.autoscaling)
  • PodDisruptionBudget (if spec.pdb)
  • NetworkPolicy (if spec.networkPolicy)
  • KMSSecret cross-references (if spec.kmsSecrets)
  • ServiceMonitor (if spec.serviceMonitor)

Operator reconciler

  • Rust: ~/work/hanzo/operator/src/controllers/service.rs
  • Go parity: deprecated, see legacy/go-impl-before-rust-port.

Invariant: env, envFrom, volumes, volumeMounts must round-trip from CR to Pod template. Asserted by controllers::service::tests.

Every facade Kind (IAM, KMS, LLM, Indexer, Explorer) delegates to the Service reconciler. The vast majority of CRs in ~/work/hanzo/universe/infra/k8s/hanzo-operator/crs/ are Service-shaped.

Status

Implemented in hanzoai/operator v0.3.0+. Active in cluster do-sfo3-hanzo-k8s for 40+ workloads.