diff --git a/.github/workflows/cyclonus-netpol-test.yaml b/.github/workflows/cyclonus-netpol-test.yaml index 1bcef09ec5..5fce38aa16 100644 --- a/.github/workflows/cyclonus-netpol-test.yaml +++ b/.github/workflows/cyclonus-netpol-test.yaml @@ -8,6 +8,8 @@ on: pull_request: paths: - 'npm/**' + - 'github/**' + - 'test/**' schedule: # run once a day at midnight - cron: '0 0 * * *' @@ -19,22 +21,33 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Make NPM image - run: | - VERSION=cyclonus make azure-npm-image + - name: Setup Kind uses: engineerd/setup-kind@v0.5.0 with: - version: "v0.9.0" + version: "v0.11.1" config: ./test/kind/kind.yaml name: npm-kind + + - name: Check Kind + run: | + kubectl get po -owide -A + + - name: Make NPM image + run: | + VERSION=cyclonus make azure-npm-image - name: Install Azure NPM run: | sed -i 's/mcr.microsoft.com\/containernetworking\/azure-npm:v1.3.1/acnpublic.azurecr.io\/azure-npm:cyclonus/' ./npm/azure-npm.yaml kind load docker-image acnpublic.azurecr.io/azure-npm:cyclonus --name npm-kind kubectl apply -f ./npm/azure-npm.yaml + + - name: Check Kind after installation + run: | + sleep 10 + kubectl get po -owide -A - name: Run Cyclonus network policy test run: make test-cyclonus @@ -53,4 +66,3 @@ jobs: path: | ./npm-logs.txt ./cyclonus-test.txt - diff --git a/npm/azure-npm.yaml b/npm/azure-npm.yaml index d273cdaadf..10f5e5dbac 100644 --- a/npm/azure-npm.yaml +++ b/npm/azure-npm.yaml @@ -80,7 +80,7 @@ spec: containers: - name: azure-npm - image: mcr.microsoft.com/containernetworking/azure-npm:v1.3.1 + image: mcr.microsoft.com/containernetworking/azure-npm:v1.4.1 resources: limits: cpu: 250m diff --git a/test/cyclonus/install-cyclonus.yaml b/test/cyclonus/install-cyclonus.yaml index c21928b1b1..44b3f19b5f 100644 --- a/test/cyclonus/install-cyclonus.yaml +++ b/test/cyclonus/install-cyclonus.yaml @@ -17,12 +17,11 @@ spec: - --ignore-loopback=true - --cleanup-namespaces=true - --perturbation-wait-seconds=5 - - --pod-creation-timeout-seconds=20 + - --pod-creation-timeout-seconds=30 - --job-timeout-seconds=2 - --server-protocol=TCP,UDP - --server-port=80 name: cyclonus imagePullPolicy: IfNotPresent - image: mfenwick100/cyclonus:v0.4.4 + image: mfenwick100/cyclonus:v0.4.7 serviceAccount: cyclonus - \ No newline at end of file diff --git a/test/cyclonus/test-cyclonus.sh b/test/cyclonus/test-cyclonus.sh index 5ce106edf6..114fc1ca7f 100755 --- a/test/cyclonus/test-cyclonus.sh +++ b/test/cyclonus/test-cyclonus.sh @@ -15,7 +15,9 @@ kubectl create clusterrolebinding cyclonus --clusterrole=cluster-admin --service kubectl create sa cyclonus -n kube-system kubectl create -f ./install-cyclonus.yaml -time kubectl wait --for=condition=ready --timeout=1m pod -n kube-system -l job-name=cyclonus +sleep 5 + +time kubectl wait --for=condition=ready --timeout=5m pod -n kube-system -l job-name=cyclonus #!/bin/bash { kubectl logs -f -n kube-system job.batch/cyclonus; } & diff --git a/test/kind/kind.yaml b/test/kind/kind.yaml index 0c323fd4c6..217d01d2a7 100644 --- a/test/kind/kind.yaml +++ b/test/kind/kind.yaml @@ -2,11 +2,11 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.19.1 + image: kindest/node:v1.20.7 - role: worker - image: kindest/node:v1.19.1 + image: kindest/node:v1.20.7 - role: worker - image: kindest/node:v1.19.1 + image: kindest/node:v1.20.7 networking: ipFamily: ipv4 podSubnet: "10.10.0.0/16"