From 004e603398aafb3ada305daf03cffa359bfc9fe0 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 2 Jul 2021 11:16:02 -0700 Subject: [PATCH 1/3] bump cyclonus version --- .github/workflows/cyclonus-netpol-test.yaml | 3 ++- test/cyclonus/install-cyclonus.yaml | 5 ++--- test/cyclonus/test-cyclonus.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cyclonus-netpol-test.yaml b/.github/workflows/cyclonus-netpol-test.yaml index 1bcef09ec5..a9a4a75d66 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 * * *' @@ -53,4 +55,3 @@ jobs: path: | ./npm-logs.txt ./cyclonus-test.txt - 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..0e836a0914 100755 --- a/test/cyclonus/test-cyclonus.sh +++ b/test/cyclonus/test-cyclonus.sh @@ -15,7 +15,7 @@ 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 +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; } & From 5e729b20d4103a3e25190bdbdda67760e4290b6d Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 2 Jul 2021 11:55:39 -0700 Subject: [PATCH 2/3] pod --- .github/workflows/cyclonus-netpol-test.yaml | 19 +++++++++++++++---- npm/azure-npm.yaml | 2 +- test/cyclonus/test-cyclonus.sh | 2 ++ test/kind/kind.yaml | 6 +++--- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cyclonus-netpol-test.yaml b/.github/workflows/cyclonus-netpol-test.yaml index a9a4a75d66..5fce38aa16 100644 --- a/.github/workflows/cyclonus-netpol-test.yaml +++ b/.github/workflows/cyclonus-netpol-test.yaml @@ -21,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 diff --git a/npm/azure-npm.yaml b/npm/azure-npm.yaml index d273cdaadf..c5919f59a7 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: acnpublic.azurecr.io/azure-npm:cyclonus resources: limits: cpu: 250m diff --git a/test/cyclonus/test-cyclonus.sh b/test/cyclonus/test-cyclonus.sh index 0e836a0914..114fc1ca7f 100755 --- a/test/cyclonus/test-cyclonus.sh +++ b/test/cyclonus/test-cyclonus.sh @@ -15,6 +15,8 @@ kubectl create clusterrolebinding cyclonus --clusterrole=cluster-admin --service kubectl create sa cyclonus -n kube-system kubectl create -f ./install-cyclonus.yaml +sleep 5 + time kubectl wait --for=condition=ready --timeout=5m pod -n kube-system -l job-name=cyclonus #!/bin/bash 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" From 5141ce3decc170f7e915ac11ced3118c8f03457b Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 6 Jul 2021 10:14:31 -0700 Subject: [PATCH 3/3] revert npm change --- npm/azure-npm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/azure-npm.yaml b/npm/azure-npm.yaml index c5919f59a7..10f5e5dbac 100644 --- a/npm/azure-npm.yaml +++ b/npm/azure-npm.yaml @@ -80,7 +80,7 @@ spec: containers: - name: azure-npm - image: acnpublic.azurecr.io/azure-npm:cyclonus + image: mcr.microsoft.com/containernetworking/azure-npm:v1.4.1 resources: limits: cpu: 250m