Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#8 from jsafrane/rebase-v1.1.0
Browse files Browse the repository at this point in the history
Rebase to v1.1.0
  • Loading branch information
openshift-merge-robot authored Jun 7, 2019
2 parents 82ea3ac + a9cd2e1 commit 4f7d6d0
Show file tree
Hide file tree
Showing 39 changed files with 1,901 additions and 3,467 deletions.
5 changes: 5 additions & 0 deletions .prow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

. release-tools/prow.sh

main
18 changes: 18 additions & 0 deletions CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog since v1.0.2

## Deprecations
* Command line flag `-connection-timeout` is deprecated and has no effect.

## Notable Features

* The driver registrar now tries to connect to CSI driver indefinitely. ([#29](https://github.com/kubernetes-csi/node-driver-registrar/pull/29))

## Other notable changes

* Use distroless as base image ([#34](https://github.com/kubernetes-csi/node-driver-registrar/pull/34))
* Use GetDriverName from csi-lib-utils ([#33](https://github.com/kubernetes-csi/node-driver-registrar/pull/33))
* Migrate to k8s.io/klog from glog. ([#24](https://github.com/kubernetes-csi/node-driver-registrar/pull/24))
* Update compatibility matrix to only reflect branch head ([#25](https://github.com/kubernetes-csi/node-driver-registrar/pull/25))
* Update documentation and argument descriptions ([#13](https://github.com/kubernetes-csi/node-driver-registrar/pull/13))
* Cleanup vendor ([#11](https://github.com/kubernetes-csi/node-driver-registrar/pull/11))
* Add csi prefix to image name ([#5](https://github.com/kubernetes-csi/node-driver-registrar/pull/5))
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine
FROM gcr.io/distroless/static:latest
LABEL maintainers="Kubernetes Authors"
LABEL description="CSI Node driver registrar"

Expand Down
10 changes: 10 additions & 0 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.11 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/node-driver-registrar
COPY . .
RUN go build ./cmd/csi-node-driver-registrar

FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
COPY --from=builder /go/src/github.com/kubernetes-csi/node-driver-registrar/csi-node-driver-registrar /usr/bin/
RUN useradd csi-node-driver-registrar
USER csi-node-driver-registrar
ENTRYPOINT ["/usr/bin/csi-node-driver-registrar"]
10 changes: 10 additions & 0 deletions Dockerfile.openshift.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.11 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/node-driver-registrar
COPY . .
RUN go build ./cmd/csi-node-driver-registrar

FROM registry.svc.ci.openshift.org/ocp/4.0:base
COPY --from=builder /go/src/github.com/kubernetes-csi/node-driver-registrar/csi-node-driver-registrar /usr/bin/
RUN useradd csi-node-driver-registrar
USER csi-node-driver-registrar
ENTRYPOINT ["/usr/bin/csi-node-driver-registrar"]
38 changes: 6 additions & 32 deletions Gopkg.lock

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

11 changes: 1 addition & 10 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,17 @@
# name = "github.com/x/y"
# version = "2.4.0"

[[constraint]]
name = "github.com/container-storage-interface/spec"
version = "1.0.0"

[[override]]
name = "github.com/golang/protobuf"
version = "v1.1.0"

[[constraint]]
name = "github.com/kubernetes-csi/csi-test"
version = "v1.0.0-1"


[[override]]
name = "github.com/json-iterator/go"
version = "1.1.4"

[[constraint]]
name = "github.com/kubernetes-csi/csi-lib-utils"
version = "0.3.0"
version = ">=0.4.0-rc1"

[prune]
non-go = true
Expand Down
2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
approvers:
- openshift-maintainers
- openshift-storage-maintainers
- jsafrane
- lpabon
- msau42
Expand Down
2 changes: 1 addition & 1 deletion OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aliases:
openshift-maintainers:
openshift-storage-maintainers:
- jsafrane
- tsmetana
- gnufied
Expand Down
17 changes: 9 additions & 8 deletions cmd/csi-node-driver-registrar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import (
"k8s.io/klog"
registerapi "k8s.io/kubernetes/pkg/kubelet/apis/pluginregistration/v1alpha1"

"github.com/kubernetes-csi/node-driver-registrar/pkg/connection"
"github.com/kubernetes-csi/csi-lib-utils/connection"
csirpc "github.com/kubernetes-csi/csi-lib-utils/rpc"
)

const (
Expand Down Expand Up @@ -116,23 +117,23 @@ func main() {
// resolved, if plugin does not support PUBLISH_UNPUBLISH_VOLUME, then we
// can skip adding mapping to "csi.volume.kubernetes.io/nodeid" annotation.

// Connect to CSI.
klog.V(1).Infof("Attempting to open a gRPC connection with: %q", *csiAddress)
csiConn, err := connection.NewConnection(*csiAddress)
csiConn, err := connection.Connect(*csiAddress)
if err != nil {
klog.Error(err.Error())
klog.Errorf("error connecting to CSI driver: %v", err)
os.Exit(1)
}

// Get CSI driver name.
klog.V(1).Infof("Calling CSI driver to discover driver name.")
klog.V(1).Infof("Calling CSI driver to discover driver name")
ctx, cancel := context.WithTimeout(context.Background(), csiTimeout)
defer cancel()
csiDriverName, err := csiConn.GetDriverName(ctx)

csiDriverName, err := csirpc.GetDriverName(ctx, csiConn)
if err != nil {
klog.Error(err.Error())
klog.Errorf("error retreiving CSI driver name: %v", err)
os.Exit(1)
}

klog.V(2).Infof("CSI driver name: %q", csiDriverName)

// Run forever
Expand Down
70 changes: 0 additions & 70 deletions pkg/connection/connection.go

This file was deleted.

54 changes: 0 additions & 54 deletions pkg/connection/connection_test.go

This file was deleted.

7 changes: 7 additions & 0 deletions release-tools/.prow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash -e
#
# This is for testing csi-release-tools itself in Prow. All other
# repos use prow.sh for that, but as csi-release-tools isn't a normal
# repo with some Go code in it, it has a custom Prow test script.

./verify-shellcheck.sh "$(pwd)"
Loading

0 comments on commit 4f7d6d0

Please sign in to comment.