diff --git a/.github/workflows/master-workflow.yaml b/.github/workflows/master-workflow.yaml index 617d42d..15fa8f3 100644 --- a/.github/workflows/master-workflow.yaml +++ b/.github/workflows/master-workflow.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: '1.14.7' + go-version: '1.17.0' - uses: actions/checkout@v2 diff --git a/.github/workflows/tag-workflow.yaml b/.github/workflows/tag-workflow.yaml index a2a0678..511c808 100644 --- a/.github/workflows/tag-workflow.yaml +++ b/.github/workflows/tag-workflow.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: '1.14.7' + go-version: '1.17.0' - uses: actions/checkout@v2 diff --git a/.github/workflows/topic-workflow.yaml b/.github/workflows/topic-workflow.yaml index 855c101..74a65c9 100644 --- a/.github/workflows/topic-workflow.yaml +++ b/.github/workflows/topic-workflow.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: '1.14.7' + go-version: '1.17.0' - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 035623c..c543200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## Unreleased +- 72: Upgrade to wire 0.5.0 and golang 1.17 - 67: Update upgrade instructions to explicitly delete certificate generation job ## 0.13.0 - 2021-05-15 diff --git a/Dockerfile b/Dockerfile index 83a2b49..b4e1f19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.14.7 as builder +FROM golang:1.17.0 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/Makefile b/Makefile index b89ee06..5c620bd 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ docker-push: # Develop in docker docker-develop: docker run --rm -it -v $(PWD):/go/src/kubemod -w /go/src/kubemod \ - --entrypoint bash golang:1.14.7 + --entrypoint bash golang:1.17.0 # find or download controller-gen # download controller-gen if necessary @@ -96,7 +96,7 @@ ifeq (, $(shell which controller-gen)) CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ cd $$CONTROLLER_GEN_TMP_DIR ;\ go mod init tmp ;\ - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\ + go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\ rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ } CONTROLLER_GEN=$(GOBIN)/controller-gen @@ -112,7 +112,7 @@ ifeq (, $(shell which wire)) WIRE_TMP_DIR=$$(mktemp -d) ;\ cd $$WIRE_TMP_DIR ;\ go mod init tmp ;\ - go get github.com/google/wire/cmd/wire@v0.4.0 ;\ + go install github.com/google/wire/cmd/wire@v0.5.0 ;\ rm -rf $$WIRE_TMP_DIR ;\ } WIRE=$(GOBIN)/wire diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 9d1d0ff..31ef2a3 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/app/webapp.go b/app/webapp.go index 778fbe0..e2da0c3 100644 --- a/app/webapp.go +++ b/app/webapp.go @@ -88,7 +88,7 @@ func run(router *gin.Engine, webAppAddr string, log logr.Logger) { }() // Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds. - quit := make(chan os.Signal) + quit := make(chan os.Signal, 1) // kill (no param) default send syscall.SIGTERM // kill -2 is syscall.SIGINT diff --git a/app/wire.go b/app/wire.go index cfd8346..fbbf8a9 100644 --- a/app/wire.go +++ b/app/wire.go @@ -1,4 +1,5 @@ -//+build wireinject +//go:build wireinject +// +build wireinject /* Licensed under the BSD 3-Clause License (the "License"); diff --git a/app/wire_gen.go b/app/wire_gen.go index f09e344..37b1de3 100644 --- a/app/wire_gen.go +++ b/app/wire_gen.go @@ -1,7 +1,8 @@ // Code generated by Wire. DO NOT EDIT. -//go:generate wire -//+build !wireinject +//go:generate go run github.com/google/wire/cmd/wire +//go:build !wireinject +// +build !wireinject package app diff --git a/core/wire.go b/core/wire.go index 168fb30..e634816 100644 --- a/core/wire.go +++ b/core/wire.go @@ -1,4 +1,5 @@ -//+build wireinject +//go:build wireinject +// +build wireinject /* Licensed under the BSD 3-Clause License (the "License"); diff --git a/core/wire_gen.go b/core/wire_gen.go index 6bb9ffc..78eb064 100644 --- a/core/wire_gen.go +++ b/core/wire_gen.go @@ -1,7 +1,8 @@ // Code generated by Wire. DO NOT EDIT. -//go:generate wire -//+build !wireinject +//go:generate go run github.com/google/wire/cmd/wire +//go:build !wireinject +// +build !wireinject package core @@ -13,6 +14,7 @@ import ( // Injectors from wire.go: +// InitializeModRuleStoreTestBed instructs wire how to construct a new test bed. func InitializeModRuleStoreTestBed(clusterModRulesNamespace ClusterModRulesNamespace, tLogger util.TLogger) *ModRuleStoreTestBed { language := expressions.NewJSONPathLanguage() logger := NewTestLogger(tLogger) @@ -22,6 +24,7 @@ func InitializeModRuleStoreTestBed(clusterModRulesNamespace ClusterModRulesNames return modRuleStoreTestBed } +// InitializeModRuleStoreItemTestBed instructs wire how to construct a new test bed. func InitializeModRuleStoreItemTestBed(tLogger util.TLogger) *ModRuleStoreItemTestBed { language := expressions.NewJSONPathLanguage() logger := NewTestLogger(tLogger) diff --git a/go.mod b/go.mod index 3cb3a4b..94dcd34 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/evanphx/json-patch/v5 v5.1.0 github.com/gin-gonic/gin v1.6.3 github.com/go-logr/logr v0.1.0 - github.com/google/wire v0.4.0 + github.com/google/wire v0.5.0 github.com/hexops/gotextdiff v1.0.3 github.com/onsi/ginkgo v1.14.1 github.com/onsi/gomega v1.10.2 diff --git a/go.sum b/go.sum index e6c1be2..59edaa0 100644 --- a/go.sum +++ b/go.sum @@ -200,6 +200,8 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.4.0 h1:kXcsA/rIGzJImVqPdhfnr6q0xsS9gU0515q1EPpJ9fE= github.com/google/wire v0.4.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= +github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= +github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=