Repository navigation
v0.28.67
Changes
feat(routegroup): wrap validation errors with namespace and name (#4390)
Summary
Ensures RouteGroup sub-component validation errors (filters,
predicates, backends, and duplicate hosts) include the target resource's
namespace and name (error in route group <namespace>/<name>: <err>),
resolving prior TODOs and standardizing error reporting across the
Kubernetes dataclient and admission controller.
Motivation
Validation failures in sub-components previously returned unwrapped
error strings (such as parse failed after token ... or backend address ... does not match scheme://host format). In admission logs and
cluster-wide validation pipelines, this lacked resource context, making
it difficult to pinpoint which RouteGroup triggered the failure.
Changes
dataclients/kubernetes/definitions/routegroupvalidator.go:- Removed obsolete TODO comments.
- Wrapped errors in
validateFilters,validatePredicates,
validateBackends, andvalidateHostsusing
routeGroupError(item.Metadata, ...). - Updated relevant test fixtures and assertions to expect the wrapped
prefix:dataclients/kubernetes/admission/admission_test.go
dataclients/kubernetes/definitions/testdata/errorwrapdata/errors.logdataclients/kubernetes/testdata/routegroups/convert/*.log
(failing-filter,failing-predicate,
no-catchall-for-failed-route-group,
single-failing-route-makes-the-group-fail)
Multiarch Docker image
Multiarch Docker image is available in GitHub's docker registry:
docker run -it ghcr.io/zalando/skipper:v0.28.67 skipper --help