-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal: Allow status on HTTPRoutes to be set #3456
Conversation
865c6a2
to
3c46077
Compare
Codecov Report
@@ Coverage Diff @@
## main #3456 +/- ##
==========================================
- Coverage 75.45% 75.28% -0.18%
==========================================
Files 98 99 +1
Lines 6740 6818 +78
==========================================
+ Hits 5086 5133 +47
- Misses 1534 1569 +35
+ Partials 120 116 -4
|
3c46077
to
dcda7ea
Compare
has a conflict to resolve now. |
dcda7ea
to
5e53531
Compare
All rebased @skriss, there are probably more spots to set status now that more features have been added in the last 2 weeks. I can look to add them, but won't change the overall code base. |
👍 I'll try to get through this this afternoon, sorry for the delay |
b0de520
to
dd113d6
Compare
No worries! 🌮 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good and straightforward to me! Just some comments on some specifics but generally LGTM
internal/dag/gatewayapi_processor.go
Outdated
|
||
// Validate TLS Configuration | ||
if route.Spec.TLS != nil { | ||
p.Error("NOT IMPLEMENTED: The 'RouteTLSConfig' is not yet implemented.") | ||
routeAccessor.ConditionFor(status.NotImplemented, "NotImplemented", "HTTPRoute.Spec.TLS: Not yet implemented.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth calling out somewhere that we are adding additional conditions with details about why a Route is invalid, I forget if the original design doc mentioned this specifically? Or if it was assumed the reason/description on the "Admitted" reason would have all this info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another point for not using status as message passing is that it could be relatively unwieldy it seems, maybe keying off of reasons is good enough, but if you need more detail than that you would want some structured description (JSON probably?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echoing @sunjayBhatia's q on the conditions, "Admitted" is the only type that Gateway API documents, so should we only use that? I'm not sure, I guess it depends on who is consuming the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it's okay for implementations to add their own Conditions, but they should roll up into the Admitted
condition. I think that Steve has handled that here in another way, but I think it would be best to be clear about what we're doing, and make sure that the status gets rolled up into the Admitted
condition at the end (we can use the commit
function to do that).
I think that ConditionFor
is not a good name for this one, as it's really doing an AddCondition
to the proxy update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we only use Admitted
then we can only set a single status on the resource? I was under the impression that since it's a set, we'd want to list out all the issues with a route and not just a single.
internal/dag/gatewayapi_processor.go
Outdated
@@ -194,44 +197,44 @@ func (p *GatewayAPIProcessor) computeHTTPRoute(route *gatewayapi_v1alpha1.HTTPRo | |||
case gatewayapi_v1alpha1.PathMatchPrefix: | |||
pathPrefixes = append(pathPrefixes, stringOrDefault(match.Path.Value, "/")) | |||
default: | |||
p.Error("NOT IMPLEMENTED: Only PathMatchPrefix is currently implemented.") | |||
routeAccessor.ConditionFor(status.Invalid, "PathMatchType", "HTTPRoute.Spec.Rules.PathMatch: Only Prefix match type is supported.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to pull the reasons into constants as well or since these are temporary we're ok with leaving them as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same logic as the conditions I guess, constraining what could be passed in with a type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I agree that we should make a set of defined Reasons for any condition we're using. As you say, because this is temporary though, we can probably not worry for now. Depends on how we update ConditionFor
.
internal/dag/gatewayapi_processor.go
Outdated
for _, forward := range rule.ForwardTo { | ||
// Verify the service is valid | ||
if forward.ServiceName == nil { | ||
p.Error("ServiceName must be specified and is currently only type implemented!") | ||
routeAccessor.ConditionFor(status.Invalid, "ForwardTo", "Spec.Rules.ForwardTo.ServiceName must be specified.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reason seems like it would be good to have as a constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, handful of comments
internal/dag/gatewayapi_processor.go
Outdated
|
||
// Validate TLS Configuration | ||
if route.Spec.TLS != nil { | ||
p.Error("NOT IMPLEMENTED: The 'RouteTLSConfig' is not yet implemented.") | ||
routeAccessor.ConditionFor(status.NotImplemented, "NotImplemented", "HTTPRoute.Spec.TLS: Not yet implemented.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echoing @sunjayBhatia's q on the conditions, "Admitted" is the only type that Gateway API documents, so should we only use that? I'm not sure, I guess it depends on who is consuming the info.
internal/dag/gatewayapi_processor.go
Outdated
// Determine if any errors exist in conditions and set the "Admitted" | ||
// condition accordingly. | ||
switch len(routeAccessor.Conditions) { | ||
case 0: | ||
routeAccessor.ConditionFor(status.AdmittedConditionValid, "Valid", "Valid HTTPRoute") | ||
default: | ||
routeAccessor.ConditionFor(status.AdmittedConditionInvalid, "ErrorsExist", "Errors Found, check other Conditions for details.") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see now that you're setting the Admitted
condition here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the rollup I was talking about. I think it's definitely worth some comments/explanations that this is what we are doing, as it's hard to see the flow as it stands. I also think that we need to try to use the upstream Reasons wherever we can, as if we don't we will diverge from the standards. We can, of course, push updates to the upstream reasons if we need to.
internal/status/cache.go
Outdated
// AdmittedConditionValid is the valid ConditionType for Admitted. | ||
const AdmittedConditionValid ConditionType = "AdmittedValid" | ||
|
||
// AdmittedConditionInValid is the invalid ConditionType for Admitted. | ||
const AdmittedConditionInvalid ConditionType = "AdmittedInvalid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was slightly confusing because these aren't actually condition types; they correspond to the different states ("True" or "False" for the Admitted
condition type). Thinking about suggestions here.
internal/status/httproutestatus.go
Outdated
} | ||
|
||
// ConditionFor returns a v1.Condition for a given ConditionType. | ||
func (pu *HTTPRouteUpdate) ConditionFor(cond ConditionType, reason string, message string) metav1.Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about having this function also take a status
as an arg, so instead of having the "AdmittedValid" and "AdmittedInvalid" psuedo-condition types, you can just explicitly pass "Admitted", "True" or "Admitted", "False" from the call sites?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the pattern I used for DetailedCondition doesn't work here. That pattern was that you call ConditionFor
to get a DetailedCondition, that has AddError
and AddWarning
methods on it. In this case, the upstream Condition has none of that, so a better pattern would probably be to just have an AddCondition
or UpsertCondition
method that would upsert a Condition to the object, taking type
, status
, reason
, and message
, and then using the holding HTTPRouteUpdate's Generation to calculate the ObservedGeneration for you.
So, my suggestion for this signature is this:
func (pu *HTTPRouteUpdate) ConditionFor(cond ConditionType, reason string, message string) metav1.Condition { | |
func (pu *HTTPRouteUpdate) AddCondition(cond ConditionType, status bool, reason string, message string) metav1.Condition { |
Obviously, this would mean changes at the calling site as well.
I'm sorry that I led us down the wrong path with DetailedCondition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking pretty good, although I have two broad things I think need fixing:
- It's vital that we get the ObservedGeneration behavior right.
- If we're going to generate extra Conditions per GatewayRef, we have to document what they are going to be, and provide a type with constants for the
type
andreason
fields, and document what they're for when we use them, just like the upstream gateway-apis code does.
I think that having extra conditions is great, as long as we make sure we're doing the Condition contract as expected by the upstream code.
internal/status/httproutestatus.go
Outdated
} | ||
|
||
// ConditionFor returns a v1.Condition for a given ConditionType. | ||
func (pu *HTTPRouteUpdate) ConditionFor(cond ConditionType, reason string, message string) metav1.Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the pattern I used for DetailedCondition doesn't work here. That pattern was that you call ConditionFor
to get a DetailedCondition, that has AddError
and AddWarning
methods on it. In this case, the upstream Condition has none of that, so a better pattern would probably be to just have an AddCondition
or UpsertCondition
method that would upsert a Condition to the object, taking type
, status
, reason
, and message
, and then using the holding HTTPRouteUpdate's Generation to calculate the ObservedGeneration for you.
So, my suggestion for this signature is this:
func (pu *HTTPRouteUpdate) ConditionFor(cond ConditionType, reason string, message string) metav1.Condition { | |
func (pu *HTTPRouteUpdate) AddCondition(cond ConditionType, status bool, reason string, message string) metav1.Condition { |
Obviously, this would mean changes at the calling site as well.
I'm sorry that I led us down the wrong path with DetailedCondition.
internal/status/httproutestatus.go
Outdated
type HTTPRouteUpdate struct { | ||
Fullname types.NamespacedName | ||
Conditions []metav1.Condition | ||
ExistingConditions []metav1.Condition | ||
GatewayRef types.NamespacedName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of how the Condition contract requires us to update the ObservedGeneration each time we update the Condition, the HTTPRouteUpdate has to include a Generation
field, like the ProxyUpdate does. This should be populated from the object when the update is created with the HTTPRouteAccessor()
call, and then copied into the ObservedGeneration
of the condition when the condition is generated with ConditionFor
.
I'll add some other comments to cover this.
internal/status/httproutestatus.go
Outdated
newDc.Type = "Admitted" | ||
} | ||
newDc.Message = message | ||
newDc.LastTransitionTime = metav1.NewTime(time.Now()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newDC.ObservedGeneration
should be updated around here as well.
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
func TestHTTPRouteConditionFor(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is also going to need to test the ObservedGeneration
bits, I think.
internal/dag/gatewayapi_processor.go
Outdated
|
||
// Validate TLS Configuration | ||
if route.Spec.TLS != nil { | ||
p.Error("NOT IMPLEMENTED: The 'RouteTLSConfig' is not yet implemented.") | ||
routeAccessor.ConditionFor(status.NotImplemented, "NotImplemented", "HTTPRoute.Spec.TLS: Not yet implemented.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it's okay for implementations to add their own Conditions, but they should roll up into the Admitted
condition. I think that Steve has handled that here in another way, but I think it would be best to be clear about what we're doing, and make sure that the status gets rolled up into the Admitted
condition at the end (we can use the commit
function to do that).
I think that ConditionFor
is not a good name for this one, as it's really doing an AddCondition
to the proxy update.
internal/dag/gatewayapi_processor.go
Outdated
@@ -194,44 +197,44 @@ func (p *GatewayAPIProcessor) computeHTTPRoute(route *gatewayapi_v1alpha1.HTTPRo | |||
case gatewayapi_v1alpha1.PathMatchPrefix: | |||
pathPrefixes = append(pathPrefixes, stringOrDefault(match.Path.Value, "/")) | |||
default: | |||
p.Error("NOT IMPLEMENTED: Only PathMatchPrefix is currently implemented.") | |||
routeAccessor.ConditionFor(status.Invalid, "PathMatchType", "HTTPRoute.Spec.Rules.PathMatch: Only Prefix match type is supported.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I agree that we should make a set of defined Reasons for any condition we're using. As you say, because this is temporary though, we can probably not worry for now. Depends on how we update ConditionFor
.
internal/dag/gatewayapi_processor.go
Outdated
// Determine if any errors exist in conditions and set the "Admitted" | ||
// condition accordingly. | ||
switch len(routeAccessor.Conditions) { | ||
case 0: | ||
routeAccessor.ConditionFor(status.AdmittedConditionValid, "Valid", "Valid HTTPRoute") | ||
default: | ||
routeAccessor.ConditionFor(status.AdmittedConditionInvalid, "ErrorsExist", "Errors Found, check other Conditions for details.") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the rollup I was talking about. I think it's definitely worth some comments/explanations that this is what we are doing, as it's hard to see the flow as it stands. I also think that we need to try to use the upstream Reasons wherever we can, as if we don't we will diverge from the standards. We can, of course, push updates to the upstream reasons if we need to.
625dc1d
to
5c943c6
Compare
I think I've addressed everyone's comments, can you all take a look again? Thanks! |
internal/status/httproutestatus.go
Outdated
for _, cond := range routeUpdate.Conditions { | ||
|
||
// Look through the newly calculated conditions, if they already exist | ||
// on the object or if our obervation is stale, then leave them be, | ||
// otherwise add them to the list to be written back to the API. | ||
for _, existingCond := range routeUpdate.ExistingConditions { | ||
if (cond.Status == existingCond.Status && | ||
cond.Reason == existingCond.Reason && | ||
cond.Message == existingCond.Message && | ||
cond.Type == existingCond.Type) || | ||
existingCond.ObservedGeneration > cond.ObservedGeneration { | ||
|
||
cond.ObservedGeneration = existingCond.ObservedGeneration | ||
cond.LastTransitionTime = existingCond.LastTransitionTime | ||
} | ||
} | ||
|
||
conditionsToWrite = append(conditionsToWrite, cond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I took a look at the HTTPProxy
equivalent here, and I think there are a couple things:
- at the top of the loop, we should always set
cond.ObservedGeneration = routeUpdate.Generation
andcond.LastTransitionTime = routeUpdate.LastTransitionTime
- the inner loop should be looking for an existing Condition on the HTTPRoute that's got the same
Type
, but a newer observed generation. If we find one, that meanscond
is stale, so we should keep the existing one instead. If we don't find a newer existing one, then we should usecond
.
So I think this should look more like (I wrote this in GitHub so it's definitely not 100% right):
for _, cond := range routeUpdate.Conditions {
// set the Condition's observed generation based on
// the generation of the HTTPRoute we looked at.
cond.ObservedGeneration = routeUpdate.Generation
cond.LastTransitionTime = routeUpdate.TransitionTime
// is there a newer Condition on the HTTPRoute matching
// this condition's type? If so, our observation is stale,
// so don't write it, keep the newer one instead.
var newerConditionExists bool
for _, existingCond := routeUpdate.ExistingConditions {
if existingCond.Type != cond.Type {
continue
}
if existingCond.ObservedGeneration > cond.ObservedGeneration {
conditionsToWrite = append(conditionsToWrite, existingCond)
newerConditionExists = true
break
}
}
// if we didn't find a newer version of the Condition on the
// HTTPRoute, then write the one we computed.
if !newerConditionExists {
conditionsToWrite = append(conditionsToWrite, cond)
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I was looking for in my earlier comment, thanks for making it clearer @skriss!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly LGTM, I think that Steve's suggestion is great.
internal/status/httproutestatus.go
Outdated
for _, cond := range routeUpdate.Conditions { | ||
|
||
// Look through the newly calculated conditions, if they already exist | ||
// on the object or if our obervation is stale, then leave them be, | ||
// otherwise add them to the list to be written back to the API. | ||
for _, existingCond := range routeUpdate.ExistingConditions { | ||
if (cond.Status == existingCond.Status && | ||
cond.Reason == existingCond.Reason && | ||
cond.Message == existingCond.Message && | ||
cond.Type == existingCond.Type) || | ||
existingCond.ObservedGeneration > cond.ObservedGeneration { | ||
|
||
cond.ObservedGeneration = existingCond.ObservedGeneration | ||
cond.LastTransitionTime = existingCond.LastTransitionTime | ||
} | ||
} | ||
|
||
conditionsToWrite = append(conditionsToWrite, cond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I was looking for in my earlier comment, thanks for making it clearer @skriss!
} | ||
|
||
// AddCondition returns a metav1.Condition for a given ConditionType. | ||
func (routeUpdate *HTTPRouteUpdate) AddCondition(cond gatewayapi_v1alpha1.RouteConditionType, status metav1.ConditionStatus, reason RouteReasonType, message string) metav1.Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method really should do some checking by cond
to see if there's an existing one, since conditions are supposed to be a List that's keyed of the Type. Not a blocker on this one, maybe a TODO though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh you can't have multiple conditions of the same type? What if you had two different missing services in a ForwardTo? Or on two different paths in the same HTTPRoute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to concatenate the details into the Message, but yeah, the Conditions is a ListTypeMap, meaning it's a map that's implemented as a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what happens if you do add multiple instances of the same Type, since the current code can definitely do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now you get multiple conditions since I thought you wouldn't want to concat but you'd want to have the details.
But like it seems with this API, my thought of how it should work is completely opposite. I'll have to come up with some concat thing to fix this since I guess I'm not following the spec in the current impl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this OK to merge as-is for 1.14? The current code can definitely potentially add multiple conditions of the same type, and i'm not sure what the Kube behavior is in that scenario - does it accept all of them? IMHO, given Gateway support is all alpha/WIP, I think we're probably OK as long as it doesn't cause Contour to crash or anything like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added #3534 to track this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Rules: []gatewayapi_v1alpha1.HTTPRouteRule{{ | ||
Matches: []gatewayapi_v1alpha1.HTTPRouteMatch{{ | ||
Path: gatewayapi_v1alpha1.HTTPPathMatch{ | ||
Type: "Exact", // <---- exact type not yet supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to be careful around the order of merging this PR and #3478
gatewayapi_v1alpha1 "sigs.k8s.io/gateway-api/apis/v1alpha1" | ||
) | ||
|
||
func TestHTTPRouteAddCondition(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth adding more testing around conditions not being updated if the existing conditions are more recent than the attempted update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we definitely should, though personally I'd be OK merging this PR as-is and adding more testing in subsequent PRs, since this area is still WIP and this is all alpha anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly LGTM, couple comments on true vs. false conditions
} | ||
|
||
// AddCondition returns a metav1.Condition for a given ConditionType. | ||
func (routeUpdate *HTTPRouteUpdate) AddCondition(cond gatewayapi_v1alpha1.RouteConditionType, status metav1.ConditionStatus, reason RouteReasonType, message string) metav1.Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what happens if you do add multiple instances of the same Type, since the current code can definitely do that.
- Update the status package to process GatewayAPI HTTPRoutes. - Update the dag.GatewayAPIProcessor to set status. Fixes projectcontour#3436 Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
Signed-off-by: Steve Sloka <[email protected]>
b0e3e2d
to
5ad0395
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is probably OK to merge now, had a couple comments/questions on open threads though.
} | ||
|
||
// AddCondition returns a metav1.Condition for a given ConditionType. | ||
func (routeUpdate *HTTPRouteUpdate) AddCondition(cond gatewayapi_v1alpha1.RouteConditionType, status metav1.ConditionStatus, reason RouteReasonType, message string) metav1.Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this OK to merge as-is for 1.14? The current code can definitely potentially add multiple conditions of the same type, and i'm not sure what the Kube behavior is in that scenario - does it accept all of them? IMHO, given Gateway support is all alpha/WIP, I think we're probably OK as long as it doesn't cause Contour to crash or anything like that.
gatewayapi_v1alpha1 "sigs.k8s.io/gateway-api/apis/v1alpha1" | ||
) | ||
|
||
func TestHTTPRouteAddCondition(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we definitely should, though personally I'd be OK merging this PR as-is and adding more testing in subsequent PRs, since this area is still WIP and this is all alpha anyway.
I think it's fine to merge and gives us a set of status information which is helpful. I agree that there's lots of room for improvement. =) |
Could you add issues and/or TODOs for the bits that have open questions/discussion threads so we don't lose them? |
Fixes #3436
Signed-off-by: Steve Sloka [email protected]