Skip to content

Commit

Permalink
Merge pull request #1 from PrimalPimmy/CI
Browse files Browse the repository at this point in the history
Ci
  • Loading branch information
PrimalPimmy authored Feb 15, 2024
2 parents 291c2b6 + 92cf012 commit cb5f306
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,35 @@ jobs:
else
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
fi
RUNTIME=docker ./contribution/k3s/install_k3s.sh
RUNTIME=containerd ./contribution/k3s/install_k3s.sh
- name: Generate KubeArmor artifacts
run: GITHUB_SHA=$GITHUB_SHA ./KubeArmor/build/build_kubearmor.sh ${{ steps.vars.outputs.tag }}

- name: Deploy KubeArmor into Kubernetes
- name: Build Kubearmor-Operator
working-directory: pkg/KubeArmorOperator
run: |
helm upgrade --install kubearmor ./deployments/helm/KubeArmor \
--values ./KubeArmor/build/kubearmor-helm-test-values.yaml \
--set kubearmor.image.tag=${{ steps.vars.outputs.tag }} \
--set kubearmorInit.image.tag=${{ steps.vars.outputs.tag }} \
-n kubearmor --create-namespace;
make docker-buildx TAG=${{ steps.tag.outputs.tag }}
kubectl wait --for=condition=ready --timeout=5m -n kubearmor pod -l kubearmor-app
- name: deploy pre existing pod
run: |
kubectl apply -f ./tests/k8s_env/ksp/pre-run-pod.yaml
sleep 60
kubectl get pods -A
- name: Run KubeArmor
run: |
docker save kubearmor/kubearmor-init:${{ steps.vars.outputs.tag }} | sudo k3s ctr images import -
docker save kubearmor/kubearmor:${{ steps.vars.outputs.tag }} | sudo k3s ctr images import -
docker save kubearmor/kubearmor-operator:${{ steps.vars.outputs.tag }} | sudo k3s ctr images import -
docker save kubearmor/kubearmor-snitch:${{ steps.vars.outputs.tag }} | sudo k3s ctr images import -
helm upgrade --install kubearmor-operator ./deployments/helm/KubeArmorOperator -n kubearmor --create-namespace
kubectl wait --for=condition=ready --timeout=5m -n kubearmor pod -l kubearmor-app=kubearmor-operator
kubectl get pods -A
kubectl apply -f pkg/KubeArmorOperator/config/samples/kubearmor-test.yaml
kubectl wait -n kubearmor --timeout=5m --for=jsonpath='{.status.phase}'=Running kubearmorconfigs/kubearmorconfig-test
kubectl wait --timeout=5m --for=condition=ready pod -l kubearmor-app,kubearmor-app!=kubearmor-snitch -n kubearmor
kubectl get pods -A
- name: Test KubeArmor using Ginkgo
Expand Down
4 changes: 2 additions & 2 deletions KubeArmor/monitor/systemMonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func (mon *SystemMonitor) TraceSyscall() {

now := time.Now()
if now.After(time.Unix(int64(ctx.Ts), 0).Add(10 * time.Second)) {
mon.Logger.Warn("Event dropped due to replay timeout")
mon.Logger.Debug("Event dropped due to replay timeout")
continue
}

Expand All @@ -644,7 +644,7 @@ func (mon *SystemMonitor) TraceSyscall() {
}

}
mon.Logger.Warn("Event dropped due to replay timeout")
mon.Logger.Debug("Event dropped due to replay timeout")
}()
}
}()
Expand Down

0 comments on commit cb5f306

Please sign in to comment.