-
Notifications
You must be signed in to change notification settings - Fork 222
Bug 1944851: Clear route status when an ingress controller is deleted or a route is un-admitted #724
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
Bug 1944851: Clear route status when an ingress controller is deleted or a route is un-admitted #724
Conversation
|
@gcs278: This pull request references Bugzilla bug 1944851, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1c2e6d1 to
c5be3e1
Compare
|
/bugzilla refresh |
|
@gcs278: This pull request references Bugzilla bug 1944851, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
71cf24c to
030f1b7
Compare
bc489d1 to
237844e
Compare
795bc0a to
fd8de0d
Compare
gcs278
left a comment
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.
Thanks for the review!
… or a route is not admitted anymore.
This change adds the responsibility of clearing route status to the ingress controller. There are two situations in
which the ingress controller now updates route status:
#1 When the ingress controller/router is deleted or killed
openshift#2 When the ingress controller/router un-admits a route
This also adds a new watch for router pods deleted so that the ingress controller can determine when to clear route
status for #1.
It also adds new status fields for RouteSelector and NamespaceSelector in order to determine when to clear route
status for openshift#2.
df39af5 to
1852c35
Compare
|
Errors don't look related. |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
| for i := range routeList.Items { | ||
| route := &routeList.Items[i] | ||
|
|
||
| routeInShard := routeSelector.Matches(labels.Set(route.Labels)) | ||
| namespaceInShard := namespacesInShard.Has(route.Namespace) | ||
|
|
||
| if !routeInShard || !namespaceInShard { | ||
| if cleared, err := r.clearRouteStatus(route, ingress.ObjectMeta.Name); err != nil { |
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.
Iterating over i isn't actually an optimization if we then copy to the route variable.
| for i := range routeList.Items { | |
| route := &routeList.Items[i] | |
| routeInShard := routeSelector.Matches(labels.Set(route.Labels)) | |
| namespaceInShard := namespacesInShard.Has(route.Namespace) | |
| if !routeInShard || !namespaceInShard { | |
| if cleared, err := r.clearRouteStatus(route, ingress.ObjectMeta.Name); err != nil { | |
| for i := range routeList.Items { | |
| routeInShard := routeSelector.Matches(labels.Set(routeList.Items[i].Labels)) | |
| namespaceInShard := namespacesInShard.Has(routeList.Items[i].Namespace) | |
| if !routeInShard || !namespaceInShard { | |
| if cleared, err := r.clearRouteStatus(&routeList.Items[i], ingress.ObjectMeta.Name); err != nil { |
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.
Never mind, route is a pointer value, so the code you have isn't doing a copy.
|
Lovely jubbly! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gcs278, Miciah The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/unhold |
|
@gcs278: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@gcs278: All pull requests linked via external trackers have merged: Bugzilla bug 1944851 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Updates for fixing stale route status which is impacting various operations such as sharding and ingress operator status.