HIP-402: SQL CRD. Status Active. Hanzo's own standard โ read this before implementing against it.
The SQL CRD is the facade Kind for SQL workloads (hanzoai/sql). It is structurally identical to Datastore with type: postgresql and exists to give SQL a first-class API surface โ kubectl get sql instead of kubectl get datastore. The reconciler delegates to the Datastore controller. The CR's spec is DatastoreSpec verbatim.
hanzo.ai/v1, plural sqls, shortname sql.
Same shape as Datastore (HIP-401). Implicitly type: postgresql.
apiVersion: hanzo.ai/v1
kind: SQL
metadata:
name: sql
namespace: hanzo
spec:
type: postgresql
image:
repository: ghcr.io/hanzoai/sql
tag: "18"
replicas: 1
storage:
storageClassName: do-block-storage
size: 20Gi
retentionPolicy: Retain
env:
- name: POSTGRES_USER
value: hanzo
- name: POSTGRES_DB
value: hanzo
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials
key: password
credentialsSecret: postgres-credentials
serviceAliases: [postgres, hanzo-sql]
Same as Datastore: StatefulSet, headless + ClusterIP Services, PVCs.
~/work/hanzo/operator/src/controllers/datastore.rs (via SQL facade in crd.rs).
Implemented in hanzoai/operator v0.3.0+. One CR sql active in cluster.