Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
194289a
update Go mod support
pohly Oct 4, 2019
c1078a6
go-get-kubernetes.sh: automate Kubernetes dependency handling
pohly Oct 7, 2019
518d6af
Merge pull request #35 from ddebroy/winbld2
k8s-ci-robot Oct 7, 2019
2c81919
Merge pull request #34 from pohly/go-mod-tidy
k8s-ci-robot Oct 8, 2019
f1697d2
Do full git clones in travis. Shallow clones are causing test-subtree
msau42 Oct 8, 2019
adf00fe
Merge pull request #36 from msau42/full-clone
k8s-ci-robot Oct 8, 2019
eb0b24d
release-tools: update
pohly Oct 15, 2019
3caa479
replace "dep" with "go mod"
pohly Oct 15, 2019
3d800bb
Merge pull request #52 from pohly/go-mod
k8s-ci-robot Oct 15, 2019
e0fde8c
Add new variables for 1.16 and remove 1.13
msau42 Oct 31, 2019
f419d74
Merge pull request #40 from msau42/add-1.16
k8s-ci-robot Oct 31, 2019
5e773d2
update CI to use Go 1.13.3
pohly Oct 31, 2019
c8a1c4a
better handling of Go version
pohly Oct 31, 2019
a53bd4c
Merge pull request #41 from pohly/go-version
k8s-ci-robot Oct 31, 2019
23df4ae
prow.sh: use vendor directory if available
pohly Nov 4, 2019
8067845
travis.yml: also use vendor directory
pohly Nov 4, 2019
ee22a9c
Merge pull request #42 from pohly/use-vendor-dir
k8s-ci-robot Nov 4, 2019
a1d3eab
release-tools: update
pohly Nov 4, 2019
f41c135
prow.sh: also log output of system containers
pohly Nov 5, 2019
4fcafec
Merge pull request #43 from pohly/system-pod-logging
k8s-ci-robot Nov 6, 2019
204944a
Merge pull request #53 from pohly/prow-update-master
k8s-ci-robot Nov 9, 2019
83a4ef1
Adding build for ppc64le
Pensu Nov 19, 2019
1eaaaa1
Delete kind cluster after tests run.
mucahitkurt Nov 16, 2019
a41f386
Merge pull request #46 from mucahitkurt/kind-cluster-cleanup
k8s-ci-robot Nov 21, 2019
e945215
release-tools: update
pohly Nov 21, 2019
003c14b
Add snapshotter CRDs after cluster setup
ggriffiths Nov 12, 2019
8adde49
Merge pull request #45 from ggriffiths/snapshot_beta_crds
k8s-ci-robot Nov 25, 2019
6d674a7
Merge pull request #47 from Pensu/multi-arch
k8s-ci-robot Nov 26, 2019
80bba1f
Use kind v0.6.0
darkowlzz Nov 29, 2019
4ff2f5f
Merge pull request #50 from darkowlzz/kind-0.6.0
k8s-ci-robot Dec 2, 2019
9a7a685
Create a kind cluster with two worker nodes so that the topology feat…
msau42 Dec 3, 2019
53888ae
Improve README by adding an explicit Kubernetes dependency section
msau42 Dec 4, 2019
4ad6949
Improve snapshot pod running checks and improve version_gt
ggriffiths Dec 4, 2019
d7c69d2
Merge pull request #51 from msau42/enable-multinode
k8s-ci-robot Dec 4, 2019
c65f9a7
fix doc about csi socket path
Sh4d1 Dec 4, 2019
8f7e0d3
Merge pull request #59 from Sh4d1/fix_doc
k8s-ci-robot Dec 4, 2019
771ca6f
Merge pull request #49 from ggriffiths/prowsh_improve_version_gt
k8s-ci-robot Dec 4, 2019
a4e6299
fix syntax for ppc64le build
msau42 Dec 4, 2019
540599b
Merge pull request #53 from msau42/fix-make
k8s-ci-robot Dec 4, 2019
9ace020
Merge pull request #52 from msau42/update-readme
k8s-ci-robot Dec 6, 2019
0bb1ff3
Merge pull request #58 from pohly/prow-update-master
k8s-ci-robot Dec 10, 2019
b98b2ae
Enable snapshot tests in 1.17 to be run in non-alpha jobs.
msau42 Dec 17, 2019
9f1f3dd
Merge pull request #56 from msau42/enable-snapshots
k8s-ci-robot Dec 18, 2019
fc80975
Fix version_gt to work with kubernetes prefix
ggriffiths Dec 21, 2019
f6c74b3
Merge pull request #57 from ggriffiths/version_gt_kubernetes_fix
k8s-ci-robot Dec 23, 2019
af9549b
Update prow hostpath driver version to 1.3.0-rc2
saad-ali Jan 2, 2020
5f444b8
Merge pull request #60 from saad-ali/updateHostpathVersion
k8s-ci-robot Jan 2, 2020
8b0316c
Fix overriding of junit results by using unique names for each e2e run
msau42 Jan 2, 2020
3c463fb
Merge pull request #61 from msau42/enable-snapshots
k8s-ci-robot Jan 2, 2020
8191eab
Update snapshotter to version v2.0.0
ggriffiths Jan 8, 2020
4cc9174
Merge pull request #64 from ggriffiths/snapshotter_2_version_update
k8s-ci-robot Jan 8, 2020
6582f2f
Update hostpath driver version to get fix for connection-timeout
msau42 Jan 10, 2020
23be652
Merge pull request #65 from msau42/update-hostpath
k8s-ci-robot Jan 10, 2020
ac8a021
Document the process for releasing a new sidecar
msau42 Dec 12, 2019
ff3cc3f
Merge pull request #54 from msau42/add-release-process
k8s-ci-robot Jan 13, 2020
fa90abd
fix incorrect link
windayski Jan 19, 2020
3c34b4f
Merge pull request #67 from windayski/fix-link
k8s-ci-robot Jan 24, 2020
84f78b1
prow.sh: generic driver installation
pohly Feb 10, 2020
5f74333
prow.sh: also configure feature gates for kubelet
pohly Feb 10, 2020
a1432bc
Merge pull request #70 from pohly/kubelet-feature-gates
k8s-ci-robot Feb 10, 2020
d717c8c
Merge pull request #69 from pohly/test-driver-config
k8s-ci-robot Feb 10, 2020
baa66de
Fix registration socket removal on windows.
kkmsft Feb 11, 2020
1ee4d80
Utils UT
kkmsft Feb 12, 2020
82423aa
Add go.mod & go.sum - for using tmp test dir create util
kkmsft Feb 12, 2020
49f5e4e
Update from go mod vendor
kkmsft Feb 12, 2020
0d5f28f
Merge pull request #64 from kkmsft/reg-path-fix
k8s-ci-robot Feb 12, 2020
fdb3218
Change 'make test-vet' to call 'go vet'
wozniakjan Feb 13, 2020
b8587b2
Merge pull request #71 from wozniakjan/test-vet
k8s-ci-robot Feb 13, 2020
7c5a89c
prow.sh: use 1.3.0 hostpath driver for testing
pohly Feb 14, 2020
8322a7d
Merge pull request #72 from pohly/hostpath-update
k8s-ci-robot Feb 14, 2020
dff5b00
release-tools: update
pohly Feb 14, 2020
b4bdb81
Merge pull request #65 from pohly/prow-update-master
k8s-ci-robot Feb 19, 2020
fb5e53a
Add multiarch dockerfile
vitt-bagal Mar 24, 2020
0c60f8e
Automate Container Image Builds Using GCB
vitt-bagal Mar 24, 2020
6604f7c
Added readme of image pushing
vitt-bagal Mar 25, 2020
6e168e6
Merge pull request #68 from linux-on-ibm-z/multiarch-supportGCB
k8s-ci-robot Mar 27, 2020
254825d
Add 1.3 changelog
msau42 Mar 31, 2020
6e9fff3
Merge pull request #70 from msau42/changelog
k8s-ci-robot Mar 31, 2020
06121d8
Merge tag 'v1.3.0' into rebase-v1.3.0
jsafrane Apr 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG-1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog since v1.2.0

