aws / aws-application-networking-k8s

A Kubernetes controller for Amazon VPC Lattice

Home Page:https://www.gateway-api-controller.eks.aws.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid BackendRef should not block route creation/update

erikfuller opened this issue · comments

According to the spec, invalid backendRefs should return a 500 rather than block route creation or updates. Lattice does not currently support fixed responses outside of 404, so we will return that for now.

Current behaviour (as originally highlighted by @zijun726911 offline) and steps to reproduce:

kubectl apply -f examples/my-hotel-gateway.yaml
kubectl apply -f examples/inventory-route.yaml

By creating a route with no backing service, we will see errors like:

failed at BuildModel: {“logger”:“controller.route”,“caller”:“controllers/route_controller.go:282”,“msg”:“buildAndDeployModel, Failed build model for salmo-5-ok4zh8ytnj due to failed to build rules due to buildTargetGroupSpec err error finding backend service e2e-test/bugmu-2-tfbytur05o due to Service \“bugmu-2-tfbytur05o\” not found”}

This will never succeed until the service is created.

Fix for this in the attached PR. Follow up is #494