Skip to content

Commit

Permalink
upgrade go version to 1.23.6
Browse files Browse the repository at this point in the history
Signed-off-by: Manik2708 <[email protected]>
  • Loading branch information
Manik2708 committed Feb 10, 2025
1 parent 3034561 commit 7e3be1b
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 32 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci-multiubuntu-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci-latest-multiubuntu-release

on:
push:
branches: [main]
paths: ["examples/multiubuntu/build/**"]

permissions: read-all

env:
PLATFORM: linux/amd64,linux/arm64/v8

jobs:
multiubuntu-release:
name: Build & Push KubeArmor Operator
if: github.repository == 'kubearmor/kubearmor'
runs-on: ubuntu-20.04
permissions:
id-token: write
timeout-minutes: 90
steps:
- 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: linux/amd64,linux/arm64/v8

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTHTOK }}

- name: Build and push multi-architecture image
uses: docker/build-push-action@v6
with:
context: examples/multiubuntu/build
file: examples/multiubuntu/build/Dockerfile
push: true
tags: kubearmor/ubuntu-w-utils:latest
platforms: linux/amd64,linux/arm64/v8

- name: Logout from Docker Hub
run: docker logout
21 changes: 21 additions & 0 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- ".github/workflows/ci-test-ginkgo.yml"
- "pkg/KubeArmorOperator/**"
- "deployments/helm/**"
- "examples/multiubuntu/build/**"
pull_request:
branches: [main]
paths:
Expand Down Expand Up @@ -51,6 +52,8 @@ jobs:
filters: |
controller:
- 'pkg/KubeArmorController/**'
multiubuntu:
- 'examples/multiubuntu/build/**'
- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand All @@ -76,12 +79,23 @@ jobs:
if: steps.filter.outputs.controller == 'true'
run: make -C pkg/KubeArmorController/ docker-build TAG=latest

- name: Build multiubuntu docker image
working-directory: examples/multiubuntu/build
if: steps.filter.outputs.multiubuntu == 'true'
run: docker build -t kubearmor/ubuntu-w-utils:latest .

- name: deploy pre existing pod
run: |
kubectl apply -f ./tests/k8s_env/ksp/pre-run-pod.yaml
sleep 60
kubectl get pods -A
- name: make changes in multiubuntu-deployment
working-directory: tests/k8s_env
if: steps.filter.outputs.multiubuntu == 'true'
run: |
grep -rl "kubearmor/ubuntu-w-utils:latest" ./ | while read -r file; do sed -i 's/imagePullPolicy: Always/imagePullPolicy: Never/g' "$file"; done
- name: Run KubeArmor
timeout-minutes: 7
run: |
Expand All @@ -94,6 +108,9 @@ jobs:
if [[ ${{ steps.filter.outputs.controller }} == 'true' ]]; then
docker save kubearmor/kubearmor-controller:latest | sudo k3s ctr images import -
fi
if [[ ${{ steps.filter.outputs.multiubuntu }} == 'true' ]]; then
docker save kubearmor/ubuntu-w-utils:latest | sudo k3s ctr images import -
fi
else
if [ ${{ matrix.runtime }} == "crio" ]; then
docker save kubearmor/kubearmor-test-init:latest | sudo podman load
Expand All @@ -108,6 +125,10 @@ jobs:
docker save kubearmor/kubearmor-controller:latest | sudo podman load
sudo podman tag localhost/latest:latest docker.io/kubearmor/kubearmor-controller:latest
fi
if [ ${{ steps.filter.outputs.multiubuntu }} == 'true' ]; then
docker save kubearmor/ubuntu-w-utils:latest | sudo podman load
sudo podman tag localhost/latest:latest docker.io/kubearmor/ubuntu-w-utils:latest
fi
fi
fi
docker system prune -a -f
Expand Down
2 changes: 1 addition & 1 deletion KubeArmor/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/KubeArmor

go 1.23.5
go 1.23.6

