diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 64e697d63fdb9eff86a9e3f81637800d81e95666..d011bbb835d57cbf1fb8a35f703a45b4eec03331 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -10,12 +10,15 @@ jobs: test: name: test runs-on: ubuntu-latest + strategy: + matrix: + go: ['1.18','1.19'] steps: - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: ${{ matrix.go }} - name: Install make run: sudo apt -y install make - name: Run verification and tests diff --git a/.github/workflows/pull_request_e2e.yml b/.github/workflows/pull_request_e2e.yml index 2243738af6454f45d4ba29f7a7ba5a31846b3fb0..d42a12a9bb4643e6db59c6297168176e58f89cc1 100644 --- a/.github/workflows/pull_request_e2e.yml +++ b/.github/workflows/pull_request_e2e.yml @@ -17,7 +17,7 @@ jobs: - name: set up go 1.x uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: checkout uses: actions/checkout@v3 - name: run end-to-end tests diff --git a/.github/workflows/push_image.yml b/.github/workflows/push_image.yml index a2e4f729037d385fc4cfb1c76e085e983b769258..72eff44bd22b48e2a7d1b111c5f6bf3bbd285bff 100644 --- a/.github/workflows/push_image.yml +++ b/.github/workflows/push_image.yml @@ -14,10 +14,10 @@ env: jobs: push-image: name: push image - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: - go: ['1.18'] + go: ['1.19'] steps: - name: install make run: sudo apt-get install make diff --git a/.github/workflows/push_image_pr.yml b/.github/workflows/push_image_pr.yml index 1542a529da2dc84b370df42dad95961823928381..a7e44de1b28593851e25ca9765b768ce52803785 100644 --- a/.github/workflows/push_image_pr.yml +++ b/.github/workflows/push_image_pr.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ['1.18'] + go: ['1.19'] steps: - name: install make run: sudo apt-get install make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59f6b717dce76158793e32effbbf1934adde0dda..7ad5373f1009b4b57558aefa6028fd9a12c47d07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - go: ['1.18'] + go: ['1.19'] steps: - name: checkout uses: actions/checkout@v3 diff --git a/.golangci.yml b/.golangci.yml index b75c21b7bd0b978865e872972de6f083088fe548..6f8b98977879ab757c124eba33f4c2258014dad7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,7 +21,7 @@ linters: - varcheck linters-settings: stylecheck: - go: "1.18" + go: "1.19" gocritic: enabled-checks: - hugeParam diff --git a/Dockerfile b/Dockerfile index ae57888e59bdada7f1ab1ced3435a50c79b0bb5a..1fa4974b4e168f632e457793b874b73dabf77caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi9/go-toolset:1.18.4 as builder +FROM docker.io/library/golang:1.19 as builder ARG SW_VERSION="unknown" -ARG GOVERSION="1.18.4" WORKDIR /opt/app-root @@ -20,7 +19,7 @@ COPY Makefile Makefile RUN make compile # Create final image from minimal + built binary -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.1.0 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.1 WORKDIR / COPY --from=builder /opt/app-root/bin/netobserv-ebpf-agent . USER 65532:65532 diff --git a/e2e/cluster/kind.go b/e2e/cluster/kind.go index b2e27a842c39673aa4a0bd501021541645379d81..3b48168380faf701a053331a3910ce2cf506fe2d 100644 --- a/e2e/cluster/kind.go +++ b/e2e/cluster/kind.go @@ -11,7 +11,7 @@ import ( "errors" "fmt" "io" - "io/ioutil" + "os" "path" "sort" "testing" @@ -264,7 +264,7 @@ func deployManifestFile(definition Deployment, ) error { log.WithField("file", definition.ManifestFile).Info("deploying manifest file") - b, err := ioutil.ReadFile(definition.ManifestFile) + b, err := os.ReadFile(definition.ManifestFile) if err != nil { return fmt.Errorf("reading manifest file %q: %w", definition.ManifestFile, err) } diff --git a/e2e/cluster/tester/loki.go b/e2e/cluster/tester/loki.go index 00ffaf034cd830ad2679ba7e9de8ee590088f0e4..4c7f2b2a8a8b1c3c10c4cc87ec3ee391385fa685 100644 --- a/e2e/cluster/tester/loki.go +++ b/e2e/cluster/tester/loki.go @@ -3,7 +3,7 @@ package tester import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" @@ -33,7 +33,7 @@ func (l *Loki) get(pathQuery string) (status int, body string, err error) { if err != nil { return 0, "", err } - bodyBytes, err := ioutil.ReadAll(resp.Body) + bodyBytes, err := io.ReadAll(resp.Body) if err != nil { return resp.StatusCode, "", err } diff --git a/pkg/agent/tls.go b/pkg/agent/tls.go index 24af3d8f4eb267330153930bc50bc7da0b2735c6..3430eb70806f36f2e62a8a6e71a9caebd8d2c343 100644 --- a/pkg/agent/tls.go +++ b/pkg/agent/tls.go @@ -3,7 +3,7 @@ package agent import ( "crypto/tls" "crypto/x509" - "io/ioutil" + "os" ) func buildTLSConfig(cfg *Config) (*tls.Config, error) { @@ -11,7 +11,7 @@ func buildTLSConfig(cfg *Config) (*tls.Config, error) { InsecureSkipVerify: cfg.KafkaTLSInsecureSkipVerify, } if cfg.KafkaTLSCACertPath != "" { - caCert, err := ioutil.ReadFile(cfg.KafkaTLSCACertPath) + caCert, err := os.ReadFile(cfg.KafkaTLSCACertPath) if err != nil { return nil, err } @@ -19,11 +19,11 @@ func buildTLSConfig(cfg *Config) (*tls.Config, error) { tlsConfig.RootCAs.AppendCertsFromPEM(caCert) if cfg.KafkaTLSUserCertPath != "" && cfg.KafkaTLSUserKeyPath != "" { - userCert, err := ioutil.ReadFile(cfg.KafkaTLSUserCertPath) + userCert, err := os.ReadFile(cfg.KafkaTLSUserCertPath) if err != nil { return nil, err } - userKey, err := ioutil.ReadFile(cfg.KafkaTLSUserKeyPath) + userKey, err := os.ReadFile(cfg.KafkaTLSUserKeyPath) if err != nil { return nil, err }