Skip to content

Commit

Permalink
scripts: use auto-generated SSH key, "aws eks update-kubeconfig"
Browse files Browse the repository at this point in the history
Use latest testser release

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho authored and mogren committed Apr 20, 2020
1 parent b375e66 commit a53e646
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ensure_ecr_repo() {
}

ensure_aws_k8s_tester() {
TESTER_RELEASE=${TESTER_RELEASE:-v0.6.8}
TESTER_RELEASE=${TESTER_RELEASE:-v0.7.1}
TESTER_DOWNLOAD_URL=https://github.com/aws/aws-k8s-tester/releases/download/$TESTER_RELEASE/aws-k8s-tester-$TESTER_RELEASE-$OS-$ARCH

# Download aws-k8s-tester if not yet
Expand Down
4 changes: 0 additions & 4 deletions scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ function down-test-cluster() {

function up-test-cluster() {
echo -n "Configuring cluster $CLUSTER_NAME"
ssh-keygen -q -P cni-test -f $SSH_KEY_PATH

AWS_K8S_TESTER_EKS_NAME=$CLUSTER_NAME \
AWS_K8S_TESTER_EKS_KUBECONFIG_PATH=$KUBECONFIG_PATH \
AWS_K8S_TESTER_EKS_PARAMETERS_VERSION=${K8S_VERSION%.*} \
Expand All @@ -25,8 +23,6 @@ function up-test-cluster() {
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ROLE_CREATE=false \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ROLE_ARN=arn:aws:iam::404174646922:role/K8sTester-ClusterManagementRole \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_MNGS={\"${CLUSTER_NAME}-mng-for-cni\":{\"name\":\"${CLUSTER_NAME}-mng-for-cni\",\"tags\":{\"group\":\"amazon-vpc-cni-k8s\"},\"ami-type\":\"AL2_x86_64\",\"asg-min-size\":3,\"asg-max-size\":3,\"asg-desired-capacity\":3,\"instance-types\":[\"c5.xlarge\"]}} \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_REMOTE_ACCESS_PRIVATE_KEY_PATH=$SSH_KEY_PATH \
AWS_K8S_TESTER_EKS_AWS_IAM_AUTHENTICATOR_PATH=$AUTHENTICATOR_PATH \
AWS_K8S_TESTER_EKS_ADD_ON_NLB_HELLO_WORLD_ENABLE=true \
AWS_K8S_TESTER_EKS_ADD_ON_ALB_2048_ENABLE=true \
AWS_K8S_TESTER_EKS_KUBECTL_PATH=$KUBECTL_PATH \
Expand Down
3 changes: 0 additions & 3 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ CLUSTER_NAME=cni-test-$CLUSTER_ID
TEST_CLUSTER_DIR=/tmp/cni-test/cluster-$CLUSTER_NAME
CLUSTER_MANAGE_LOG_PATH=$TEST_CLUSTER_DIR/cluster-manage.log
CLUSTER_CONFIG=${CLUSTER_CONFIG:-${TEST_CLUSTER_DIR}/${CLUSTER_NAME}.yaml}
SSH_KEY_PATH=${SSH_KEY_PATH:-${TEST_CLUSTER_DIR}/id_rsa}
KUBECONFIG_PATH=${KUBECONFIG_PATH:-${TEST_CLUSTER_DIR}/kubeconfig}

# shared binaries
TESTER_DIR=${TESTER_DIR:-/tmp/aws-k8s-tester}
TESTER_PATH=${TESTER_PATH:-$TESTER_DIR/aws-k8s-tester}
AUTHENTICATOR_PATH=${AUTHENTICATOR_PATH:-$TESTER_DIR/aws-iam-authenticator}
KUBECTL_PATH=${KUBECTL_PATH:-$TESTER_DIR/kubectl}

LOCAL_GIT_VERSION=$(git describe --tags --always --dirty)
Expand Down Expand Up @@ -142,7 +140,6 @@ echo "+ Cluster config dir: $TEST_CLUSTER_DIR"
echo "+ Result dir: $TEST_DIR"
echo "+ Tester: $TESTER_PATH"
echo "+ Kubeconfig: $KUBECONFIG_PATH"
echo "+ Node SSH key: $SSH_KEY_PATH"
echo "+ Cluster config: $CLUSTER_CONFIG"
echo "+ AWS Account ID: $AWS_ACCOUNT_ID"
echo "+ CNI image to test: $IMAGE_NAME:$TEST_IMAGE_VERSION"
Expand Down

0 comments on commit a53e646

Please sign in to comment.