Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arm64 e2e test #1829

Merged
merged 1 commit into from
Nov 7, 2023
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
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,20 @@ test-e2e-external:
COLLECT_METRICS="true" \
./hack/e2e/run.sh

.PHONY: test-e2e-external-arm64
test-e2e-external-arm64:
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\]" \
INSTANCE_TYPE="m7g.medium" \
AMI_PARAMETER="/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64" \
IMAGE_ARCH="arm64" \
./hack/e2e/run.sh

.PHONY: test-e2e-external-eks
test-e2e-external-eks:
CLUSTER_TYPE=eksctl \
Expand Down
5 changes: 3 additions & 2 deletions hack/e2e/ecr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function ecr_build_and_push() {
AWS_ACCOUNT_ID=${2}
IMAGE_NAME=${3}
IMAGE_TAG=${4}
IMAGE_ARCH=${5}
set +e
if docker images --format "{{.Repository}}:{{.Tag}}" | grep "${IMAGE_NAME}:${IMAGE_TAG}"; then
set -e
Expand All @@ -27,8 +28,8 @@ function ecr_build_and_push() {
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
make all-push
else
IMAGE=${IMAGE_NAME} TAG=${IMAGE_TAG} OS=linux ARCH=amd64 OSVERSION=al2023 make image
docker tag "${IMAGE_NAME}":"${IMAGE_TAG}"-linux-amd64-al2023 "${IMAGE_NAME}":"${IMAGE_TAG}"
IMAGE=${IMAGE_NAME} TAG=${IMAGE_TAG} OS=linux ARCH=${IMAGE_ARCH} OSVERSION=al2023 make image
docker tag "${IMAGE_NAME}":"${IMAGE_TAG}"-linux-${IMAGE_ARCH}-al2023 "${IMAGE_NAME}":"${IMAGE_TAG}"
docker push "${IMAGE_NAME}":"${IMAGE_TAG}"
fi
fi
Expand Down
7 changes: 5 additions & 2 deletions hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ INSTANCE_TYPE=${INSTANCE_TYPE:-c5.large}
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}}
IMAGE_ARCH=${IMAGE_ARCH:-amd64}

# kops: must include patch version (e.g. 1.19.1)
# eksctl: mustn't include patch version (e.g. 1.19)
Expand All @@ -56,7 +57,8 @@ KOPS_VERSION=${KOPS_VERSION:-1.28.0}
KOPS_STATE_FILE=${KOPS_STATE_FILE:-s3://k8s-kops-csi-shared-e2e}
KOPS_PATCH_FILE=${KOPS_PATCH_FILE:-./hack/kops-patch.yaml}
KOPS_PATCH_NODE_FILE=${KOPS_PATCH_NODE_FILE:-./hack/kops-patch-node.yaml}
AMI_ID=$(aws ssm get-parameters --names /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 --region ${REGION} --query 'Parameters[0].Value' --output text)
AMI_PARAMETER=${AMI_PARAMETER:-/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64}
AMI_ID=$(aws ssm get-parameters --names ${AMI_PARAMETER} --region ${REGION} --query 'Parameters[0].Value' --output text)

EKSCTL_VERSION=${EKSCTL_VERSION:-0.163.0}
EKSCTL_PATCH_FILE=${EKSCTL_PATCH_FILE:-./hack/eksctl-patch.yaml}
Expand Down Expand Up @@ -137,7 +139,8 @@ fi
ecr_build_and_push "${REGION}" \
"${AWS_ACCOUNT_ID}" \
"${IMAGE_NAME}" \
"${IMAGE_TAG}"
"${IMAGE_TAG}" \
"${IMAGE_ARCH}"

if [[ "${CLUSTER_TYPE}" == "kops" ]]; then
kops_create_cluster \
Expand Down