A sample (non-production) CSI Driver that creates a local directory as a volume on a single node
Go to file
Kubernetes Prow Robot 8b88d04ec3
Merge pull request #610 from xing-yang/changelog_1.17
Add changelog for v1.17
2025-06-23 10:38:27 -07:00
.github Add dependabot configuration 2023-04-26 19:26:51 +02:00
CHANGELOG Add changelog for v1.17 2025-06-23 12:56:16 -04:00
cmd/hostpathplugin Merge pull request #605 from nixpanic/automaxprocs 2025-06-22 19:38:59 -07:00
deploy Merge pull request #607 from PrasadG193/patch-1 2025-06-22 20:04:59 -07:00
docs Merge pull request #595 from carlbraganza/update-example-snapshot-metadata 2025-06-22 20:04:52 -07:00
examples update the vgs to beta1 2025-01-07 14:15:39 +01:00
hack bump image versions 2023-12-28 15:06:52 +08:00
internal switch from glog to klog 2024-06-18 16:19:28 +08:00
pkg spelling correction 2025-05-28 10:54:36 -07:00
release-tools Squashed 'release-tools/' changes from 04965932..0a435bf9 2025-05-28 10:54:36 -07:00
vendor Add `-automaxprocs` flag for configuring `GOMAXPROCS` 2025-05-22 18:01:30 +02:00
.cloudbuild.sh Revert "cloud build: initialize support for running commands in Dockerfile" 2020-06-08 10:54:30 +02:00
.gitignore common release tools and repo setup 2019-01-24 14:10:19 +01:00
.prow.sh Update deployment structure and sidecar versions for Kubernetes 1.32 2025-02-05 17:33:12 +01:00
CONTRIBUTING.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
Dockerfile Use GNU tar in the Docker image 2025-02-19 18:01:48 +01:00
LICENSE Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
Makefile common release tools and repo setup 2019-01-24 14:10:19 +01:00
OWNERS nominate myself as an approver 2025-02-11 10:52:14 +08:00
OWNERS_ALIASES OWNERS update with aliases 2021-05-21 09:54:07 +02:00
README.md Bump image versions and add usage instructions 2022-02-09 11:38:50 -08:00
RELEASE.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
SECURITY_CONTACTS Update OWNERS and SECURITY_CONTACTS 2018-09-18 11:52:04 -07:00
cloudbuild.yaml cloud build: use files from csi-release-tools 2020-06-02 20:22:41 +02:00
code-of-conduct.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
go.mod Add `-automaxprocs` flag for configuring `GOMAXPROCS` 2025-05-22 18:01:30 +02:00
go.sum Add `-automaxprocs` flag for configuring `GOMAXPROCS` 2025-05-22 18:01:30 +02:00

README.md

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.