diff --git a/.github/workflows/apidiff.yml b/.github/workflows/apidiff.yml index ec57a638aec..0894ccad0ef 100644 --- a/.github/workflows/apidiff.yml +++ b/.github/workflows/apidiff.yml @@ -37,7 +37,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: "1.17" + go-version: "1.18" - name: Execute go-apidiff uses: joelanford/go-apidiff@v0.2.0 with: diff --git a/.github/workflows/testdata.yml b/.github/workflows/testdata.yml index fd0fbb05e1e..e0e0f977a9b 100644 --- a/.github/workflows/testdata.yml +++ b/.github/workflows/testdata.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Remove pre-installed kustomize # This step is needed as the following one tries to remove # kustomize for each test but has no permission to do so diff --git a/.github/workflows/unit-tests-legacy.yml b/.github/workflows/unit-tests-legacy.yml new file mode 100644 index 00000000000..780bcad8b1c --- /dev/null +++ b/.github/workflows/unit-tests-legacy.yml @@ -0,0 +1,50 @@ +# todo: remove this file when go/v2 be removed +name: Unit tests Legacy (go/v2) + +# Trigger the workflow on pull requests and direct pushes to any branch +on: + push: + pull_request: + +jobs: + test: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + # Pull requests from the same repository won't trigger this checks as they were already triggered by the push + if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) + steps: + - name: Clone the code + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + # the go/v2 cannot be updated and is scaffold with golang 1.13 + # (version used by its dep version of the controller-runtime) + # however, we are unable to downgrade the version here + # because we will face errors + # So we are keeping the latest version where it works + # and highlighting that must be fixed + # Therefore, we probably will deprecate go/v2 soon since we cannot upgrade it + # to use the versions of controller-runtime > v0.9 + # and controller-tools > v0.6 as k8s > 1.21 then it might not be valid we spend effort on this fix + go-version: "1.17" + # This step is needed as the following one tries to remove + # kustomize for each test but has no permission to do so + - name: Remove pre-installed kustomize + run: sudo rm -f /usr/local/bin/kustomize + - name: Perform the test + run: make test-legacy + - name: Report failure + uses: nashmaniac/create-issue-action@v1.1 + # Only report failures of pushes (PRs have are visible through the Checks section) to the default branch + if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master' + with: + title: 🐛 Unit tests failed on ${{ matrix.os }} for ${{ github.sha }} + token: ${{ secrets.GITHUB_TOKEN }} + labels: kind/bug + body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e585edde5ad..1dbcbf55f09 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: "1.17" + go-version: "1.18" # This step is needed as the following one tries to remove # kustomize for each test but has no permission to do so - name: Remove pre-installed kustomize @@ -71,7 +71,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: "1.17" + go-version: "1.18" - name: Generate the coverage output run: make test-coverage - name: Send the coverage output diff --git a/Makefile b/Makefile index 1d505692f99..dc4b24f05de 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,12 @@ check-testdata: ## Run the script to ensure that the testdata is updated test-testdata: ## Run the tests of the testdata directory ./test/testdata/test.sh +#todo(remove the test-legacy whne the go/v2 be removed from kubebuilder) + +.PHONY: test-legacy +test-legacy: ## Run the legacy tests (go/v2) of the testdata directory + ./test/testdata/test_legacy.sh + .PHONY: test-e2e-local test-e2e-local: ## Run the end-to-end tests locally ## To keep the same kind cluster between test runs, use `SKIP_KIND_CLEANUP=1 make test-e2e-local` diff --git a/build/.goreleaser.yml b/build/.goreleaser.yml index 230c8cf7857..e08fa0806a3 100644 --- a/build/.goreleaser.yml +++ b/build/.goreleaser.yml @@ -44,7 +44,7 @@ builds: - darwin_amd64 - darwin_arm64 env: - - KUBERNETES_VERSION=1.23.5 + - KUBERNETES_VERSION=1.24.1 - CGO_ENABLED=0 # Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released. diff --git a/build/cloudbuild.yaml b/build/cloudbuild.yaml index 745b86cca94..86f2ca82715 100644 --- a/build/cloudbuild.yaml +++ b/build/cloudbuild.yaml @@ -38,7 +38,7 @@ steps: git checkout $${BRANCH_NAME} git branch --set-upstream-to=origin/$${BRANCH_NAME} git tag -d ${TAG_NAME} -- name: "goreleaser/goreleaser:v1.8.3" +- name: "goreleaser/goreleaser:v1.9.2" entrypoint: "bash" args: ["build/build_kubebuilder.sh"] secretEnv: ["GITHUB_TOKEN"] diff --git a/build/cloudbuild_local.yaml b/build/cloudbuild_local.yaml index dce1c628cb5..94fa084b346 100644 --- a/build/cloudbuild_local.yaml +++ b/build/cloudbuild_local.yaml @@ -19,7 +19,7 @@ # Release tar will be in ./cloudbuild steps: -- name: "goreleaser/goreleaser:v1.8.3" +- name: "goreleaser/goreleaser:v1.9.2" entrypoint: "bash" env: ["SNAPSHOT=1"] args: ["build/build_kubebuilder.sh"] diff --git a/build/cloudbuild_snapshot.yaml b/build/cloudbuild_snapshot.yaml index 151842cfda7..7cfcf09751b 100644 --- a/build/cloudbuild_snapshot.yaml +++ b/build/cloudbuild_snapshot.yaml @@ -19,7 +19,7 @@ # Release tar will be in ./cloudbuild steps: -- name: "goreleaser/goreleaser:v1.8.3" +- name: "goreleaser/goreleaser:v1.9.2" entrypoint: "bash" env: ["SNAPSHOT=1"] args: ["build/build_kubebuilder.sh"] diff --git a/docs/book/src/quick-start.md b/docs/book/src/quick-start.md index b8c5b15a8ed..0ea914a2642 100644 --- a/docs/book/src/quick-start.md +++ b/docs/book/src/quick-start.md @@ -11,7 +11,8 @@ This Quick Start guide will cover: - [go](https://golang.org/dl/) version v1.15+ (kubebuilder v3.0 < v3.1). - [go](https://golang.org/dl/) version v1.16+ (kubebuilder v3.1 < v3.3). -- [go](https://golang.org/dl/) version v1.17+ < v1.18 (kubebuilder v3.3+). +- [go](https://golang.org/dl/) version v1.17+ < v1.18 (kubebuilder v3.4.1). +- [go](https://golang.org/dl/) version v1.17.9+ (kubebuilder v3.5+). - [docker](https://docs.docker.com/install/) version 17.03+. - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/pkg/cli/alpha/config-gen/testdata/go.mod b/pkg/cli/alpha/config-gen/testdata/go.mod index a74b8cc016b..d4f33ae00f6 100644 --- a/pkg/cli/alpha/config-gen/testdata/go.mod +++ b/pkg/cli/alpha/config-gen/testdata/go.mod @@ -1,6 +1,6 @@ module config-gen/testdata -go 1.17 +go 1.18 require ( k8s.io/apimachinery v0.23.5 diff --git a/pkg/plugins/golang/go_version_test.go b/pkg/plugins/golang/go_version_test.go index dd52f800ba2..892f68bb6a0 100644 --- a/pkg/plugins/golang/go_version_test.go +++ b/pkg/plugins/golang/go_version_test.go @@ -195,6 +195,7 @@ var _ = Describe("checkGoVersion", func() { Entry("for go 1.17.3", "go1.17.3"), Entry("for go 1.17.4", "go1.17.4"), Entry("for go 1.17.5", "go1.17.5"), + Entry("for go 1.18.1", "go1.18.1"), ) DescribeTable("should return an error for non-supported go versions", diff --git a/pkg/plugins/golang/v3/commons.go b/pkg/plugins/golang/v3/commons.go index 8af90eb6b96..68ec3948467 100644 --- a/pkg/plugins/golang/v3/commons.go +++ b/pkg/plugins/golang/v3/commons.go @@ -78,7 +78,7 @@ manifests: controller-gen` } if err := util.ReplaceInFile("Makefile", - "ENVTEST_K8S_VERSION = 1.23", + "ENVTEST_K8S_VERSION = 1.24.1", "ENVTEST_K8S_VERSION = 1.21"); err != nil { log.Warnf("unable to update the Makefile with %s: %s", "ENVTEST_K8S_VERSION = 1.21", err) } diff --git a/pkg/plugins/golang/v3/init.go b/pkg/plugins/golang/v3/init.go index 1293bb6ad4b..68a30b35183 100644 --- a/pkg/plugins/golang/v3/init.go +++ b/pkg/plugins/golang/v3/init.go @@ -35,7 +35,7 @@ import ( // Variables and function to check Go version requirements. var ( - goVerMin = golang.MustParse("go1.17") + goVerMin = golang.MustParse("go1.17.9") goVerMax = golang.MustParse("go2.0alpha1") ) diff --git a/pkg/plugins/golang/v3/scaffolds/init.go b/pkg/plugins/golang/v3/scaffolds/init.go index e2cf8ca3593..9c8bfd43456 100644 --- a/pkg/plugins/golang/v3/scaffolds/init.go +++ b/pkg/plugins/golang/v3/scaffolds/init.go @@ -36,7 +36,7 @@ const ( // ControllerRuntimeVersion is the kubernetes-sigs/controller-runtime version to be used in the project ControllerRuntimeVersion = "v0.12.1" // ControllerToolsVersion is the kubernetes-sigs/controller-tools version to be used in the project - ControllerToolsVersion = "v0.8.0" + ControllerToolsVersion = "v0.9.0" // KustomizeVersion is the kubernetes-sigs/kustomize version to be used in the project // @Deprecated. This information ought to come from kustomize plugin // Note that by updating the following value nothing will change for the go/3 plugin diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go index a072725ccac..9ed3f869fa1 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go @@ -39,7 +39,7 @@ func (f *Dockerfile) SetTemplateDefaults() error { } const dockerfileTemplate = `# Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/gomod.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/gomod.go index f2cd7df7a35..0bdfb567b3d 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/gomod.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/gomod.go @@ -46,7 +46,7 @@ func (f *GoMod) SetTemplateDefaults() error { const goModTemplate = ` module {{ .Repo }} -go 1.17 +go 1.18 require ( sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }} diff --git a/test/common.sh b/test/common.sh index affe6d1c920..e51f18847fa 100644 --- a/test/common.sh +++ b/test/common.sh @@ -46,7 +46,7 @@ if [ -n "$TRACE" ]; then set -x fi -export KIND_K8S_VERSION="${KIND_K8S_VERSION:-"v1.23.3"}" +export KIND_K8S_VERSION="${KIND_K8S_VERSION:-"v1.24.1"}" tools_k8s_version=$(convert_to_tools_ver "${KIND_K8S_VERSION#v*}") kind_version=0.11.1 goarch=amd64 diff --git a/test/testdata/test.sh b/test/testdata/test.sh index 3508b588f49..6fab5aa63dc 100755 --- a/test/testdata/test.sh +++ b/test/testdata/test.sh @@ -36,9 +36,3 @@ test_project project-v3-multigroup test_project project-v3-addon test_project project-v3-config -# Test project v2, which relies on pre-installed envtest tools to run 'make test'. -tools_k8s_version="1.19.2" -fetch_tools -test_project project-v2 -test_project project-v2-multigroup -test_project project-v2-addon diff --git a/test/testdata/test_legacy.sh b/test/testdata/test_legacy.sh new file mode 100755 index 00000000000..7f639de517e --- /dev/null +++ b/test/testdata/test_legacy.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# todo: remove this file when go/v2 be removed +# Copyright 2018 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +source "$(dirname "$0")/../common.sh" + +# Executes the test of the testdata directories +function test_project { + rm -f "$(command -v controller-gen)" + rm -f "$(command -v kustomize)" + + header_text "Performing tests in dir $1" + pushd "$(dirname "$0")/../../testdata/$1" + go mod tidy + make test + popd +} + +build_kb + +# Test project v2, which relies on pre-installed envtest tools to run 'make test'. +tools_k8s_version="1.19.2" +fetch_tools +test_project project-v2 +test_project project-v2-multigroup +test_project project-v2-addon diff --git a/testdata/project-v3-addon/Dockerfile b/testdata/project-v3-addon/Dockerfile index 3a486ab6e30..9103a8d38f8 100644 --- a/testdata/project-v3-addon/Dockerfile +++ b/testdata/project-v3-addon/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3-addon/Makefile b/testdata/project-v3-addon/Makefile index 93feb2482e0..2bc5e8c7c94 100644 --- a/testdata/project-v3-addon/Makefile +++ b/testdata/project-v3-addon/Makefile @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_admirals.yaml b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_admirals.yaml index 8953264ea89..7ff2ba131f5 100644 --- a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_admirals.yaml +++ b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_admirals.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: admirals.crew.testproject.org spec: @@ -67,9 +67,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_captains.yaml b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_captains.yaml index b7c8d92c6b8..8bd62690d0b 100644 --- a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_captains.yaml +++ b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_captains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: captains.crew.testproject.org spec: @@ -67,9 +67,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_firstmates.yaml b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_firstmates.yaml index 566f27bcd47..051b5f10888 100644 --- a/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_firstmates.yaml +++ b/testdata/project-v3-addon/config/crd/bases/crew.testproject.org_firstmates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: firstmates.crew.testproject.org spec: @@ -67,9 +67,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-addon/go.mod b/testdata/project-v3-addon/go.mod index 731616a39ab..c6bbf5f3a30 100644 --- a/testdata/project-v3-addon/go.mod +++ b/testdata/project-v3-addon/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3-addon -go 1.17 +go 1.18 require ( github.com/go-logr/logr v1.2.0 diff --git a/testdata/project-v3-config/Dockerfile b/testdata/project-v3-config/Dockerfile index 456533d4c2d..5a355c21489 100644 --- a/testdata/project-v3-config/Dockerfile +++ b/testdata/project-v3-config/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3-config/Makefile b/testdata/project-v3-config/Makefile index 93feb2482e0..2bc5e8c7c94 100644 --- a/testdata/project-v3-config/Makefile +++ b/testdata/project-v3-config/Makefile @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_admirals.yaml b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_admirals.yaml index 5b617849067..c2631d473fd 100644 --- a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_admirals.yaml +++ b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_admirals.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: admirals.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_captains.yaml b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_captains.yaml index 41b080622f6..7b74c835a5e 100644 --- a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_captains.yaml +++ b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_captains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: captains.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_firstmates.yaml b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_firstmates.yaml index 5ccecbc8eb8..7ec1923cf15 100644 --- a/testdata/project-v3-config/config/crd/bases/crew.testproject.org_firstmates.yaml +++ b/testdata/project-v3-config/config/crd/bases/crew.testproject.org_firstmates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: firstmates.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-config/go.mod b/testdata/project-v3-config/go.mod index 133dacb0d94..bd3f4cc42ef 100644 --- a/testdata/project-v3-config/go.mod +++ b/testdata/project-v3-config/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3-config -go 1.17 +go 1.18 require ( github.com/onsi/ginkgo v1.16.5 diff --git a/testdata/project-v3-multigroup/Dockerfile b/testdata/project-v3-multigroup/Dockerfile index 9a23dc6ee57..7be3cae2b1e 100644 --- a/testdata/project-v3-multigroup/Dockerfile +++ b/testdata/project-v3-multigroup/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3-multigroup/Makefile b/testdata/project-v3-multigroup/Makefile index 93feb2482e0..2bc5e8c7c94 100644 --- a/testdata/project-v3-multigroup/Makefile +++ b/testdata/project-v3-multigroup/Makefile @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/testdata/project-v3-multigroup/config/crd/bases/crew.testproject.org_captains.yaml b/testdata/project-v3-multigroup/config/crd/bases/crew.testproject.org_captains.yaml index 41b080622f6..7b74c835a5e 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/crew.testproject.org_captains.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/crew.testproject.org_captains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: captains.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/fiz.testproject.org_bars.yaml b/testdata/project-v3-multigroup/config/crd/bases/fiz.testproject.org_bars.yaml index 9e9c2b5a1a3..65954daa736 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/fiz.testproject.org_bars.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/fiz.testproject.org_bars.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: bars.fiz.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/foo.policy.testproject.org_healthcheckpolicies.yaml b/testdata/project-v3-multigroup/config/crd/bases/foo.policy.testproject.org_healthcheckpolicies.yaml index ca1642fc31c..75a4760ab55 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/foo.policy.testproject.org_healthcheckpolicies.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/foo.policy.testproject.org_healthcheckpolicies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: healthcheckpolicies.foo.policy.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/foo.testproject.org_bars.yaml b/testdata/project-v3-multigroup/config/crd/bases/foo.testproject.org_bars.yaml index 24002b5b0c8..9dd660118be 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/foo.testproject.org_bars.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/foo.testproject.org_bars.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: bars.foo.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_krakens.yaml b/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_krakens.yaml index 392d5f48e32..d76df221086 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_krakens.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_krakens.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: krakens.sea-creatures.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_leviathans.yaml b/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_leviathans.yaml index df8b9b4eedb..65001fd6ce0 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_leviathans.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/sea-creatures.testproject.org_leviathans.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: leviathans.sea-creatures.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_cruisers.yaml b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_cruisers.yaml index 1eea0d2b28f..2b9e991e608 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_cruisers.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_cruisers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: cruisers.ship.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_destroyers.yaml b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_destroyers.yaml index 8b00c07bf02..0f9d5aed784 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_destroyers.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_destroyers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: destroyers.ship.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_frigates.yaml b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_frigates.yaml index 31811f7c74a..4df40fdb5a5 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_frigates.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/ship.testproject.org_frigates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: frigates.ship.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/config/crd/bases/testproject.org_lakers.yaml b/testdata/project-v3-multigroup/config/crd/bases/testproject.org_lakers.yaml index 0403dd77d65..dc234f6ffca 100644 --- a/testdata/project-v3-multigroup/config/crd/bases/testproject.org_lakers.yaml +++ b/testdata/project-v3-multigroup/config/crd/bases/testproject.org_lakers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: lakers.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-multigroup/go.mod b/testdata/project-v3-multigroup/go.mod index 551efcdf32e..7fe016bf59f 100644 --- a/testdata/project-v3-multigroup/go.mod +++ b/testdata/project-v3-multigroup/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3-multigroup -go 1.17 +go 1.18 require ( github.com/onsi/ginkgo v1.16.5 diff --git a/testdata/project-v3-v1beta1/Dockerfile b/testdata/project-v3-v1beta1/Dockerfile index 456533d4c2d..5a355c21489 100644 --- a/testdata/project-v3-v1beta1/Dockerfile +++ b/testdata/project-v3-v1beta1/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3-v1beta1/Makefile b/testdata/project-v3-v1beta1/Makefile index 587e4d08f1d..fc483bd85a4 100644 --- a/testdata/project-v3-v1beta1/Makefile +++ b/testdata/project-v3-v1beta1/Makefile @@ -2,7 +2,7 @@ # Image URL to use all building/pushing image targets IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.24.1 +ENVTEST_K8S_VERSION = 1.21 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/testdata/project-v3-v1beta1/go.mod b/testdata/project-v3-v1beta1/go.mod index d5f48dde15c..f52a4b61cb7 100644 --- a/testdata/project-v3-v1beta1/go.mod +++ b/testdata/project-v3-v1beta1/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3-v1beta1 -go 1.17 +go 1.18 require ( github.com/onsi/ginkgo v1.16.4 diff --git a/testdata/project-v3-with-kustomize-v2/Dockerfile b/testdata/project-v3-with-kustomize-v2/Dockerfile index 456533d4c2d..5a355c21489 100644 --- a/testdata/project-v3-with-kustomize-v2/Dockerfile +++ b/testdata/project-v3-with-kustomize-v2/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3-with-kustomize-v2/Makefile b/testdata/project-v3-with-kustomize-v2/Makefile index f9082092cdb..05361d23a2a 100644 --- a/testdata/project-v3-with-kustomize-v2/Makefile +++ b/testdata/project-v3-with-kustomize-v2/Makefile @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v4.5.3 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_admirals.yaml b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_admirals.yaml index 5b617849067..c2631d473fd 100644 --- a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_admirals.yaml +++ b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_admirals.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: admirals.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_captains.yaml b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_captains.yaml index 41b080622f6..7b74c835a5e 100644 --- a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_captains.yaml +++ b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_captains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: captains.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_firstmates.yaml b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_firstmates.yaml index 5ccecbc8eb8..7ec1923cf15 100644 --- a/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_firstmates.yaml +++ b/testdata/project-v3-with-kustomize-v2/config/crd/bases/crew.testproject.org_firstmates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: firstmates.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3-with-kustomize-v2/go.mod b/testdata/project-v3-with-kustomize-v2/go.mod index 24417ddd199..78b6b646afd 100644 --- a/testdata/project-v3-with-kustomize-v2/go.mod +++ b/testdata/project-v3-with-kustomize-v2/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3-with-kustomize-v2 -go 1.17 +go 1.18 require ( github.com/onsi/ginkgo v1.16.5 diff --git a/testdata/project-v3/Dockerfile b/testdata/project-v3/Dockerfile index 456533d4c2d..5a355c21489 100644 --- a/testdata/project-v3/Dockerfile +++ b/testdata/project-v3/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/testdata/project-v3/Makefile b/testdata/project-v3/Makefile index 93feb2482e0..2bc5e8c7c94 100644 --- a/testdata/project-v3/Makefile +++ b/testdata/project-v3/Makefile @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/testdata/project-v3/config/crd/bases/crew.testproject.org_admirales.yaml b/testdata/project-v3/config/crd/bases/crew.testproject.org_admirales.yaml index 2b18f84f649..337d572f093 100644 --- a/testdata/project-v3/config/crd/bases/crew.testproject.org_admirales.yaml +++ b/testdata/project-v3/config/crd/bases/crew.testproject.org_admirales.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: admirales.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3/config/crd/bases/crew.testproject.org_captains.yaml b/testdata/project-v3/config/crd/bases/crew.testproject.org_captains.yaml index 41b080622f6..7b74c835a5e 100644 --- a/testdata/project-v3/config/crd/bases/crew.testproject.org_captains.yaml +++ b/testdata/project-v3/config/crd/bases/crew.testproject.org_captains.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: captains.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3/config/crd/bases/crew.testproject.org_firstmates.yaml b/testdata/project-v3/config/crd/bases/crew.testproject.org_firstmates.yaml index 5ccecbc8eb8..7ec1923cf15 100644 --- a/testdata/project-v3/config/crd/bases/crew.testproject.org_firstmates.yaml +++ b/testdata/project-v3/config/crd/bases/crew.testproject.org_firstmates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null name: firstmates.crew.testproject.org spec: @@ -48,9 +48,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/testdata/project-v3/go.mod b/testdata/project-v3/go.mod index f455c27f6ec..ddbd4fc6055 100644 --- a/testdata/project-v3/go.mod +++ b/testdata/project-v3/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v3 -go 1.17 +go 1.18 require ( github.com/onsi/ginkgo v1.16.5