How juicedata/juicefs-csi-driver works
Project type and purpose
• This is a Kubernetes CSI (Container Storage Interface) Driver for JuiceFS, written in Go.
• It provides volume provisioning, attach/detach, mount/unmount on Kubernetes nodes, plus an optional Dashboard (backend+React frontend) and webhook components.
• Key indicators:
• “cmd/” contains controller, node, dashboard binaries.
• “pkg/driver”, “pkg/controller”, “pkg/fuse”, “pkg/juicefs” implement the CSI patterns.
• “deploy/” holds Kubernetes manifests.
• “dashboard-ui-v2” is a React/TypeScript frontend.
File structure
• Top-level “cmd/”:
• cmd/main.go – CSI controller manager entry point
• cmd/node.go – CSI node plugin entry point
• cmd/dashboard – Dashboard API server
• cmd/app / cmd/pod_manager – controller implementations
• “pkg/driver”, “pkg/controller”, “pkg/webhook”: core CSI logic, controller-runtime reconciler, admission webhooks.
• “pkg/fuse”, “pkg/juicefs”: mount logic (spawn FUSE, process mounts).
• “dashboard-ui-v2”: a separate React SPA.
• “deploy/” & “docker/”: manifest and image builds.
• CI workflows and test directories for e2e, chaos and validation in “tests/”.
README for additional insights
• Confirms purpose: “JuiceFS CSI Driver allows you to use JuiceFS in Kubernetes.”
Details
• CSI sub-components (identity, controller, node, provisioner logic in “pkg/driver”).
• Deployment method (Kustomize overlays under “deploy/”).
• Don’t over-complicate: break into Frontend, Backend, CSI Controller, CSI Node, Webhook, External Storage.