From 680a68204e887fd954f1be9d34ab24d4d1a56dd4 Mon Sep 17 00:00:00 2001 From: sys-liqian Date: Sat, 11 May 2024 03:09:16 -0400 Subject: [PATCH] docs: :memo: update README.md update README.md --- Makefile | 4 ++-- README.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b9befb6..7ca9b1c 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,6 @@ LOCAL_REPOSITORY ?= localhost:5000 go-build: CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -o bin/webdavplugin ./cmd/webdav -.PHONY: build-local-image -build-local-image: +.PHONY: docker-build +docker-build: go-build docker build --network host -t $(LOCAL_REPOSITORY)/webdavplugin:$(IMAGE_VERSION) . \ No newline at end of file diff --git a/README.md b/README.md index 274f418..e1f53ba 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,36 @@ ### Overview This is a repository for webdav csi driver, csi plugin name: `webdav.csi.io`. This driver supports dynamic provisioning of Persistent Volumes via Persistent Volume Claims by creating a new sub directory under webdav server. + +### Quick start with kind + +#### Build plugin image +```bash +make docker-build +``` + +#### Start kind cluster +```bash +kind create cluster --image kindest/node:v1.27.3 +``` + +### Load plugin image to kind cluster +```bash +kind load docker-image registry.k8s.io/sig-storage/csi-provisioner:v3.6.2 +kind load docker-image registry.k8s.io/sig-storage/livenessprobe:v2.11.0 +kind load docker-image registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.1 +kind load docker-image localhost:5000/webdavplugin:v0.0.1 +``` + +### Deploy CSI +```bash +kubectl apply -f deploy/ +``` + +### Tests +```bash +kubectl apply -f examples/csi-webdav-secret.yaml +kubectl apply -f examples/csi-webdav-storageclass.yaml +kubectl apply -f examples/csi-webdav-dynamic-pvc.yaml +kubectl apply -f examples/csi-webdav-pod.yaml +``` \ No newline at end of file