HybridRoute

Resource configuration reference · Kind/name · when · dependsOn

apiVersion: hybrid.routerd.net/v1alpha1 · metadata.name

Expand explicitly listed IPv4 destination networks into main-table IPv4Route resources through an OverlayPeer.

Conditions and references

Configuration syntax

This is explanatory notation, not YAML to copy. Unbracketed fields are required within their parent; [ ... ] marks fields that can be omitted, subject to the conditions in the table. <type> is a placeholder, and (a | b) lists alternatives. Optional parents may contain required children. Conditional requirements, exclusions and runtime defaults are described below. Use the linked YAML example for an ordinary configuration.

- apiVersion: hybrid.routerd.net/v1alpha1
  kind: HybridRoute
  metadata:
    name: "<name>"
  spec:
    destinationCIDRs:
      - <string>
    [ healthCheckRef: <string> ]
    [ install:
        [ metric: <integer> ]
        [ table: ("" | "main") ]
    ]
    peerRef: <string>

Field meaning and default

Required children of optional objects apply only when their parent is used. Other exact conditions are in the explanation; bracketed alternatives may still require one choice.

YAML Presence Type / constraints Field meaning and default
spec.destinationCIDRs Required array Required nonempty IPv4 CIDR list, no default route. No implicit remote networks or discovery.
spec.peerRef Required string Required bare existing OverlayPeer metadata.name. Although expansion can normalize OverlayPeer/name, normal cross-resource validation requires the bare name.
spec.install Optional object Optional route-install settings; default main table, metric 0. No policy routing or automatic HA selection.
spec.install.table Optional string; enum=["", "main"] Empty or main only; both lower to main-table IPv4Route. Other table names/numbers are rejected.
spec.install.metric Optional integer; minimum=0 Nonnegative integer, default 0, copied to generated IPv4Route. Linux emits positive metrics only; FreeBSD path ignores metric.
spec.healthCheckRef Optional string Optional bare existing HealthCheck name. Empty has no health-status augmentation. Unhealthy/failed/error status marks Degraded but does not change the routes; missing/unknown runtime status is not treated as unhealthy by this function.

Implementation: pkg/api/specs.go · pkg/config/validate_hybrid.go · pkg/config/validate.go · pkg/hybrid/hybrid.go · pkg/controller/chain/dynamic_effective.go · pkg/controller/chain/hybrid.go · pkg/controller/chain/phase2.go

Referenceable status fields

The ordinary status-reference validator accepts these field names for this kind. This allowlist does not guarantee that every field is currently populated; inspect runtime status. These are outputs, not YAML spec fields.

phase, routes, peerRef, defaultRouteUntouched, estimatedMTU

Example