npc: Pass --use-legacy-netpol to weaver in 840
This commit is contained in:
1 parent
86958be6cf
commit
be8298926a
1 file changed
+8
-2
@@ -44,9 +44,9 @@ for host in $HOSTS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$COVERAGE" ]; then
|
if [ -n "$COVERAGE" ]; then
|
||||||
WEAVE_ENV_VARS="env:\\n - name: EXTRA_ARGS\\n value: \"-test.coverprofile=/home/weave/cover.prof --\""
|
WEAVE_ENV_VARS="env:\\n - name: EXTRA_ARGS\\n value: \"-test.coverprofile=/home/weave/cover.prof -- --use-legacy-netpol\""
|
||||||
else
|
else
|
||||||
WEAVE_ENV_VARS="env:"
|
WEAVE_ENV_VARS="env:\\n - name: EXTRA_ARGS\\n value: \"--use-legacy-netpol\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure Kubernetes uses locally built container images and inject code coverage environment variable (or do nothing depending on $COVERAGE):
|
# Ensure Kubernetes uses locally built container images and inject code coverage environment variable (or do nothing depending on $COVERAGE):
|
||||||
@@ -179,6 +179,12 @@ run_on $HOST1 "$KUBECTL run nettest-deny --labels=\"access=deny,run=nettest-deny
|
|||||||
denyPodName=$($SSH $HOST1 "$KUBECTL get pods -l run=nettest-deny -o go-template='{{(index .items 0).metadata.name}}'")
|
denyPodName=$($SSH $HOST1 "$KUBECTL get pods -l run=nettest-deny -o go-template='{{(index .items 0).metadata.name}}'")
|
||||||
assert_raises "! $SSH $HOST1 $KUBECTL exec $denyPodName -- curl -s -S -f -m 2 http://$DOMAIN:8080/status >/dev/null"
|
assert_raises "! $SSH $HOST1 $KUBECTL exec $denyPodName -- curl -s -S -f -m 2 http://$DOMAIN:8080/status >/dev/null"
|
||||||
|
|
||||||
|
if [ -n "$COVERAGE" ]; then
|
||||||
|
WEAVE_ENV_VARS="env:\\n - name: EXTRA_ARGS\\n value: \"-test.coverprofile=/home/weave/cover.prof --\""
|
||||||
|
else
|
||||||
|
WEAVE_ENV_VARS="env:"
|
||||||
|
fi
|
||||||
|
|
||||||
# Restart weave-net with npc in non-legacy mode
|
# Restart weave-net with npc in non-legacy mode
|
||||||
$SSH $HOST1 "$KUBECTL delete ds weave-net -n=kube-system"
|
$SSH $HOST1 "$KUBECTL delete ds weave-net -n=kube-system"
|
||||||
sed -e "s%imagePullPolicy: Always%imagePullPolicy: Never%" \
|
sed -e "s%imagePullPolicy: Always%imagePullPolicy: Never%" \
|
||||||
|
|||||||
Reference in new issue
Block a user