Updates ParentRef Status Conditions#495
Conversation
|
@skriss with this PR an |
Agree, I'd expect an |
...nal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml
Outdated
Show resolved
Hide resolved
internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml
Outdated
Show resolved
Hide resolved
.../gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml
Outdated
Show resolved
Hide resolved
internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml
Outdated
Show resolved
Hide resolved
internal/gatewayapi/translator.go
Outdated
There was a problem hiding this comment.
From my read of the spec, we should either be ignoring the duplicate header, or appending its value:
- https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPHeaderFilter
- https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPHeader
But it doesn't seem like we need to be setting a condition here.
Regardless, the combo of Accepted: true with reason UnsupportedValue does not seem valid -- if we're using the UnsupportedValue reason, then the status should be False.
There was a problem hiding this comment.
From my read of the spec, we should either be ignoring the duplicate header, or appending its value:
The code currently ignores duplicate headers from the add/remove operations. Commit e3210aa no longer sets a status condition for these cases and therefore an Accepted=true condition is surfaced.
Signed-off-by: danehans <daneyonhansen@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #495 +/- ##
==========================================
+ Coverage 60.21% 60.24% +0.03%
==========================================
Files 45 45
Lines 5582 5564 -18
==========================================
- Hits 3361 3352 -9
+ Misses 2011 2003 -8
+ Partials 210 209 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: danehans <daneyonhansen@gmail.com>
skriss
left a comment
There was a problem hiding this comment.
Looks reasonable to me, and we'll likely revisit some of this with upcoming Gateway API spec changes around conditions.
Updates the
Acceptedcondition type to use RouteReasonUnsupportedValue instead of theResolvedRefscondition type.Fixes #494
Signed-off-by: danehans daneyonhansen@gmail.com