Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit e77320e

Browse files
committed
Move some files around and build binary and container image
1 parent 26f7617 commit e77320e

18 files changed

Lines changed: 84 additions & 27 deletions

Makefile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif
3131
depend-update: work
3232
cd $(DEST) && glide update
3333

34-
build: openstack-cloud-controller-manager cinder-provisioner cinder-flex-volume-driver k8s-keystone-auth
34+
build: openstack-cloud-controller-manager cinder-provisioner cinder-flex-volume-driver cinder-csi-plugin k8s-keystone-auth
3535

3636
openstack-cloud-controller-manager: depend $(SOURCES)
3737
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
@@ -45,6 +45,12 @@ cinder-provisioner: depend $(SOURCES)
4545
-o cinder-provisioner \
4646
cmd/cinder-provisioner/main.go
4747

48+
cinder-csi-plugin: depend $(SOURCES)
49+
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
50+
-ldflags "-X 'main.version=${VERSION}'" \
51+
-o cinder-csi-plugin \
52+
cmd/cinder-csi-plugin/main.go
53+
4854
cinder-flex-volume-driver: depend $(SOURCES)
4955
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
5056
-ldflags "-X 'main.version=${VERSION}'" \
@@ -123,7 +129,7 @@ install-distro-packages:
123129
tools/install-distro-packages.sh
124130

125131
clean:
126-
rm -rf .bindep openstack-cloud-controller-manager cinder-flex-volume-driver cinder-provisioner k8s-keystone-auth
132+
rm -rf .bindep openstack-cloud-controller-manager cinder-flex-volume-driver cinder-provisioner cinder-csi-plugin k8s-keystone-auth
127133

128134
realclean: clean
129135
rm -rf vendor
@@ -134,7 +140,7 @@ realclean: clean
134140
shell: work
135141
cd $(DEST) && $(SHELL) -i
136142

137-
images: image-controller-manager image-flex-volume-driver image-provisioner image-k8s-keystone-auth
143+
images: image-controller-manager image-flex-volume-driver image-provisioner image-csi-plugin image-k8s-keystone-auth
138144

139145
image-controller-manager: depend openstack-cloud-controller-manager
140146
ifeq ($(GOOS),linux)
@@ -163,6 +169,15 @@ else
163169
$(error Please set GOOS=linux for building the image)
164170
endif
165171

172+
image-csi-plugin: depend cinder-csi-plugin
173+
ifeq ($(GOOS),linux)
174+
cp cinder-csi-plugin cluster/images/cinder-csi-plugin
175+
docker build -t $(REGISTRY)/cinder-csi-plugin:$(VERSION) cluster/images/cinder-csi-plugin
176+
rm cluster/images/cinder-csi-plugin/cinder-csi-plugin
177+
else
178+
$(error Please set GOOS=linux for building the image)
179+
endif
180+
166181
image-k8s-keystone-auth: depend k8s-keystone-auth
167182
ifeq ($(GOOS),linux)
168183
cp k8s-keystone-auth cluster/images/webhook

cluster/images/cinder-plugin/Dockerfile renamed to cluster/images/cinder-csi-plugin/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ FROM centos:7.4.1708
33
LABEL maintainers="Kubernetes Authors"
44
LABEL description="Cinder CSI Plugin"
55

6-
# Copy cinderplugin from build directory
7-
COPY cinderplugin /cinderplugin
8-
96
# Install e4fsprogs for format
107
RUN yum -y install e4fsprogs
118

12-
# Define default command
13-
ENTRYPOINT ["/cinderplugin"]
9+
ADD cinder-csi-plugin /bin/
10+
11+
CMD ["/bin/cinder-csi-plugin"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222
"os"
2323

24-
"github.com/kubernetes-csi/drivers/pkg/cinder"
24+
"git.openstack.org/openstack/openstack-cloud-controller-manager/pkg/csi/cinder"
2525
"github.com/spf13/cobra"
2626
)
2727

glide.lock

Lines changed: 38 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package: git.openstack.org/openstack/openstack-cloud-controller-manager
22
import:
3+
- package: github.com/container-storage-interface/spec
4+
version: 9e88e4bfabeca1b8e4810555815f112159292ada
5+
subpackages:
6+
- lib/go/csi
37
- package: github.com/golang/glog
48
- package: github.com/gophercloud/gophercloud
59
version: e6eebf4bc729a74c834d96d950a804ab61015b0a
@@ -29,6 +33,10 @@ import:
2933
- openstack/networking/v2/ports
3034
- openstack/utils
3135
- pagination
36+
- package: github.com/kubernetes-csi/drivers
37+
subpackages:
38+
- pkg/cinder
39+
- pkg/csi-common
3240
- package: github.com/kubernetes-incubator/external-storage
3341
repo: https://github.com/dims/external-storage
3442
subpackages:
@@ -38,8 +46,18 @@ import:
3846
- package: github.com/prometheus/client_golang
3947
subpackages:
4048
- prometheus
41-
- package: github.com/scalingdata/gcfg
49+
- package: github.com/spf13/cobra
4250
- package: github.com/spf13/pflag
51+
- package: github.com/stretchr/testify
52+
subpackages:
53+
- mock
54+
- package: golang.org/x/net
55+
subpackages:
56+
- context
57+
- package: google.golang.org/grpc
58+
subpackages:
59+
- codes
60+
- status
4361
- package: gopkg.in/gcfg.v1
4462
- package: k8s.io/api
4563
version: kubernetes-1.9.2

manifests/cinder-plugin/csi-attacher-cinderplugin.yaml renamed to manifests/cinder-csi-plugin/csi-attacher-cinderplugin.yaml

File renamed without changes.
File renamed without changes.

manifests/cinder-plugin/csi-nodeplugin-cinderplugin.yaml renamed to manifests/cinder-csi-plugin/csi-nodeplugin-cinderplugin.yaml

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)