You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kubernetes/README.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,22 +25,29 @@ The BatchSandbox custom resource allows you to create and manage multiple identi
25
25
26
26
### Resource Pooling
27
27
The Pool custom resource maintains a pool of pre-warmed compute resources to enable rapid sandbox provisioning:
28
-
- Configurable buffer sizes (minimum and maximum) to balance resource availability and cost
29
-
- Pool capacity limits to control overall resource consumption
30
-
- Automatic resource allocation and deallocation based on demand
31
-
- Real-time status monitoring showing total, allocated, and available resources
28
+
-**Configurable Buffer Sizes**: Minimum and maximum buffer settings to ensure resource availability while controlling costs.
29
+
-**Pool Capacity Limits**: Overall resource consumption control with pool-wide minimum and maximum limits.
30
+
-**Recycle Policies**: Support for different pod recycling strategies:
31
+
-**Delete (Default)**: Pods are deleted and recreated from the template when returned to the pool, ensuring a completely clean environment.
32
+
-**Restart**: PID 1 in all containers is gracefully terminated (SIGTERM), and the Kubernetes `restartPolicy` triggers a restart. This is faster than `Delete` but requires the `restartPolicy` in `PodTemplateSpec` to be set to `Always` or `OnFailure`.
33
+
-**Automatic Scaling**: Dynamic resource allocation and deallocation based on current demand and buffer settings.
34
+
-**Real-time Status**: Monitoring of total, allocated, available, and restarting pods.
32
35
33
36
### Task Orchestration
34
37
Integrated task management system that executes custom workloads within sandboxes:
35
-
-**Optional Execution**: Task scheduling is completely optional - sandboxes can be created without tasks
36
-
-**Process-Based Tasks**: Support for process-based tasks that execute within the sandbox environment
37
-
-**Heterogeneous Task Distribution**: Customize individual tasks for each sandbox in a batch using shardTaskPatches
38
+
-**Optional Execution**: Task scheduling is completely optional - sandboxes can be created without tasks.
39
+
-**Process-Based Tasks**: Support for process-based tasks that execute within the sandbox environment.
40
+
-**Heterogeneous Task Distribution**: Customize individual tasks for each sandbox in a batch using `shardTaskPatches`.
41
+
-**Resource Release Policy**: Control when resources are returned to the pool after task completion via `taskResourcePolicyWhenCompleted`:
42
+
-**Retain (Default)**: Keeps the sandbox resources until the `BatchSandbox` is deleted or expires.
43
+
-**Release**: Automatically releases the sandbox back to the pool immediately after the task reaches a terminal state (SUCCEEDED or FAILED).
38
44
39
45
### Advanced Scheduling
40
46
Intelligent resource management features:
41
-
- Minimum and maximum buffer settings to ensure resource availability while controlling costs
42
-
- Pool-wide capacity limits to prevent resource exhaustion
43
-
- Automatic scaling based on demand
47
+
-**Demand-based Scaling**: Automatically scales the number of pods in the pool based on real-time sandbox allocation requests.
48
+
-**Buffer Management**: `bufferMin` and `bufferMax` settings to balance instant availability with resource overhead.
49
+
-**Pool Constraints**: `poolMin` and `poolMax` to set hard boundaries on resource usage.
50
+
-**Rolling Updates**: Automatic pool update and pod rotation when the `PodTemplateSpec` is modified.
44
51
45
52
## Runtime API Support Notes
46
53
@@ -389,6 +396,7 @@ spec:
389
396
bufferMin: 2
390
397
poolMax: 20
391
398
poolMin: 5
399
+
podRecyclePolicy: Delete
392
400
```
393
401
394
402
Apply the pool configuration:
@@ -441,6 +449,7 @@ spec:
441
449
bufferMin: 2
442
450
poolMax: 20
443
451
poolMin: 5
452
+
podRecyclePolicy: Delete
444
453
```
445
454
446
455
Create a batch of sandboxes with process-based heterogeneous tasks using the pool we just created:
0 commit comments