## Bug Fixes

- Fix registration socket cleanup on Windows during startup([#64](https://github.com/kubernetes-csi/node-driver-registrar/pull/64), [@kkmsft](https://github.com/kkmsft))


## Other Notable Changes

- Migrated to Go modules, so the source builds also outside of GOPATH. ([#52](https://github.com/kubernetes-csi/node-driver-registrar/pull/52), [@pohly](https://github.com/pohly))


14 changes: 14 additions & 0 deletions Dockerfile.multiarch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM --platform=$BUILDPLATFORM golang:1.13.3 AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
WORKDIR /code
ADD . /code/

RUN cd /code/ && GOARCH=$(echo $TARGETPLATFORM | cut -f2 -d '/') make build

FROM gcr.io/distroless/static:latest
LABEL maintainers="Kubernetes Authors"
LABEL description="CSI Node driver registrar"

COPY --from=builder /code/bin/csi-node-driver-registrar csi-node-driver-registrar
ENTRYPOINT ["/csi-node-driver-registrar"]
168 changes: 0 additions & 168 deletions Gopkg.lock

This file was deleted.

38 changes: 0 additions & 38 deletions Gopkg.toml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ There are two UNIX domain sockets used by the node-driver-registrar:
* CSI driver socket:
* Used by kubelet to interact with the CSI driver.
* Created by the CSI driver.
* Exposed on a Kubernetes node via hostpath somewhere other than the Kubelet.
plugin registry (typically `/var/lib/kubelet/plugins/<drivername.example.com>/csi.sock`).
* Exposed on a Kubernetes node via hostpath somewhere other than the Kubelet plugin registry. (typically `/var/lib/kubelet/plugins/<drivername.example.com>/csi.sock`).
* This is the socket referenced by the `--csi-address` and `--kubelet-registration-path` arguments.
* Note that before Kubernetes v1.17, if the csi socket is in the `/var/lib/kubelet/plugins/` path, kubelet may log a lot of harmless errors regarding grpc `GetInfo` call not implemented (fix in kubernetes/kubernetes#84533). The `/var/lib/kubelet/csi-plugins/` path is preferred in Kubernetes versions prior to v1.17.

### Required arguments

Expand Down
28 changes: 28 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md for more details on image pushing process

# this must be specified in seconds. If omitted, defaults to 600s (10 mins)
timeout: 1200s
# this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
# or any new substitutions added in the future.
options:
substitution_option: ALLOW_LOOSE
steps:
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4'
entrypoint: 'bash'
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- VERSION=$_GIT_TAG
- BASE_REF=$_PULL_BASE_REF
args:
- '-c'
- |
docker buildx create --use --name multiarchimage-builder \
&& docker buildx build --push -t gcr.io/k8s-staging-csi/csi-node-driver-registrar:latest --platform=linux/amd64,linux/s390x -f Dockerfile.multiarch .
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
# can be used as a substitution
_GIT_TAG: '12345'
# _PULL_BASE_REF will contain the ref that was pushed to to trigger this build -
# a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
_PULL_BASE_REF: 'master'

17 changes: 5 additions & 12 deletions cmd/csi-node-driver-registrar/node_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"google.golang.org/grpc"

"github.com/kubernetes-csi/node-driver-registrar/pkg/util"
"k8s.io/klog"
registerapi "k8s.io/kubernetes/pkg/kubelet/apis/pluginregistration/v1alpha1"
)
Expand All @@ -36,23 +37,15 @@ func nodeRegister(
// pluginswatcher infrastructure. Node labeling is done by kubelet's csi code.
registrar := newRegistrationServer(csiDriverName, *kubeletRegistrationPath, supportedVersions)
socketPath := fmt.Sprintf("/registration/%s-reg.sock", csiDriverName)
fi, err := os.Stat(socketPath)
if err == nil && (fi.Mode()&os.ModeSocket) != 0 {
// Remove any socket, stale or not, but fall through for other files
if err := os.Remove(socketPath); err != nil {
klog.Errorf("failed to remove stale socket %s with error: %+v", socketPath, err)
os.Exit(1)
}
}
if err != nil && !os.IsNotExist(err) {
klog.Errorf("failed to stat the socket %s with error: %+v", socketPath, err)
if err := util.CleanupSocketFile(socketPath); err != nil {
klog.Errorf("%+v", err)
os.Exit(1)
}

var oldmask int
if runtime.GOOS == "linux" {
// Default to only user accessible socket, caller can open up later if desired
oldmask, _ = umask(0077)
oldmask, _ = util.Umask(0077)
}

klog.Infof("Starting Registration Server at: %s\n", socketPath)
Expand All @@ -62,7 +55,7 @@ func nodeRegister(
os.Exit(1)
}
if runtime.GOOS == "linux" {
umask(oldmask)
util.Umask(oldmask)
}
klog.Infof("Registration Server started at: %s\n", socketPath)
grpcServer := grpc.NewServer()
Expand Down
27 changes: 0 additions & 27 deletions cmd/csi-node-driver-registrar/util_windows.go

This file was deleted.

21 changes: 21 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module github.com/kubernetes-csi/node-driver-registrar

go 1.12

require (
github.com/container-storage-interface/spec v1.0.0 // indirect
github.com/gogo/protobuf v1.0.0 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.1.0 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.4.0-rc1
github.com/stretchr/testify v1.4.0 // indirect
golang.org/x/net v0.0.0-20180301190904-22ae77b79946 // indirect
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20180302081741-dd2ff4accc09
golang.org/x/text v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20180301225018-2c5e7ac708aa // indirect
google.golang.org/grpc v1.10.0
k8s.io/client-go v11.0.0+incompatible
k8s.io/klog v0.1.0
k8s.io/kubernetes v1.11.0-beta.2
)
Loading