Skip to content

Automount envFrom fields can appear in random order #849

@amisevsk

Description

@amisevsk

Description

In some cases, the DevWorkspace Operator can get stuck in a loop where it updates the workspace deployment with the same envFrom configmaps but in a different order. This causes repeated creation + deletion of workspace pods as the Deployment cycles. If additional logging is enabled via enableExperimentalFeatures, DWO logs the diff:

Diff:   &v1.Deployment{
    ... // 2 ignored fields
    Spec: v1.DeploymentSpec{
<snip>
              EnvFrom: []v1.EnvFromSource{
                {
                  Prefix: "",
                  ConfigMapRef: &v1.ConfigMapEnvSource{
-                   LocalObjectReference: v1.LocalObjectReference{Name: "my-settings"},
+                   LocalObjectReference: v1.LocalObjectReference{Name: "che-proxy-settings"},
                    Optional:             nil,
                  },
                  SecretRef: nil,
                },
                {
                  Prefix: "",
                  ConfigMapRef: &v1.ConfigMapEnvSource{
-                   LocalObjectReference: v1.LocalObjectReference{Name: "che-proxy-settings"},
+                   LocalObjectReference: v1.LocalObjectReference{Name: "my-settings"},
                    Optional:             nil,
                  },
                  SecretRef: nil,
                },
              },
<snip>

How To Reproduce

Create two envFrom automount configmaps in one namespace and attempt to start a DevWorkspace. In my testing, it doesn't always occur, and it's not clear what triggers it.

Expected behavior

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions