This documentation is for a release that is no longer maintained
See documentation for the latest supported version.3.4.2. 允许用户同时运行多个工作区
默认情况下,用户一次只能运行一个工作区。您可以让用户同时运行多个工作区。
注意
如果使用默认存储方法,如果用户在多节点集群中分布 pod,则同时运行工作区时可能会出现问题。从用户 通用 存储策略切换到 每个工作区存储策略,或 使用临时存储 类型可以避免或解决这些问题。
这个配置是 CheCluster 自定义资源的一部分:
spec:
components:
devWorkspace:
runningLimit: "<running_workspaces_limit>"
spec:
components:
devWorkspace:
runningLimit: "<running_workspaces_limit>"
- 1
- 设置每个用户同时运行工作区的最大数量。默认值为:
1。
流程
获取 OpenShift Dev Spaces 命名空间的名称:
oc get checluster --all-namespaces \ -o=jsonpath="{.items[*].metadata.namespace}"$ oc get checluster --all-namespaces \ -o=jsonpath="{.items[*].metadata.namespace}"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 默认为
openshift-operators。配置
runningLimit:oc patch checluster/devspaces -n openshift-operators \ --type='merge' -p \ '{"spec":{"components":{"devWorkspace":{"runningLimit": "<running_workspaces_limit>"}}}}'$ oc patch checluster/devspaces -n openshift-operators \1 --type='merge' -p \ '{"spec":{"components":{"devWorkspace":{"runningLimit": "<running_workspaces_limit>"}}}}'2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow