How to Develop
Requirements
- Git
- Golang (version >= 1.26)
- Docker (version >= 19.03)
- Kubernetes (version >= 1.14)
- GNU Make
For installation of Golang, please refer to Install Golang
NOTE: The Go toolchain used by CI and the image builds is pinned by the
toolchaindirective ingo.mod. With the defaultGOTOOLCHAIN=auto, an older local Go downloads that toolchain automatically, but a newer local Go is used as-is, so keep it on its latest patch release (for example, Go 1.27.0–1.27.3 are affected by GO-2026-6859, which is fixed in Go 1.27.4). To build with exactly the pinned toolchain, set it explicitly, e.g.export GOTOOLCHAIN=go1.26.11.
make is usually in a build-essential package in your distribution's package manager of choice. Make sure you have make on your machine.
There're great chances that you may want to run your implementation in a real Kubernetes cluster, so probably a Docker is needed for some necessary operations like building images. See Install Docker for more information.
How to Build, Run and Debug
Get Source Code
$ git clone https://github.com/fluid-cloudnative/fluid.git
$ cd fluid
NOTE: Fluid uses Go modules for dependency management. No GOPATH setup is required.
Build Binary
Makefile under project directory provides many tasks you may want to use including Test, Build, Debug, Deploy etc.
You can simply get a binary by running:
# build dataset-controller, alluxioruntime-controller and csi Binary
$ make build
# if you only want to build alluxioruntime-controller
$ make alluxioruntime-controller-build
By default, the binary would be put under <fluid-path>/bin.