mirror of
https://github.com/hanzoai/volume.git
synced 2026-10-01 00:48:00 +00:00
A fork of Rancher's local-path-provisioner at v0.0.36. The behaviour is unchanged and deliberately so — a directory on the node a pod lands on is the right thing for a disk. What changes is identity. The provisioner answers to hanzo.ai/volume rather than rancher.io/local-path. That is not branding: two provisioners sharing one name race for the same claims, and a stock k3s carries the upstream one, so a cluster running both would settle our storage by chance. Data lives at /var/lib/hanzo/volume, so reading a Hanzo cluster does not mean learning another vendor's directory. Apache-2.0 as published, unaltered, with Rancher's attribution in NOTICE. The README says what this is not: durability. A volume here dies with its node. That is hanzoai/replicate's question, one layer up, and keeping the two apart is what lets the disk stay this simple.
50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
.PHONY: build test validate validate-ci package ci default e2e-test release ci-image
|
|
|
|
DOCKER_BUILD = docker buildx build -f Dockerfile
|
|
CI_IMAGE ?= local-path-provisioner-ci:$(shell git rev-parse --short HEAD 2>/dev/null || echo dev)
|
|
PROJECT_DIR = /go/src/github.com/hanzoai/volume
|
|
HOST_UID ?= $(shell id -u)
|
|
HOST_GID ?= $(shell id -g)
|
|
|
|
build:
|
|
$(DOCKER_BUILD) --target binary --output type=local,dest=./bin .
|
|
|
|
test:
|
|
$(DOCKER_BUILD) --target test .
|
|
|
|
validate:
|
|
$(DOCKER_BUILD) --target validate .
|
|
|
|
validate-ci:
|
|
./scripts/validate-ci
|
|
|
|
package: build
|
|
./scripts/package
|
|
|
|
ci:
|
|
$(DOCKER_BUILD) --target ci-binary --output type=local,dest=./bin .
|
|
./scripts/validate-ci
|
|
./scripts/package
|
|
|
|
e2e-test:
|
|
./scripts/e2e-preflight
|
|
$(MAKE) ci-image
|
|
docker run --rm --network=host \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v $(CURDIR):$(PROJECT_DIR) \
|
|
-w $(PROJECT_DIR) \
|
|
-e REPO -e TAG -e DRONE_TAG \
|
|
-e HOST_UID=$(HOST_UID) -e HOST_GID=$(HOST_GID) \
|
|
$(CI_IMAGE) \
|
|
bash -c './scripts/e2e-test; status=$$?; chown -R "$$HOST_UID:$$HOST_GID" bin dist test/testdata 2>/dev/null || true; exit $$status'
|
|
|
|
ci-image:
|
|
$(DOCKER_BUILD) --target base --load -t $(CI_IMAGE) .
|
|
|
|
release:
|
|
./scripts/release
|
|
|
|
.DEFAULT_GOAL := default
|
|
|
|
default: build test package
|