-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- move CI installation method to helm - cleanup deployments after each suite - increase ginkgo verbosity to find out why each test flakes - move some syscall test to syscalls suite from ksp Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
- Loading branch information
1 parent
46513d5
commit a539248
Showing
21 changed files
with
248 additions
and
1,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,61 @@ | ||
name: ci-test-controllers | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "pkg/**" | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "pkg/**" | ||
- ".github/workflows/ci-test-controllers.yml" | ||
|
||
jobs: | ||
kubearmor-controller-build: | ||
name: Build and Deploy KubeArmorController | ||
defaults: | ||
run: | ||
working-directory: ./pkg/KubeArmorController | ||
kubearmor-controller-test: | ||
name: Build and Test KubeArmorController Using Ginkgo | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "v1.20" | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup a Kubernetes environment | ||
run: ./.github/workflows/install-k3s.sh | ||
|
||
- name: Build KubeArmorController | ||
run: make docker-build TAG=latest | ||
run: make -C pkg/KubeArmorController/ docker-build TAG=latest | ||
|
||
- name: Install KubeArmor Latest and KubeArmorController using Helm | ||
run: | | ||
# install kubearmor latest and controller built in this PR | ||
helm upgrade --install kubearmor ./deployments/helm \ | ||
--values ./KubeArmor/build/kubearmor-helm-test-values.yaml \ | ||
--set kubearmorController.imagePullPolicy=Never \ | ||
--set kubearmor.imagePullPolicy=Always \ | ||
--set kubearmor.image.tag=latest \ | ||
-n kube-system; | ||
kubectl wait --for=condition=ready --timeout=5m -n kube-system pod -l kubearmor-app | ||
kubectl get pods -A | ||
- name: Test KubeArmor using Ginkgo | ||
run: | | ||
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo | ||
make -C tests/ | ||
timeout-minutes: 20 | ||
|
||
- name: Get karmor sysdump | ||
if: ${{ failure() }} | ||
run: | | ||
kubectl describe pod -n kube-system -l kubearmor-app=kubearmor | ||
curl -sfL http://get.kubearmor.io/ | sudo sh -s -- -b /usr/local/bin | ||
mkdir -p /tmp/kubearmor/ && cd /tmp/kubearmor && karmor sysdump | ||
- name: Archive log artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kubearmor.logs | ||
path: | | ||
/tmp/kubearmor/ | ||
/tmp/kubearmor.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.