Skip to content

Commit

Permalink
Merge pull request #11 from Aryan-sharma11/releasev0.5
Browse files Browse the repository at this point in the history
add object file for sys_monitor to archive
  • Loading branch information
Aryan-sharma11 authored Apr 5, 2024
2 parents 94f2ab6 + aff03d7 commit 1e26b01
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
6 changes: 3 additions & 3 deletions KubeArmor/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ nfpms:
postinstall: packaging/post-install.sh
overrides:
deb:
dependencies:
recommends:
- make
- libelf-dev
- clang
- llvm
- linux-headers-generic
rpm:
dependencies:
recommends:
- make
- elfutils-libelf-devel
- clang
- llvm
- kernel-devel
- policycoreutils-devel
- setools-console
- setools-console
23 changes: 15 additions & 8 deletions KubeArmor/packaging/post-install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@

set -e

# compile BPF programs
make -C /opt/kubearmor/BPF/
if [ ! -e "/sys/kernel/btf/vmlinux" ]; then
# compile BPF programs
make -C /opt/kubearmor/BPF/
fi

# update karmor SELinux module if BPFLSM is not present
lsm_file="/sys/kernel/security/lsm"
bpf="bpf"
if ! grep -q "$bpf" "$lsm_file"; then
if [ -x "$(command -v semanage)" ]; then
# old karmor SELinux module
/opt/kubearmor/templates/uninstall.sh

# update karmor SELinux module
if [ -x "$(command -v semanage)" ]; then
# old karmor SELinux module
/opt/kubearmor/templates/uninstall.sh
# new karmor SELinux module
/opt/kubearmor/templates/install.sh

# new karmor SELinux module
/opt/kubearmor/templates/install.sh
fi
fi

# start kubearmor.service
Expand Down
7 changes: 3 additions & 4 deletions getting-started/kubearmor_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ The recipe installs `kubearmor` as systemd process and `karmor` cli tool to mana
1. Download the [latest release](https://github.com/kubearmor/KubeArmor/releases) or KubeArmor.
2. Install KubeArmor (VER is the kubearmor release version)
```
sudo apt install ./kubearmor_${VER}_linux-amd64.deb
sudo apt --no-install-recommends install ./kubearmor_${VER}_linux-amd64.deb
```

> Note that the above automatically installs `bpfcc-tools` with our package, but your distribution might have an older version of BCC. In case of errors, consider installing `bcc` from [source](https://github.com/iovisor/bcc/blob/master/INSTALL.md#source).
> Note that the above command doesn't installs the recommended packages, as we ship object files along with the package file. In case you don't have BTF, consider removing `--no-install-recommends` flag.
<details><summary>For distributions other than Ubuntu/Debian</summary>
<p>

Expand Down

0 comments on commit 1e26b01

Please sign in to comment.