replace (
github.com/kubearmor/KubeArmor => ../../
Expand Down
2 changes: 1 addition & 1 deletion deployments/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/deployments

go 1.23.5
go 1.23.6

replace (
github.com/kubearmor/KubeArmor => ../
Expand Down
2 changes: 1 addition & 1 deletion pkg/KubeArmorController/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/pkg/KubeArmorController

go 1.23.5
go 1.23.6

require (
github.com/go-logr/logr v1.4.2
Expand Down
2 changes: 1 addition & 1 deletion pkg/KubeArmorOperator/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/pkg/KubeArmorOperator

go 1.23.5
go 1.23.6

replace (
github.com/kubearmor/KubeArmor/KubeArmor => ../../KubeArmor
Expand Down
2 changes: 1 addition & 1 deletion protobuf/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/protobuf

go 1.23.5
go 1.23.6

replace (
github.com/kubearmor/KubeArmor => ../
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/KubeArmor/tests

go 1.23.5
go 1.23.6

replace (
github.com/kubearmor/KubeArmor/pkg/KubeArmorController => ../pkg/KubeArmorController
Expand Down
16 changes: 9 additions & 7 deletions tests/k8s_env/configmap/manifests/ubuntu-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ spec:
container: unannotated
spec:
containers:
- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:0.1
- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
---
apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -50,8 +51,9 @@ spec:
container: partialyannotated
spec:
containers:
- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:0.1
- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
---
apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -81,6 +83,6 @@ spec:
container: fullyannotated
spec:
containers:
- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:0.1

- name: ubuntu-1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
21 changes: 13 additions & 8 deletions tests/k8s_env/ksp/multiubuntu/multiubuntu-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ spec:
spec:
containers:
- name: ubuntu-1-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
capabilities:
add: ["AUDIT_WRITE", "NET_RAW","SYS_CHROOT","MKNOD","SETFCAP"]
Expand All @@ -50,7 +51,8 @@ spec:
spec:
containers:
- name: ubuntu-2-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
capabilities:
add: ["AUDIT_WRITE", "NET_RAW","SYS_CHROOT","MKNOD","SETFCAP"]
Expand All @@ -76,7 +78,8 @@ spec:
spec:
containers:
- name: ubuntu-3-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
volumeMounts:
- name: var-log-path
mountPath: /host/var/log
Expand Down Expand Up @@ -106,11 +109,12 @@ spec:
metadata:
labels:
group: group-2
container: ubuntu-4
container: ubuntu-4
spec:
containers:
- name: ubuntu-4-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
capabilities:
add: ["AUDIT_WRITE", "NET_RAW","SYS_CHROOT","MKNOD","SETFCAP"]
Expand All @@ -132,11 +136,12 @@ spec:
metadata:
labels:
group: group-2
container: ubuntu-5
container: ubuntu-5
spec:
containers:
- name: ubuntu-5-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
capabilities:
add: ["AUDIT_WRITE", "NET_RAW","SYS_CHROOT","MKNOD","SETFCAP"]
add: ["AUDIT_WRITE", "NET_RAW","SYS_CHROOT","MKNOD","SETFCAP"]
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ spec:
container: ubuntu-1
spec:
containers:
- name: ubuntu-1-container
image: kubearmor/ubuntu-w-utils:0.1
- name: ubuntu-1-container
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ spec:
container: multicontainer
spec:
containers:
- name: container-1
image: kubearmor/ubuntu-w-utils:0.1
- name: container-2
image: kubearmor/ubuntu-w-utils:0.1
- name: container-1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
- name: container-2
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
3 changes: 2 additions & 1 deletion tests/k8s_env/privileged/manifests/caps-all-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spec:
spec:
containers:
- name: caps-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
capabilities:
add: [ "ALL" ]
7 changes: 5 additions & 2 deletions tests/k8s_env/privileged/manifests/privileged-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

apiVersion: v1
kind: Namespace
metadata:
Expand All @@ -22,8 +23,10 @@ spec:
spec:
containers:
- name: priv-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
securityContext:
privileged: true
- name: unpriv-container
image: kubearmor/ubuntu-w-utils:0.1
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always
5 changes: 3 additions & 2 deletions tests/k8s_env/syscalls/manifests/ubuntu-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ spec:
container: ubuntu-1
spec:
containers:
- name: ubuntu-1-container
image: kubearmor/ubuntu-w-utils:0.1
- name: ubuntu-1-container
image: kubearmor/ubuntu-w-utils:latest
imagePullPolicy: Always

0 comments on commit 7e3be1b

Please sign in to comment.