Provision projects in advance

Provision workspace projects in advance, rather than relying on automatic provisioning, to control namespace naming and apply custom resource quotas. Repeat the procedure for each user.

Before you begin

Procedure

  1. Disable automatic namespace provisioning on the CheCluster level:
    devEnvironments:
      defaultNamespace:
        autoProvision: false
  2. Create the <project_name> project for <username> user with the following labels and annotations:
    kind: Namespace
    apiVersion: v1
    metadata:
      name: <project_name>
      labels:
        app.kubernetes.io/part-of: che.eclipse.org
        app.kubernetes.io/component: workspaces-namespace
      annotations:
        che.eclipse.org/username: <username>

    where:

    <project_name>
    A project name of your choosing.
    <username>
    The username of the OpenShift Dev Spaces user.

Results

  • Verify that the project was created with the correct labels:
    $ oc get namespace <project_name> --show-labels