1.3.4. 工作区示例

本节介绍 OpenShift Dev Spaces 工作区示例。

以下 devfile 定义 OpenShift Dev Spaces 工作区:

schemaVersion: 2.1.0
metadata:
  name: bash
components:
  - name: tools
    container:
      image: quay.io/devfile/universal-developer-image:ubi8-0e189d9
      memoryLimit: 4Gi

commands:
  - id: run-main-script
    exec:
      label: "Run main.sh script"
      component: tools
      workingDir: '${PROJECT_SOURCE}'
      commandLine: |
        ./main.sh
      group:
        kind: run
        isDefault: true

这个表为每个工作区组件提供内存要求:

表 1.4. 工作区内存要求和限制

Pod容器名称默认内存限值默认内存请求

Workspace

theia-ide

512 Mi

64 Mi

Workspace

machine-exec

128 Mi

32 Mi

Workspace

工具

4 Gi

64 Mi

Workspace

che-gateway

256 Mi

64 Mi

总计

4.9 Gi

224 Mi