From e8d2bff6ba29a5a31cff9ffd2968a0ce0ef35bd5 Mon Sep 17 00:00:00 2001 From: Stephen Augustus Date: Wed, 14 Jul 2021 13:31:40 -0400 Subject: [PATCH] [go1.17] Update to go1.17 Signed-off-by: Stephen Augustus --- build/build-image/cross/VERSION | 2 +- build/common.sh | 2 +- build/dependencies.yaml | 16 ++++++++-------- .../fluentd-elasticsearch/es-image/Dockerfile | 2 +- hack/lib/golang.sh | 2 +- staging/publishing/rules.yaml | 2 +- test/images/Makefile | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index c2de591b8c8..e18b787da3a 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.16.7-1 +v1.23.0-go1.17-buster.0 diff --git a/build/common.sh b/build/common.sh index e4965b524dd..8658edf5631 100755 --- a/build/common.sh +++ b/build/common.sh @@ -91,7 +91,7 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730 # These are the default versions (image tags) for their respective base images. readonly __default_debian_iptables_version=buster-v1.6.6 -readonly __default_go_runner_version=v2.3.1-go1.16.7-buster.0 +readonly __default_go_runner_version=v2.3.1-go1.17-buster.0 readonly __default_setcap_version=buster-v2.0.4 # These are the base images for the Docker-wrapped binaries. diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 3c04764a143..5c640114ec1 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -85,7 +85,7 @@ dependencies: # Golang - name: "golang: upstream version" - version: 1.16.7 + version: 1.17 refPaths: - path: build/build-image/cross/VERSION - path: cluster/addons/fluentd-elasticsearch/es-image/Dockerfile @@ -97,20 +97,20 @@ dependencies: - path: test/images/Makefile match: GOLANG_VERSION=\d+.\d+(alpha|beta|rc)?\.?\d+ - # Golang pre-releases are denoted as `1.y.z` + # Golang pre-releases are denoted as `1.y` # Example: go1.16rc1 # - # This entry is a stub of the major and minor version to allow dependency - # checks to pass when building Kubernetes using a pre-release of Golang. - - name: "golang: ." - version: 1.16 + # This entry is a stub of the major version to allow dependency checks to + # pass when building Kubernetes using a pre-release of Golang. + - name: "golang: 1." + version: 1.17 refPaths: - path: build/build-image/cross/VERSION - path: hack/lib/golang.sh match: minimum_go_version=go([0-9]+\.[0-9]+) - name: "k8s.gcr.io/kube-cross: dependents" - version: v1.16.7-1 + version: v1.23.0-go1.17-buster.0 refPaths: - path: build/build-image/cross/VERSION @@ -138,7 +138,7 @@ dependencies: match: configs\[DebianIptables\] = Config{list\.BuildImageRegistry, "debian-iptables", "[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)"} - name: "k8s.gcr.io/go-runner: dependents" - version: v2.3.1-go1.16.7-buster.0 + version: v2.3.1-go1.17-buster.0 refPaths: - path: build/common.sh match: __default_go_runner_version= diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile index 791467f3763..8be3bb55179 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.16.7 AS builder +FROM golang:1.17 AS builder COPY elasticsearch_logging_discovery.go go.mod go.sum / RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -ldflags "-w" -o /elasticsearch_logging_discovery /elasticsearch_logging_discovery.go diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 3df96b467df..25f0fc88420 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -478,7 +478,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)" local minimum_go_version - minimum_go_version=go1.16.0 + minimum_go_version=go1.17.0 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 <