The following section describes advanced deployment and configuration methods for Eclipse Che.
Che configMaps and their behavior
The following section describes Che configMaps and how they behave.
A configMap is provided as an editable file that lists options to customize the Che environment. Based on the Che installation method, configMaps can be used to customize the working environment. The type of configMaps available in your Che environment varies based on the method used for installing Che.
Che installed using an Operator
Operators are software extensions to Kubernetes that use custom resources to manage applications and their components.
Che installed using the Operator provides the user with an automatically generated configMap called che.
The che configMap contains the main properties for the Che server, and is in sync with the information stored in the CheCluster Custom Resource file. User modifications of the che configMap after installing Che using the Operator are automatically overwritten by values that the Operator obtains from the CheCluster Custom Resource.
To edit the che configMap, edit the Custom Resource manually.
The configMap derives values from the CheCluster field. User modifications of the CheCluster Custom Resource field cause the Operator to change the attributes of the che configMap accordingly. The configMap changes automatically trigger a restart of the Che Pod.
To add custom properties to the Che server, such as environment variables that are not automatically generated in the che configMap by the Operator, or to override automatically generated properties, the CheCluster Custom Resource has a customCheProperties field, which expects a map.
For example, to override the default memory limit for workspaces, add the CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB property to customCheProperties:
apiVersion: org.eclipse.che/v1
kind: CheCluster
metadata:
name: eclipse-che
namespace: che
spec:
server:
cheImageTag: ''
devfileRegistryImage: ''
pluginRegistryImage: ''
tlsSupport: false
selfSignedCert: false
customCheProperties:
CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB: "2048"
auth:
...
Previous versions of the Che Operator had a configMap named custom to fulfill this role. If the Che Operator finds a configMap with the name custom, it adds the data it contains into the customCheProperties field, redeploys Che, and deletes the custom configMap.
Che installed using a Helm Chart
A Helm Chart is a Kubernetes extension for defining, installing, and upgrading Kubernetes applications.
When Che is installed using a Helm Chart, the user configures Che manually by modifying the configMap object. The configMap object is called che and is generated as an editable template after the installation. To apply manual changes to the custom configMap, delete the Che pod to manually restart it. Alternatively, use the following kubectl command:
$ kubectl rollout restart deployment/che
This avoids the downtime associated with deleting a Pod because it deploys and starts a new Pod, and only then deletes the old Pod.
Configuring namespace strategies
| The term namespace (Kubernetes) is used interchangeably with project (OpenShift). |
The namespace strategies are configured using the CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT environment variable.
There are legacy variables CHE_INFRA_KUBERNETES_NAMESPACE and CHE_INFRA_OPENSHIFT_PROJECT. These should be left unset for new installations. Changing these variables during update can lead to data loss.
|
One namespace per workspace strategy
The strategy creates a new namespace for each new workspace.
To use the strategy, the CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT variable value must contain the <workspaceid> identifier. It can be used alone or combined with other identifiers or any string.
To assign namespace names composed of a che-ws prefix and workspace id, set:
CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT=che-ws-<workspaceid>
One namespace for all workspaces strategy
The strategy uses one predefined namespace for all workspaces.
To use the strategy, the CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT variable value must be the name of the desired namespace to use.
To have all workspaces created in che-workspaces namespace, set:
CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT=che-workspaces
To run more than one workspace at a time when using this strategy together with the common PVC strategy, configure persistent volumes to use ReadWriteMany access mode.
|
One namespace per user strategy
The strategy isolates each user in their own namespace.
To use the strategy, the CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT variable value must contain one or more user identifiers. Currently supported identifiers are <username> and <userid>.
To assign namespace names composed of a che-ws prefix and individual usernames (che-ws-user1, che-ws-user2), set:
CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT=che-ws-<username>
|
To run more than one workspace at a time when using this strategy together with the To limit the number of concurrently running workspaces per user to one, set the To limit the number of concurrently running workspaces per user to one (1):
|
Allowing user-defined workspace namespaces
Che server can be configured to honor the user selection of a namespace when a workspace is created. This feature is disabled by default. To allow user-defined workspace namespaces, set:
CHE_INFRA_KUBERNETES_NAMESPACE_ALLOWUSERDEFINED=true
Deploying Che with support for Git repositories with self-signed certificates
This procedure describes how to configure Che for deployment with support for Git operations on repositories that use self-signed certificates.
-
Git version 2 or later
-
Helm version 2.15 or higher
Configuring support for self-signed Git repositories on Kubernetes
-
Create a new configMap with details about the Git server:
$ kubectl create configmap che-git-self-signed-cert --from-file=ca.crt \ --from-literal=githost=<host:port> -n=che
In the command, substitute
<host:port>for the host and port of the HTTPS connection on the Git server (optional).When githostis not specified, the given certificate is used for all HTTPS repositories.The certificate file must be named ca.crt. -
Configure the workspace exposure strategy
If Che is deployed using a Helm Chart-
Clone the che project
-
Go to
deploy/kubernetes/helm/chedirectory -
Update the
global.useGitSelfSignedCertsproperty. To do that, add the following option to thehelm upgradecommand:$ helm upgrade che -n che --set global.useGitSelfSignedCerts=true --set global.ingressDomain=<kubernetes-cluster-domain> .
<kubernetes-cluster-domain> On Minikube, use
$(minikube ip).nip.io
If Che is deployed using OperatorsUpdate the
gitSelfSignedCertproperty. To do that, execute:$ kubectl patch checluster eclipse-che -n che --type=json -p '[{"op": "replace", "path": "/spec/server/gitSelfSignedCert", "value": true}]' -
-
Create and start new workspace. Every container used by the workspace mounts a special volume that contains a file with the self-signed certificate. The repository’s
.git/configfile contains information about the Git server host (its URL) and the path to the certificate in thehttpsection (see Git documentation about git-config). For example:[http "https://10.33.177.118:3000"] sslCAInfo = /etc/che/git/cert/ca.crt
Installing Che using storage classes
To configure Che to use a configured infrastructure storage, install Che using storage classes. This is especially useful when a user wants to bind a persistent volume provided by a non-default provisioner. To do so, a user binds this storage for the Che data saving and sets the parameters for that storage. These parameters can determine the following:
-
A special host path
-
A storage capacity
-
A volume mod
-
Mount options
-
A file system
-
An access mode
-
A storage type
-
And many others
Che has two components that require persistent volumes to store data:
-
A PostgreSQL database.
-
A Che workspaces. Che workspaces store source code using volumes, for example
/projectsvolume.
|
Che workspaces source code is stored in the persistent volume only if a workspace is not ephemeral. |
-
Che does not create persistent volumes in the infrastructure.
-
Che uses persistent volume claims (PVC) to mount persistent volumes.
-
The Che server creates persistent volume claims.
A user defines a storage class name in the Che configuration to use the storage classes feature in the Che PVC. With storage classes, a user configures infrastructure storage in a flexible way with additional storage parameters. It is also possible to bind a static provisioned persistent volumes to the Che PVC using the class name.
Use CheCluster custom resource definition to define storage classes:
-
Define storage class names
To do so, use one of the following methods:
-
Use arguments for the
server:startcommand-
Provide the storage class name for the PostgreSQL PVC
Use the
chectlserver:startcommand with the--postgres-pvc-storage-class-nameflag:$ chectl server:start -m -p minikube -a operator --postgres-pvc-storage-class-name=postgress-storage
-
Provide the storage class name for the Che workspaces
Use the
server:startcommand with the--workspace-pvc-storage-class-nameflag:$ chectl server:start -m -p minikube -a operator --workspace-pvc-storage-class-name=workspace-storage
For Che workspaces, the storage class name has different behavior depending on the workspace PVC strategy.
postgres-pvc-storage-class-name=postgress-storageandworkspace-pvc-storage-class-namework for the Operator installer and the Helm installer.
-
-
Define storage class names using a custom resources YAML file:
-
Create a YAML file with custom resources defined for the Che installation.
-
Define fields:
spec#storage#postgresPVCStorageClassNameandspec#storage#workspacePVCStorageClassName.apiVersion: org.eclipse.che/v1 kind: CheCluster metadata: name: eclipse-che spec: # ... storage: # ... # keep blank unless you need to use a non default storage class for PostgreSQL PVC postgresPVCStorageClassName: 'postgres-storage' # ... # keep blank unless you need to use a non default storage class for workspace PVC(s) workspacePVCStorageClassName: 'workspace-storage' # ... -
Start the che server with your custom resources:
$ chectl server:start -m -p minikube -a operator --che-operator-cr-yaml=/path/to/custom/che/resource/org_v1_che_cr.yaml
-
-
-
Configure Che to store workspaces in one persistent volume and postrges in the second one:
-
Modify your custom resources YAML file:
-
Set
pvcStrategyascommon. -
Configure Che to start workspaces in a single namespace.
-
Define storage class names for
postgresPVCStorageClassNameandworkspacePVCStorageClassName. -
Example of the YAML file:
apiVersion: org.eclipse.che/v1 kind: CheCluster metadata: name: eclipse-che spec: server: # ... workspaceNamespaceDefault: 'che' # ... storage: # ... # Defaults to common pvcStrategy: 'common' # ... # keep blank unless you need to use a non default storage class for PostgreSQL PVC postgresPVCStorageClassName: 'postgres-storage' # ... # keep blank unless you need to use a non default storage class for workspace PVC(s) workspacePVCStorageClassName: 'workspace-storage' # ...
-
-
Start the che server with your custom resources:
$ chectl server:start -m -p minikube -a operator --che-operator-cr-yaml=/path/to/custom/che/resource/org_v1_che_cr.yaml
-
-
Bind static provisioned volumes using class names:
-
Define the persistent volume for a PostgreSQL database:
# che-postgres-pv.yaml apiVersion: v1 kind: PersistentVolume metadata: name: postgres-pv-volume labels: type: local spec: storageClassName: postgres-storage capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/data/che/postgres" -
Define the persistent volume for a Che workspace:
# che-workspace-pv.yaml apiVersion: v1 kind: PersistentVolume metadata: name: workspace-pv-volume labels: type: local spec: storageClassName: workspace-storage capacity: storage: 10Gi accessModes: - ReadWriteOnce hostPath: path: "/data/che/workspace" -
Bind the two persistent volumes:
-
$ kubectl apply -f che-workspace-pv.yaml -f che-postgres-pv.yaml
|
You must provide valid file permissions for volumes. You can do it using storage class configuration or manually. To manually define permissions, define |
Adding custom public SSL certificates to Che trust-store
This procedure describes how to configure Che to be able to perform HTTP requests to unrecognized resources.
-
Save the public certificate(s) that you want to apply.
-
Create a new configMap with the certificate(s):
$ kubectl create configmap <config-map name> --from-file=<certificate file path> -n=che
To apply more then one certificate, add
--from-file=<certificate file path>key to the command. -
Define the certificates config-map name.
If Che is deployed using a Helm Chart-
Clone the che project
-
Go to
deploy/kubernetes/helm/chedirectory -
Set the
global.tls.serverTrustStoreConfigMapNameproperty to previously created config-map name. To do that, add the following option to thehelm upgradecommand:$ helm upgrade che -n che --set global.tls.serverTrustStoreConfigMapName=<config-map name> --set global.ingressDomain=<kubernetes-cluster-domain> .
<kubernetes-cluster-domain> On Minikube, use
$(minikube ip).nip.io
If Che is deployed using OperatorsSet the
serverTrustStoreConfigMapNameproperty to previously created config-map name. To do that, execute:$ kubectl patch checluster eclipse-che -n che --type=json -p '[{"op": "replace", "path": "/spec/server/serverTrustStoreConfigMapName", "value": "<config-map name>"}]' -
Che configMaps fields reference
server settings related to the Che server
| Property | Default value | Description |
|---|---|---|
|
omit |
An optional host name or URL to an alternate container registry to pull images from. This value overrides the container registry host name defined in all default container images involved in a Che deployment. This is particularly useful to install Che in an air-gapped environment. |
|
omit |
Optional repository name of an alternate container registry to pull images from. This value overrides the container registry organization defined in all the default container images involved in a Che deployment. This is particularly useful to install Che in an air-gapped environment. |
|
|
Enables the debug mode for Che server. |
|
|
Flavor of the installation. |
|
The Operator automatically sets the value. |
A public host name of the installed Che server. |
|
|
Overrides the image pull policy used in Che deployment. |
|
omit |
Overrides the tag of the container image used in Che deployment. Omit it or leave it empty to use the default image tag provided by the Operator. |
|
omit |
Overrides the container image used in Che deployment. This does not include the container image tag. Omit it or leave it empty to use the default container image provided by the Operator. |
|
|
Log level for the Che server: |
|
omit |
Custom cluster role bound to the user for the Che workspaces. Omit or leave empty to use the default roles. |
|
omit |
Map of additional environment variables that will be applied in the generated |
|
omit |
Overrides the container image used in the Devfile registry deployment. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. |
|
|
Overrides the memory limit used in the Devfile registry deployment. |
|
|
Overrides the memory request used in the Devfile registry deployment. |
|
|
Overrides the image pull policy used in the Devfile registry deployment. |
|
The Operator automatically sets the value. |
Public URL of the Devfile registry that serves sample, ready-to-use devfiles. Set it if you use an external devfile registry (see the |
|
|
Instructs the Operator to deploy a dedicated Devfile registry server. By default a dedicated devfile registry server is started. If |
|
|
Instructs the Operator to deploy a dedicated Plugin registry server. By default, a dedicated plug-in registry server is started. If |
|
omit |
List of hosts that should not use the configured proxy. Use |
|
omit |
Overrides the container image used in the Plugin registry deployment. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. |
|
|
Overrides the memory limit used in the Plugin registry deployment. |
|
|
Overrides the memory request used in the Plugin registry deployment. |
|
|
Overrides the image pull policy used in the Plugin registry deployment. |
|
the Operator sets the value automatically |
Public URL of the Plugin registry that serves sample ready-to-use devfiles. Set it only when using an external devfile registry (see the |
|
omit |
Password of the proxy server. Only use when proxy configuration is required. |
|
omit |
Port of the proxy server. Only use when configuring a proxy is required (see also the |
|
omit |
URL (protocol+host name) of the proxy server. This drives the appropriate changes in the |
|
omit |
User name of the proxy server. Only use when configuring a proxy is required (see also the |
|
|
Enables the support of OpenShift clusters with routers that use self-signed certificates. When enabled, the Operator retrieves the default self-signed certificate of OpenShift routes and adds it to the Java trust store of the Che server. Required when activating the |
|
|
Overrides the memory limit used in the Che server deployment. |
|
|
Overrides the memory request used in the Che server deployment. |
|
|
Instructs the Operator to deploy Che in TLS mode. Enabling TLS requires enabling the |
database configuration settings related to the database used by Che
| Property | Default value | Description |
|---|---|---|
|
|
PostgreSQL database name that the Che server uses to connect to the database. |
|
the Operator sets the value automatically |
PostgreSQL Database host name that the Che server uses to connect to. Defaults to |
|
auto-generated value |
PostgreSQL password that the Che server uses to connect to the database. |
|
|
PostgreSQL Database port that the Che server uses to connect to. Override this value only when using an external database (see field |
|
|
PostgreSQL user that the Che server uses to connect to the database. |
|
|
Instructs the Operator to deploy a dedicated database. By default, a dedicated PostgreSQL database is deployed as part of the Che installation. If set to |
|
Always` for |
Overrides the image pull policy used in the PostgreSQL database deployment. |
|
omit |
Overrides the container image used in the PostgreSQL database deployment. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. |
auth configuration settings related to authentication used by Che installation
| Property | Default value | Description |
|---|---|---|
|
|
By default, a dedicated Identity Provider server is deployed as part of the Che installation. But if |
|
|
Overrides the name of the Identity Provider admin user. |
|
omit |
Name of an Identity provider (Keycloak / RH SSO) |
|
|
Overrides the image pull policy used in the Identity Provider (Keycloak / RH SSO) deployment. |
|
omit |
Overrides the container image used in the Identity Provider (Keycloak / RH SSO) deployment. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. |
|
omit |
Overrides the password of Keycloak admin user. Override it only when using an external Identity Provider (see the |
|
the Operator sets the value automatically |
Password for The Identity Provider (Keycloak / RH SSO) to connect to the database. This is useful to override it ONLY if you use an external Identity Provider (see the |
|
omit |
Name of an Identity provider (Keycloak / RH SSO) realm. Override it only when using an external Identity Provider (see the |
|
the Operator sets the value automatically |
Instructs the Operator to deploy a dedicated Identity Provider (Keycloak or RH SSO instance). Public URL of the Identity Provider server (Keycloak / RH SSO server). Set it only when using an external Identity Provider (see the |
|
the Operator sets the value automatically |
Name of the OpenShift |
|
the Operator sets the value automatically |
Name of the secret set in the OpenShift |
|
|
Enables the integration of the identity provider (Keycloak / RHSSO) with OpenShift OAuth. This allows users to login with their OpenShift login and have their workspaces created under personal OpenShift namespaces. The |
|
|
Forces the default |
storage configuration settings related to persistent storage used by Che
| Property | Default value | Description |
|---|---|---|
|
omit |
Storage class for the Persistent Volume Claim dedicated to the PostgreSQL database. Omitted or leave empty to use a default storage class. |
|
|
Instructs the Che server to launch a special Pod to pre-create a subpath in the Persistent Volumes. Enable it according to the configuration of your K8S cluster. |
|
|
Size of the persistent volume claim for workspaces. |
|
omit |
Overrides the container image used to create sub-paths in the Persistent Volumes. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. See also the |
|
|
Available options:`common` (all workspaces PVCs in one volume), |
|
omit |
Storage class for the Persistent Volume Claims dedicated to the Che workspaces. Omit or leave empty to use a default storage class. |
k8s configuration settings specific to Che installations on Kubernetes
| Property | Default value | Description |
|---|---|---|
|
|
Ingress class that defines which controller manages ingresses. |
|
omit |
Global ingress domain for a K8S cluster. This field must be explicitly specified. This drives the |
|
|
Strategy for ingress creation. This can be |
|
|
FSGroup the Che Pod and Workspace Pods containers should run in. |
|
|
ID of the user the Che Pod and Workspace Pods containers should run as. |
|
omit |
Name of a secret that is used to set ingress TLS termination if TLS is enabled. See also the |
installation defines the observed state of Che installation
| Property | Description |
|---|---|
|
Status of a Che installation. Can be |
|
Public URL to the Che server. |
|
Currently installed Che version. |
|
Indicates whether a PostgreSQL instance has been correctly provisioned. |
|
Public URL to the Devfile registry. |
|
A URL to where to find help related to the current Operator status. |
|
Indicates whether an Identity Provider instance (Keycloak / RH SSO) has been provisioned with realm, client and user. |
|
Public URL to the Identity Provider server (Keycloak / RH SSO). |
|
A human-readable message with details about why the Pod is in this state. |
|
Indicates whether an Identity Provider instance (Keycloak / RH SSO) has been configured to integrate with the OpenShift OAuth. |
|
Public URL to the Plugin registry. |
|
A brief CamelCase message with details about why the Pod is in this state. |
Limits for workspaces
| Property | Default value | Description |
|---|---|---|
|
|
The maximum amount of RAM that a user can allocate to a workspace when they create a new workspace. The RAM slider is adjusted to this maximum value. |
|
|
The length of time that a user is idle with their workspace when the system will suspend the workspace and then stopping it. Idleness is the length of time that the user has not interacted with the workspace, meaning that one of our agents has not received interaction. Leaving a browser window open counts toward idleness. |
Limits for the workspaces of an user
| Property | Default value | Description |
|---|---|---|
|
|
he total amount of RAM that a single user is allowed to allocate to running workspaces. A user can allocate this RAM to a single workspace or spread it across multiple workspaces. |
|
|
The maximum number of workspaces that a user is allowed to create. The user will be presented with an error message if they try to create additional workspaces. This applies to the total number of both running and stopped workspaces. |
|
|
The maximum number of running workspaces that a single user is allowed to have. If the user has reached this threshold and they try to start an additional workspace, they will be prompted with an error message. The user will need to stop a running workspace to activate another. |
Limits for the workspaces of an organization
| Property | Default value | Description |
|---|---|---|
|
|
The total amount of RAM that a single organization (team) is allowed to allocate to running workspaces. An organization owner can allocate this RAM however they see fit across the team’s workspaces. |
|
|
The maximum number of workspaces that a organization is allowed to own. The organization will be presented an error message if they try to create additional workspaces. This applies to the total number of both running and stopped workspaces. |
|
|
The maximum number of running workspaces that a single organization is allowed. If the organization has reached this threshold and they try to start an additional workspace, they will be prompted with an error message. The organization will need to stop a running workspace to activate another. |