Skip to content

Commit

Permalink
Merge pull request #54 from anurag-rajawat/deps-update
Browse files Browse the repository at this point in the history
chore(deps): Update 5GSEC/nimbus digest to 624660f in adapters
  • Loading branch information
anurag-rajawat authored Feb 8, 2024
2 parents 624660f + 48619b8 commit bffb456
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 50 deletions.
82 changes: 38 additions & 44 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,30 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Temporarily disabled, since adapters have dependency on nimbus and this PR contains changes
# for both nimbus and for adapters. Due to which this job is failing. Once the adapters dependency
# for nimbus updated in a subsequent PR this job will be enabled.

# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
#
# - name: Setup go
# uses: actions/setup-go@v4
# with:
# go-version: '1.20'
#
# - name: go fmt
# run: make fmt
#
# - name: Lint
# id: lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: v1.54
# args: --deadline=30m --out-format=line-number
# skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
#
# - name: Run unit tests
# run: make test
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: go fmt
run: make fmt

- name: Lint
id: lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: --deadline=30m --out-format=line-number
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778

- name: Run unit tests
run: make test

go-sec:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,19 +83,17 @@ jobs:
- name: Build image
run: make docker-build

# Same here.

# build-adapters-image:
# strategy:
# matrix:
# adapters: [ "nimbus-kubearmor", "nimbus-netpol" ]
# name: Build ${{ matrix.adapters }} adapter's image
# runs-on: ubuntu-latest
# timeout-minutes: 20
# steps:
# - name: Checkout source code
# uses: actions/checkout@v3
#
# - name: Build image
# working-directory: ./pkg/adapter/${{ matrix.adapters }}
# run: make docker-build
build-adapters-image:
strategy:
matrix:
adapters: [ "nimbus-kubearmor", "nimbus-netpol" ]
name: Build ${{ matrix.adapters }} adapter's image
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Build image
working-directory: ./pkg/adapter/${{ matrix.adapters }}
run: make docker-build
1 change: 1 addition & 0 deletions pkg/adapter/nimbus-kubearmor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN go mod download
COPY main.go main.go
COPY manager/ manager/
COPY processor/ processor/
COPY watcher/ watcher/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapter/nimbus-kubearmor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/5GSEC/nimbus/pkg/adapter/nimbus-kubearmor
go 1.21

require (
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768
github.com/go-logr/logr v1.4.1
github.com/kubearmor/KubeArmor/pkg/KubeArmorController v0.0.0-20240125171707-8e6641511fe3
k8s.io/apimachinery v0.29.1
Expand Down
2 changes: 2 additions & 0 deletions pkg/adapter/nimbus-kubearmor/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7 h1:adBGcrCAKeU7PLiz6m2c+3c8uuL5UPkHN5O6FHJQm7I=
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7/go.mod h1:VXo/w78XDmQEunuZYIsDyGDthCKealQR13X9OkY25D0=
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768 h1:v2fY3lWXydstfekQSHs9n0TpNnTteC7Iws3ojwGtFJk=
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768/go.mod h1:yw79m9f1+f3tBSZCMQKbNVKL39Q71FyGyoa8nClo1Hs=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
Expand Down
5 changes: 3 additions & 2 deletions pkg/adapter/nimbus-kubearmor/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (
intentv1 "github.com/5GSEC/nimbus/api/v1"
"github.com/5GSEC/nimbus/pkg/adapter/common"
"github.com/5GSEC/nimbus/pkg/adapter/k8s"
"github.com/5GSEC/nimbus/pkg/adapter/nimbus-kubearmor/processor"
kspwatcher "github.com/5GSEC/nimbus/pkg/adapter/nimbus-kubearmor/watcher"
adapterutil "github.com/5GSEC/nimbus/pkg/adapter/util"
globalwatcher "github.com/5GSEC/nimbus/pkg/adapter/watcher"

"github.com/5GSEC/nimbus/pkg/adapter/nimbus-kubearmor/processor"
kspwatcher "github.com/5GSEC/nimbus/pkg/adapter/nimbus-kubearmor/watcher"
)

var (
Expand Down
1 change: 1 addition & 0 deletions pkg/adapter/nimbus-netpol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN go mod download
COPY main.go main.go
COPY manager/ manager/
COPY processor/ processor/
COPY watcher/ watcher/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapter/nimbus-netpol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/5GSEC/nimbus/pkg/adapter/nimbus-netpol
go 1.21

require (
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768
github.com/go-logr/logr v1.4.1
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
Expand Down
2 changes: 2 additions & 0 deletions pkg/adapter/nimbus-netpol/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7 h1:adBGcrCAKeU7PLiz6m2c+3c8uuL5UPkHN5O6FHJQm7I=
github.com/5GSEC/nimbus v0.0.0-20240129090659-01178b5c28c7/go.mod h1:VXo/w78XDmQEunuZYIsDyGDthCKealQR13X9OkY25D0=
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768 h1:v2fY3lWXydstfekQSHs9n0TpNnTteC7Iws3ojwGtFJk=
github.com/5GSEC/nimbus v0.0.0-20240208070656-624660f34768/go.mod h1:yw79m9f1+f3tBSZCMQKbNVKL39Q71FyGyoa8nClo1Hs=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
Expand Down
5 changes: 3 additions & 2 deletions pkg/adapter/nimbus-netpol/manager/netpols_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (
intentv1 "github.com/5GSEC/nimbus/api/v1"
"github.com/5GSEC/nimbus/pkg/adapter/common"
"github.com/5GSEC/nimbus/pkg/adapter/k8s"
"github.com/5GSEC/nimbus/pkg/adapter/nimbus-netpol/processor"
netpolwatcher "github.com/5GSEC/nimbus/pkg/adapter/nimbus-netpol/watcher"
adapterutil "github.com/5GSEC/nimbus/pkg/adapter/util"
globalwatcher "github.com/5GSEC/nimbus/pkg/adapter/watcher"

"github.com/5GSEC/nimbus/pkg/adapter/nimbus-netpol/processor"
netpolwatcher "github.com/5GSEC/nimbus/pkg/adapter/nimbus-netpol/watcher"
)

var (
Expand Down

0 comments on commit bffb456

Please sign in to comment.