Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ test-e2e-single-az:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e/... \
GINKGO_FOCUS="\[ebs-csi-e2e\] \[single-az\]" \
GINKGO_SKIP="\"sc1\"|\"st1\"" \
Expand All @@ -92,6 +93,7 @@ test-e2e-multi-az:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e/... \
GINKGO_FOCUS="\[ebs-csi-e2e\] \[multi-az\]" \
./hack/e2e/run.sh
Expand All @@ -101,6 +103,7 @@ test-e2e-migration:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="\[ebs-csi-migration\]" \
EBS_CHECK_MIGRATION=true \
Expand All @@ -111,6 +114,7 @@ test-e2e-external:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="External.Storage" \
GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \
Expand All @@ -122,6 +126,7 @@ test-e2e-external-eks:
K8S_VERSION="1.20" \
HELM_VALUES_FILE="./hack/values_eksctl.yaml" \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
EKSCTL_ADMIN_ROLE="Infra-prod-KopsDeleteAllLambdaServiceRoleF1578477-1ELDFIB4KCMXV" \
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b \
Expand Down
23 changes: 18 additions & 5 deletions hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ IMAGE_TAG=${IMAGE_TAG:-${TEST_ID}}

# kops: must include patch version (e.g. 1.19.1)
# eksctl: mustn't include patch version (e.g. 1.19)
K8S_VERSION=${K8S_VERSION:-1.20.6}
K8S_VERSION=${K8S_VERSION:-1.20.8}

KOPS_VERSION=${KOPS_VERSION:-1.20.0}
KOPS_VERSION=${KOPS_VERSION:-1.21.0}
KOPS_STATE_FILE=${KOPS_STATE_FILE:-s3://k8s-kops-csi-e2e}
KOPS_PATCH_FILE=${KOPS_PATCH_FILE:-./hack/kops-patch.yaml}
KOPS_PATCH_NODE_FILE=${KOPS_PATCH_NODE_FILE:-./hack/kops-patch-node.yaml}
Expand All @@ -71,7 +71,8 @@ GINKGO_SKIP=${GINKGO_SKIP:-"\[Disruptive\]"}
GINKGO_NODES=${GINKGO_NODES:-4}
TEST_EXTRA_FLAGS=${TEST_EXTRA_FLAGS:-}

EBS_SNAPSHOT_CRD=${EBS_SNAPSHOT_CRD:-"./deploy/kubernetes/cluster/crd_snapshotter.yaml"}
EBS_INSTALL_SNAPSHOT=${EBS_INSTALL_SNAPSHOT:-"false"}
EBS_INSTALL_SNAPSHOT_VERSION=${EBS_INSTALL_SNAPSHOT_VERSION:-"v4.1.1"}
EBS_CHECK_MIGRATION=${EBS_CHECK_MIGRATION:-"false"}

CLEAN=${CLEAN:-"true"}
Expand Down Expand Up @@ -144,6 +145,15 @@ elif [[ "${CLUSTER_TYPE}" == "eksctl" ]]; then
fi
fi

if [[ "${EBS_INSTALL_SNAPSHOT}" == true ]]; then
loudecho "Installing snapshot controller and CRDs"
kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml
kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml
kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
fi

loudecho "Deploying driver"
startSec=$(date +'%s')

Expand All @@ -154,12 +164,15 @@ HELM_ARGS=(upgrade --install "${DRIVER_NAME}"
--wait
--kubeconfig "${KUBECONFIG}"
./charts/"${DRIVER_NAME}")
if test -f "$HELM_VALUES_FILE"; then
if [[ -f "$HELM_VALUES_FILE" ]]; then
HELM_ARGS+=(-f "${HELM_VALUES_FILE}")
fi
eval "EXPANDED_HELM_EXTRA_FLAGS=$HELM_EXTRA_FLAGS"
if [[ -n "$EXPANDED_HELM_EXTRA_FLAGS" ]]; then
HELM_ARGS+=("${EXPANDED_HELM_EXTRA_FLAGS}")
fi
set -x
"${HELM_BIN}" "${HELM_ARGS[@]}" "${EXPANDED_HELM_EXTRA_FLAGS}"
"${HELM_BIN}" "${HELM_ARGS[@]}"
set +x

endSec=$(date +'%s')
Expand Down
1 change: 0 additions & 1 deletion hack/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
enableVolumeSnapshot: true
controller:
logLevel: 5
node:
Expand Down