The term namespace (Kubernetes) is used interchangeably with project (OpenShift).

One Namespace per Workspace strategy

The strategy creates new namespace for each new workspace. Name of new namespace is workspace’s id.

To use the strategy, unset or leave empty CHE_INFRA_KUBERNETES_NAMESPACE variable on Kubernetes or CHE_INFRA_OPENSHIFT_PROJECT variable on Openshift.

CHE_INFRA_KUBERNETES_NAMESPACE=

One Namespace for all Workspaces strategy

The strategy uses one predefined namespace for all workspaces.

To use the strategy, set the CHE_INFRA_KUBERNETES_NAMESPACE variable on Kubernetes or the CHE_INFRA_OPENSHIFT_PROJECT variable on Openshift. The value must be name of desired namespace that you want to use.

Example

To have all workspaces created in che-workspaces namespace, set:

CHE_INFRA_KUBERNETES_NAMESPACE=che-workspaces

One Namespace per User strategy

The strategy isolates each user in their own namespace.

To use the strategy, set the CHE_INFRA_KUBERNETES_NAMESPACE variable on Kubernetes or the CHE_INFRA_OPENSHIFT_PROJECT variable on OpenShift. The value must contain one or more user identifiers. Currently supported identifiers are <username> and <userid>.

Example

To assign namespace names composed of a che-ws prefix and individual usernames (che-ws-user1, che-ws-user2), set:

CHE_INFRA_KUBERNETES_NAMESPACE=che-ws-<username>

Using the One Namespace per User strategy with the common PVC strategy only works correctly when the user runs not more than one workspace at a time. To enforce this limit, set:

CHE_LIMITS_USER_WORKSPACES_RUN_COUNT=1
Tags: