Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#3513 from sushrk/disable-wafv2
Browse files Browse the repository at this point in the history
add env to disable wafv2 in tests
  • Loading branch information
k8s-ci-robot authored Dec 21, 2023
2 parents a5ecd78 + 13cfa32 commit f38fe49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ PROD_IMAGE_REGISTRY=${PROD_IMAGE_REGISTRY:-"602401143452.dkr.ecr.us-west-2.amazo

ADC_REGIONS="us-iso-east-1 us-isob-east-1 us-iso-west-1"
CONTAINER_NAME="aws-load-balancer-controller"
: "${DISABLE_WAFV2:=false}"
DISABLE_WAFV2_FLAGS=""

function toggle_windows_scheduling(){
schedule=$1
Expand Down Expand Up @@ -174,15 +176,13 @@ if [[ $ADC_REGIONS == *"$REGION"* ]]; then
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=NLBSecurityGroup=false,ListenerRulesTagging=false"}]' || true
else
echo "install via helm repo, update helm repo from github"
if [[ "$DISABLE_WAFV2" == true ]]; then
DISABLE_WAFV2_FLAGS="--set enableShield=false --set enableWaf=false --set enableWafv2=false"
fi
helm repo add eks https://aws.github.io/eks-charts
helm repo update
echo "Install aws-load-balancer-controller"
if [[ "$REGION" == "ca-west-1" ]]; then
# Disable Shield and WAF temporarily for ca-west-1
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 --set enableShield=false --set enableWaf=false --set enableWafv2=false
else
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
fi
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 $DISABLE_WAFV2_FLAGS
fi

echo_time() {
Expand Down

0 comments on commit f38fe49

Please sign in to comment.