From eacb0c370c0fbe6abcd15b00b7e7e35ca039c2ed Mon Sep 17 00:00:00 2001 From: Olivia Song Date: Fri, 29 Sep 2023 15:23:56 -0700 Subject: [PATCH] update prow script (#3406) * update prow script * add step to create ingressclass and params --- scripts/run-e2e-test.sh | 14 +++++++++----- test/prow/v2_6_0_ingclass.yaml | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 test/prow/v2_6_0_ingclass.yaml diff --git a/scripts/run-e2e-test.sh b/scripts/run-e2e-test.sh index 343666489..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" - source "$SCRIPT_DIR"/lib/common.sh # TEST_IMAGE_REGISTRY is the registry in test-infra-* accounts where e2e test images are stored @@ -135,19 +134,24 @@ 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]}" - sed -i "" "s#$default_url#$adc_url#g" "$cert_manager_yaml" + 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 - + sleep 60s 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" - sed -i "" "s#$default_controller_image#$IMAGE#g" "$controller_yaml" + 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" + 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