@@ -110,6 +110,10 @@ stages:
110110 AZURE_CLUSTER : " conformance-v2-linux-stress"
111111 PROFILE : " v2-background"
112112 IS_STRESS_TEST : " true"
113+ v2-place-first :
114+ AZURE_CLUSTER : " conformance-v2-place-first"
115+ PROFILE : " v2-place-first"
116+ IS_STRESS_TEST : " false"
113117 pool :
114118 name : $(BUILD_POOL_NAME_DEFAULT)
115119 demands :
@@ -251,15 +255,23 @@ stages:
251255 set -e
252256 make -C ./hack/aks set-kubeconf AZCLI=az GROUP=$(RESOURCE_GROUP) CLUSTER=$(AZURE_CLUSTER)
253257
254- # sig-release provides test suite tarball(s) per k8s release. Just need to provide k8s version "v1.xx.xx"
255- # pulling k8s version from AKS.
256- eval k8sVersion="v"$( az aks show -g $(RESOURCE_GROUP) -n $(AZURE_CLUSTER) --query "currentKubernetesVersion")
257- echo $k8sVersion
258- curl -L https://dl.k8s.io/$k8sVersion/kubernetes-test-linux-amd64.tar.gz -o ./kubernetes-test-linux-amd64.tar.gz
259-
260- # https://github.com/kubernetes/sig-release/blob/master/release-engineering/artifacts.md#content-of-kubernetes-test-system-archtargz-on-example-of-kubernetes-test-linux-amd64targz-directories-removed-from-list
261- # explictly unzip and strip directories from ginkgo and e2e.test
262- tar -xvzf kubernetes-test-linux-amd64.tar.gz --strip-components=3 kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
258+ if [ $(PROFILE) == "v2-place-first" ]; then
259+ git clone --depth=1 --branch=huntergregory/service-types https://github.com/huntergregory/network-policy-api.git
260+ cd network-policy-api/cmd/policy-assistant
261+ make policy-assistant
262+ cd ../../..
263+ mv network-policy-api/cmd/policy-assistant/cmd/policy-assistant/policy-assistant .
264+ else
265+ # sig-release provides test suite tarball(s) per k8s release. Just need to provide k8s version "v1.xx.xx"
266+ # pulling k8s version from AKS.
267+ eval k8sVersion="v"$( az aks show -g $(RESOURCE_GROUP) -n $(AZURE_CLUSTER) --query "currentKubernetesVersion")
268+ echo $k8sVersion
269+ curl -L https://dl.k8s.io/$k8sVersion/kubernetes-test-linux-amd64.tar.gz -o ./kubernetes-test-linux-amd64.tar.gz
270+
271+ # https://github.com/kubernetes/sig-release/blob/master/release-engineering/artifacts.md#content-of-kubernetes-test-system-archtargz-on-example-of-kubernetes-test-linux-amd64targz-directories-removed-from-list
272+ # explictly unzip and strip directories from ginkgo and e2e.test
273+ tar -xvzf kubernetes-test-linux-amd64.tar.gz --strip-components=3 kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
274+ fi
263275
264276 displayName : " Setup Environment"
265277
@@ -280,8 +292,13 @@ stages:
280292 echo $FQDN
281293
282294 runConformance () {
283- KUBERNETES_SERVICE_HOST="$FQDN" KUBERNETES_SERVICE_PORT=443 ./e2e.test --provider=local --ginkgo.focus="NetworkPolicy" --ginkgo.skip="SCTP" --kubeconfig=./kubeconfig
284- # there can't be a command after e2e.test because the exit code is important
295+ if [ $(PROFILE) == "v2-place-first" ]; then
296+ # 15 minute timeout for creating LoadBalancer with Azure-internal "external IPs"
297+ ./policy-assistant generate --noisy=true --job-timeout-seconds=2 --pod-creation-timeout-seconds 900 --server-protocol TCP,UDP --ignore-loopback --include special-services --exclude cni-brings-source-pod-info-to-other-node
298+ else
299+ KUBERNETES_SERVICE_HOST="$FQDN" KUBERNETES_SERVICE_PORT=443 ./e2e.test --provider=local --ginkgo.focus="NetworkPolicy" --ginkgo.skip="SCTP" --kubeconfig=./kubeconfig
300+ fi
301+ # there can't be a command after e2e.test/policy-assistant because the exit code is important
285302 }
286303
287304 runConformanceWindows () {
0 commit comments