Skip to content

Commit 8c8c865

Browse files
authored
Merge pull request #826 from AndyXiangLi/release-0.10.1
Release 0.10.1
2 parents cc46a6b + 41687a7 commit 8c8c865

File tree

13 files changed

+268
-14
lines changed

13 files changed

+268
-14
lines changed

CHANGELOG-0.x.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# v0.10.1
2+
## Notable changes
3+
* support volume partition, users can specify partition in the pv and driver will mount the device on the specified partition ([#824](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/824), [@AndyXiangLi](https://github.com/AndyXiangLi))
4+
5+
### Misc.
6+
* Warn users of migrating without draining ([#822](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/822), [@partcyborg](https://github.com/partcyborg))
7+
18
# v0.10.0
29

310
## Notable changes

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
PKG=github.com/kubernetes-sigs/aws-ebs-csi-driver
1616
IMAGE?=amazon/aws-ebs-csi-driver
17-
VERSION=v0.10.0
17+
VERSION=v0.10.1
1818
VERSION_AMAZONLINUX=$(VERSION)-amazonlinux
1919
GIT_COMMIT?=$(shell git rev-parse HEAD)
2020
BUILD_DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")

charts/aws-ebs-csi-driver/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
appVersion: "0.10.0"
2+
appVersion: "0.10.1"
33
name: aws-ebs-csi-driver
44
description: A Helm chart for AWS EBS CSI Driver
5-
version: 0.10.0
5+
version: 0.10.1
66
kubeVersion: ">=1.17.0-0"
77
home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
88
sources:

charts/aws-ebs-csi-driver/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 2
66

77
image:
88
repository: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
9-
tag: "v0.10.0"
9+
tag: "v0.10.1"
1010
pullPolicy: IfNotPresent
1111

1212
sidecars:

deploy/kubernetes/base/controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
tolerationSeconds: 300
3333
containers:
3434
- name: ebs-plugin
35-
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.0
35+
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.1
3636
imagePullPolicy: IfNotPresent
3737
args:
3838
# - {all,controller,node} # specify the driver mode

deploy/kubernetes/base/node.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
- name: ebs-plugin
4444
securityContext:
4545
privileged: true
46-
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.0
46+
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.1
4747
args:
4848
- node
4949
- --endpoint=$(CSI_ENDPOINT)

deploy/kubernetes/overlays/stable/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ bases:
44
- ../../base
55
images:
66
- name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
7-
newTag: v0.10.0
7+
newTag: v0.10.1
88
- name: k8s.gcr.io/sig-storage/csi-provisioner
99
newTag: v2.0.2
1010
- name: k8s.gcr.io/sig-storage/csi-attacher

docs/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The [Amazon Elastic Block Store](https://aws.amazon.com/ebs/) Container Storage
1212
| AWS EBS CSI Driver \ CSI Version | v0.3.0| v1.0.0 | v1.1.0 |
1313
|----------------------------------------|-------|--------|--------|
1414
| master branch | no | no | yes |
15-
| v0.10.0 | no | no | yes |
15+
| v0.10.x | no | no | yes |
1616
| v0.9.x | no | no | yes |
1717
| v0.8.x | no | no | yes |
1818
| v0.7.1 | no | no | yes |
@@ -53,7 +53,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
5353
| AWS EBS CSI Driver \ Kubernetes Version| v1.12 | v1.13 | v1.14 | v1.15 | v1.16 | v1.17 | v1.18+ |
5454
|----------------------------------------|-------|-------|-------|-------|-------|-------|-------|
5555
| master branch | no | no+ | no | no | no | yes | yes |
56-
| v0.10.0 | no | no+ | no | no | no | yes | yes |
56+
| v0.10.x | no | no+ | no | no | no | yes | yes |
5757
| v0.9.x | no | no+ | no | no | no | yes | yes |
5858
| v0.8.x | no | no+ | yes | yes | yes | yes | yes |
5959
| v0.7.1 | no | no+ | yes | yes | yes | yes | yes |
@@ -70,6 +70,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
7070
|AWS EBS CSI Driver Version | Image |
7171
|---------------------------|--------------------------------------------------|
7272
|master branch |amazon/aws-ebs-csi-driver:latest |
73+
|v0.10.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.1|
7374
|v0.10.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.0|
7475
|v0.9.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1 |
7576
|v0.9.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0 |
@@ -161,12 +162,14 @@ Make sure you follow the [Prerequisites](README.md#Prerequisites) before the exa
161162
* [Volume Resizing](../examples/kubernetes/resizing)
162163

163164
## Migrating from in-tree EBS plugin
164-
Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistence volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you could migrate to use EBS CSI driver. To turn on the migration, set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager` and `kubelet`.
165+
Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistence volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you could migrate to use EBS CSI driver. To turn on the migration, drain the node and set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager` and `kubelet`.
165166

166167
To make sure dynamically provisioned EBS volumes have all tags that the in-tree volume plugin used:
167168
* Run the external-provisioner sidecar with `--extra-create-metadata=true` cmdline option. External-provisioner v1.6 or newer is required.
168169
* Run the CSI driver with `--k8s-tag-cluster-id=<ID of the Kubernetes cluster>` command line option.
169170

171+
**Warning**:
172+
* kubelet *must* be drained of all pods with mounted EBS volumes ***before*** changing its CSI migration feature flags. Failure to do this will cause deleted pods to get stuck in `Terminating`, requiring a forced delete which can cause filesystem corruption. See [#679](../../../issues/679) for more details.
170173

171174
## Development
172175
Please go through [CSI Spec](https://github.com/container-storage-interface/spec/blob/master/spec.md) and [General CSI driver development guideline](https://kubernetes-csi.github.io/docs/developing.html) to get some basic understanding of CSI driver before you start.

pkg/driver/constants.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ const (
2323
DevicePathKey = "devicePath"
2424
)
2525

26+
// constants of keys in VolumeContext
27+
const (
28+
// VolumeAttributePartition represents key for partition config in VolumeContext
29+
// this represents the partition number on a device used to mount
30+
VolumeAttributePartition = "partition"
31+
)
32+
33+
// constants of disk partition suffix
34+
const (
35+
diskPartitionSuffix = ""
36+
nvmeDiskPartitionSuffix = "p"
37+
)
38+
2639
// constants of keys in volume parameters
2740
const (
2841
// VolumeTypeKey represents key for volume type

pkg/driver/controller.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,23 @@ func isValidVolumeCapabilities(volCaps []*csi.VolumeCapability) bool {
450450
return foundAll
451451
}
452452

453+
func isValidVolumeContext(volContext map[string]string) bool {
454+
//There could be multiple volume attributes in the volumeContext map
455+
//Validate here case by case
456+
if partition, ok := volContext[VolumeAttributePartition]; ok {
457+
partitionInt, err := strconv.ParseInt(partition, 10, 64)
458+
if err != nil {
459+
klog.Errorf("failed to parse partition %s as int", partition)
460+
return false
461+
}
462+
if partitionInt < 0 {
463+
klog.Errorf("invalid partition config, partition = %s", partition)
464+
return false
465+
}
466+
}
467+
return true
468+
}
469+
453470
func (d *controllerService) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) {
454471
klog.V(4).Infof("CreateSnapshot: called with args %+v", req)
455472
snapshotName := req.GetName()

0 commit comments

Comments
 (0)