Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPNODE-1892: Switch to golang 1.21 #1845

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.20-openshift-4.15
tag: rhel-9-release-golang-1.21-openshift-4.16
4 changes: 2 additions & 2 deletions build/pause/Dockerfile.Rhel
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.15 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
WORKDIR /go/src/github.com/openshift/kubernetes/build/pause
COPY . .
RUN mkdir -p bin && \
gcc -Os -Wall -Werror -o bin/pause ./linux/pause.c

FROM registry.ci.openshift.org/ocp/4.15:base-rhel9
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
COPY --from=builder /go/src/github.com/openshift/kubernetes/build/pause/bin/pause /usr/bin/pod
LABEL io.k8s.display-name="OpenShift Pod" \
io.k8s.description="This is a component of OpenShift and contains the binary that holds the pod namespaces." \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

module k8s.io/kubernetes

go 1.20
go 1.21

require (
bitbucket.org/bertimus9/systemstat v0.5.0
Expand Down
2 changes: 1 addition & 1 deletion hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ EOF
local go_version
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
local minimum_go_version
minimum_go_version=go1.20
minimum_go_version=go1.21
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
kube::log::usage_from_stdin <<EOF
Detected go version: ${go_version[*]}.
Expand Down
4 changes: 2 additions & 2 deletions openshift-hack/images/hyperkube/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.15 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
RUN make WHAT='cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-scheduler cmd/kubelet cmd/watch-termination openshift-hack/cmd/k8s-tests' && \
Expand All @@ -7,7 +7,7 @@ RUN make WHAT='cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-scheduler
cp /go/src/k8s.io/kubernetes/_output/local/bin/linux/$(go env GOARCH)/{kube-apiserver,kube-controller-manager,kube-scheduler,kubelet,watch-termination,k8s-tests} \
/tmp/build

FROM registry.ci.openshift.org/ocp/4.15:base-rhel9
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
RUN yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False iproute && yum clean all
COPY --from=builder /tmp/build/* /usr/bin/
LABEL io.k8s.display-name="OpenShift Kubernetes Server Commands" \
Expand Down
4 changes: 2 additions & 2 deletions openshift-hack/images/tests/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.15 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
RUN make WHAT=openshift-hack/e2e/k8s-e2e.test; \
Expand All @@ -8,7 +8,7 @@ RUN make WHAT=openshift-hack/e2e/k8s-e2e.test; \
cp /go/src/k8s.io/kubernetes/_output/local/bin/linux/$(go env GOARCH)/ginkgo /tmp/build/; \
cp /go/src/k8s.io/kubernetes/openshift-hack/test-kubernetes-e2e.sh /tmp/build/

FROM registry.ci.openshift.org/ocp/4.15:tools
FROM registry.ci.openshift.org/ocp/4.16:tools
COPY --from=builder /tmp/build/k8s-e2e.test /usr/bin/
COPY --from=builder /tmp/build/ginkgo /usr/bin/
COPY --from=builder /tmp/build/test-kubernetes-e2e.sh /usr/bin/
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/api

go 1.20
go 1.21

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/apiextensions-apiserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/apiextensions-apiserver

go 1.20
go 1.21

require (
github.com/emicklei/go-restful/v3 v3.11.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/apimachinery/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/apimachinery

go 1.20
go 1.21

require (
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/apiserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/apiserver

go 1.20
go 1.21

require (
github.com/coreos/go-oidc v2.2.1+incompatible
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/cli-runtime/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/cli-runtime

go 1.20
go 1.21

require (
github.com/evanphx/json-patch v4.12.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/client-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/client-go

go 1.20
go 1.21

require (
github.com/evanphx/json-patch v4.12.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/cloud-provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/cloud-provider

go 1.20
go 1.21

require (
github.com/google/go-cmp v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/cluster-bootstrap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/cluster-bootstrap

go 1.20
go 1.21

require (
github.com/stretchr/testify v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/code-generator/examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/code-generator/examples

go 1.20
go 1.21

require (
k8s.io/api v0.29.0
Expand Down
9 changes: 9 additions & 0 deletions staging/src/k8s.io/code-generator/examples/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/k8s.io/code-generator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/code-generator

go 1.20
go 1.21

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/component-base/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/component-base

go 1.20
go 1.21

require (
github.com/blang/semver/v4 v4.0.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/component-helpers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/component-helpers

go 1.20
go 1.21

require (
github.com/google/go-cmp v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/controller-manager/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/controller-manager

go 1.20
go 1.21

require (
github.com/spf13/pflag v1.0.5
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/cri-api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/cri-api

go 1.20
go 1.21

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/csi-translation-lib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/csi-translation-lib

go 1.20
go 1.21

require (
github.com/stretchr/testify v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/dynamic-resource-allocation/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/dynamic-resource-allocation

go 1.20
go 1.21

require (
github.com/go-logr/logr v1.3.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/endpointslice/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/endpointslice

go 1.20
go 1.21

require (
github.com/davecgh/go-spew v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kms/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kms

go 1.20
go 1.21

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kms/internal/plugins/_mock/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/kms/plugins/mock

go 1.20
go 1.21

require (
github.com/ThalesIgnite/crypto11 v1.2.5
Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/kms/internal/plugins/_mock/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/k8s.io/kube-aggregator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kube-aggregator

go 1.20
go 1.21

require (
github.com/emicklei/go-restful/v3 v3.11.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kube-controller-manager/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kube-controller-manager

go 1.20
go 1.21

require (
k8s.io/apimachinery v0.29.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kube-proxy/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kube-proxy

go 1.20
go 1.21

require (
k8s.io/apimachinery v0.29.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kube-scheduler/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kube-scheduler

go 1.20
go 1.21

require (
github.com/google/go-cmp v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kubectl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kubectl

go 1.20
go 1.21

require (
github.com/MakeNowJust/heredoc v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kubelet/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/kubelet

go 1.20
go 1.21

require (
github.com/emicklei/go-restful/v3 v3.11.0
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/legacy-cloud-providers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/legacy-cloud-providers

go 1.20
go 1.21

require (
cloud.google.com/go/compute/metadata v0.2.3
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/metrics/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/metrics

go 1.20
go 1.21

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/mount-utils/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/mount-utils

go 1.20
go 1.21

require (
github.com/moby/sys/mountinfo v0.6.2
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/pod-security-admission/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module k8s.io/pod-security-admission

go 1.20
go 1.21

require (
github.com/blang/semver/v4 v4.0.0
Expand Down