From 24b8e32b088bec15e1f40deab8fefc8bd1b6c2da Mon Sep 17 00:00:00 2001 From: Long Wu Yuan Date: Thu, 12 May 2022 00:15:03 +0530 Subject: [PATCH] bumped go version to 1.18.1 (#8578) --- .github/workflows/ci.yaml | 10 ++--- go.mod | 2 +- images/custom-error-pages/rootfs/Dockerfile | 2 +- images/custom-error-pages/rootfs/go.mod | 2 +- .../rootfs/Dockerfile | 4 +- images/ext-auth-example-authsvc/rootfs/go.mod | 9 ++--- images/kube-webhook-certgen/rootfs/Dockerfile | 2 +- images/kube-webhook-certgen/rootfs/go.mod | 38 ++++++++++++++++++- images/test-runner/Makefile | 2 +- 9 files changed, 52 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e82d55134..cf8ec20f2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,11 +69,11 @@ jobs: - name: Checkout uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 - - name: Set up Go 1.17 + - name: Set up Go 1.18 id: go uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2 with: - go-version: '1.17.6' + go-version: '1.18.2' - name: Set up Docker Buildx id: buildx @@ -133,7 +133,7 @@ jobs: - name: Setup Go uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2 with: - go-version: '1.17.6' + go-version: '1.18.2' - name: cache uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # v2 @@ -403,12 +403,12 @@ jobs: version: v0.11.1 image: kindest/node:v1.21.1 - - name: Set up Go 1.17 + - name: Set up Go 1.18 id: go if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }} uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2 with: - go-version: '1.17.6' + go-version: '1.18.2' - name: kube-webhook-certgen image build if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }} diff --git a/go.mod b/go.mod index b13ed1cc6..514eb4f3e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module k8s.io/ingress-nginx -go 1.17 +go 1.18 require ( github.com/armon/go-proxyproto v0.0.0-20210323213023-7e956b284f0a diff --git a/images/custom-error-pages/rootfs/Dockerfile b/images/custom-error-pages/rootfs/Dockerfile index cdceb032b..d53228201 100755 --- a/images/custom-error-pages/rootfs/Dockerfile +++ b/images/custom-error-pages/rootfs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.17-alpine as builder +FROM golang:1.18.2-alpine as builder RUN apk add git WORKDIR /go/src/k8s.io/ingress-nginx/images/custom-error-pages diff --git a/images/custom-error-pages/rootfs/go.mod b/images/custom-error-pages/rootfs/go.mod index dec3b7bbb..05bd45400 100644 --- a/images/custom-error-pages/rootfs/go.mod +++ b/images/custom-error-pages/rootfs/go.mod @@ -1,6 +1,6 @@ module k8s.io/ingress-nginx/custom-error-pages -go 1.17 +go 1.18 require github.com/prometheus/client_golang v1.11.0 diff --git a/images/ext-auth-example-authsvc/rootfs/Dockerfile b/images/ext-auth-example-authsvc/rootfs/Dockerfile index ee2737286..9a52919be 100644 --- a/images/ext-auth-example-authsvc/rootfs/Dockerfile +++ b/images/ext-auth-example-authsvc/rootfs/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.6-alpine3.15 as builder +FROM golang:1.18.2-alpine3.15 as builder RUN mkdir /authsvc WORKDIR /authsvc COPY . ./ @@ -7,4 +7,4 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o authsvc authsvc.go FROM gcr.io/distroless/base-debian11 COPY --from=builder /authsvc/authsvc / EXPOSE 8080 -ENTRYPOINT ["/authsvc"] \ No newline at end of file +ENTRYPOINT ["/authsvc"] diff --git a/images/ext-auth-example-authsvc/rootfs/go.mod b/images/ext-auth-example-authsvc/rootfs/go.mod index 72f2a1049..052d17d6f 100644 --- a/images/ext-auth-example-authsvc/rootfs/go.mod +++ b/images/ext-auth-example-authsvc/rootfs/go.mod @@ -1,8 +1,7 @@ module example.com/authsvc -go 1.17 +go 1.18 -require ( - github.com/google/uuid v1.1.2 // indirect - k8s.io/apimachinery v0.23.1 // indirect -) +require k8s.io/apimachinery v0.23.1 + +require github.com/google/uuid v1.1.2 // indirect diff --git a/images/kube-webhook-certgen/rootfs/Dockerfile b/images/kube-webhook-certgen/rootfs/Dockerfile index f9020fa41..4a60ed2ea 100644 --- a/images/kube-webhook-certgen/rootfs/Dockerfile +++ b/images/kube-webhook-certgen/rootfs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=$BUILDPLATFORM golang:1.16 as builder +FROM --platform=$BUILDPLATFORM golang:1.18.2 as builder ARG BUILDPLATFORM ARG TARGETARCH diff --git a/images/kube-webhook-certgen/rootfs/go.mod b/images/kube-webhook-certgen/rootfs/go.mod index edd74bea3..3858ae566 100644 --- a/images/kube-webhook-certgen/rootfs/go.mod +++ b/images/kube-webhook-certgen/rootfs/go.mod @@ -1,14 +1,48 @@ module github.com/jet/kube-webhook-certgen -go 1.16 +go 1.18 require ( github.com/onrik/logrus v0.9.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 - github.com/tidwall/gjson v1.14.0 // indirect k8s.io/api v0.22.6 k8s.io/apimachinery v0.22.6 k8s.io/client-go v0.22.6 k8s.io/kube-aggregator v0.22.6 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.5 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.5 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/tidwall/gjson v1.14.0 // indirect + golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + google.golang.org/appengine v1.6.5 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/klog/v2 v2.9.0 // indirect + k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect + k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) diff --git a/images/test-runner/Makefile b/images/test-runner/Makefile index e6e047e6c..8ebffc5bb 100644 --- a/images/test-runner/Makefile +++ b/images/test-runner/Makefile @@ -39,7 +39,7 @@ build: ensure-buildx --progress=$(PROGRESS) \ --pull \ --build-arg BASE_IMAGE=$(NGINX_BASE_IMAGE) \ - --build-arg GOLANG_VERSION=1.17.6 \ + --build-arg GOLANG_VERSION=1.18.2 \ --build-arg ETCD_VERSION=3.4.3-0 \ --build-arg K8S_RELEASE=v1.21.3 \ --build-arg RESTY_CLI_VERSION=0.27 \