From 26036777c9f81cf217e323cbd70c5ed8374911f6 Mon Sep 17 00:00:00 2001 From: Marco Ebert Date: Mon, 5 Aug 2024 17:26:59 +0200 Subject: [PATCH] Go: Bump to v1.22.5. (#11634) --- GOLANG_VERSION | 2 +- go.mod | 4 +--- go.work | 2 +- images/custom-error-pages/rootfs/go.mod | 2 +- images/ext-auth-example-authsvc/rootfs/Dockerfile | 4 ++-- images/ext-auth-example-authsvc/rootfs/go.mod | 2 +- images/fastcgi-helloserver/rootfs/Dockerfile | 4 ++-- images/go-grpc-greeter-server/rootfs/Dockerfile | 4 ++-- images/kube-webhook-certgen/rootfs/go.mod | 2 +- images/opentelemetry/rootfs/Dockerfile | 10 +++++----- images/opentelemetry/rootfs/build.sh | 5 ++++- images/opentelemetry/rootfs/go.mod | 2 +- magefiles/go.mod | 2 +- 13 files changed, 23 insertions(+), 22 deletions(-) diff --git a/GOLANG_VERSION b/GOLANG_VERSION index be02b337a..da9594fd6 100644 --- a/GOLANG_VERSION +++ b/GOLANG_VERSION @@ -1 +1 @@ -1.22.4 \ No newline at end of file +1.22.5 diff --git a/go.mod b/go.mod index 62241e201..6aeb96031 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module k8s.io/ingress-nginx -go 1.22.0 - -toolchain go1.22.4 +go 1.22.5 require ( dario.cat/mergo v1.0.0 diff --git a/go.work b/go.work index c963e3c0e..9da22b9ae 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.22.0 +go 1.22.5 use ( . diff --git a/images/custom-error-pages/rootfs/go.mod b/images/custom-error-pages/rootfs/go.mod index eebc562a5..75c488ae9 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.21 +go 1.22.5 require github.com/prometheus/client_golang v1.11.1 diff --git a/images/ext-auth-example-authsvc/rootfs/Dockerfile b/images/ext-auth-example-authsvc/rootfs/Dockerfile index ec611fa54..5942ac5b9 100644 --- a/images/ext-auth-example-authsvc/rootfs/Dockerfile +++ b/images/ext-auth-example-authsvc/rootfs/Dockerfile @@ -1,6 +1,6 @@ ARG GOLANG_VERSION -FROM golang:${GOLANG_VERSION}-alpine3.18 as builder +FROM golang:${GOLANG_VERSION}-alpine3.20 as builder RUN mkdir /authsvc WORKDIR /authsvc COPY . ./ @@ -9,4 +9,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 8c3abdcf2..0079040cb 100644 --- a/images/ext-auth-example-authsvc/rootfs/go.mod +++ b/images/ext-auth-example-authsvc/rootfs/go.mod @@ -1,6 +1,6 @@ module example.com/authsvc -go 1.21 +go 1.22.5 require k8s.io/apimachinery v0.23.1 diff --git a/images/fastcgi-helloserver/rootfs/Dockerfile b/images/fastcgi-helloserver/rootfs/Dockerfile index eec93c844..2b91887c9 100755 --- a/images/fastcgi-helloserver/rootfs/Dockerfile +++ b/images/fastcgi-helloserver/rootfs/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. ARG GOLANG_VERSION -FROM golang:${GOLANG_VERSION}-alpine3.18 as builder +FROM golang:${GOLANG_VERSION}-alpine3.20 as builder WORKDIR /go/src/k8s.io/ingress-nginx/images/fastcgi @@ -30,4 +30,4 @@ FROM gcr.io/distroless/static:nonroot COPY --from=builder /go/src/k8s.io/ingress-nginx/images/fastcgi/fastcgi-helloserver / USER nonroot:nonroot -CMD ["/fastcgi-helloserver"] \ No newline at end of file +CMD ["/fastcgi-helloserver"] diff --git a/images/go-grpc-greeter-server/rootfs/Dockerfile b/images/go-grpc-greeter-server/rootfs/Dockerfile index 79693eaeb..f07b1d667 100644 --- a/images/go-grpc-greeter-server/rootfs/Dockerfile +++ b/images/go-grpc-greeter-server/rootfs/Dockerfile @@ -1,6 +1,6 @@ ARG GOLANG_VERSION -FROM golang:${GOLANG_VERSION}-alpine3.18 as build +FROM golang:${GOLANG_VERSION}-alpine3.20 as build WORKDIR /go/src/greeter-server @@ -15,4 +15,4 @@ COPY --from=build /greeter-server / EXPOSE 50051 -CMD ["/greeter-server"] \ No newline at end of file +CMD ["/greeter-server"] diff --git a/images/kube-webhook-certgen/rootfs/go.mod b/images/kube-webhook-certgen/rootfs/go.mod index b32fd22bd..bbbc44215 100644 --- a/images/kube-webhook-certgen/rootfs/go.mod +++ b/images/kube-webhook-certgen/rootfs/go.mod @@ -1,6 +1,6 @@ module github.com/jet/kube-webhook-certgen -go 1.21 +go 1.22.5 require ( github.com/onrik/logrus v0.11.0 diff --git a/images/opentelemetry/rootfs/Dockerfile b/images/opentelemetry/rootfs/Dockerfile index eb951e5c4..90135a1e3 100644 --- a/images/opentelemetry/rootfs/Dockerfile +++ b/images/opentelemetry/rootfs/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. -FROM alpine:3.20.0 as base +FROM alpine:3.20.0 AS base RUN mkdir -p /opt/third_party/install COPY . /opt/third_party/ @@ -24,14 +24,14 @@ RUN apk update \ && apk add -U bash \ && bash /opt/third_party/build.sh -p -ENV NINJA_STATUS "[%p/%f/%t] " +ENV NINJA_STATUS="[%p/%f/%t] " # install otel_ngx_module.so -FROM base as nginx +FROM base AS nginx ARG NGINX_VERSION=1.25.3 RUN bash /opt/third_party/build.sh -n ${NGINX_VERSION} -FROM golang:1.21.6-bullseye as build-init +FROM golang:1.22.5-bullseye AS build-init WORKDIR /go/src/app COPY . . @@ -39,7 +39,7 @@ COPY . . RUN go mod download RUN CGO_ENABLED=0 go build -o /go/bin/init_module -FROM gcr.io/distroless/static-debian11 as final +FROM gcr.io/distroless/static-debian11 AS final COPY --from=build-init /go/bin/init_module / COPY --from=nginx /etc/nginx/modules /etc/nginx/modules diff --git a/images/opentelemetry/rootfs/build.sh b/images/opentelemetry/rootfs/build.sh index d46ab9fe5..649595a75 100755 --- a/images/opentelemetry/rootfs/build.sh +++ b/images/opentelemetry/rootfs/build.sh @@ -52,7 +52,10 @@ Help() prepare() { - echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories + echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories + echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories + echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories + apk add \ linux-headers \ cmake \ diff --git a/images/opentelemetry/rootfs/go.mod b/images/opentelemetry/rootfs/go.mod index 9c183ef06..c2fb37d60 100644 --- a/images/opentelemetry/rootfs/go.mod +++ b/images/opentelemetry/rootfs/go.mod @@ -1,3 +1,3 @@ module init-otel -go 1.21 +go 1.22.5 diff --git a/magefiles/go.mod b/magefiles/go.mod index d41baf17e..ef6e89197 100644 --- a/magefiles/go.mod +++ b/magefiles/go.mod @@ -1,6 +1,6 @@ module k8s.io/ingress-nginx/magefiles -go 1.21 +go 1.22.5 require ( github.com/blang/semver/v4 v4.0.0