Skip to content

Comments

Feature: Pause/resume sandbox (delete/restore Pod with no persistancy)#299

Open
tomergee wants to merge 3 commits intokubernetes-sigs:mainfrom
tomergee:pause-sandbox
Open

Feature: Pause/resume sandbox (delete/restore Pod with no persistancy)#299
tomergee wants to merge 3 commits intokubernetes-sigs:mainfrom
tomergee:pause-sandbox

Conversation

@tomergee
Copy link
Contributor

@tomergee tomergee commented Feb 8, 2026

Feature: Support Sandbox Pause/Resume capabilities, on pause pod will be terminated and resumed pod will be recreated

glott added 2 commits February 8, 2026 00:05
… be terminated and resumed pod will be recreated
… be terminated and resumed pod will be recreated
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 8, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tomergee / name: Tomer Glottmann (b47f903)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tomergee
Once this PR has been reviewed and has the lgtm label, please assign janetkuo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Hi @tomergee. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 8, 2026
@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for agent-sandbox canceled.

Name Link
🔨 Latest commit b47f903
🔍 Latest deploy log https://app.netlify.com/projects/agent-sandbox/deploys/6990170fd7379f0008d39410

@tomergee
Copy link
Contributor Author

tomergee commented Feb 8, 2026

/retest

@k8s-ci-robot
Copy link
Contributor

@tomergee: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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-sigs/prow repository.

f"Failed to communicate with the sandbox via the gateway at {url}.") from e

@trace_span("pause")
def pause(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a response objects for both methods with the status of the pause?

It might happen that the scaling down might not succeed. To report such case it would be nice to store the response.

wait: If True (default), blocks until the sandbox pod is ready.
If False, returns immediately after patching replicas.
"""
if not self.sandbox_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we ever have this case based on the current logic?

This seems to be set when we first initialize the client, if the name is not set we throw an error. Were you thinking to eventually move from this model and use the create and terminate methods?

"""
if not self.sandbox_name:
raise RuntimeError("Cannot resume; no sandbox has been created.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a validation check to see if the replica count is 0 before resuming?

@janetkuo janetkuo added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 9, 2026
**Data Persistence:** Pausing deletes the pod, so any data on ephemeral storage (container
filesystem, `emptyDir` volumes) is **lost**. To persist data across pause/resume, the `Sandbox` CR
supports `spec.volumeClaimTemplates` for PVC-backed volumes. Note that this field is on the `Sandbox`
spec directly and is not currently exposed through `SandboxTemplate`/`SandboxClaim`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#240 under review

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 14, 2026
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Details

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

@tomergee: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
presubmit-test-autogen-up-to-date b47f903 link true /test presubmit-test-autogen-up-to-date
presubmit-agent-sandbox-unit-test b47f903 link true /test presubmit-agent-sandbox-unit-test
presubmit-agent-sandbox-e2e-test b47f903 link true /test presubmit-agent-sandbox-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants