openebs / mayastor

Dynamically provision Stateful Persistent Replicated Cluster-wide Fabric Volumes & Filesystems for Kubernetes that is provisioned from an optimized NVME SPDK backend data storage stack.
Apache License 2.0
753 stars 109 forks source link

Support adding extra volumes to the csi-node daemonset when installing via helm #1683

Open Champ-Goblem opened 5 months ago

Champ-Goblem commented 5 months ago

Is your feature request related to a problem? Please describe. The csi-node daemonset has an init container called nvme-tcp-probe which continuously probes the loaded kernel modules for nvme_tcp. On some operating systems nvme_tcp is not loaded by default which causes this init container to hang until the kernel module is loaded. It is possible to pre-load the kernel module via an init container that runs before the probe init container that manually loads the module on container startup. The init container looks like this:

      - command:
        - nsenter
        - --mount=/pid1/mnt
        - --net=/pid1/net
        - --
        - modprobe
        - nvme_tcp
        image: ubuntu:latest
        name: load-nvme-tcp
        resources: {}
        securityContext:
          privileged: true
        volumeMounts:
        - mountPath: /pid1
          name: pid1

It is possible to configure the init container on the helm chart, however, the helm chart does not support adding extra volumes to the daemonset to pass through /proc/1/ns

Describe the solution you'd like It would be helpful to allow extending the initial volume array to be able to add the corresponding volume for the above init container which mounts /proc/1/ns from the host. The following is the volume spec required:

- name: pid1
  hostPath:
    path: /proc/1/ns
    type: Directory
tiagolobocastro commented 4 months ago

Hi, I think yes should be ok to support extending the volume array. Would you like to open a PR for this yourself?

avishnu commented 1 month ago

@Champ-Goblem will you be interested in taking this up and becoming an OpenEBS contributor?