Skip to content

Commit

Permalink
Merge pull request #103 from wnxn/new-gomod
Browse files Browse the repository at this point in the history
use go mod
  • Loading branch information
ks-ci-bot authored Aug 25, 2019
2 parents 2b41d24 + 1d5eea0 commit f52a490
Show file tree
Hide file tree
Showing 727 changed files with 193,572 additions and 296,526 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ before_install:
- docker pull golang:1.12.7-alpine
- docker pull k8s.gcr.io/debian-base:v1.0.0

install:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -vendor-only
script:
- make disk-container
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DISK_IMAGE_TAG=canary
ROOT_PATH=$(pwd)
PACKAGE_LIST=./cmd/... ./pkg/...

disk:
disk: mod
docker build -t ${DISK_IMAGE_NAME}-builder:${DISK_IMAGE_TAG} -f deploy/disk/docker/Dockerfile . --target builder

disk-container:
Expand All @@ -47,6 +47,12 @@ uninstall-prod:
gen-prod:
kustomize build deploy/disk/kubernetes/overlays/dev

mod:
go build ./...
go mod download
go mod tidy
go mod vendor

fmt:
go fmt ${PACKAGE_LIST}

Expand All @@ -57,4 +63,5 @@ sanity-test:
${ROOT_PATH}/csi-sanity --csi.endpoint /var/lib/kubelet/plugins/disk.csi.qingcloud.com/csi.sock --csi.testvolumesize 107374182400

clean:
go clean -r -x
go clean -r -x ./...
rm -rf ./_output
4 changes: 4 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
approvers:
- wnxn
reviewers:
- wnxn
6 changes: 3 additions & 3 deletions deploy/disk/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
# +-------------------------------------------------------------------------

FROM golang:1.12.7-alpine as builder
WORKDIR /go/src/github.com/yunify/qingcloud-csi
WORKDIR /qingcloud-csi
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/qingcloud-disk-csi-driver ./cmd/disk
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=vendor -ldflags "-s -w" -o _output/qingcloud-disk-csi-driver ./cmd/disk

FROM k8s.gcr.io/debian-base:v1.0.0
LABEL maintainers="Yunify"
LABEL description="QingCloud CSI plugin"
RUN clean-install util-linux e2fsprogs xfsprogs mount ca-certificates udev
COPY --from=builder /go/src/github.com/yunify/qingcloud-csi/_output/qingcloud-disk-csi-driver /qingcloud-disk-csi-driver
COPY --from=builder /qingcloud-csi/_output/qingcloud-disk-csi-driver /qingcloud-disk-csi-driver
RUN chmod +x /qingcloud-disk-csi-driver && \
mkdir -p /var/log/qingcloud-disk-csi-driver
ENTRYPOINT ["/qingcloud-disk-csi-driver"]
28 changes: 28 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module github.com/yunify/qingcloud-csi

go 1.12

require (
github.com/container-storage-interface/spec v1.1.0
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/golang/protobuf v1.3.2
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.2.0
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/prometheus/client_golang v1.1.0 // indirect
github.com/yunify/qingcloud-sdk-go v0.0.0-20190806070725-5b519baeba90
golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/appengine v1.6.1 // indirect
google.golang.org/grpc v1.23.0
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiextensions-apiserver v0.0.0-20190823014223-07b4561f8b0e // indirect
k8s.io/apiserver v0.0.0-20190823053033-1316076af51c // indirect
k8s.io/cloud-provider v0.0.0-20190717025205-585d8110a88f // indirect
k8s.io/klog v0.4.0
k8s.io/kube-openapi v0.0.0-20190718094010-3cf2ea392886 // indirect
k8s.io/kubernetes v1.14.1
)
404 changes: 404 additions & 0 deletions go.sum

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS

This file was deleted.

1 change: 1 addition & 0 deletions vendor/github.com/gogo/protobuf/proto/extensions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/extensions_gogo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions vendor/github.com/golang/protobuf/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion vendor/github.com/golang/protobuf/proto/decode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions vendor/github.com/golang/protobuf/proto/deprecated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions vendor/github.com/golang/protobuf/proto/encode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/golang/protobuf/proto/equal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 71 additions & 7 deletions vendor/github.com/golang/protobuf/proto/extensions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f52a490

Please sign in to comment.