Chapter 10. Readiness init containers


CodeReady Workspaces Operator installs CodeReady Workspaces and starts its containers in the correct order. If a node with CodeReady Workspaces is restarted and all CodeReady Workspaces containers start simultaneously, some containers may fail because some other component they depend on is not ready. To avoid such failures, the readiness init containers queue the containers for CodeReady Workspaces components to start in the correct order.

The readiness init containers are disabled by default. If you choose to enable them, proceed according to the installation method used to install CodeReady Workspaces:

You can enable and disable the readiness init containers for the CodeReady Workspaces installed by the Operator installer:

The readiness init containers are not enabled by default, so to use them you first have to enable them. To enable the readiness init containers for the CodeReady Workspaces installed by the Operator installer:

Prerequisites

  • Red Hat CodeReady Workspaces installed by the Operator installer.

Procedure

  1. Find the name of the CodeReady Workspaces Operator Deployment. Usually it is codeready-workspaces-operator:

    $ oc get deployments -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  2. Edit the Deployment as follows: Under spec.template.spec.containers[0].env of the Operator Deployment, insert the following lines:

     - name: ADD_COMPONENT_READINESS_INIT_CONTAINERS 
    1
    
       value: "true"
    Copy to Clipboard Toggle word wrap
    1
    ADD_COMPONENT_READINESS_INIT_CONTAINERS is an environment variable.
  3. Wait while CodeReady Workspaces Operator restarts some components.
Note

Repeat these steps after each CodeReady Workspaces upgrade when a new Operator Deployment is created.

To disable the previously enabled readiness init containers for the CodeReady Workspaces installed by the Operator installer:

Prerequisites

  • Red Hat CodeReady Workspaces installed by the Operator installer.

Procedure

  1. Find the name of the CodeReady Workspaces Operator Deployment. Usually it is codeready-workspaces-operator:

    $ oc get deployments -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  2. Edit the Deployment as follows: Under spec.template.spec.containers[0].env of the Operator Deployment, remove the following lines:

     - name: ADD_COMPONENT_READINESS_INIT_CONTAINERS 
    1
    
       value: "true"
    Copy to Clipboard Toggle word wrap
    1
    ADD_COMPONENT_READINESS_INIT_CONTAINERS is an environment variable.
  3. Wait while CodeReady Workspaces Operator restarts some components.

You can enable and disable the readiness init containers for the CodeReady Workspaces installed by the OLM installer. (Available through crwctl, the OLM installer uses the Operator Lifecycle Manager to install CodeReady Workspaces.)

The readiness init containers are not enabled by default, so to use them you first have to enable them. To enable the readiness init containers for the CodeReady Workspaces installed by the OLM installer:

Prerequisites

  • CodeReady Workspaces is installed by the OLM installer.

Procedure

  1. Find the CodeReady Workspaces Operator subscription name:

    $ oc get subscriptions -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  2. Get the CSV (Cluster Service Version) name from the CodeReady Workspaces Operator subscription:

    $ oc get subscription <subscription-name> -n openshift-workspaces -o yaml | grep installedCSV
    Copy to Clipboard Toggle word wrap
  3. Edit the ClusterServiceVersion YAML manifest:

    $ oc edit csv <csv-name> -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  4. Add the following environment variable to the Operator Deployment spec:

     - name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
       value: "true"
    Copy to Clipboard Toggle word wrap
  5. Wait for the CodeReady Workspaces Operator restart to finish. The restarted Operator will then continue with restarting some of its components.
Note

Repeat these steps after each CodeReady Workspaces upgrade when a new CSV is created by OLM.

To disable the previously enabled readiness init containers for the CodeReady Workspaces installed by the OLM installer:

Prerequisites

  • CodeReady Workspaces is installed by the OLM installer.

Procedure

  1. Find the CodeReady Workspaces Operator subscription name:

    $ oc get subscriptions -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  2. Get the CSV (Cluster Service Version) name from the CodeReady Workspaces Operator subscription:

    $ oc get subscription <subscription-name> -n openshift-workspaces -o yaml | grep installedCSV
    Copy to Clipboard Toggle word wrap
  3. Edit the ClusterServiceVersion YAML manifest:

    $ oc edit csv <csv-name> -n openshift-workspaces
    Copy to Clipboard Toggle word wrap
  4. Remove the following environment variable from the Operator Deployment spec:

     - name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
       value: "true"
    Copy to Clipboard Toggle word wrap
  5. Wait for the CodeReady Workspaces Operator restart to finish. The restarted Operator will then continue with restarting some of its components.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat