Skip to content

Persitent Volume "devworkspace" has node selector on multi-node cluster #950

@granicayv

Description

@granicayv

Description

When the first workspace was created via Dashboard, Persistent Volume with claim "claim-devworkspace" was created by "devworkspace-operator". Persistent Volume with claim "claim-devworkspace" has node selection:

apiVersion: v1
kind: PersistentVolume
...
spec:
  accessModes:
  - ReadWriteOnce
...
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: claim-devworkspace
    namespace: admin-che
...
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - node-3

All created workspaces use this Volume, so all of them were created on only one node despite the cluster having several nodes.

How To Reproduce

Steps to reproduce the behavior:

  1. Create a multi-node microk8s cluster, for example, with 3 control plane nodes.
  2. Install Che on this multi-node cluster.
  3. Create several workspace pods
  4. Make sure all of them were created on only one node

Also, you can create some simple deployment yaml file, add this volume to spec and apply this file. The created pod was located in the same node as all workspaces despite other nodes being less loaded.

Expected behavior

Expected that no one Kubernetes object has a node selector. It is necessary to make microk8s load nodes by itself.

Questions

  1. Why this Persistent Volume is needed for workspaces?
  2. Can we change it somehow to remove the node selector? Is it safety for Che's behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions