Skip to content

DEPRECATED: Sidecar container that registers the CSI driver with the Kubernetes cluster

License

Notifications You must be signed in to change notification settings

kubernetes-csi/cluster-driver-registrar

Build Status

!NOTE!

⚠️ ⚠️ Cluster Driver Registrar is deprecated ⚠️ ⚠️

CSIDriver object instance should be created by CSI driver installer (or manually). See docs/cluster-driver-registrar and docs/csi-driver-object for more information.

Cluster Driver Registrar

The cluster-driver-registrar is a sidecar container that creates a cluster-level CSIDriver object for the CSI driver.

This sidecar container is only needed if you need one of the following Kubernetes features:

  • Skip attach: For drivers that don't support ControllerPublishVolume, this eliminates the need to deploy the external-attacher sidecar
  • Pod info on mount: This passes Kubernetes metadata such as Pod name and namespace to the NodePublish call

If you are not using one of these features, this sidecar container (and the creation of the CSIDriver Object) is not required. However, it is still recommended, because the CSIDriver Object makes it easier for users to easily discover the CSI drivers installed on their clusters.

Compatibility

This information reflects the head of this branch.

Compatible with CSI Version Container Image Min K8s Version
CSI Spec v1.0.0 quay.io/k8scsi/csi-cluster-driver-registrar 1.14

Usage

Common arguments

Though not strictly required, the following parameters are typically customized:

  • --csi-address: This is the path to the CSI driver UNIX domain socket inside the pod that the cluster-driver-registrar container will use to issue CSI operations (e.g. /csi/csi.sock).
  • --pod-info-mount: This allows Pod information to be passed to the NodePublish call. This should only be set if the CSI driver requires Pod information for mounting.

Required permissions

The cluster-driver-registrar needs to be able to create and delete CSIDriver objects. A sample RBAC configuration can be found at deploy/kubernetes/rbac.yaml.

Example

Here is an example sidecar spec in the driver's controller StatefulSet. <drivername.example.com> should be replaced by the actual driver's name.

      containers:
        - name: cluster-driver-registrar
          image: quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.2
          args:
            - "--csi-address=/csi/csi.sock"
            - "--pod-info-mount=true"
          volumeMounts:
            - name: plugin-dir
              mountPath: /csi
      volumes:
        - name: plugin-dir
          emptyDir: {}

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.