• Stars
    star
    321
  • Rank 130,752 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 30 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A sample (non-production) CSI Driver that creates a local directory as a volume on a single node

CSI Hostpath Driver

This repository hosts the CSI Hostpath driver and all of its build and dependent configuration files to deploy the driver.


*WARNING: This driver is just a demo implementation and is used for CI testing. This has many fake implementations and other non-standard best practices, and should not be used as an example of how to write a real driver.

Pre-requisite

  • Kubernetes cluster
  • Running version 1.17 or later
  • Access to terminal with kubectl installed
  • VolumeSnapshot CRDs and Snapshot Controller must be installed as part of the cluster deployment (see Kubernetes 1.17+ deployment instructions)

Features

The driver can provide empty directories that are backed by the same filesystem as EmptyDir volumes. In addition, it can provide raw block volumes that are backed by a single file in that same filesystem and bound to a loop device.

Various command line parameters influence the behavior of the driver. This is relevant in particular for the end-to-end testing that this driver is used for in Kubernetes.

Usually, the driver implements all CSI operations itself. When deployed with the -proxy-endpoint parameter, it instead proxies all incoming connections for a CSI driver that is embedded inside the Kubernetes E2E test suite and used for mocking a CSI driver with callbacks provided by certain tests.

Deployment

Deployment for Kubernetes 1.17 and later

Examples

The following examples assume that the CSI hostpath driver has been deployed and validated:

Building the binaries

If you want to build the driver yourself, you can do so with the following command from the root directory:

make

Development

Updating sidecar images

The deploy/ directory contains manifests for deploying the CSI hostpath driver for different Kubernetes versions.

If you want to update the image versions used in these manifests, you can do so with the following command from the root directory:

hack/bump-image-versions.sh

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.

More Repositories

1

csi-driver-nfs

This driver allows Kubernetes to access NFS server on Linux node.
Go
841
star
2

external-snapshotter

Sidecar container that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint.
Go
484
star
3

csi-driver-smb

This driver allows Kubernetes to access SMB Server on both Linux and Windows nodes.
Go
483
star
4

external-provisioner

Sidecar container that watches Kubernetes PersistentVolumeClaim objects and triggers CreateVolume/DeleteVolume against a CSI endpoint
Go
338
star
5

external-attacher

Sidecar container that watches Kubernetes VolumeAttachment objects and triggers ControllerPublish/Unpublish against a CSI endpoint
Go
167
star
6

csi-test

CSI test frameworks
Go
158
star
7

docs

Documentation for CSI integration with Kubernetes
CSS
140
star
8

node-driver-registrar

Sidecar container that registers a CSI driver with the kubelet using the kubelet plugin registration mechanism.
Shell
132
star
9

external-resizer

Sidecar container that watches Kubernetes PersistentVolumeClaims objects and triggers controller side expansion operation against a CSI endpoint
Go
125
star
10

csi-driver-iscsi

Shell
101
star
11

livenessprobe

A sidecar container that can be included in a CSI plugin pod to enable integration with Kubernetes Liveness Probe.
Shell
74
star
12

external-health-monitor

This repo contains sidecar controller and agent for volume health monitoring.
Shell
64
star
13

csi-driver-nvmf

CSI driver NVMf mainly supports RDMA and TCP for Software Defined Storage by NVMf
Shell
61
star
14

csi-proxy

CSI Proxy utility to enable CSI Plugins on Windows
Go
58
star
15

csi-lib-utils

Common code for Kubernetes CSI sidecar containers (e.g. `external-attacher`, `external-provisioner`, etc.)
Go
41
star
16

driver-registrar

[Deprecated] Sidecar container that 1) registers the CSI driver with kubelet, and 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object
Go
24
star
17

csi-release-tools

shared build and test files used by kubernetes-csi projects
Shell
22
star
18

lib-volume-populator

Shared library for use by volume populators.
Go
21
star
19

csi-lib-iscsi

Go
16
star
20

cluster-driver-registrar

DEPRECATED: Sidecar container that registers the CSI driver with the Kubernetes cluster
Go
13
star
21

kubernetes-csi.github.io

8
star
22

volume-data-source-validator

Controller responsible for validating PVC data sources
Shell
5
star
23

external-snapshot-metadata

This repo contains sidecar controller for the snapshot metadata service.
Go
3
star
24

.github

Default files for all repos in the Kubernetes CSI GitHub org
1
star