Skip to content

Commit 6255351

Browse files
committed
fix(kubernetes): allow pod exec creation in helmchart cluster role
1 parent 36c0788 commit 6255351

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

kubernetes/README-ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Pool 自定义资源维护一个预热的计算资源池,以实现快速沙箱
2929
- **池容量限制**:通过池范围的最小和最大限制来控制总体资源消耗。
3030
- **回收策略 (Recycle Policies)**:支持不同的 Pod 回收策略:
3131
- **Delete (默认)**:Pod 在返回池时会被删除并根据模板重新创建,确保环境绝对纯净。
32-
- **Restart**:通过向所有容器的 PID 1 发送 SIGTERM 信号优雅终止进程,并依赖 Kubernetes 的 `restartPolicy` 触发重启。这种方式比 `Delete` 更快,但要求 `PodTemplateSpec` 中的 `restartPolicy` 设置为 `Always``OnFailure`
32+
- **Restart**:通过向所有容器的 PID 1 发送 SIGTERM 信号优雅终止进程,并依赖 Kubernetes 的 `restartPolicy` 触发重启。这种方式比 `Delete` 更快,但要求 `PodTemplateSpec` 中的 `restartPolicy` 设置为 `Always`
3333
- **自动扩展**:基于当前需求和缓冲区设置进行动态资源分配和释放。
3434
- **实时状态监控**:显示总数、已分配、可用以及正在重启中的 Pod 数量。
3535

kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The Pool custom resource maintains a pool of pre-warmed compute resources to ena
2929
- **Pool Capacity Limits**: Overall resource consumption control with pool-wide minimum and maximum limits.
3030
- **Recycle Policies**: Support for different pod recycling strategies:
3131
- **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`.
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`.
3333
- **Automatic Scaling**: Dynamic resource allocation and deallocation based on current demand and buffer settings.
3434
- **Real-time Status**: Monitoring of total, allocated, available, and restarting pods.
3535

kubernetes/charts/opensandbox-controller/templates/clusterrole.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ rules:
7373
- get
7474
- patch
7575
- update
76+
- apiGroups:
77+
- ""
78+
resources:
79+
- pods/exec
80+
verbs:
81+
- create
7682
- apiGroups:
7783
- sandbox.opensandbox.io
7884
resources:

0 commit comments

Comments
 (0)