Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3033

Applying a ConfigMap with type env causes the workspace to fail to start

XMLWordPrintable

    • False
    • None
    • False
    • Hide
      = Workspace startup might fail if a `ConfigMap` includes environment variables

      Currently, a workspace might fail to start if an applied `ConfigMap` includes environment variables, `env`.

      .Workaround

      . Delete any `ConfigMap` that include environment variables for the workspace.
      . Edit the workspace's devfile to add the required environment variables for the workspace.
      Show
      = Workspace startup might fail if a `ConfigMap` includes environment variables Currently, a workspace might fail to start if an applied `ConfigMap` includes environment variables, `env`. .Workaround . Delete any `ConfigMap` that include environment variables for the workspace. . Edit the workspace's devfile to add the required environment variables for the workspace.
    • Documented as Known Issue
    • Workaround Exists
      • Log in to cluster
      • Apply config map into user's workspace
      • Try to start a devfile

      Related upstream issues:

      After the configmap is applied, the workspace starts rapidly creating and terminating workspace pods

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: disconnected-env
        annotations:
          controller.devfile.io/mount-as: env
        labels:
          controller.devfile.io/mount-to-devworkspace: 'true'
          controller.devfile.io/watch-configmap: 'true'
      data:
        MAVEN_OPTS: >-
          -Duser.home=/home/user -Djavax.net.ssl.trustStore=/home/user/.m2/truststore.jks -Djavax.net.ssl.trustStorePassword=changeit
      

      This environment variable is necessary for a correct build of a maven based project https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.15/html/end-user_guide/using-artifact-repositories-in-a-restricted-environment_crw#using-self-signed-certificates-in-maven-projects_crw

      Workaround:
      Add an env variable directly into a devfile in the dashboard

        1. chrome_2022-07-20_16-14-47.png
          11 kB
          Tibor Dancs
        2. chrome_2022-07-20_16-15-04.png
          32 kB
          Tibor Dancs

              amisevsk Angel Misevski (Inactive)
              tdancs Tibor Dancs (Inactive)
              Max Leonov Max Leonov
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: