Skip to content

Commit

Permalink
Merge pull request #779 from AndyXiangLi/release-0.9.1
Browse files Browse the repository at this point in the history
Release 0.9.1
  • Loading branch information
k8s-ci-robot authored Mar 8, 2021
2 parents f121e6e + efd1b2d commit 6cd9013
Show file tree
Hide file tree
Showing 22 changed files with 568 additions and 50 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG-0.x.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# v0.9.1

## Notable changes
- Change helm deploy settings: default tolerationAllTaints to false, NoExecute toleration time is 300s and will tolerate `CriticalAddonsOnly`

### New features
* Integrate external e2e test in the testsuits ([#726](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/726), [@AndyXiangLi](https://github.com/AndyXiangLi))

### Bug fixes
* delete leaked volume if driver don't know the volume status ([#771](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/771), [@AndyXiangLi](https://github.com/AndyXiangLi))
* Update test k8s version to 1.18.16 ([#759](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/759), [@ayberk](https://github.com/ayberk))

# v0.9.0

## Notable changes
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

PKG=github.com/kubernetes-sigs/aws-ebs-csi-driver
IMAGE?=amazon/aws-ebs-csi-driver
VERSION=v0.9.0
VERSION=v0.9.1
VERSION_AMAZONLINUX=$(VERSION)-amazonlinux
GIT_COMMIT?=$(shell git rev-parse HEAD)
BUILD_DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
Expand Down Expand Up @@ -94,11 +94,20 @@ test-e2e-multi-az:
test-e2e-migration:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a \
TEST_PATH=./tests/e2e-migration/... \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="\[ebs-csi-migration\]" \
EBS_CHECK_MIGRATION=true \
./hack/e2e/run.sh

.PHONY: test-e2e-external
test-e2e-external:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="External.Storage" \
GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \
./hack/e2e/run.sh

.PHONY: image-release
image-release:
docker build -t $(IMAGE):$(VERSION) . --target debian-base
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "0.9.0"
appVersion: "0.9.1"
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 0.9.0
Expand Down
7 changes: 3 additions & 4 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 2

image:
repository: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
tag: "v0.9.0"
tag: "v0.9.1"
pullPolicy: IfNotPresent

sidecars:
Expand Down Expand Up @@ -61,8 +61,7 @@ resources:
# memory: 128Mi

nodeSelector: {}

tolerateAllTaints: true
tolerateAllTaints: false
tolerations: []

affinity: {}
Expand All @@ -89,7 +88,7 @@ region: ""
node:
nodeSelector: {}
podAnnotations: {}
tolerateAllTaints: true
tolerateAllTaints: false
tolerations: []

serviceAccount:
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- operator: Exists
containers:
- name: ebs-plugin
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1
imagePullPolicy: IfNotPresent
args:
# - {all,controller,node} # specify the driver mode
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- name: ebs-plugin
securityContext:
privileged: true
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1
args:
- node
- --endpoint=$(CSI_ENDPOINT)
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/overlays/stable/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bases:
- ../../base
images:
- name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
newTag: v0.9.0
newTag: v0.9.1
- name: k8s.gcr.io/sig-storage/csi-provisioner
newTag: v2.0.2
- name: k8s.gcr.io/sig-storage/csi-attacher
Expand Down
8 changes: 6 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The [Amazon Elastic Block Store](https://aws.amazon.com/ebs/) Container Storage
| AWS EBS CSI Driver \ CSI Version | v0.3.0| v1.0.0 | v1.1.0 |
|----------------------------------------|-------|--------|--------|
| master branch | no | no | yes |
| v0.9.0 | no | no | yes |
| v0.9.x | no | no | yes |
| v0.8.x | no | no | yes |
| v0.7.1 | no | no | yes |
| v0.6.0 | no | no | yes |
Expand Down Expand Up @@ -52,7 +52,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
| AWS EBS CSI Driver \ Kubernetes Version| v1.12 | v1.13 | v1.14 | v1.15 | v1.16 | v1.17 | v1.18+ |
|----------------------------------------|-------|-------|-------|-------|-------|-------|-------|
| master branch | no | no+ | no | no | no | yes | yes |
| v0.9.0 | no | no+ | no | no | no | yes | yes |
| v0.9.x | no | no+ | no | no | no | yes | yes |
| v0.8.x | no | no+ | yes | yes | yes | yes | yes |
| v0.7.1 | no | no+ | yes | yes | yes | yes | yes |
| v0.6.0 | no | no+ | yes | yes | yes | yes | yes |
Expand All @@ -68,6 +68,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
|AWS EBS CSI Driver Version | Image |
|---------------------------|--------------------------------------------------|
|master branch |amazon/aws-ebs-csi-driver:latest |
|v0.9.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1 |
|v0.9.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0 |
|v0.8.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.8.1 |
|v0.7.1 |amazon/aws-ebs-csi-driver:v0.7.1 |
Expand Down Expand Up @@ -111,6 +112,9 @@ If your cluster is v1.14+, you can skip this step. Install the `CSINodeInfo` CRD
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csinodeinfo.yaml
```

#### Config node toleration settings
By default, driver tolerates taint `CriticalAddonsOnly` and has `tolerationSeconds` configured as `300`, to deploy the driver on any nodes, please set helm `Value.node.tolerateAllTaints` and `Value.tolerateAllTaints` to true before deployment

#### Deploy driver
Please see the compatibility matrix above before you deploy the driver

Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
Expand Down Expand Up @@ -332,7 +331,6 @@ github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgo
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down Expand Up @@ -431,7 +429,6 @@ github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down Expand Up @@ -564,7 +561,6 @@ golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
Expand Down Expand Up @@ -640,7 +636,6 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/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 h1:72l8qCJ1nGxMGH26QVBVIxKd/D34cfGt0OvrPtpemyY=
golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand All @@ -649,7 +644,6 @@ golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fq
golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/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 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
IMAGE_NAME=${IMAGE_NAME:-${AWS_ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com/${DRIVER_NAME}}
IMAGE_TAG=${IMAGE_TAG:-${TEST_ID}}

K8S_VERSION=${K8S_VERSION:-1.18.10}
K8S_VERSION=${K8S_VERSION:-1.18.16}
KOPS_VERSION=${KOPS_VERSION:-1.18.2}
KOPS_STATE_FILE=${KOPS_STATE_FILE:-s3://k8s-kops-csi-e2e}
KOPS_FEATURE_GATES_FILE=${KOPS_FEATURE_GATES_FILE:-./hack/feature-gates.yaml}
Expand Down
7 changes: 7 additions & 0 deletions pkg/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ func (c *cloud) CreateDisk(ctx context.Context, volumeName string, diskOptions *
}

if err := c.waitForVolume(ctx, volumeID); err != nil {
// To avoid leaking volume, we should delete the volume just created
// TODO: Need to figure out how to handle DeleteDisk failed scenario instead of just log the error
if _, error := c.DeleteDisk(ctx, volumeID); error != nil {
klog.Errorf("%v failed to be deleted, this may cause volume leak", volumeID)
} else {
klog.V(5).Infof("%v is deleted because it is not in desired state within retry limit", volumeID)
}
return nil, fmt.Errorf("failed to get an available volume in EC2: %v", err)
}

Expand Down
35 changes: 20 additions & 15 deletions pkg/cloud/cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ const (

func TestCreateDisk(t *testing.T) {
testCases := []struct {
name string
volumeName string
volState string
diskOptions *DiskOptions
expDisk *Disk
expErr error
expCreateVolumeErr error
expDescVolumeErr error
name string
volumeName string
volState string
diskOptions *DiskOptions
expDisk *Disk
cleanUpFailedVolume bool
expErr error
expCreateVolumeErr error
expDescVolumeErr error
}{
{
name: "success: normal",
Expand Down Expand Up @@ -163,7 +164,7 @@ func TestCreateDisk(t *testing.T) {
expErr: nil,
},
{
name: "fail: CreateVolume returned CreateVolume error",
name: "fail: ec2.CreateVolume returned CreateVolume error",
volumeName: "vol-test-name-error",
diskOptions: &DiskOptions{
CapacityBytes: util.GiBToBytes(1),
Expand All @@ -174,27 +175,29 @@ func TestCreateDisk(t *testing.T) {
expCreateVolumeErr: fmt.Errorf("CreateVolume generic error"),
},
{
name: "fail: CreateVolume returned a DescribeVolumes error",
name: "fail: ec2.DescribeVolumes error after volume created",
volumeName: "vol-test-name-error",
volState: "creating",
diskOptions: &DiskOptions{
CapacityBytes: util.GiBToBytes(1),
Tags: map[string]string{VolumeNameTagKey: "vol-test"},
AvailabilityZone: "",
},
expErr: fmt.Errorf("could not create volume in EC2: DescribeVolumes generic error"),
expCreateVolumeErr: fmt.Errorf("DescribeVolumes generic error"),
expErr: fmt.Errorf("failed to get an available volume in EC2: DescribeVolumes generic error"),
expDescVolumeErr: fmt.Errorf("DescribeVolumes generic error"),
cleanUpFailedVolume: true,
},
{
name: "fail: CreateVolume returned a volume with wrong state",
name: "fail: Volume is not ready to use, volume stuck in creating status and controller timed out waiting for the condition",
volumeName: "vol-test-name-error",
volState: "creating",
diskOptions: &DiskOptions{
CapacityBytes: util.GiBToBytes(1),
Tags: map[string]string{VolumeNameTagKey: "vol-test"},
AvailabilityZone: "",
},
expErr: fmt.Errorf("failed to get an available volume in EC2: timed out waiting for the condition"),
cleanUpFailedVolume: true,
expErr: fmt.Errorf("failed to get an available volume in EC2: timed out waiting for the condition"),
},
{
name: "success: normal from snapshot",
Expand Down Expand Up @@ -243,7 +246,9 @@ func TestCreateDisk(t *testing.T) {
if len(tc.diskOptions.SnapshotID) > 0 {
mockEC2.EXPECT().DescribeSnapshotsWithContext(gomock.Eq(ctx), gomock.Any()).Return(&ec2.DescribeSnapshotsOutput{Snapshots: []*ec2.Snapshot{snapshot}}, nil).AnyTimes()
}

if tc.cleanUpFailedVolume == true {
mockEC2.EXPECT().DeleteVolumeWithContext(gomock.Eq(ctx), gomock.Any()).Return(&ec2.DeleteVolumeOutput{}, nil)
}
if len(tc.diskOptions.AvailabilityZone) == 0 {
mockEC2.EXPECT().DescribeAvailabilityZonesWithContext(gomock.Eq(ctx), gomock.Any()).Return(&ec2.DescribeAvailabilityZonesOutput{
AvailabilityZones: []*ec2.AvailabilityZone{
Expand Down
17 changes: 17 additions & 0 deletions tests/e2e-kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Kubernetes tests

This directory imports tests from kubernetes/kubernetes and enables:

* External CSI tests, https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/external
* CSI migration tests

# Prerequisites
- kubernetes 1.17+ AWS cluster

# Run
* External CSI tests: `FOCUS=External.Storage`.
* CSI migration tests: `FOCUS=[ebs-csi-migration]`.

```sh
go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="$FOCUS" -ginkgo.skip="\[Disruptive\]" -gce-zone=us-west-2a
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ package e2e
import (
"flag"
"fmt"
"k8s.io/kubernetes/test/e2e/framework/testfiles"
"k8s.io/kubernetes/test/e2e/storage/drivers"
"k8s.io/kubernetes/test/e2e/storage/external"
"k8s.io/kubernetes/test/e2e/storage/testsuites"
"log"
"math/rand"
"os"
Expand All @@ -30,9 +34,6 @@ import (
"github.com/onsi/ginkgo/reporters"
"github.com/onsi/gomega"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/storage/drivers"
"k8s.io/kubernetes/test/e2e/storage/testsuites"

// ensure that cloud provider is loaded
_ "k8s.io/kubernetes/test/e2e/framework/providers/aws"
)
Expand All @@ -54,6 +55,10 @@ func init() {
_ = flag.Set("provider", "aws")
flag.Parse()
framework.AfterReadingAllFlags(&framework.TestContext)

// Add e2e tests for the CSI driver (without migration)
testfiles.AddFileSource(testfiles.RootFileSource{Root: "."})
external.AddDriverDefinition("manifests.yaml")
}

func TestEBSCSI(t *testing.T) {
Expand Down
29 changes: 29 additions & 0 deletions tests/e2e-kubernetes/manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Manifest for Kubernetes external tests.
# See https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/external

ShortName: ebs
StorageClass:
FromFile: storageclass.yaml
SnapshotClass:
FromFile: snapshotclass.yaml
DriverInfo:
Name: ebs.csi.aws.com
SupportedSizeRange:
Min: 1Gi
Max: 16Ti
SupportedFsType:
xfs: {}
ext4: {}
SupportedMountOption:
dirsync: {}
TopologyKeys: ["topology.ebs.csi.aws.com/zone"]
Capabilities:
persistence: true
fsGroup: true
block: true
exec: true
volumeLimits: false
controllerExpansion: true
nodeExpansion: true
snapshotDataSource: true
multipods: true
9 changes: 9 additions & 0 deletions tests/e2e-kubernetes/snapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SnapshotClass for Kubernetes external tests.
# See https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/external

apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass
metadata:
name: csi-aws-vsc
driver: ebs.csi.aws.com
deletionPolicy: Delete
9 changes: 9 additions & 0 deletions tests/e2e-kubernetes/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# StorageClass for Kubernetes external tests.
# See https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/external

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: ebs.csi.aws.com
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
Loading

0 comments on commit 6cd9013

Please sign in to comment.