Skip to content

Commit

Permalink
Merge 0d58931 into 873eb43
Browse files Browse the repository at this point in the history
  • Loading branch information
vklohiya committed Feb 15, 2024
2 parents 873eb43 + 0d58931 commit 9f117f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bug Fixes
* `Issue 3230 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/3230>`_: CRD multicluster configuration triggers Raw response from Big-IP: map[code:422 declarationFullId: message:declaration has duplicate values in rules].
* `Issue 3239 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/3239>`_: Support for mix of k8s Secret and bigip reference in TLSProfile.
* `Issue 3232 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/3232>`_: Enhance as3 response add the runtime attribute
* `Issue 3266 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/3266>`_: Improve log when admitting next gen routes
* Fix for wildcard domain with multiple hosts in tls profile

2.15.1
Expand Down
12 changes: 7 additions & 5 deletions pkg/controller/nativeResourceWorker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1556,22 +1556,22 @@ func (ctlr *Controller) updateRouteAdmitStatus(
}
Admitted := false
now := metaV1.Now().Rfc3339Copy()
var routeStatusIngress []routeapi.RouteIngress
for _, routeIngress := range route.Status.Ingress {
if routeIngress.RouterName == F5RouterName {
for _, condition := range routeIngress.Conditions {
if condition.Status == status {
Admitted = true
} else {
// remove all multiple route admit status submitted earlier
ctlr.eraseRouteAdmitStatus(rscKey)
}
}
} else {
routeStatusIngress = append(routeStatusIngress, routeIngress)
}
}
if Admitted {
return
}
route.Status.Ingress = append(route.Status.Ingress, routeapi.RouteIngress{
routeStatusIngress = append(routeStatusIngress, routeapi.RouteIngress{
RouterName: F5RouterName,
Host: route.Spec.Host,
Conditions: []routeapi.RouteIngressCondition{{
Expand All @@ -1582,9 +1582,11 @@ func (ctlr *Controller) updateRouteAdmitStatus(
LastTransitionTime: &now,
}},
})
// updating to the new status
route.Status.Ingress = routeStatusIngress
_, err := ctlr.routeClientV1.Routes(route.ObjectMeta.Namespace).UpdateStatus(context.TODO(), route, metaV1.UpdateOptions{})
if err == nil {
log.Debugf("Admitted Route - %v", route.ObjectMeta.Name)
log.Infof("Admitted Route - %v", route.ObjectMeta.Name)
return
}
log.Errorf("Error while Updating Route Admit Status: %v\n", err)
Expand Down

0 comments on commit 9f117f2

Please sign in to comment.