You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When applying a TrafficPolicy that references a non-existing target (e.g. HTTPRoute) the status of the resource isn't updated and the controller doesn't have any logging for this case.
Also, if the target ref resource is removed, the status is still in a state of Accepted with no indication of a missing target ref.
Expected Behavior
Status should mention that the spec's targetRef(s) does not exist.
Steps to reproduce the bug
Apply a TrafficPolicy with a targetRef that does not exists. I had this for instance:
After adding the missing HTTPRoute and verifying that the TrafficPolicy's status is updated, remove the HTTPRoute. You'll notice that status stays as it was.
Additional Environment Detail
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
@ymesika please update the issue description to include the status yaml.
With the PolicyStatus API that uses AncestorRef based statuses, policy CRs will only have a valid status when they attach to a resource whose ancestor is a Gateway object. An unattached policy will not have any status. In fact, this should ideally be handled via defaults in the Status schema, which I believe will suffice to indicate "unattached state".
Removing an HTTPRoute could invalidate an AncesorRef status if the policy no longer targets any routes belonging to a Gateway. This is something that is tricky to implement, but feasible.
@shashankram that's right. The resource doesn't get any Status in the first case and based on your comment it is expected. Having a defaults status can indeed indicate that there is an issue.
kgateway version
main
Kubernetes Version
1.31.0
Describe the bug
When applying a
TrafficPolicy
that references a non-existing target (e.g. HTTPRoute) the status of the resource isn't updated and the controller doesn't have any logging for this case.Also, if the target ref resource is removed, the status is still in a state of Accepted with no indication of a missing target ref.
Expected Behavior
Status should mention that the spec's targetRef(s) does not exist.
Steps to reproduce the bug
TrafficPolicy
with a targetRef that does not exists. I had this for instance:HTTPRoute
and verifying that the TrafficPolicy's status is updated, remove the HTTPRoute. You'll notice that status stays as it was.Additional Environment Detail
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: