1.3.4. 工作区示例
本节介绍 OpenShift Dev Spaces 工作区示例。
以下 devfile 定义 OpenShift Dev Spaces 工作区:
apiVersion: 1.0.0
metadata:
generateName: nodejs-configmap-
projects:
- name: nodejs-configmap
source:
location: "https://github.com/crw-samples/nodejs-configmap.git"
branch: 12.x
type: git
components:
- id: vscode/typescript-language-features/latest
type: chePlugin
- mountSources: true
type: kubernetes
entrypoints:
- command:
- sleep
args:
- infinity
reference: 'https://raw.githubusercontent.com/crw-samples/nodejs-mongodb-sample/master/kubernetes-manifests/guestbook-app.deployment.yaml'
alias: guestbook-frontend这个表为每个工作区组件提供内存要求:
表 1.4. 工作区内存要求和限制
| Pod | 容器名称 | 默认内存限值 | 默认内存请求 |
|---|---|---|---|
| Workspace |
| 512 Mi | 64 Mi |
| Workspace |
| 128 Mi | 32 Mi |
| Workspace |
| 4 Gi | 64 Mi |
| Workspace |
| 256 Mi | 64 Mi |
| 总计 | 4.9 Gi | 224 Mi | |