Skip to content

Commit

Permalink
ES-746 docker image vulnerabilities (#32)
Browse files Browse the repository at this point in the history
* ES-746 docker image vulnerabilities
  • Loading branch information
Qeas authored Apr 3, 2023
1 parent 78fcdf0 commit ac5c96b
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 74 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
ARG BASE_IMAGE
ARG BUILD_IMAGE

# build container
FROM golang:1.17.4 as builder
FROM $BUILD_IMAGE as builder
WORKDIR /go/src/github.com/Nexenta/nexentastor-csi-driver/
COPY . ./
ARG VERSION
ENV VERSION=$VERSION
RUN apk add --no-cache make git
RUN go version
RUN make build &&\
cp ./bin/nexentastor-csi-driver /


# driver container
FROM alpine:3.15.4
FROM $BASE_IMAGE
LABEL name="nexentastor-csi-driver"
LABEL maintainer="Nexenta Systems, Inc."
LABEL description="NexentaStor CSI Driver"
LABEL io.k8s.description="NexentaStor CSI Driver"
# install nfs and smb dependencies
RUN apk add --no-cache rpcbind nfs-utils cifs-utils ca-certificates
RUN apk update && apk add "libcrypto3>=3.0.8-r3" "libssl3>=3.0.8-r3" && rm -rf /var/cache/apt/*
# create driver config folder and print version
RUN mkdir -p /config/
COPY --from=builder /nexentastor-csi-driver /
Expand Down
15 changes: 10 additions & 5 deletions Dockerfile.csi-sanity
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
ARG BASE_IMAGE
ARG BUILD_IMAGE

# csi-sanity build container
FROM golang:1.13 as builder-csi-sanity
FROM $BUILD_IMAGE as builder-csi-sanity
WORKDIR /go/src/github.com/kubernetes-csi/
# csi-sanity versions: https://github.com/kubernetes-csi/csi-test/releases
ARG CSI_SANITY_VERSION_TAG
ENV CSI_SANITY_VERSION_TAG=$CSI_SANITY_VERSION_TAG
RUN apk add --no-cache make git
RUN git clone https://github.com/kubernetes-csi/csi-test.git &&\
cd csi-test &&\
git checkout -b ${CSI_SANITY_VERSION_TAG} ${CSI_SANITY_VERSION_TAG} &&\
Expand All @@ -13,15 +17,16 @@ RUN git clone https://github.com/kubernetes-csi/csi-test.git &&\


# driver build container
FROM golang:1.13 as builder-driver
FROM $BUILD_IMAGE as builder-driver
WORKDIR /go/src/github.com/Nexenta/nexentastor-csi-driver/
COPY . ./
RUN apk add --no-cache make git
RUN make build &&\
cp ./bin/nexentastor-csi-driver /nexentastor-csi-driver


# run driver and csi-sanity tests
FROM alpine:3.10
FROM $BASE_IMAGE
WORKDIR /
# driver UNIX socket
ENV SOCK="unix:///csi.sock"
Expand All @@ -42,9 +47,9 @@ RUN echo '/nexentastor-csi-driver --config-dir=/config --endpoint=${SOCK} --node
RUN mkdir /lib64 &&\
ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
# versions
RUN /csi-sanity -csi.version &&\
RUN /csi-sanity -version &&\
/nexentastor-csi-driver --version
# other csi-sanity options: --ginkgo.v -ginkgo.noColor
#TODO remove "--ginkgo.skip" option after fixing volume paginatin by token:
ENTRYPOINT ["/bin/sh", "-c", "/run-driver && /csi-sanity --csi.endpoint=${SOCK} --csi.createpathcmdtimeout=180 --csi.removepathcmdtimeout=180 --ginkgo.skip 'pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted'"]
ENTRYPOINT ["/bin/sh", "-c", "/run-driver && /csi-sanity --csi.endpoint=${SOCK} --csi.createpathcmdtimeout=180s --csi.removepathcmdtimeout=180s --ginkgo.skip 'pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted'"]
#ENTRYPOINT ["/bin/sh", "-c", "/run-driver && /csi-sanity --csi.endpoint=${SOCK} --csi.createpathcmdtimeout=180 --csi.removepathcmdtimeout=180]
12 changes: 5 additions & 7 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
ARG BUILD_IMAGE

# tests container
FROM golang:1.13
FROM $BUILD_IMAGE

# install deps
RUN apt-get -q update &&\
apt-get -q install -y -o Dpkg::Options::="--force-confnew" rpcbind nfs-common cifs-utils &&\
apt-get -q autoremove &&\
apt-get -q clean -y &&\
rm -rf /var/lib/apt/lists/* &&\
rm -f /var/cache/apt/*.bin
RUN apk update &&\
apk add --no-cache rpcbind nfs-utils cifs-utils make openssh

WORKDIR /go/src/github.com/Nexenta/nexentastor-csi-driver/
COPY . ./
Expand Down
31 changes: 19 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
DRIVER_NAME = nexentastor-csi-driver
IMAGE_NAME ?= ${DRIVER_NAME}

BASE_IMAGE ?= alpine:3.17
BUILD_IMAGE ?= golang:1.20.2-alpine3.17
CSI_SANITY_VERSION_TAG ?= v4.0.0

DOCKER_FILE = Dockerfile
DOCKER_FILE_TESTS = Dockerfile.tests
DOCKER_FILE_TEST_CSI_SANITY = Dockerfile.csi-sanity
Expand All @@ -29,6 +33,9 @@ LDFLAGS ?= \
-X github.com/Nexenta/nexentastor-csi-driver/pkg/driver.Commit=${COMMIT} \
-X github.com/Nexenta/nexentastor-csi-driver/pkg/driver.DateTime=${DATETIME}

DOCKER_ARGS = --build-arg BUILD_IMAGE=${BUILD_IMAGE} \
--build-arg BASE_IMAGE=${BASE_IMAGE}

.PHONY: all
all:
@echo "Some of commands:"
Expand Down Expand Up @@ -66,31 +73,31 @@ build: vet fmt
.PHONY: container-build
container-build:
ifeq (${VERSION}, master)
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} ${DOCKER_ARGS} .
else
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} ${DOCKER_ARGS} .
endif

.PHONY: container-push-local
container-push-local:
ifeq (${VERSION}, master)
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} ${DOCKER_ARGS} .
docker tag ${IMAGE_NAME}:${VERSION} ${REGISTRY_LOCAL}/${IMAGE_NAME}:${VERSION}
docker push ${REGISTRY_LOCAL}/${IMAGE_NAME}:${VERSION}
else
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} ${DOCKER_ARGS} .
docker tag ${IMAGE_NAME}:v${VERSION} ${REGISTRY_LOCAL}/${IMAGE_NAME}:v${VERSION}
docker push ${REGISTRY_LOCAL}/${IMAGE_NAME}:v${VERSION}
endif

.PHONY: container-push-remote
container-push-remote:
ifeq (${VERSION}, master)
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:${VERSION} --build-arg VERSION=${VERSION} ${DOCKER_ARGS} .
docker tag ${IMAGE_NAME}:${VERSION} ${REGISTRY}/${IMAGE_NAME}:${VERSION}
docker push ${REGISTRY}/${IMAGE_NAME}:${VERSION}
else
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} .
docker build -f ${DOCKER_FILE} -t ${IMAGE_NAME}:v${VERSION} --build-arg VERSION=v${VERSION} ${DOCKER_ARGS} .
docker tag ${IMAGE_NAME}:v${VERSION} ${REGISTRY}/${IMAGE_NAME}:v${VERSION}
docker push ${REGISTRY}/${IMAGE_NAME}:v${VERSION}
endif
Expand All @@ -104,7 +111,7 @@ test-unit:
go test ./tests/unit/config -v -count 1
.PHONY: test-unit-container
test-unit-container:
docker build -f ${DOCKER_FILE_TESTS} -t ${IMAGE_NAME}-test --build-arg VERSION=${VERSION} .
docker build -f ${DOCKER_FILE_TESTS} -t ${IMAGE_NAME}-test --build-arg VERSION=${VERSION} ${DOCKER_ARGS} .
docker run -i --rm -e NOCOLORS=${NOCOLORS} ${IMAGE_NAME}-test test-unit

# run e2e k8s tests using image from local docker registry
Expand All @@ -126,7 +133,7 @@ test-e2e-k8s-local-image-container: check-env-TEST_K8S_IP
docker build -f ${DOCKER_FILE_TESTS} -t ${IMAGE_NAME}-test --build-arg VERSION=${VERSION} \
--build-arg TESTRAIL_URL=${TESTRAIL_URL} \
--build-arg TESTRAIL_USR=${TESTRAIL_USR} \
--build-arg TESTRAIL_PSWD=${TESTRAIL_PSWD} .
--build-arg TESTRAIL_PSWD=${TESTRAIL_PSWD} ${DOCKER_ARGS} .
docker run -i --rm -v ${HOME}/.ssh:/root/.ssh:ro \
-e NOCOLORS=${NOCOLORS} -e TEST_K8S_IP=${TEST_K8S_IP} \
${IMAGE_NAME}-test test-e2e-k8s-local-image
Expand All @@ -148,7 +155,7 @@ test-e2e-k8s-remote-image-container: check-env-TEST_K8S_IP
docker build -f ${DOCKER_FILE_TESTS} -t ${IMAGE_NAME}-test --build-arg VERSION=${VERSION} \
--build-arg TESTRAIL_URL=${TESTRAIL_URL} \
--build-arg TESTRAIL_USR=${TESTRAIL_USR} \
--build-arg TESTRAIL_PSWD=${TESTRAIL_PSWD} .
--build-arg TESTRAIL_PSWD=${TESTRAIL_PSWD} ${DOCKER_ARGS} .
docker run -i --rm -v ${HOME}/.ssh:/root/.ssh:ro \
-e NOCOLORS=${NOCOLORS} -e TEST_K8S_IP=${TEST_K8S_IP} \
${IMAGE_NAME}-test test-e2e-k8s-remote-image
Expand All @@ -161,9 +168,9 @@ test-e2e-k8s-remote-image-container: check-env-TEST_K8S_IP
.PHONY: test-csi-sanity-container
test-csi-sanity-container:
docker build \
--build-arg CSI_SANITY_VERSION_TAG=v2.1.0 \
--build-arg CSI_SANITY_VERSION_TAG=${CSI_SANITY_VERSION_TAG} \
-f ${DOCKER_FILE_TEST_CSI_SANITY} \
-t ${IMAGE_NAME}-test-csi-sanity .
-t ${IMAGE_NAME}-test-csi-sanity ${DOCKER_ARGS} .
docker run --privileged=true -i -e NOCOLORS=${NOCOLORS} ${IMAGE_NAME}-test-csi-sanity
docker image prune -f
docker images | grep nexentastor-csi-driver-test-csi-sanity | awk '{print $$1}' | xargs docker rmi -f
Expand Down Expand Up @@ -221,7 +228,7 @@ release:
.PHONY: generate-changelog
generate-changelog:
@echo "Release tag: ${VERSION}\n"
docker build -f ${DOCKER_FILE_PRE_RELEASE} -t ${DOCKER_IMAGE_PRE_RELEASE} --build-arg VERSION=${VERSION} .
docker build -f ${DOCKER_FILE_PRE_RELEASE} -t ${DOCKER_IMAGE_PRE_RELEASE} --build-arg VERSION=${VERSION} ${DOCKER_ARGS} .
-docker rm -f ${DOCKER_CONTAINER_PRE_RELEASE}
docker create --name ${DOCKER_CONTAINER_PRE_RELEASE} ${DOCKER_IMAGE_PRE_RELEASE}
docker cp \
Expand Down
22 changes: 14 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
module github.com/Nexenta/nexentastor-csi-driver

go 1.13
go 1.20

require (
github.com/Nexenta/go-nexentastor v2.7.1+incompatible
github.com/antonfisher/nested-logrus-formatter v1.0.3
github.com/container-storage-interface/spec v1.2.0
github.com/educlos/testrail v0.0.0-20190627213040-ca1b25409ae2
github.com/golang/protobuf v1.4.3
github.com/google/go-cmp v0.5.2 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.7.0
github.com/sirupsen/logrus v1.6.0
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/net v0.8.0
google.golang.org/grpc v1.27.1
gopkg.in/yaml.v2 v2.2.8
k8s.io/mount-utils v0.0.0
)

require (
github.com/go-logr/logr v0.4.0 // indirect
github.com/google/go-cmp v0.5.2 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect
google.golang.org/grpc v1.27.1
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/yaml.v2 v2.2.8
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/mount-utils v0.0.0
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
)

replace (
Expand Down
18 changes: 6 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/Nexenta/go-nexentastor v2.3.0+incompatible h1:VEgcvXq8o3aJZg83/DeunIovbkUykaQcHGkVwc8Bc0A=
github.com/Nexenta/go-nexentastor v2.3.0+incompatible/go.mod h1:AeOU2WLKqHJqeeTfz2xCxx0jGuNKbhbrb6/SLOy53vo=
github.com/Nexenta/go-nexentastor v2.7.1+incompatible h1:q+DxyUwdFqKj/cJvM21YS0yfQciV0y+dWtAV6twj4FY=
github.com/Nexenta/go-nexentastor v2.7.1+incompatible/go.mod h1:AeOU2WLKqHJqeeTfz2xCxx0jGuNKbhbrb6/SLOy53vo=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
Expand Down Expand Up @@ -165,7 +163,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
Expand All @@ -182,8 +179,8 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -203,16 +200,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down Expand Up @@ -279,7 +274,6 @@ k8s.io/component-base v0.17.3/go.mod h1:GeQf4BrgelWm64PXkIXiPh/XS0hnO42d9gx9BtbZ
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
Expand Down
8 changes: 4 additions & 4 deletions pkg/driver/controllerServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (s *ControllerServer) resolveNSWithZone(params ResolveNSParams) (response R
}

// ListVolumes - list volumes, shows only volumes created in defaultDataset
//TODO return only shared fs?
// TODO return only shared fs?
func (s *ControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (
*csi.ListVolumesResponse,
error,
Expand Down Expand Up @@ -469,9 +469,9 @@ func (s *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolu
VolumeId: fmt.Sprintf("%s:%s", resolveResp.configName, volumePath),
CapacityBytes: capacityBytes,
VolumeContext: map[string]string{
"dataIp": reqParams["dataIp"],
"mountOptions": reqParams["mountOptions"],
"mountFsType": reqParams["mountFsType"],
"dataIp": reqParams["dataIp"],
"mountOptions": reqParams["mountOptions"],
"mountFsType": reqParams["mountFsType"],
"mountPointPermissions": mountPointPermissions,
},
},
Expand Down
Loading

0 comments on commit ac5c96b

Please sign in to comment.