Skip to content

Commit

Permalink
chore: Update e2e and integration test Kubernetes/kOps versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Apr 26, 2024
1 parent 03e2716 commit 5b73b2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 6 additions & 4 deletions hack/e2e/README.md
Expand Up @@ -5,20 +5,22 @@ End-to-end testing verifies the functionality of the AWS IAM authenticator for K
## Prerequisites

Have the following installed on your system:
- go (1.16+)

- go (1.22+)
- jq
- awscli
- Configure your AWS credentials, as well.
- Configure your AWS credentials, as well.
- docker

## Operation

From the base directory, run `./hack/e2e/run.sh`. Alternatively, run `make test-<testname>` or `GINKGO_FOCUS="[<test_group>]" ./hack/e2e/run.sh` to run a specific subset of tests.
From the base directory, run `./hack/e2e/run.sh`. Alternatively, run `make test-<testname>` or `GINKGO_FOCUS="[<test_group>]" ./hack/e2e/run.sh` to run a specific subset of tests.

You can change the behavior of the tests by setting certain environment variables beforehand. Most of these can stay unchanged, but some should be noted:

- `REGION`, `ZONES`: AWS region that the tests should be run on.
- `KOPS_STATE_FILE`: An S3 bucket that you have access to. **Change this to a bucket you own!**
- `K8S_VERSION`: Kuberenetes version. Don't change this off `1.22.10`; you might end up with a bunch of build errors otherwise.
- `K8S_VERSION`: Kuberenetes version.
- `TEST_ID`: Normally a random number, but can be set for a more controlled environment.
- `CLEAN`: Set to false if you don't want the cluster to be torn down after the tests are done running. Useful if you want to inspect the cluster state after setup.

Expand Down
8 changes: 3 additions & 5 deletions hack/e2e/run.sh
Expand Up @@ -54,9 +54,9 @@ ECR_URL=${AWS_ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com
IMAGE_NAME=${IMAGE_NAME:-${ECR_URL}/${REPO_NAME}}
IMAGE_TAG=${IMAGE_TAG:-${TEST_ID}}

K8S_VERSION=${K8S_VERSION:-1.22.10}

KOPS_VERSION=${KOPS_VERSION:-1.23.0}
K8S_VERSION=${K8S_VERSION:-1.29.0}
KUBECTL_VERSION=${KUBECTL_VERSION:-1.29.0}
KOPS_VERSION=${KOPS_VERSION:-1.28.4}

KOPS_STATE_FILE=${KOPS_STATE_FILE:-s3://${KOPS_STATE_BUCKET}}
KOPS_PATCH_FILE=${KOPS_PATCH_FILE:-${BASE_DIR}/kops-patch.yaml}
Expand All @@ -66,8 +66,6 @@ ROLES_SPEC_FILE=${ROLES_SPEC_FILE:-${BASE_DIR}/roles.yaml}
APISERVER_UPDATE_FILE=${APISERVER_UPDATE_FILE:-${BASE_DIR}/apiserver-update.yaml}
KUBECONFIG_UPDATE_FILE=${KUBECONFIG_UPDATE_FILE:-${BASE_DIR}/kubeconfig-update.yaml}

KUBECTL_VERSION=${KUBECTL_VERSION:-1.24.0}

TEST_PATH=${TEST_PATH:-"./..."}
ARTIFACTS=${ARTIFACTS:-"${TEST_DIR}/artifacts"}
GINKGO_FOCUS=${GINKGO_FOCUS:-"\[iam-auth-e2e\]"}
Expand Down
2 changes: 1 addition & 1 deletion hack/test-integration.sh
Expand Up @@ -57,7 +57,7 @@ EOF
CREATE_TEST_ROLE="${CREATE_TEST_ROLE:-true}"
GENERATED_TEST_ROLE_NAME="aws-iam-authenticator-test-role-${RANDOM}"
GENERATED_TEST_ROLE_POLICY_FILE=/tmp/role-policy.json
KUBERNETES_TAG="v1.22.1"
KUBERNETES_TAG="v1.29.0"
REPO_ROOT="$(cd "$( dirname "${BASH_SOURCE[0]}" )"/.. &> /dev/null && pwd)"
TEST_ARTIFACTS="${TEST_ARTIFACTS:-"${REPO_ROOT}/test-artifacts"}"
TEST_ROLE_ARN="${TEST_ROLE_ARN:-$(role_arn_from_default_credentials)}"
Expand Down

0 comments on commit 5b73b2c

Please sign in to comment.