-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Surface cpu and mem requests forbidden errors (and other ones too) in KSVC creation #14453
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
Changes from all commits
933ff82
da77117
97a75c2
f2a37f5
4c39ae2
caf0d9e
d921741
158d35b
5ff10f6
25714c2
2b999c8
b02331f
d061fe7
7d2d707
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,12 @@ func (c *Reconciler) reconcileDeployment(ctx context.Context, rev *v1.Revision) | |
| } | ||
| } | ||
|
|
||
| // If the replicaset is failing we assume its an error we have to surface | ||
| if rev.Status.IsReplicaSetFailure(&deployment.Status) { | ||
| rev.Status.PropagateDeploymentStatus(&deployment.Status) | ||
| return nil | ||
| } | ||
|
Comment on lines
+83
to
+86
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My initial thought was to have this in the Otherwise this section might be easier to reason about if we push
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that I revisit the code, yes the reason to have it there is for newly created deployments with replicaset errors. I couldn't move it inside propagate status inside since they are both different cases. The revision required surface an error but it does not care to be overwritten later, and you can have a replicaset error without a replicaset error, with the replicaset error we want to return immediately after so we need to check in the reconciler. |
||
|
|
||
| // If a container keeps crashing (no active pods in the deployment although we want some) | ||
| if *deployment.Spec.Replicas > 0 && deployment.Status.AvailableReplicas == 0 { | ||
| pods, err := c.kubeclient.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(deployment.Spec.Selector)}) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.