Skip to content

Commit e0e8a7d

Browse files
committed
Fix DP installation scripts for custom NP controller
1 parent b2055b4 commit e0e8a7d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

scripts/lib/network-policy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ function install_network_policy_helm(){
8787
fi
8888

8989
echo "Updating annotations and labels on existing resources"
90-
for kind in daemonSet clusterRole clusterRoleBinding serviceAccount; do
91-
echo "setting annotations and labels on $kind/aws-node"
92-
kubectl -n kube-system annotate --overwrite $kind aws-node meta.helm.sh/release-name=aws-vpc-cni || echo "Unable to annotate $kind/aws-node"
93-
kubectl -n kube-system annotate --overwrite $kind aws-node meta.helm.sh/release-namespace=kube-system || echo "Unable to annotate $kind/aws-node"
94-
kubectl -n kube-system label --overwrite $kind aws-node app.kubernetes.io/managed-by=Helm || echo "Unable to label $kind/aws-node"
90+
resources=("daemonSet/aws-node" "clusterRole/aws-node" "clusterRoleBinding/aws-node" "serviceAccount/aws-node" "configmap/amazon-vpc-cni")
91+
for kind in ${resources[@]}; do
92+
echo "setting annotations and labels on $kind"
93+
kubectl -n kube-system annotate --overwrite $kind meta.helm.sh/release-name=aws-vpc-cni meta.helm.sh/release-namespace=kube-system || echo "Unable to annotate $kind"
94+
kubectl -n kube-system label --overwrite $kind app.kubernetes.io/managed-by=Helm || echo "Unable to label $kind"
9595
done
9696

9797
echo "Installing/Updating the aws-vpc-cni helm chart with enableNetworkPolicy=true"

scripts/lib/verify_test_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ def verify_results(file_name,ip_family):
1515
# expected_results maintains a mapping of the test number and the number of sub-tests that are expected to pass for v4/v6 clusters
1616
# For the test numbers not included in this map, it is expected that all the sub-tests should be passing
1717
if ip_family == "IPv6":
18-
expected_results={ 2:80, 3:80, 8:80, 12:80, 23:80, 25:80, 26:80, 28:80,29:80, 31:77, 98:80, 102:72, 104:72, 106:72, 108:72, 111:80, 112:80 }
18+
expected_results={ 2:80, 3:80, 8:80, 12:64, 23:80, 25:80, 26:80, 28:80, 29:80, 31:50, 98:80, 102:72, 104:72, 106:72, 108:72, 111:80, 112:80 }
1919
else:
20-
expected_results={ 2:80, 3:80, 8:80, 12:80, 23:80, 25:80, 26:80, 28:80, 29:80, 31:80, 98:80, 111:80, 112:80 }
20+
expected_results={ 2:80, 3:80, 8:80, 12:80, 23:80, 25:80, 26:80, 28:80, 29:80, 31:50, 98:80, 111:80, 112:80 }
2121

2222
start="starting test case"
2323
wrong="wrong"

scripts/update-controller-image-dataplane.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Parameters:
55
# KUBECONFIG: path to the kubeconfig file, default ~/.kube/config
6-
# AMAZON_NP_CONTROLLER: node agent image
6+
# AMAZON_NP_CONTROLLER: Custom network policy controller image
77

88
set -e
99
DIR=$(cd "$(dirname "$0")"; pwd)
@@ -13,7 +13,7 @@ kubectl apply -k config/default
1313

1414
if [[ ! -z $AMAZON_NP_CONTROLLER ]];then
1515
echo "Setting the Controller Image: $AMAZON_NP_CONTROLLER"
16-
kubectl set image deployment.v1.apps/amazon-network-policy-controller-k8s controller=$AMAZON_NP_CONTROLLER
16+
kubectl set image -n kube-system deployment.v1.apps/amazon-network-policy-controller-k8s controller=$AMAZON_NP_CONTROLLER
1717
fi
1818

1919
echo "Restarting the Controller"

0 commit comments

Comments
 (0)