gatewayapi

package
v0.0.0-...-c46dd35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gatewayapi provides the aether-controller's Gateway API HTTPRoute validating admission webhook. Gateway API allows multiple HTTPRoutes to share a hostname on one Gateway — the data plane merges their routes in precedence order (creationTimestamp/namespace/name tie-break, then path specificity). The webhook therefore admits same-hostname routes freely. It retains only the structural checks required for correctness: routes with no parentRefs (unreachable) and invalid JSON are the current no-ops / hard-errors. See docs/proposals/018_gateway-api-gamma.md and proposal 021 for the hostname-merge design.

Index

Constants

View Source
const HTTPRouteKind = "HTTPRoute"

HTTPRouteKind is the Gateway API Kind the controller's shared /validate dispatcher routes to this validator.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
	// Reader lists existing HTTPRoutes cluster-wide. Retained for
	// forward-compatibility; not used in the current (admit-all) implementation.
	Reader client.Reader
	Log    *slog.Logger
}

Validator is an admission webhook for HTTPRoutes. It admits all structurally valid HTTPRoutes. Duplicate-hostname rejection (previously here) was dropped when the data plane gained same-hostname route merge: multiple HTTPRoutes sharing a hostname on one Gateway now merge in path-specificity / creation- timestamp order rather than conflicting.

The Reader field is kept for forward-compatibility (future validations that need to list existing routes), but is unused in the current implementation.

func (*Validator) Handle

Handle admits all structurally-valid HTTPRoutes. The webhook is kept in the admission chain so the controller's /validate dispatcher still routes HTTPRoute requests here; extending validation in the future does not require registering a new webhook path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL