Ingress controller is unable to co-exist with any other Gateway API controller in the same cluster: it updates status of all routes regardless of their Gateway's class name. This results in two controllers hammering the HTTPRoute's status with constant updates, with ingress controller complaining about overloaded envoy and OOMing after a few minutes.
Exhibit A:
|
o.HTTPRoutesByGateway = make(map[refKey][]httpRouteInfo) |
|
for i := range hrl.Items { |
|
hr := &hrl.Items[i] |
|
o.OriginalHTTPRouteStatus = append(o.OriginalHTTPRouteStatus, |
|
httpRouteAndOriginalStatus{route: hr, originalStatus: hr.Status.DeepCopy()}) |
|
ensureRouteParentStatusExists(hr, c.ControllerName) |
|
for j := range hr.Spec.ParentRefs { |
|
pr := &hr.Spec.ParentRefs[j] |
|
key := refKeyForParentRef(hr, pr) |
|
if _, ok := o.Gateways[key]; ok { |
|
o.HTTPRoutesByGateway[key] = append(o.HTTPRoutesByGateway[key], |
|
httpRouteInfo{hr, pr, &hr.Status.Parents[j]}) |
|
} |
|
} |
|
} |
On line 74 it adds an incomplete status to the HTTPRoute struct, after adding a pointer to it to OriginalHTTPRouteStatus. That loop is supposed to filter out routes that belong to other controllers, but, unfortunately, that is done later on line 78.
Exhibit B:
|
if err := c.updateModifiedHTTPRouteStatus(ctx, o.OriginalHTTPRouteStatus); err != nil { |
That happens in the function processGateways that is called right after fetchObject (which is Exhibit A), overwriting route's status with an incomplete stub.
Ingress controller is unable to co-exist with any other Gateway API controller in the same cluster: it updates status of all routes regardless of their
Gateway's class name. This results in two controllers hammering theHTTPRoute's status with constant updates, with ingress controller complaining about overloaded envoy and OOMing after a few minutes.Exhibit A:
ingress-controller/controllers/gateway/fetch.go
Lines 69 to 83 in 0c6d986
On line 74 it adds an incomplete status to the
HTTPRoutestruct, after adding a pointer to it toOriginalHTTPRouteStatus. That loop is supposed to filter out routes that belong to other controllers, but, unfortunately, that is done later on line 78.Exhibit B:
ingress-controller/controllers/gateway/gateway.go
Line 33 in 0c6d986
That happens in the function
processGatewaysthat is called right afterfetchObject(which is Exhibit A), overwriting route's status with an incomplete stub.