Skip to content

Commit f3f7d4d

Browse files
committed
Use go modules
1 parent cb86208 commit f3f7d4d

File tree

684 files changed

+227919
-107724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

684 files changed

+227919
-107724
lines changed

Gopkg.lock

Lines changed: 0 additions & 1210 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 90 deletions
This file was deleted.

Makefile

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@
22
GIT_HOST = sigs.k8s.io
33
PWD := $(shell pwd)
44
BASE_DIR := $(shell basename $(PWD))
5-
# Keep an existing GOPATH, make a private one if it is undefined
6-
GOPATH_DEFAULT := $(PWD)/.go
7-
export GOPATH ?= $(GOPATH_DEFAULT)
8-
GOBIN_DEFAULT := $(GOPATH)/bin
9-
export GOBIN ?= $(GOBIN_DEFAULT)
105
TESTARGS_DEFAULT := "-v"
116
export TESTARGS ?= $(TESTARGS_DEFAULT)
12-
PKG := $(shell awk -F "\"" '/^ignored = / { print $$2 }' Gopkg.toml)
13-
DEST := $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR)
14-
SOURCES := $(shell find $(DEST) -name '*.go')
157

16-
HAS_DEP := $(shell command -v dep;)
178
HAS_LINT := $(shell command -v golint;)
189
HAS_GOX := $(shell command -v gox;)
1910
HAS_YQ := $(shell command -v yq;)
@@ -33,46 +24,29 @@ TAGS :=
3324
LDFLAGS := "-w -s -X 'main.version=${VERSION}'"
3425
REGISTRY ?= k8scloudprovider
3526

36-
ifneq ("$(realpath $(DEST))", "$(realpath $(PWD))")
37-
$(error Please run 'make' from $(DEST). Current directory is $(PWD))
38-
endif
39-
40-
# CTI targets
41-
42-
$(GOBIN):
43-
echo "create gobin"
44-
mkdir -p $(GOBIN)
45-
46-
work: $(GOBIN)
47-
48-
depend: work
49-
ifndef HAS_DEP
50-
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
51-
endif
52-
dep ensure
53-
54-
depend-update: work
55-
dep ensure -update
27+
.PHONY: vendor
28+
vendor: ## Runs go mod to ensure proper vendoring.
29+
./hack/update-vendor.sh
5630

5731
build: binary images
5832

5933
binary: manager clusterctl
6034

6135
manager:
62-
GO111MODULE=off CGO_ENABLED=0 GOOS=$(GOOS) go build -v \
36+
CGO_ENABLED=0 GOOS=$(GOOS) go build -v \
6337
-ldflags $(LDFLAGS) \
6438
-o bin/manager \
6539
cmd/manager/main.go
6640

6741
clusterctl:
68-
GO111MODULE=off CGO_ENABLED=0 GOOS=$(GOOS) go build \
42+
CGO_ENABLED=0 GOOS=$(GOOS) go build \
6943
-ldflags $(LDFLAGS) \
7044
-o bin/clusterctl \
7145
cmd/clusterctl/main.go
7246

7347
test: unit functional generate_yaml_test
7448

75-
check: depend fmt vet lint
49+
check: vendor fmt vet lint
7650

7751
generate_yaml_test:
7852
ifndef HAS_YQ
@@ -86,8 +60,8 @@ endif
8660
rm -fr $(GENERATE_YAML_PATH)/$(GENERATE_YAML_TEST_FOLDER)
8761
rm dummy-clouds-test.yaml
8862

89-
unit: generate depend
90-
go test -tags=unit $(shell go list ./...) $(TESTARGS)
63+
unit: generate vendor
64+
go test -tags=unit ./pkg/... ./cmd/... $(TESTARGS)
9165

9266
functional:
9367
@echo "$@ not yet implemented"
@@ -103,10 +77,10 @@ endif
10377
hack/verify-golint.sh
10478

10579
vet:
106-
go vet ./...
80+
go vet ./pkg/... ./cmd/...
10781

108-
cover: generate depend
109-
go test -tags=unit $(shell go list ./...) -cover
82+
cover: generate vendor
83+
go test -tags=unit ./pkg/... ./cmd/... -cover
11084

11185
docs:
11286
@echo "$@ not yet implemented"
@@ -126,10 +100,6 @@ translation:
126100
env:
127101
@echo "PWD: $(PWD)"
128102
@echo "BASE_DIR: $(BASE_DIR)"
129-
@echo "GOPATH: $(GOPATH)"
130-
@echo "GOROOT: $(GOROOT)"
131-
@echo "DEST: $(DEST)"
132-
@echo "PKG: $(PKG)"
133103
go version
134104
go env
135105

@@ -154,10 +124,10 @@ manifests:
154124

155125
images: openstack-cluster-api-controller clusterctl-image
156126

157-
openstack-cluster-api-controller: generate fmt vet manifests
127+
openstack-cluster-api-controller: generate manifests
158128
docker build . -f cmd/manager/Dockerfile --network=host -t "$(REGISTRY)/openstack-cluster-api-controller:$(VERSION)"
159129

