Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit f131b28

Browse files
authored
v1.0.0 changes (#61)
- driver name change - Non-default namespace support - MULTI-STAGE build support - Removed auto unmount functionality - Added check to reject the ReadOnlyMany volume creation request. - Improved log collection tool - Improved generate_pv_yaml - CSI Sanity changes - README update - New custom SCC
1 parent ed1533a commit f131b28

Some content is hidden

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

50 files changed

+2353
-2644
lines changed

contributing.md renamed to CONTRIBUTING.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
------------------------------
2-
Sign your work for submittal
3-
------------------------------
1+
[go_effectivego]: https://golang.org/doc/effective_go.html
2+
[go_gettingstarted]: https://github.com/golang/go/wiki#getting-started-with-go
3+
[go_goreturns]: https://github.com/sqs/goreturns
4+
[go_golangci-lint]: https://github.com/golangci/golangci-lint#install
5+
[go_codecomments]: https://github.com/golang/go/wiki/CodeReviewComments
6+
7+
# Contributing
8+
9+
## Before You Submit a Pull Request
10+
11+
1. Follow [coding practices](#coding-practices)
12+
2. [Verify](#run-local-verifications) your pull request
13+
3. [Sign your work](#sign-your-work-for-submittal) (required)
14+
15+
### Coding Practices
16+
17+
* Go
18+
- get started with [go-lang][go_gettingstarted]
19+
- practice [Effective Go][go_effectivego]
20+
- format code with [goreturns][go_goreturns]
21+
- keep in mind [common review comments][go_codecomments]
22+
23+
### Run Local Verifications
24+
You can run these verifications locally to predict the pass or fail of continuous integration.
25+
26+
* ```goreturns -d ./```
27+
28+
### Sign your work for submittal
429

530
The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org):
631

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
FROM registry.access.redhat.com/ubi7-minimal:latest
2-
LABEL maintainers="IBM Spectrum Scale"
3-
LABEL description="CSI Plugin for IBM Spectrum Scale"
2+
LABEL name="IBM Spectrum Scale CSI driver" \
3+
vendor="ibm" \
4+
version="1.0.0" \
5+
release="1" \
6+
run='docker run ibm-spectrum-scale-csi-driver' \
7+
summary="An implementation of CSI Plugin for the IBM Spectrum Scale product."\
8+
description="CSI Plugin for IBM Spectrum Scale"\
9+
maintainers="IBM Spectrum Scale"
10+
COPY licenses /licenses
411

5-
COPY _output/csi-spectrum-scale /csi-spectrum-scale
6-
RUN chmod +x /csi-spectrum-scale
7-
ENTRYPOINT ["/csi-spectrum-scale"]
12+
COPY _output/ibm-spectrum-scale-csi /ibm-spectrum-scale-csi
13+
RUN chmod +x /ibm-spectrum-scale-csi
14+
ENTRYPOINT ["/ibm-spectrum-scale-csi"]

Dockerfile.msb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# MULTI-STAGE BUILD for IBM Spectrum Scale CSI Driver
2+
3+
FROM golang:1.13.1 AS builder
4+
RUN wget -q -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64
5+
RUN chmod +x $GOPATH/bin/dep && export PATH=$PATH:$GOPATH/bin
6+
WORKDIR /go/src/github.com/IBM/ibm-spectrum-scale-csi-driver/
7+
COPY . .
8+
RUN [ -d /go/src/github.com/IBM/ibm-spectrum-scale-csi-driver/vendor ] || dep ensure
9+
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/ibm-spectrum-scale-csi ./cmd/ibm-spectrum-scale-csi
10+
11+
FROM registry.access.redhat.com/ubi7-minimal:latest
12+
LABEL name="IBM Spectrum Scale CSI driver" \
13+
vendor="ibm" \
14+
version="1.0.0" \
15+
release="1" \
16+
run='docker run ibm-spectrum-scale-csi-driver' \
17+
summary="An implementation of CSI Plugin for the IBM Spectrum Scale product."\
18+
description="CSI Plugin for IBM Spectrum Scale"\
19+
maintainers="IBM Spectrum Scale"
20+
COPY licenses /licenses
21+
COPY --from=builder /go/src/github.com/IBM/ibm-spectrum-scale-csi-driver/_output/ibm-spectrum-scale-csi /ibm-spectrum-scale-csi
22+
RUN chmod +x /ibm-spectrum-scale-csi
23+
ENTRYPOINT ["/ibm-spectrum-scale-csi"]

MANUAL_BUILD.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
# Manual Build
3+
4+
5+
## Using local golang build environment to build the CSI driver code
6+
7+
This method involves installation of golang and dep package on local build machine
8+
9+
1. Install the latest version of Go and add it to PATH. Refer https://golang.org/
10+
11+
```
12+
export PATH=$PATH:<go_install_dir>/bin
13+
```
14+
15+
2. Set your GOPATH to a directory where you want to clone the repo
16+
17+
```
18+
export GOPATH=<path_to_repo_base>
19+
```
20+
21+
3. Clone the code
22+
23+
```
24+
mkdir -p $GOPATH/src/github.com/IBM
25+
cd $GOPATH/src/github.com/IBM
26+
git clone https://github.com/IBM/ibm-spectrum-scale-csi-driver.git
27+
```
28+
29+
4. Build
30+
31+
4.1 Get dep (*Go's dependency manager*), which will be used by Makefile:
32+
33+
```
34+
wget --directory-prefix=/tmp/ https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64
35+
mkdir -p $GOPATH/bin
36+
mv /tmp/dep-linux-amd64 $GOPATH/bin/dep
37+
chmod +x $GOPATH/bin/dep
38+
export PATH=$PATH:$GOPATH/bin
39+
```
40+
41+
4.2 Compile:
42+
43+
```
44+
cd $GOPATH/src/github.com/IBM/ibm-spectrum-scale-csi-driver
45+
make
46+
```
47+
48+
4.3 Compile/build the docker image:
49+
50+
```
51+
cd $GOPATH/src/github.com/IBM/ibm-spectrum-scale-csi-driver
52+
make build-image
53+
```
54+

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
NAME=csi-spectrum-scale
15+
NAME=ibm-spectrum-scale-csi
1616

1717
.PHONY: all $NAME
1818

19-
IMAGE_VERSION=v0.9.0
19+
IMAGE_VERSION=v1.0.0
2020
IMAGE_NAME=$(NAME)
2121

2222
all: $NAME
2323

2424
$NAME:
2525
if [ ! -d ./vendor ]; then dep ensure; fi
26-
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/$(NAME) ./cmd/csi-spectrum-scale
26+
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/$(NAME) ./cmd/ibm-spectrum-scale-csi
2727

2828
build-image: $NAME
2929
docker build --network=host -t $(IMAGE_NAME):$(IMAGE_VERSION) .

0 commit comments

Comments
 (0)