-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Keep other controller statuses when updating httproute status #11705
Conversation
Signed-off-by: Alex Leong <[email protected]>
Signed-off-by: Alex Leong <[email protected]>
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.
Nice!
@@ -6,6 +6,7 @@ use crate::{ | |||
use ahash::{AHashMap as HashMap, AHashSet as HashSet}; | |||
use chrono::offset::Utc; | |||
use chrono::DateTime; | |||
use gateway::RouteParentStatus; |
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 this needs to be included i'd prefer to i'd prefer to include this on line 12 like:
use linkerd_policy_controller_k8s_api::{self as k8s, gateway::{self, RouteParentStatus}, ResourceExt};
having indirect/relative imports like this gets very confusing in my experience.
let unowned_statuses = route | ||
.statuses | ||
.iter() | ||
.filter_map(|parent_ref| self.parent_status(parent_ref, backend_condition.clone())) | ||
.collect(); | ||
.filter(|status| status.controller_name != POLICY_CONTROLLER_NAME) | ||
.cloned(); | ||
let parent_statuses = route | ||
.parents | ||
.iter() | ||
.filter_map(|parent_ref| self.parent_status(parent_ref, backend_condition.clone())); |
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.
Can you help me understand this by adding a comment that explains why this is load bearing?
Is this essentially that we are "replacing" any statuses where the controller name is ours? I think the implicit bit here is that parent_status only returns the status of things for which we control status?
Unrelated to the current fix, but I noticed we are not conserving previous conditions. Looking at statuses in other resources like Pods, it seems we should? |
Signed-off-by: Alex Leong <[email protected]>
## edge-23.12.2 This edge release includes a restructuring of the proxy's balancer along with accompanying new metrics. The new minimum supported Kubernetes version is 1.22. * Restructured the proxy's balancer ([#11750]): balancer changes may now occur independently of request processing. Fail-fast circuit breaking is enforced on the balancer's queue so that requests can't get stuck in a queue indefinitely. This new balancer is instrumented with new metrics: request (in-queue) latency histograms, failfast states, discovery updates counts, and balancer endpoint pool sizes. * Changed how the policy controller updates HTTPRoute status so that it doesn't affect statuses from other non-linkerd controllers ([#11705]; fixes [#11659]) [#11750]: #11750 [#11705]: #11705 [#11659]: #11659
## edge-23.12.2 This edge release includes a restructuring of the proxy's balancer along with accompanying new metrics. The new minimum supported Kubernetes version is 1.22. * Restructured the proxy's balancer ([#11750]): balancer changes may now occur independently of request processing. Fail-fast circuit breaking is enforced on the balancer's queue so that requests can't get stuck in a queue indefinitely. This new balancer is instrumented with new metrics: request (in-queue) latency histograms, failfast states, discovery updates counts, and balancer endpoint pool sizes. * Changed how the policy controller updates HTTPRoute status so that it doesn't affect statuses from other non-linkerd controllers ([#11705]; fixes [#11659]) [#11750]: #11750 [#11705]: #11705 [#11659]: #11659
Fixes #11659 When the policy controller updates the status of an HttpRoute, it will override any existing statuses on that resource. We update the policy controller to take into account any statuses which are not controlled by Linkerd already on the resource. It will patch the final statuses to be the combination of thee non-Linkerd statuses plus the Linkerd statuses. Signed-off-by: Alex Leong <[email protected]>
This stable release fixes two bugs in the Linkerd control plane. * Fixed an issue in the destination controller where the metadata API was not properly initialized for jobs, leading to error messages and unnecessary API calls ([#11541]) * Fixed an issue in the policy controller where it was overriding statuses on HTTPRoute resources from other controllers ([#11705]) [#11541]: #11541 [#11705]: #11705
Fixes #11659
When the policy controller updates the status of an HttpRoute, it will override any existing statuses on that resource.
We update the policy controller to take into account any statuses which are not controlled by Linkerd already on the resource. It will patch the final statuses to be the combination of thee non-Linkerd statuses plus the Linkerd statuses.