diff --git a/Makefile b/Makefile index 4eca7612..83429832 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,8 @@ test-api: ## Run api tests cd api; go test $(GO_TEST_ARGS) ./... -coverprofile cover.out run: generate fmt vet manifests ## Run against the configured Kubernetes cluster in ~/.kube/config - go run $(GO_STATIC_FLAGS) ./main.go + @mkdir -p $(PWD)/bin/data + go run $(GO_STATIC_FLAGS) ./main.go --storage-adv-addr=:0 --storage-path=$(PWD)/bin/data install: manifests ## Install CRDs into a cluster kustomize build config/crd | kubectl apply -f - diff --git a/main.go b/main.go index f6b91285..84ce6379 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,6 @@ import ( "net" "net/http" "os" - "path/filepath" "time" flag "github.com/spf13/pflag" @@ -409,14 +408,6 @@ func mustInitStorage(path string, storageAdvAddr string, artifactRetentionTTL ti intdigest.Canonical = algo } - if path == "" { - p, _ := os.Getwd() - // TODO(hidde): look at this default path, seems to be an artifact of - // old things. - path = filepath.Join(p, "bin") - os.MkdirAll(path, 0o700) - } - storage, err := controllers.NewStorage(path, storageAdvAddr, artifactRetentionTTL, artifactRetentionRecords) if err != nil { setupLog.Error(err, "unable to initialise storage")