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

[RN] Avoid automatic creation of users namespaces through a configuration option

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Release Notes
    • Hide
      = New field in the `CheCluster` CR for configuring user namespace provision

      This enhancement adds an `autoProvision` field to the `CheCluster` custom resource where {prod-short} administrators can disable automatic provisioning of user namespaces:

      [source,yaml]
      ----
      spec:
         components
         containerRegistry
         devEnvironments:
           defaultNamespace:
             autoProvision: true <1>
      ----
      <1> `true` is the default.

      [WARNING]
      ====
      If you set `autoProvision` to `false`, and a user does not already have a {prod-short} namespace, workspace creation will fail.
      ====
      Show
      = New field in the `CheCluster` CR for configuring user namespace provision This enhancement adds an `autoProvision` field to the `CheCluster` custom resource where {prod-short} administrators can disable automatic provisioning of user namespaces: [source,yaml] ---- spec:    components    containerRegistry    devEnvironments:      defaultNamespace:        autoProvision: true <1> ---- <1> `true` is the default. [WARNING] ==== If you set `autoProvision` to `false`, and a user does not already have a {prod-short} namespace, workspace creation will fail. ====
    • Enhancement
    • Done

    Description

      Synced from Eclipse Che issue

      https://github.com/eclipse/che/issues/21582

      Is your enhancement related to a problem? Please describe

      In some cases administrators want to pre-create their namespaces and don't want to have Eclispe Che to automatically create them.

      Describe the solution you'd like

      Add a new property in CheCluster CR:

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      spec:
         components
         containerRegistry
         devEnvironments:
           defaultNamespace:
      +      autoProvision: true   # <= true by default
             template
         networking
      

      If spec.devEnvironments.defaultNamespace.disabled: true then Eclispe Che should not create namespaces if it doesn't exist. Eclispe Che should fail to start the workspace if the namespace doesn't exist:

      ⚠️
      You are allowed to start a workspace as there is no Kubernetes Namespace assigned
      to user <username> and the automatic creation of Namespaces is disabled in Che (
      CheCluster spec.devEnvironments.defaultNamespace.autoProvision is set to false).

      Read the documentation to create Namespaces in advance or contact your administrator to fix that.

      Current workaround

      To disable the automatic creation of users namespaces:

      spec:
        components:
          cheServer:
            extraProperties:
              CHE_INFRA_KUBERNETES_NAMESPACE_CREATION__ALLOWED: 'false'
      

      Release Notes Text

      A new field in CheCluster has been added to avoid that users namespaces get created automatically. If devEnvironments.defaultNamespace.autoProvision is set to false and a user doesn't have a Che namespace, workspace creation will fail. autoProvision is set to true by default.

      Attachments

        Issue Links

          Activity

            People

              rhn-ecs-pkovar Petr Kovar (Inactive)
              jiralint.codeready Bot Codeready
              Jana Vrbkova Jana Vrbkova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: