Skip to content

v0.28.67

Choose a tag to compare

@zalando-robot zalando-robot released this 04 Nov 12:19
f024128

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, and validateHosts using
    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.log
  • dataclients/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