This documentation is for a release that is no longer maintained
See documentation for the latest supported version.2.4. 计算 Dev Spaces 资源要求
OpenShift Dev Spaces Operator、Dev Workspace Controller 和用户工作区由一组 pod 组成。pod 贡献 CPU 和内存限值和请求中的资源消耗。
以下示例 devfile 的链接是从上游社区的指向材料的指针。本材料代表了非常最新的可用内容和最新最佳实践。这些提示尚未由红帽的 QE 部门审查,并且尚未由广泛的用户组验证。请小心使用此信息。它最适合用于教育和"开发"目的,而不是"生产"目的。
步骤
识别依赖于用于定义开发环境的 devfile 的工作区资源要求。这包括识别 devfile 的
components
部分明确指定的工作区组件。以下是带有 以下组件的 devfile 示例 :
例 2.1.
工具
devfile
的工具
组件定义了以下请求和限制:memoryLimit: 6G memoryRequest: 512M cpuRequest: 1000m cpuLimit: 4000m
memoryLimit: 6G memoryRequest: 512M cpuRequest: 1000m cpuLimit: 4000m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在工作区启动过程中,使用以下请求和限制隐式置备内部
che-gateway
容器:memoryLimit: 256M memoryRequest: 64M cpuRequest: 50m cpuLimit: 500m
memoryLimit: 256M memoryRequest: 64M cpuRequest: 50m cpuLimit: 500m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
计算每个工作区所需的资源总和。如果要使用多个 devfile,请对每个预期的 devfile 重复这个计算。
例 2.2. 上一步中 示例 devfile 的工作区要求
Expand 用途 Pod 容器名称 内存限制 内存请求 CPU 限制 CPU 请求 开发人员工具
工作区
工具
6 GiB
512 MiB
4000 m
1000 m
OpenShift Dev Spaces 网关
工作区
che-gateway
256 MiB
64 MiB
500 m
50 M
总计
6.3 GiB
576 MiB
4500 m
1050 m
- 将每个工作区的资源乘以您希望所有用户同时运行的工作区数。
计算 OpenShift Dev Spaces Operator、Operands 和 Dev Workspace Controller 的要求总和。
Expand 表 2.1. OpenShift Dev Spaces Operator、Operands 和 Dev Workspace Controller 的默认要求 用途 Pod 名称 容器名称 内存限制 内存请求 CPU 限制 CPU 请求 OpenShift Dev Spaces operator
devspaces-operator
devspaces-operator
256 MiB
64 MiB
500 m
100 m
OpenShift Dev Spaces Server
devspaces
devspaces-server
1 GiB
512 MiB
1000 m
100 m
OpenShift Dev Spaces Dashboard
devspaces-dashboard
devspaces-dashboard
256 MiB
32 MiB
500 m
100 m
OpenShift Dev Spaces Gateway
devspaces-gateway
traefik
4 GiB
128 MiB
1000 m
100 m
OpenShift Dev Spaces Gateway
devspaces-gateway
configbump
256 MiB
64 MiB
500 m
50 M
OpenShift Dev Spaces Gateway
devspaces-gateway
oauth-proxy
512 MiB
64 MiB
500 m
100 m
OpenShift Dev Spaces Gateway
devspaces-gateway
kube-rbac-proxy
512 MiB
64 MiB
500 m
100 m
Devfile registry
devfile-registry
devfile-registry
256 MiB
32 MiB
500 m
100 m
插件 registry
plugin-registry
plugin-registry
256 MiB
32 MiB
500 m
100 m
dev Workspace Controller Manager
devworkspace-controller-manager
devworkspace-controller
1 GiB
100 MiB
1000 m
250 m
dev Workspace Controller Manager
devworkspace-controller-manager
kube-rbac-proxy
不适用
不适用
不适用
不适用
dev Workspace webhook 服务器
devworkspace-webhook-server
webhook-server
300 MiB
20 MiB
200 m
100 m
dev Workspace Operator Catalog
devworkspace-operator-catalog
registry-server
不适用
50 MiB
不适用
10 m
dev Workspace Webhook 服务器
devworkspace-webhook-server
webhook-server
300 MiB
20 MiB
200 m
100 m
dev Workspace Webhook 服务器
devworkspace-webhook-server
kube-rbac-proxy
不适用
不适用
不适用
不适用
总计
9 GiB
1.2 GiB
6.9
1.3