Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
pull_request:
paths:
- 'npm/**'
- 'github/**'
- 'test/**'
schedule:
# run once a day at midnight
- cron: '0 0 * * *'
Expand All @@ -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
Expand All @@ -53,4 +66,3 @@ jobs:
path: |
./npm-logs.txt
./cyclonus-test.txt

2 changes: 1 addition & 1 deletion npm/azure-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions test/cyclonus/install-cyclonus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 3 additions & 1 deletion test/cyclonus/test-cyclonus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; } &
Expand Down
6 changes: 3 additions & 3 deletions test/kind/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down