Bump go to v1.21.6 and set a single source of truth (#10926)

This commit is contained in:
Ricardo Katz 2024-01-27 22:15:14 -03:00 committed by GitHub
parent 02e6ebc95a
commit 5acc4230ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 166 additions and 50 deletions

View file

@ -23,6 +23,8 @@ INIT_BUILDX=$(DIR)/../hack/init-buildx.sh
BASE_IMAGE = $(shell cat $(DIR)/../NGINX_BASE)
GOLANG_VERSION = $(shell cat $(DIR)/../GOLANG_VERSION)
REGISTRY ?= local
NAME ?=
@ -52,6 +54,7 @@ build: precheck ensure-buildx
--label=org.opencontainers.image.licenses=Apache-2.0 \
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--platform=${PLATFORMS} $(OUTPUT) \
--progress=$(PROGRESS) \
--pull $(EXTRAARGS) \

View file

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.21.5-alpine3.18 as builder
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION}-alpine3.18 as builder
RUN apk update \
&& apk upgrade && apk add git

View file

@ -1,6 +1,6 @@
module k8s.io/ingress-nginx/custom-error-pages
go 1.21.5
go 1.21
require github.com/prometheus/client_golang v1.11.1

View file

@ -1,4 +1,6 @@
FROM golang:1.21.5-alpine3.18 as builder
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION}-alpine3.18 as builder
RUN mkdir /authsvc
WORKDIR /authsvc
COPY . ./

View file

@ -1,6 +1,6 @@
module example.com/authsvc
go 1.21.5
go 1.21
require k8s.io/apimachinery v0.23.1

View file

@ -11,8 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG GOLANG_VERSION
FROM golang:1.21.5-alpine3.18 as builder
FROM golang:${GOLANG_VERSION}-alpine3.18 as builder
WORKDIR /go/src/k8s.io/ingress-nginx/images/fastcgi

View file

@ -1,4 +1,6 @@
FROM golang:1.21.5-alpine3.18 as build
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION}-alpine3.18 as build
WORKDIR /go/src/greeter-server

View file

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.21.5 AS builder
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION} AS builder
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

View file

@ -12,10 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM --platform=$BUILDPLATFORM golang:1.21.5 as builder
ARG GOLANG_VERSION
FROM --platform=$BUILDPLATFORM golang:${GOLANG_VERSION} as builder
ARG BUILDPLATFORM
ARG TARGETARCH
WORKDIR /workspace
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o kube-webhook-certgen main.go

View file

@ -1,6 +1,6 @@
module github.com/jet/kube-webhook-certgen
go 1.21.5
go 1.21
require (
github.com/onrik/logrus v0.9.0

View file

@ -1,3 +1,3 @@
module init-otel
go 1.21.5
go 1.21

View file

@ -27,6 +27,8 @@ IMAGE = $(REGISTRY)/e2e-test-runner
NGINX_BASE_IMAGE ?= $(shell cat $(DIR)/../../NGINX_BASE)
GOLANG_VERSION ?= $(shell cat $(DIR)/../../GOLANG_VERSION)
# required to enable buildx
export DOCKER_CLI_EXPERIMENTAL=enabled
@ -43,7 +45,7 @@ image:
--pull \
--push \
--build-arg BASE_IMAGE=${NGINX_BASE_IMAGE} \
--build-arg GOLANG_VERSION=1.21.5 \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg ETCD_VERSION=3.4.3-0 \
--build-arg K8S_RELEASE=v1.26.0 \
--build-arg RESTY_CLI_VERSION=0.27 \
@ -64,7 +66,7 @@ build: ensure-buildx
--progress=${PROGRESS} \
--pull \
--build-arg BASE_IMAGE=${NGINX_BASE_IMAGE} \
--build-arg GOLANG_VERSION=1.21.5 \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg ETCD_VERSION=3.4.3-0 \
--build-arg K8S_RELEASE=v1.26.0 \
--build-arg RESTY_CLI_VERSION=0.27 \