Files
zeekayandHanzo Dev 15d100931d
Hanzo CI/CD / cicd (push) Failing after 9m46s
CI/CD / cicd (push) Failing after 10m4s
Name the ingress in the docs, and fix what that exposed
Most of it was stale, not cosmetic: the docs taught `TRAEFIK_*` env,
`traefik.http.*` labels, `traefik.ingress.kubernetes.io/` annotations,
`.traefik.yml` plugins and `traefik_*` metrics. This binary answers to
`INGRESS_*`, `ingress.http.*`, `ingress.kubernetes.io/`, `.ingress.yml` and
`ingress.*` — a reader following the old text configured nothing.

Two were worse than stale. Gateway API examples gave `group: traefik.io` for an
IngressService backendRef, which kubernetes.go:1265 refuses against hanzo.ai.
The contributing guide built with `github.com/traefik/ingress` ldflags against
a module that is `github.com/hanzoai/ingress/v3`.

script/code-gen.sh globs `hanzo.ai_*.yaml` and matched nothing — the per-CRD
dumps had been deleted and never regenerated, so `cat` failed the script under
`set -e`. controller-gen v0.19.0 restores all ten; they concatenate
byte-for-byte into the committed definition and fixture.

CHANGELOG.md is untouched: 6,789 lines of imported release history, where a
rewrite would falsify the record rather than rebrand it. `@traefiklabs/faency`,
`traefik/whoami`, k3s's `--disable=traefik`, the `traefik.io` CRD group and the
MIT attribution stay — upstream's addresses, not our brand.

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

9.3 KiB

title, description
title description
Hanzo Ingress HTTP Routers Documentation HTTP routers are responsible for connecting incoming requests to the services that can handle them. Read the technical documentation.

HTTP Router

An HTTP router is in charge of connecting incoming requests to the services that can handle them. Routers analyze incoming requests based on rules, and when a match is found, forward the request through any configured middlewares to the appropriate service.

Configuration Example

http:
  routers:
    my-router:
      entryPoints:
        - "web"
        - "websecure"
      rule: "Host(`example.com`) && Path(`/api`)"
      priority: 10
      middlewares:
        - "auth"
        - "ratelimit"
      tls:
        certResolver: "letsencrypt"
        options: "modern"
        domains:
          - main: "example.com"
            sans:
              - "www.example.com"
      observability:
        metrics: true
        accessLogs: true
        tracing: true
      parentRefs:
        - "parent-router-1"
        - "parent-router-2"
      service: my-service
[http.routers]
  [http.routers.my-router]
    entryPoints = ["web", "websecure"]
    rule = "Host(`example.com`) && Path(`/api`)"
    priority = 10
    middlewares = ["auth", "ratelimit"]
    service = "my-service"
    parentRefs = ["parent-router-1", "parent-router-2"]

    [http.routers.my-router.tls]
      certResolver = "letsencrypt"
      options = "modern"

      [[http.routers.my-router.tls.domains]]
        main = "example.com"
        sans = ["www.example.com"]

    [http.routers.my-router.observability]
      metrics = true
      accessLogs = true
      tracing = true
labels:
  - "ingress.http.routers.my-router.entrypoints=web,websecure"
  - "ingress.http.routers.my-router.rule=Host(`example.com`) && Path(`/api`)"
  - "ingress.http.routers.my-router.priority=10"
  - "ingress.http.routers.my-router.middlewares=auth,ratelimit"
  - "ingress.http.routers.my-router.service=my-service"
  - "ingress.http.routers.my-router.tls.certresolver=letsencrypt"
  - "ingress.http.routers.my-router.tls.options=modern"
  - "ingress.http.routers.my-router.tls.domains[0].main=example.com"
  - "ingress.http.routers.my-router.tls.domains[0].sans=www.example.com"
  - "ingress.http.routers.my-router.observability.metrics=true"
  - "ingress.http.routers.my-router.observability.accessLogs=true"
  - "ingress.http.routers.my-router.observability.tracing=true"
{
  "Tags": [
    "ingress.http.routers.my-router.entrypoints=web,websecure",
    "ingress.http.routers.my-router.rule=Host(`example.com`) && Path(`/api`)",
    "ingress.http.routers.my-router.priority=10",
    "ingress.http.routers.my-router.middlewares=auth,ratelimit",
    "ingress.http.routers.my-router.service=my-service",
    "ingress.http.routers.my-router.tls.certresolver=letsencrypt",
    "ingress.http.routers.my-router.tls.options=modern",
    "ingress.http.routers.my-router.tls.domains[0].main=example.com",
    "ingress.http.routers.my-router.tls.domains[0].sans=www.example.com",
    "ingress.http.routers.my-router.observability.metrics=true",
    "ingress.http.routers.my-router.observability.accessLogs=true",
    "ingress.http.routers.my-router.observability.tracing=true",
  ]
}

Configuration Options

Field Description Default Required
entryPoints The list of entry points to which the router is attached. If not specified, HTTP routers are attached to all entry points. All entry points No
rule Rules are a set of matchers configured with values, that determine if a particular request matches specific criteria. If the rule is verified, the router becomes active, calls middlewares, and then forwards the request to the service. See Rules & Priority for details. Yes
priority To avoid path overlap, routes are sorted, by default, in descending order using rules length. The priority is directly equal to the length of the rule, and so the longest length has the highest priority. A value of 0 for the priority is ignored. Negative values are supported. See Rules & Priority for details. Rule length No
middlewares The list of middlewares that are applied to the router. Middlewares are applied in the order they are declared. See Middlewares overview for available middlewares. No
tls TLS configuration for the router. When specified, the router will only handle HTTPS requests. No
tls.certResolver The name of the certificate resolver to use for automatic certificate generation. See Certificate Resolver for details. No
tls.options The name of the TLS options to use for configuring TLS parameters (cipher suites, min/max TLS version, client authentication, etc.). See TLS Options for detailed configuration. default No
tls.domains List of domains and Subject Alternative Names (SANs) for explicit certificate domain specification. When using ACME certificate resolvers, domains are automatically extracted from router rules, making this option optional. No
observability Observability configuration for the router. Allows fine-grained control over access logs, metrics, and tracing per router. See Observability for details. Inherited from entry points No
parentRefs References to parent router names for multi-layer routing. When specified, this router becomes a child router that processes requests after parent routers have applied their middlewares. See Multi-Layer Routing for details. No
service The name of the service that will handle the matched requests. Services can be load balancer services, weighted round robin, mirroring, or failover services. See Service for details. Yes

Router Naming

  • The character @ is not authorized in the router name
  • In provider-specific configurations (Docker, Kubernetes), router names are often auto-generated based on service names and rules

{% include-markdown "includes/ingress-for-business-applications.md" %}