diff --git a/scripts/run-e2e-test.sh b/scripts/run-e2e-test.sh index 7e65d3606..cd42be548 100755 --- a/scripts/run-e2e-test.sh +++ b/scripts/run-e2e-test.sh @@ -6,7 +6,6 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build" -OSTYPE=${OSTYPE:-"linux-gnu"} source "$SCRIPT_DIR"/lib/common.sh # TEST_IMAGE_REGISTRY is the registry in test-infra-* accounts where e2e test images are stored @@ -135,11 +134,7 @@ function install_controller_for_adc_regions() { # Iterate through the mapping and perform the replacements for default_url in "${!url_mapping[@]}"; do adc_url="${url_mapping[$default_url]}" - if [[ "$OSTYPE" == "darwin"* ]]; then - sed -i "" "s#$default_url#$adc_url#g" "$cert_manager_yaml" - else - sed -i "s#$default_url#$adc_url#g" "$cert_manager_yaml" - fi + sed -i "s#$default_url#$adc_url#g" "$cert_manager_yaml" done echo "Image URLs in $cert_manager_yaml have been updated to use the ADC registry" kubectl apply -f $cert_manager_yaml || true @@ -147,17 +142,16 @@ function install_controller_for_adc_regions() { echo "install the controller via yaml" controller_yaml="$SCRIPT_DIR"/../test/prow/v2_6_0_adc.yaml default_controller_image="public.ecr.aws/eks/aws-load-balancer-controller" - if [[ "$OSTYPE" == "darwin"* ]]; then - sed -i "" "s#$default_controller_image#$IMAGE#g" "$controller_yaml" - sed -i "" "s#your-cluster-name#$CLUSTER_NAME#g" "$controller_yaml" - else - sed -i "s#$default_controller_image#$IMAGE#g" "$controller_yaml" - sed -i "s#your-cluster-name#$CLUSTER_NAME#g" "$controller_yaml" - fi + sed -i "s#$default_controller_image#$IMAGE#g" "$controller_yaml" echo "Image URL in $controller_yaml has been updated to $IMAGE" + sed -i "s#your-cluster-name#$CLUSTER_NAME#g" "$controller_yaml" echo "cluster name in $controller_yaml has been update to $CLUSTER_NAME" kubectl apply -f $controller_yaml || true kubectl rollout status -n kube-system deployment aws-load-balancer-controller || true + + echo "apply the manifest for ingressclass and ingressclassparam" + ingclass_yaml="$SCRIPT_DIR"/../test/prow/v2_6_0_ingclass.yaml + kubectl apply -f $ingclass_yaml || true } echo "installing AWS load balancer controller" diff --git a/test/prow/v2_6_0_ingclass.yaml b/test/prow/v2_6_0_ingclass.yaml new file mode 100644 index 000000000..4369c3d35 --- /dev/null +++ b/test/prow/v2_6_0_ingclass.yaml @@ -0,0 +1,19 @@ +apiVersion: elbv2.k8s.aws/v1beta1 +kind: IngressClassParams +metadata: + labels: + app.kubernetes.io/name: aws-load-balancer-controller + name: alb +--- +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + labels: + app.kubernetes.io/name: aws-load-balancer-controller + name: alb +spec: + controller: ingress.k8s.aws/alb + parameters: + apiGroup: elbv2.k8s.aws + kind: IngressClassParams + name: alb