Skip to content

Commit 2be7cec

Browse files
authored
Merge pull request #3364 from oliviassss/prow-fix
remove pre requisite check in prow script
2 parents 55ddccb + 42b398e commit 2be7cec

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

scripts/run-e2e-test.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,22 @@ EOF
107107
echo "cleanup any stale resources from previous run"
108108
cleanUp
109109

110-
PRE_REQUISITE=success
111110
echo "create Role with above policy document"
112-
aws iam create-role --role-name $ROLE_NAME --assume-role-policy-document file://trust.json --description "IAM Role to be used by aws-load-balancer-controller SA" || PRE_REQUISITE=fail
111+
aws iam create-role --role-name $ROLE_NAME --assume-role-policy-document file://trust.json --description "IAM Role to be used by aws-load-balancer-controller SA" || true
113112

114113
echo "creating AWSLoadbalancerController IAM Policy"
115114
aws iam create-policy \
116115
--policy-name AWSLoadBalancerControllerIAMPolicy \
117-
--policy-document file://"$SCRIPT_DIR"/../docs/install/${IAM_POLCIY_FILE} || PRE_REQUISITE=fail
116+
--policy-document file://"$SCRIPT_DIR"/../docs/install/${IAM_POLCIY_FILE} || true
118117

119118
echo "attaching AWSLoadBalancerController IAM Policy to $ROLE_NAME"
120-
aws iam attach-role-policy --policy-arn arn:${AWS_PARTITION}:iam::$ACCOUNT_ID:policy/AWSLoadBalancerControllerIAMPolicy --role-name $ROLE_NAME || PRE_REQUISITE=fail
119+
aws iam attach-role-policy --policy-arn arn:${AWS_PARTITION}:iam::$ACCOUNT_ID:policy/AWSLoadBalancerControllerIAMPolicy --role-name $ROLE_NAME || true
121120

122121
echo "create service account"
123-
kubectl create serviceaccount aws-load-balancer-controller -n kube-system || PRE_REQUISITE=fail
122+
kubectl create serviceaccount aws-load-balancer-controller -n kube-system || true
124123

125124
echo "annotate service account with $ROLE_NAME"
126-
kubectl annotate serviceaccount -n kube-system aws-load-balancer-controller eks.amazonaws.com/role-arn=arn:${AWS_PARTITION}:iam::"$ACCOUNT_ID":role/"$ROLE_NAME" --overwrite=true || PRE_REQUISITE=fail
125+
kubectl annotate serviceaccount -n kube-system aws-load-balancer-controller eks.amazonaws.com/role-arn=arn:${AWS_PARTITION}:iam::"$ACCOUNT_ID":role/"$ROLE_NAME" --overwrite=true || true
127126

128127
function install_controller_for_adc_regions() {
129128
echo "install cert-manager"
@@ -140,7 +139,7 @@ function install_controller_for_adc_regions() {
140139
sed -i "" "s#$default_url#$adc_url#g" "$cert_manager_yaml"
141140
done
142141
echo "Image URLs in $cert_manager_yaml have been updated to use the ADC registry"
143-
kubectl apply -f $cert_manager_yaml || PRE_REQUISITE=fail
142+
kubectl apply -f $cert_manager_yaml || true
144143

145144
echo "install the controller via yaml"
146145
controller_yaml="./test/prow/v2_6_0_adc.yaml"
@@ -149,7 +148,7 @@ function install_controller_for_adc_regions() {
149148
echo "Image URL in $controller_yaml has been updated to $IMAGE"
150149
sed -i "" "s#your-cluster-name#$CLUSTER_NAME#g" "$controller_yaml"
151150
echo "cluster name in $controller_yaml has been update to $CLUSTER_NAME"
152-
kubectl apply -f $controller_yaml || PRE_REQUISITE=fail
151+
kubectl apply -f $controller_yaml || true
153152
}
154153

155154
echo "installing AWS load balancer controller"
@@ -159,7 +158,7 @@ if [[ $ADC_REGIONS == *"$REGION"* ]]; then
159158
echo "disable NLB Security Group as it's not supported in ADC yet"
160159
kubectl patch deployment aws-load-balancer-controller -n kube-system \
161160
--type=json \
162-
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=NLBSecurityGroup=false"}]' || PRE_REQUISITE=fail
161+
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=NLBSecurityGroup=false"}]' || true
163162
else
164163
echo "install via helm repo, update helm repo from github"
165164
helm repo add eks https://aws.github.io/eks-charts
@@ -168,11 +167,6 @@ else
168167
helm upgrade -i aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=$CLUSTER_NAME --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller --set region=$REGION --set vpcId=$VPC_ID --set image.repository=$IMAGE
169168
fi
170169

171-
if [[ "$PRE_REQUISITE" == fail ]]; then
172-
echo "pre-requisite failed, exit the test."
173-
exit 1
174-
fi
175-
176170
echo_time() {
177171
date +"%D %T $*"
178172
}

0 commit comments

Comments
 (0)