Implement Sandbox status via conditions#422
Implement Sandbox status via conditions#422SHRUTI6991 wants to merge 13 commits intokubernetes-sigs:mainfrom
Conversation
✅ Deploy Preview for agent-sandbox canceled.
|
|
/assign @janetkuo |
ac14f0c to
94fa3f1
Compare
|
/assign @barney-s |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SHRUTI6991 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/assign @justinsb |
|
/assign @barney-s |
|
We need to be more precise about what we're changing here: AIUI we already have a ready status.condition, and we want to add more conditions. I'm not yet clear about what problem those conditions are solving. For "aggregation" objects, my rule of thumb is that Ready is true when all the child objects are applied to the cluster and are themselves Ready. I consider Sandbox an aggregation object. There's some ambiguity about whether a suspended sandbox should be considered Ready. I think convention would say yes, a Deployment of size 0 is not generally treated as broken (I think). A controller can observe that the pod should be suspended from spec, see in status.observedGeneration that the controller has acted on this spec, and then look at the status to understand whether the child objects have been applied. I think there's an argument to be made that the current setup makes it harder to know when the Sandbox is in the process of scaling down, and I think we need to focus on that argument. |
I have reworded the motivation and emphasized focus on suspension. My main argument against using just a single "Ready" field is that we end up recreating the issues of using In addition to that, |
|
PR needs rebase. 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-sigs/prow repository. |
Fixes #119
Motivation
We need to expose
statusmethod for Sandboxes in the Python SDK: #280. The current outstanding implementation checks thePodstatus instead ofSandboxand transforms the Pod status into the Sandbox status on the client side. This is not an ideal implementation. We should exposestatusof the Sandbox on the controller side as a first class field. To align with Kubernetes API standards and address the previous limitations of usingphasefor Sandbox as discussed in #121, this proposal replaces the deprecatedstatus.phasefield withstatus.conditionsmodel. This model establishes three conditions:Initialized,ReadyandSuspended.Description
This PR includes the
KEPandimplementationof the Sandbox status viacondition. The details for the condition types and reasons are added in the KEP.Testing Strategy