From d31d070547a3b7f96dce1c9d9ea4688fe0a9fff5 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Mon, 22 Jul 2024 12:51:42 +0000 Subject: [PATCH 1/2] Increase minimum Go version to 1.22 1.22 is the minimum version required by a couple of dependencies like k8s.io/api. Also upgrade CONTROLLER_TOOLS_VERSION to 0.15.0 to avoid crashes. Signed-off-by: Adrian Reber --- .github/workflows/tests.yaml | 2 +- Dockerfile | 2 +- Makefile | 2 +- api/v1/zz_generated.deepcopy.go | 1 - .../criu.org_checkpointrestoreoperators.yaml | 19 ++++++++++++------- go.mod | 4 +--- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5c5a8086..e7f8e6c0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - name: Install dependencies run: | diff --git a/Dockerfile b/Dockerfile index aa74435b..fabd5b3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder ARG TARGETOS ARG TARGETARCH diff --git a/Makefile b/Makefile index 9fc9592e..96918c82 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v5.0.1 -CONTROLLER_TOOLS_VERSION ?= v0.12.0 +CONTROLLER_TOOLS_VERSION ?= v0.15.0 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 6b4f8cc3..146f44dd 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2024. diff --git a/config/crd/bases/criu.org_checkpointrestoreoperators.yaml b/config/crd/bases/criu.org_checkpointrestoreoperators.yaml index 1d4bc576..e4080d65 100644 --- a/config/crd/bases/criu.org_checkpointrestoreoperators.yaml +++ b/config/crd/bases/criu.org_checkpointrestoreoperators.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: checkpointrestoreoperators.criu.org spec: group: criu.org @@ -21,14 +21,19 @@ spec: API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object diff --git a/go.mod b/go.mod index d804550e..84420d79 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/checkpoint-restore/checkpoint-restore-operator -go 1.21 - -toolchain go1.21.5 +go 1.22 require ( github.com/checkpoint-restore/checkpointctl v1.2.1 From 40299a998f29b102b4b0a2e7077035c43e87b051 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Mon, 22 Jul 2024 13:09:48 +0000 Subject: [PATCH 2/2] ci: remove trailing whitespace Signed-off-by: Adrian Reber --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e7f8e6c0..d7cb3bd3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,7 +20,7 @@ jobs: curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')" chmod +x kind sudo mv kind /bin/ - + # Install kubectl curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" chmod +x kubectl