Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#17 from jsafrane/rebase-v2.0.0
Browse files Browse the repository at this point in the history
Rebase to v2.0.0
  • Loading branch information
openshift-merge-robot authored Oct 15, 2019
2 parents d102948 + 7db8260 commit 5302fc6
Show file tree
Hide file tree
Showing 122 changed files with 6,945 additions and 5,369 deletions.
7 changes: 0 additions & 7 deletions CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Changelog since v1.1.0

## Other notable changes

* Fix RBAC rule for CSINode ([#147](https://github.com/kubernetes-csi/external-attacher/pull/147))
* Fix default leader election type ([#145](https://github.com/kubernetes-csi/external-attacher/pull/145))

# Changelog since v1.0.1

## Deprecations
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG-1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog since v1.1.0

## New Features

- Adds CSI Migration support for Azure Disk/File, fixes for backward compatible AccessModes for GCE PD. ([#156](https://github.com/kubernetes-csi/external-attacher/pull/156), [@davidz627](https://github.com/davidz627))
- Support attachment of inline volumes migrated to CSI ([#154](https://github.com/kubernetes-csi/external-attacher/pull/154), [@ddebroy](https://github.com/ddebroy))
- Adds --retry-interval-max and --retry-interval-start to the csi-attacher parameters to allow users to limit the exponential backoff retry time for requests. ([#141](https://github.com/kubernetes-csi/external-attacher/pull/141), [@barp](https://github.com/barp))


## Bug Fixes

- The default leader election type will be `configmaps` if not specified in the command line ([#144](https://github.com/kubernetes-csi/external-attacher/pull/144), [@mlmhl](https://github.com/mlmhl))
21 changes: 21 additions & 0 deletions CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog since v1.2.0

The version 2.0 is not compatible with v1.x. See Action Required section and update CSI driver manifests.

## Action Required

- The external-attacher now uses PATCH HTTP method to update API objects. Please update the attacher RBAC policy to allow the attacher to `patch` VolumeAttachments and PersistentVolumes. See `deploy/kubernetes/rbac.yaml` for an example. ([#177](https://github.com/kubernetes-csi/external-attacher/pull/177), [@jsafrane](https://github.com/jsafrane))
- The `-connection-timeout`, `-leader-election-type` and `-leader-election-identity` flags, deprecated in v1.2, have been removed. Please update your manifests for the external-attacher. Leader election uses `lease` object now. Rolling update from v1.2.y release may not work, as multiple leaders may be elected during the update (one using config maps and another using `lease` object).
- The `-dummy` flag has been removed. Please update your manifests for the external-attacher. ([#173](https://github.com/kubernetes-csi/external-attacher/pull/173), [@jsafrane](https://github.com/jsafrane))
- Processing of ControllerUnpublish errors has changed. CSI drivers SHALL return success (0), when a deleted node or volume implies that the volume is detached from the node. The external attacher treats NotFound error as any other error and it assumes that the volume may still be attached to the node. Please check behavior of your CSI driver and fix it accordingly. ([#165](https://github.com/kubernetes-csi/external-attacher/pull/165), [@jsafrane](https://github.com/jsafrane))


## Bug Fixes

- Fixed issue to actually translate backwards compatible access modes for CSI Migration ([#163](https://github.com/kubernetes-csi/external-attacher/pull/163), [@davidz627](https://github.com/davidz627))
- The external attacher now exits when it loses the connection to a CSI driver. This speeds up re-election of a new attacher leader that has connection to the driver. ([182](https://github.com/kubernetes-csi/external-attacher/pull/182), [@jsafrane](https://github.com/jsafrane))


## Other Notable Changes

- Added a new flag `--worker-threads` to control the number of goroutines for processing VolumeAttachments. The default value is 10 workers. ([#175](https://github.com/kubernetes-csi/external-attacher/pull/175), [@hoyho](https://github.com/hoyho))
2 changes: 1 addition & 1 deletion Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.11 AS builder
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/external-attacher
COPY . .
RUN make build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.openshift.rhel7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.11 AS builder
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.12 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/external-attacher
COPY . .
RUN make build
Expand Down
35 changes: 8 additions & 27 deletions Gopkg.lock

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

19 changes: 3 additions & 16 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,15 @@
name = "github.com/json-iterator/go"
version = "1.1.4"

[[constraint]]
[[override]]
name = "k8s.io/api"
version = "kubernetes-1.14.0"
branch = "release-1.15"

[[constraint]]
name = "k8s.io/csi-translation-lib"
version = "kubernetes-1.14.0"

[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.14.0"

[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.14.0"

[[constraint]]
name = "github.com/kubernetes-csi/csi-lib-utils"
version = ">=0.6.1"
branch = "master"

[prune]
non-go = true
go-tests = true
unused-packages = true

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This information reflects the head of this branch.

| Compatible with CSI Version | Container Image | Min K8s Version |
| ------------------------------------------------------------------------------------------ | ----------------------------| --------------- |
| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | quay.io/k8scsi/csi-attacher | 1.14 |
| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | quay.io/k8scsi/csi-attacher | 1.15 |

## Feature Status

Expand Down Expand Up @@ -61,10 +61,13 @@ Note that the external-attacher does not scale with more replicas. Only one exte

* `--timeout <duration>`: Timeout of all calls to CSI driver. It should be set to value that accommodates majority of `ControllerPublish` and `ControllerUnpublish` calls. See [CSI error and timeout handling](#csi-error-and-timeout-handling) for details. 15 seconds is used by default.

#### Other recognized arguments
* `--worker-threads`: The number of goroutines for processing VolumeAttachments. 10 workers is used by default.

* `--retry-interval-start`: The exponential backoff for failures. See [CSI error and timeout handling](#csi-error-and-timeout-handling) for details. 1 second is used by default.

* `--dummy`: Runs the external-attacher in dummy mode, i.e. without any CSI driver. All volumes are immediately reported as attached / detached as controller-manager requires. This option can be used for debugging of other CSI components such as Kubernetes Attach / Detach controller.
* `--retry-interval-max`: The exponential backoff maximum value. See [CSI error and timeout handling](#csi-error-and-timeout-handling) for details. 5 minutes is used by default.

#### Other recognized arguments
* `--kubeconfig <path>`: Path to Kubernetes client configuration that the external-attacher uses to connect to Kubernetes API server. When omitted, default token provided by Kubernetes will be used. This option is useful only when the external-attacher does not run as a Kubernetes pod, e.g. for debugging.

* `--resync <duration>`: Internal resync interval when the external-attacher re-evaluates all existing `VolumeAttachment` instances and tries to fulfill them, i.e. attach / detach corresponding volumes. It does not affect re-tries of failed CSI calls! It should be used only when there is a bug in Kubernetes watch logic.
Expand All @@ -73,13 +76,6 @@ Note that the external-attacher does not scale with more replicas. Only one exte

* All glog / klog arguments are supported, such as `-v <log level>` or `-alsologtostderr`.

#### Deprecated arguments
* `--connection-timeout <duration>`: This option was used to limit establishing connection to CSI driver. Currently, the option does not have any effect and the external-attacher tries to connect to CSI driver socket indefinitely. It is recommended to run ReadinessProbe on the driver to ensure that the driver comes up in reasonable time.

* `--leader-election-type`: This option was used to choose which leader election resource type to use. Currently, the option defaults to `configmaps`, but will be removed in the future to only support `leases` based leader election.

* `--leader-election-identity <id>`: This option is deprecated and has no effect since external-attacher will now use the pod hostname as the leader election identity

### CSI error and timeout handling
The external-attacher invokes all gRPC calls to CSI driver with timeout provided by `--timeout` command line argument (15 seconds by default).

Expand All @@ -88,7 +84,7 @@ The external-attacher invokes all gRPC calls to CSI driver with timeout provided
* `Probe`: The external-attacher re-tries calling Probe until the driver reports it's ready. It re-tries also when it receives timeout from `Probe` call. The external-attacher has no limit of retries. It is expected that ReadinessProbe on the driver container will catch case when the driver takes too long time to get ready.
* `GetPluginInfo`, `GetPluginCapabilitiesRequest`, `ControllerGetCapabilities`: The external-attacher expects that these calls are quick and does not retry them on any error, including timeout. Instead, it assumes that the driver is faulty and exits. Note that Kubernetes will likely start a new attacher container and it will start with `Probe` call.

Correct timeout value depends on the storage backend and how quickly it is able to processes `ControllerPublish` and `ControllerUnpublish` calls. The value should be set to accommodate majority of them. It is fine if some calls time out - such calls will be re-tried after exponential backoff (starting with 5ms), however, this backoff will introduce delay when the call times out several times for a single volume.
Correct timeout value depends on the storage backend and how quickly it is able to processes `ControllerPublish` and `ControllerUnpublish` calls. The value should be set to accommodate majority of them. It is fine if some calls time out - such calls will be re-tried after exponential backoff (starting with `--retry-interval-start`), however, this backoff will introduce delay when the call times out several times for a single volume (up to `--retry-interval-max`).

## Community, discussion, contribution, and support

Expand Down
Loading

0 comments on commit 5302fc6

Please sign in to comment.