160-
clusterctl-image: generate fmt vet manifests
130+
clusterctl-image: generate manifests
161131
docker build . -f cmd/clusterctl/Dockerfile --network=host -t "$(REGISTRY)/openstack-cluster-api-clusterctl:$(VERSION)"
162132

163133
upload-images: images
@@ -171,7 +141,7 @@ version:
171141

172142
.PHONY: build-cross
173143
build-cross: LDFLAGS += -extldflags "-static"
174-
build-cross: depend
144+
build-cross: vendor
175145
ifndef HAS_GOX
176146
go get -u github.com/mitchellh/gox
177147
endif
@@ -187,5 +157,5 @@ dist: build-cross
187157
$(DIST_DIRS) zip -r cluster-api-provider-openstack-$(VERSION)-{}.zip {} \; \
188158
)
189159

190-
.PHONY: build clean cover depend docs fmt functional lint realclean \
160+
.PHONY: build clean cover vendor docs fmt functional lint realclean \
191161
relnotes test translation version build-cross dist manifests

go.mod

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module sigs.k8s.io/cluster-api-provider-openstack
2+
3+
go 1.12
4+
5+
require (
6+
cloud.google.com/go v0.40.0 // indirect
7+
github.com/Azure/go-autorest/autorest v0.5.0 // indirect
8+
github.com/ajeddeloh/go-json v0.0.0-20170920214419-6a2fe990e083 // indirect
9+
github.com/ajeddeloh/yaml v0.0.0-20170912190910-6b94386aeefd // indirect
10+
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 // indirect
11+
github.com/coreos/container-linux-config-transpiler v0.9.0
12+
github.com/coreos/go-semver v0.3.0 // indirect
13+
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
14+
github.com/coreos/ignition v0.32.0 // indirect
15+
github.com/go-logr/logr v0.1.0 // indirect
16+
github.com/go-logr/zapr v0.1.1 // indirect
17+
github.com/gobuffalo/envy v1.7.0 // indirect
18+
github.com/gogo/protobuf v1.2.1 // indirect
19+
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
20+
github.com/google/btree v1.0.0 // indirect
21+
github.com/google/gofuzz v1.0.0 // indirect
22+
github.com/google/uuid v1.1.1 // indirect
23+
github.com/googleapis/gnostic v0.3.0 // indirect
24+
github.com/gophercloud/gophercloud v0.0.0-20190615014256-8a9023050033
25+
github.com/gophercloud/utils v0.0.0-20190527093828-25f1b77b8c03
26+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
27+
github.com/grpc-ecosystem/grpc-gateway v1.9.1 // indirect
28+
github.com/imdario/mergo v0.3.7 // indirect
29+
github.com/markbates/inflect v1.0.4 // indirect
30+
github.com/pborman/uuid v1.2.0 // indirect
31+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
32+
github.com/pkg/errors v0.8.1
33+
github.com/prometheus/client_golang v0.9.4 // indirect
34+
github.com/rogpeppe/go-internal v1.3.0 // indirect
35+
github.com/spf13/afero v1.2.2 // indirect
36+
github.com/spf13/cobra v0.0.5 // indirect
37+
github.com/vincent-petithory/dataurl v0.0.0-20160330182126-9a301d65acbb // indirect
38+
go.uber.org/atomic v1.4.0 // indirect
39+
go.uber.org/multierr v1.1.0 // indirect
40+
go.uber.org/zap v1.10.0 // indirect
41+
go4.org v0.0.0-20190313082347-94abd6928b1d // indirect
42+
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
43+
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect
44+
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect
45+
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
46+
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect
47+
google.golang.org/appengine v1.6.1 // indirect
48+
google.golang.org/genproto v0.0.0-20190611190212-a7e196e89fd3 // indirect
49+
google.golang.org/grpc v1.21.1 // indirect
50+
gopkg.in/inf.v0 v0.9.1 // indirect
51+
gopkg.in/yaml.v2 v2.2.2
52+
k8s.io/api v0.0.0-20190612125737-db0771252981
53+
k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 // indirect
54+
k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
55+
k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4
56+
k8s.io/cluster-bootstrap v0.0.0-20190612131323-aa3fd9f69a09
57+
k8s.io/code-generator v0.0.0-20190612125529-c522cb6c26aa
58+
k8s.io/component-base v0.0.0-20190615090122-7edc45fbd48e // indirect
59+
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a // indirect
60+
k8s.io/klog v0.3.3
61+
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 // indirect
62+
sigs.k8s.io/cluster-api v0.1.4
63+
sigs.k8s.io/controller-runtime v0.1.12
64+
sigs.k8s.io/controller-tools v0.1.11
65+
sigs.k8s.io/testing_frameworks v0.1.1
66+
sigs.k8s.io/yaml v1.1.0
67+
)
68+
69+
replace (
70+
k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471
71+
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
72+
)

0 commit comments

Comments
 (0)