Skip to content

Commit

Permalink
Merge pull request #1663 from VedRatan/latest_go
Browse files Browse the repository at this point in the history
updated go version to 1.21.8
  • Loading branch information
daemon1024 authored Mar 7, 2024
2 parents 0cb094a + 461b013 commit c3607df
Show file tree
Hide file tree
Showing 29 changed files with 87 additions and 72 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down Expand Up @@ -217,11 +217,11 @@ jobs:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 60
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.21"

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-operator-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
id-token: write
timeout-minutes: 90
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.21"

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-systemd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
env:
RUNTIME: "containerd"
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.21"

- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Check what paths were updated
uses: dorny/paths-filter@v2
id: filter
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Check gofmt
run: make gofmt
Expand All @@ -40,9 +40,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Run Revive Action on KubeArmor
uses: morphy2k/revive-action@v2
Expand All @@ -54,9 +54,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Run Revive Action on KubeArmor tests
uses: morphy2k/revive-action@v2
Expand All @@ -68,9 +68,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Run Gosec Security Scanner
run: make gosec
Expand All @@ -81,9 +81,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.20"
go-version-file: 'KubeArmor/go.mod'

- name: Run govulncheck
run: make scan
Expand All @@ -94,9 +94,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Run go test on the KubeArmor/KubeArmor directory
run: go test ./...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-helm-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- uses: azure/setup-helm@v3
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci-test-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/setup-go@v3
with:
go-version: v1.21

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
# working-directory only takes effect for "run"
go-version-file: 'KubeArmor/go.mod'

- name: Build kubearmor operator
run: make docker-build TAG=latest
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-ubi-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.21"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ vmlinux.h

# gingko test tmp file
**/*.test

#ignore go.work
go.work
go.work.sum
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Builder

FROM golang:1.21-alpine3.17 as builder
FROM golang:1.22-alpine3.19 as builder

RUN apk --no-cache update
RUN apk add --no-cache git clang llvm make gcc protobuf
Expand Down
4 changes: 3 additions & 1 deletion KubeArmor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/kubearmor/KubeArmor/KubeArmor

go 1.21

toolchain go1.21.8

replace (
github.com/kubearmor/KubeArmor => ../../
github.com/kubearmor/KubeArmor/KubeArmor => ../
Expand Down Expand Up @@ -38,7 +40,7 @@ require (
golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e
golang.org/x/sys v0.16.0
google.golang.org/grpc v1.61.0
google.golang.org/protobuf v1.32.0
google.golang.org/protobuf v1.33.0
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
Expand Down
8 changes: 4 additions & 4 deletions KubeArmor/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
Expand Down Expand Up @@ -367,8 +367,8 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
2 changes: 2 additions & 0 deletions deployments/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/kubearmor/KubeArmor/deployments

go 1.21

toolchain go1.21.8

replace (
github.com/kubearmor/KubeArmor => ../
github.com/kubearmor/KubeArmor/KubeArmor => ../KubeArmor
Expand Down
4 changes: 2 additions & 2 deletions pkg/KubeArmorController/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2022 Authors of KubeArmor

# Build the manager binary
FROM golang:1.21 as builder
FROM golang:1.22 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down Expand Up @@ -44,4 +44,4 @@ COPY --from=builder --chown=default:default /workspace/manager .
COPY LICENSE /licenses/license.txt

USER 1000
ENTRYPOINT ["/manager"]
ENTRYPOINT ["/manager"]
2 changes: 1 addition & 1 deletion pkg/KubeArmorController/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ uninstall-crd: manifests kustomize ## Uninstall CRDs from the K8s cluster specif
CONTROLLER_GEN = $(GOBIN)/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)

KUSTOMIZE = /usr/local/bin/kustomize
.PHONY: kustomize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.14.0
creationTimestamp: null
name: kubearmorhostpolicies.security.kubearmor.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.14.0
creationTimestamp: null
name: kubearmorpolicies.security.kubearmor.com
spec:
Expand Down
2 changes: 1 addition & 1 deletion pkg/KubeArmorController/crd/KubeArmorPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.14.0
creationTimestamp: null
name: kubearmorpolicies.security.kubearmor.com
spec:
Expand Down
6 changes: 4 additions & 2 deletions pkg/KubeArmorController/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ module github.com/kubearmor/KubeArmor/pkg/KubeArmorController

go 1.21

toolchain go1.21.8

require (
github.com/go-logr/logr v1.4.1
github.com/onsi/ginkgo/v2 v2.13.0
github.com/onsi/gomega v1.29.0
github.com/onsi/gomega v1.30.0
k8s.io/api v0.29.0
k8s.io/apiextensions-apiserver v0.29.0
k8s.io/apimachinery v0.29.0
Expand Down Expand Up @@ -57,7 +59,7 @@ require (
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/tools v0.16.1 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
Expand Down
10 changes: 4 additions & 6 deletions pkg/KubeArmorController/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down Expand Up @@ -114,8 +114,6 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -157,8 +155,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
Loading

0 comments on commit c3607df

Please sign in to comment.