mirror of
https://github.com/hanzoai/ingress.git
synced 2026-10-20 15:07:40 +00:00
* feat(cloud-mount): port ingress to HIP-0106 Mount(*zip.App, cloud.Deps)
Add pkg/ingress/mount.go (build tag: cloud) exposing the canonical
HIP-0106 contract. Hanzo Ingress is k8s-native: the full reverse-proxy
/ TLS / providers machinery stays in cmd/traefik (standalone
hanzo-ingress at the cluster edge). The unified cloud binary
co-resident with Ingress only needs:
- /_/ingress/healthz — native zip endpoint so liveness probes survive
even when the edge proxy is reloading
- /_/ingress/config — read-only projection of the deployment's
expected entrypoints / providers / acme state. Sourced from env
(INGRESS_ENTRYPOINTS, INGRESS_PROVIDERS, INGRESS_ACME_ENABLED).
Nothing else mounts: cloud-mode does NOT import pkg/config/static
(would pull in the entire provider tree: Kubernetes, Docker, Consul,
AWS, Azure, GCP, Cloudflare, Akamai, etc. — every provider stays in
the standalone binary).
Build tag isolation: the standalone hanzo-ingress binary must not pull
hanzoai/cloud + hanzoai/zip. The `//go:build cloud` constraint on
mount.go + mount_test.go keeps the default build path clean. Build the
cloud variant with `-tags=cloud`.
Wiring:
- init() registers ("ingress", order=90) in cloud.Registry — runs
after gateway(80) so identity headers are already injected.
- go.mod gains the hanzoai/cloud + hanzoai/zip requires (gated by
tag at the import sites), pinned via local ../ replace.
Tests:
- TestMount_RegistersHealthAndConfig boots a fresh zip.App, mounts
ingress with sample env, asserts /_/ingress/healthz and
/_/ingress/config respond with the expected JSON.
- cmd/traefik (the standalone hanzo-ingress binary) still builds
clean in the default mode.
Schema: schema/ingress.zap describes Health + Config services for the
zapc codegen path.
* refactor: collapse pkg/ingress/ → root for clean import path
Subsystem code lives in package ingress at repo root. Importers now use
`github.com/hanzoai/ingress` (no /pkg/ingress/ nesting). Standalone shim moved
to cmd/ingress/ where applicable.
Per Hanzo Go-stdlib pattern: repo IS the package.
* refactor: flatten import path — github.com/hanzoai/cloud (drop /pkg/cloud)