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

update prow script #3406

Merged
merged 2 commits into from
Sep 29, 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: 9 additions & 5 deletions scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
19 changes: 19 additions & 0 deletions test/prow/v2_6_0_ingclass.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading