-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Achref ben saad <achref@accuknox.com>
- Loading branch information
1 parent
1a6fbf4
commit 3af0dc5
Showing
8 changed files
with
200 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# These object files are compiled at runtime in init container | ||
**/BPF/*.o | ||
Dockerfile |
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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: ci-test-controllers | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "pkg/**" | ||
|
||
env: | ||
PLATFORM: linux/amd64,linux/arm64/v8 | ||
|
||
jobs: | ||
check: | ||
name: Check what controllers were updated | ||
if: github.repository == 'kubearmor/kubearmor' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
outputs: | ||
annotation: ${{ steps.filter.outputs.annotation }} | ||
hostpolicy: ${{ steps.filter.outputs.hostpolicy }} | ||
policy: ${{ steps.filter.outputs.policy }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
annotation: | ||
- 'pkg/KubeArmorAnnotation/**' | ||
hostpolicy: | ||
- 'pkg/KubeArmorHostPolicy/**' | ||
policy: | ||
- 'pkg/KubeArmorPolicy/**' | ||
annotation-controller-release: | ||
name: Build annotation controller | ||
needs: check | ||
defaults: | ||
run: | ||
working-directory: ./pkg/KubeArmorAnnotation | ||
if: needs.check.outputs.annotation == 'true' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: v1.18 | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
platforms: $PLATFORM | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_AUTHTOK }} | ||
|
||
- name: Build & Push annotation controller | ||
run: PLATFORM=$PLATFORM make docker-buildx TAG=latest | ||
|
||
hostpolicy-controller-release: | ||
name: Build hostpolicy controller | ||
needs: check | ||
defaults: | ||
run: | ||
working-directory: ./pkg/KubeArmorHostPolicy | ||
if: needs.check.outputs.hostpolicy == 'true' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: v1.18 | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
platforms: $PLATFORM | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_AUTHTOK }} | ||
|
||
- name: Build & Push hostpolicy controller | ||
run: PLATFORM=$PLATFORM make docker-buildx TAG=latest | ||
|
||
policy-controller-release: | ||
name: Build policy controller | ||
needs: check | ||
defaults: | ||
run: | ||
working-directory: ./pkg/KubeArmorPolicy | ||
if: needs.check.outputs.policy == 'true' | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: v1.18 | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
platforms: $PLATFORM | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_AUTHTOK }} | ||
|
||
- name: Build & Push policy controller | ||
run: PLATFORM=$PLATFORM make docker-buildx TAG=latest |
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
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
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