-
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.
Merge pull request #1273 from DelusionalOptimist/flakey-test-quickfix
fix(tests): Migrate from manifests to helm in CI tests
- Loading branch information
Showing
40 changed files
with
6,620 additions
and
5,998 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.