diff --git a/Makefile b/Makefile index ac82677a85..a2ff57e237 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ test-e2e-multi-az: .PHONY: test-e2e-migration test-e2e-migration: - AWS_REGION=us-west-2 AWS_AVAILABILITY_ZONES=us-west-2a GINKGO_FOCUS="\[ebs-csi-migration\]" ./hack/run-e2e-test + AWS_REGION=us-west-2 AWS_AVAILABILITY_ZONES=us-west-2a GINKGO_FOCUS="\[ebs-csi-migration\].+block.+volume-expand" ./hack/run-e2e-test .PHONY: image-release image-release: diff --git a/hack/feature-gates.yaml b/hack/feature-gates.yaml index 0212bd32d1..63d383461d 100644 --- a/hack/feature-gates.yaml +++ b/hack/feature-gates.yaml @@ -7,6 +7,7 @@ CSIMigrationAWS: "true" ExpandCSIVolumes: "true" VolumeSnapshotDataSource: "true" + CSIInlineVolume: "true" kubeControllerManager: featureGates: CSIDriverRegistry: "true" @@ -15,6 +16,7 @@ CSIMigration: "true" CSIMigrationAWS: "true" ExpandCSIVolumes: "true" + CSIInlineVolume: "true" kubelet: featureGates: CSIDriverRegistry: "true" @@ -23,3 +25,4 @@ CSIMigration: "true" CSIMigrationAWS: "true" ExpandCSIVolumes: "true" + CSIInlineVolume: "true" diff --git a/hack/run-e2e-test b/hack/run-e2e-test index 2e56a9d419..f61fccf7ca 100755 --- a/hack/run-e2e-test +++ b/hack/run-e2e-test @@ -17,7 +17,7 @@ set -euo pipefail OS_ARCH=$(go env GOOS)-amd64 -TEST_ID=11027 # TODO $RANDOM +TEST_ID=$RANDOM CLUSTER_NAME=test-cluster-$TEST_ID TEST_DIR=/tmp/ebs-e2e-test BASE_DIR=$(dirname $0) @@ -25,7 +25,7 @@ REGION=${AWS_REGION-us-west-2} ZONES=${AWS_AVAILABILITY_ZONES-us-west-2a,us-west-2b,us-west-2c} FOCUS=${GINKGO_FOCUS-"[ebs-csi-e2e]"} NODES=${GINKGO_NODES:-32} -K8S_VERSION=${K8S_VERSION-1.15.3-beta.0} +K8S_VERSION=${K8S_VERSION-1.16.0-beta.1} INSTANCE_TYPE=${INSTANCE_TYPE-c4.large} source $(dirname "${BASH_SOURCE}")/utils/helm.sh @@ -99,20 +99,6 @@ helm install --name aws-ebs-csi-driver \ # Run the test if [[ "$GINKGO_FOCUS" == "\[ebs-csi-migration\]" ]]; then - DEP_DOWNLOAD_URL=https://github.com/golang/dep/releases/download/v0.5.4/dep-$OS_ARCH - DEP_PATH=$TEST_DIR/dep - - # Download dep if not yet - if [[ ! -e $DEP_PATH ]]; then - mkdir -p $TEST_DIR - echo "Downloading dep from $DEP_DOWNLOAD_URL to $DEP_PATH" - curl -L -X GET $DEP_DOWNLOAD_URL -o $DEP_PATH - chmod +x $DEP_PATH - fi - - pushd ./tests/e2e-migration - $DEP_PATH ensure - popd # TODO known test failures to skip temporarily # - should not allow expansion of pvcs without AllowVolumeExpansion property # - Test passes but cleanup fails, need https://github.com/kubernetes/kubernetes/pull/81107 @@ -120,10 +106,12 @@ if [[ "$GINKGO_FOCUS" == "\[ebs-csi-migration\]" ]]; then # - NodeExpand for BlockVolumes not well-defined, need more investigation and possibly https://github.com/container-storage-interface/spec/issues/380 # - should provision storage with mount options # - Known bug, need https://github.com/kubernetes/kubernetes/pull/80191 but not yet in a patch release - GO111MODULE=off go test -v -timeout 0 ./tests/e2e-migration/... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="$FOCUS" -ginkgo.skip="\[Disruptive\]\ + pushd ./test/e2e-migration + go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="$FOCUS" -ginkgo.skip="\[Disruptive\]\ |should.not.allow.expansion\ |block.volmode.+volume-expand\ -|should.provision.storage.with.mount.options" -gce-zone=$REGION +|should.provision.storage.with.mount.options" -gce-zone=${ZONES%,*} + popd ./test/e2e-migration else go get -u github.com/onsi/ginkgo/ginkgo export KUBECONFIG=$HOME/.kube/config diff --git a/tests/e2e-migration/README.md b/tests/e2e-migration/README.md index 1e9e237933..225c1e2b77 100644 --- a/tests/e2e-migration/README.md +++ b/tests/e2e-migration/README.md @@ -1,11 +1,7 @@ # Prerequisites -- kubernetes 1.15+ AWS cluster +- kubernetes 1.16+ AWS cluster # Run ```sh -dep ensure -GO111MODULE=off go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="\[ebs-csi-migration\]" -ginkgo.skip="\[Disruptive\]" -gce-zone=us-west-2 -``` -# FAQ -- empty `go.mod` because: https://github.com/golang/go/wiki/Modules#can-an-additional-gomod-exclude-unnecessary-content-do-modules-have-the-equivalent-of-a-gitignore-file -- kubernetes 1.15+ uses go modules, but importing the e2e framework is hard, so use vendoring via dep +go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="\[ebs-csi-migration\]" -ginkgo.skip="\[Disruptive\]" -gce-zone=us-west-2a +``` \ No newline at end of file diff --git a/tests/e2e-migration/go.mod b/tests/e2e-migration/go.mod index e69de29bb2..2e54c2b87e 100644 --- a/tests/e2e-migration/go.mod +++ b/tests/e2e-migration/go.mod @@ -0,0 +1,75 @@ +module github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/e2e-migration + +go 1.12 + +require ( + github.com/Microsoft/go-winio v0.4.12 + github.com/aws/aws-sdk-go v1.21.10 + github.com/beorn7/perks v1.0.0 + github.com/coreos/etcd v3.3.13+incompatible + github.com/davecgh/go-spew v1.1.1 + github.com/docker/distribution v2.7.1+incompatible + github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c + github.com/fsnotify/fsnotify v1.4.7 + github.com/gogo/protobuf v1.2.1 + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.0 + github.com/google/gofuzz v1.0.0 + github.com/google/uuid v1.1.1 + github.com/googleapis/gnostic v0.3.0 + github.com/hashicorp/golang-lru v0.5.1 + github.com/hpcloud/tail v1.0.0 + github.com/imdario/mergo v0.3.7 + github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af + github.com/json-iterator/go v1.1.6 + github.com/matttproud/golang_protobuf_extensions v1.0.1 + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd + github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 + github.com/onsi/ginkgo v1.8.0 + github.com/onsi/gomega v1.5.0 + github.com/opencontainers/go-digest v1.0.0-rc1 + github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 + github.com/pkg/errors v0.8.1 + github.com/pmezard/go-difflib v1.0.0 + github.com/prometheus/client_golang v1.0.0 + github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 + github.com/prometheus/common v0.6.0 + github.com/prometheus/procfs v0.0.3 + github.com/spf13/afero v1.2.2 + github.com/spf13/pflag v1.0.3 + github.com/stretchr/testify v1.3.0 + github.com/vmware/govmomi v0.21.0 + golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 + golang.org/x/net v0.0.0-20190628185345-da137c7871d7 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 + golang.org/x/text v0.3.2 + golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 + google.golang.org/appengine v1.6.1 + google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 + google.golang.org/grpc v1.22.0 + gopkg.in/fsnotify.v1 v1.4.7 + gopkg.in/gcfg.v1 v1.2.3 + gopkg.in/inf.v0 v0.9.1 + gopkg.in/square/go-jose.v2 v2.3.1 + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 + gopkg.in/warnings.v0 v0.1.2 + gopkg.in/yaml.v2 v2.2.2 + k8s.io/api v0.0.0-20190730183008-42d28c278e58 + k8s.io/apiextensions-apiserver v0.0.0-20190730184511-54a04115029c + k8s.io/apimachinery v0.0.0-20190727130956-f97a4e5b4abc + k8s.io/apiserver v0.0.0-20190730183948-6d4a1e4632b0 + k8s.io/client-go v0.0.0-20190730183229-554656fd9dfc + k8s.io/cloud-provider v0.0.0-20190717025205-585d8110a88f + k8s.io/component-base v0.0.0-20190717023551-b4f50308a616 + k8s.io/cri-api v0.0.0-20190711114129-0b0c4484b3d3 + k8s.io/csi-translation-lib v0.0.0-20190717025251-2a445d2079de + k8s.io/klog v0.3.3 + k8s.io/kube-openapi v0.0.0-20190718094010-3cf2ea392886 + k8s.io/kubectl v0.0.0-20190803022817-1937123dfffc + k8s.io/kubernetes v1.16.0-alpha.2 + k8s.io/legacy-cloud-providers v0.0.0-20190803062608-1ae6510dd5d3 + k8s.io/utils v0.0.0-20190712204705-3dccf664f023 + sigs.k8s.io/yaml v1.1.0 +)