diff --git a/.github/workflows/apidiff.yml b/.github/workflows/apidiff.yml index 0bdc76a910d..052c2bf08ee 100644 --- a/.github/workflows/apidiff.yml +++ b/.github/workflows/apidiff.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Execute go-apidiff uses: joelanford/go-apidiff@v0.1.0 with: diff --git a/.github/workflows/testdata.yml b/.github/workflows/testdata.yml index 5ec04e9a22f..fd0fbb05e1e 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.16' + go-version: '1.17' - 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.yml b/.github/workflows/unit-tests.yml index d8b9b836ba9..b59db892cf2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.16' + 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 @@ -54,7 +54,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Generate the coverage output run: make test-coverage - name: Send the coverage output diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27dc121e476..0cac27d8c13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,6 +108,8 @@ The docs are published off of three branches: See [VERSIONING.md](VERSIONING.md#book-releases) for more information. +There are certain writing style guidelines for Kubernetes documentation, checkout [style guide](https://kubernetes.io/docs/contribute/style/style-guide/) for more information. + ### How to preview the changes performed in the docs Check the CI job after to do the Pull Request and then, click on in the `Details` of `netlify/kubebuilder/deploy-preview` diff --git a/build/.goreleaser.yml b/build/.goreleaser.yml index 46c74ddabd8..9576a5fc0fc 100644 --- a/build/.goreleaser.yml +++ b/build/.goreleaser.yml @@ -43,7 +43,7 @@ builds: - linux_ppc64le - darwin_amd64 env: - - KUBERNETES_VERSION=1.22.1 + - KUBERNETES_VERSION=1.23.1 - CGO_ENABLED=0 # Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released. diff --git a/docs/book/src/component-config-tutorial/api-changes.md b/docs/book/src/component-config-tutorial/api-changes.md index 53e1af0efe4..592269dcabb 100644 --- a/docs/book/src/component-config-tutorial/api-changes.md +++ b/docs/book/src/component-config-tutorial/api-changes.md @@ -27,7 +27,7 @@ var configFile string flag.StringVar(&configFile, "config", "", "The controller will load its initial configuration from this file. "+ "Omit this flag to use the default configuration values. "+ - "Command-line flags override configuration from this file." + "Command-line flags override configuration from this file.") ``` Now, we can setup the `Options` struct and check if the `configFile` is set, diff --git a/docs/book/src/component-config-tutorial/define-config.md b/docs/book/src/component-config-tutorial/define-config.md index f22e753bca8..6042a52fef8 100644 --- a/docs/book/src/component-config-tutorial/define-config.md +++ b/docs/book/src/component-config-tutorial/define-config.md @@ -9,4 +9,4 @@ values that are passed into the controller, to do this we can take a look at To see all the available fields you can look at the `v1alpha` Controller Runtime config [ControllerManagerConfiguration](configtype) -[configtype]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/#ControllerManagerConfigurationSpec \ No newline at end of file +[configtype]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1#ControllerManagerConfigurationSpec \ No newline at end of file diff --git a/docs/book/src/component-config-tutorial/testdata/project/Dockerfile b/docs/book/src/component-config-tutorial/testdata/project/Dockerfile index 4152680b742..456533d4c2d 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/Dockerfile +++ b/docs/book/src/component-config-tutorial/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.16 as builder +FROM golang:1.17 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/docs/book/src/component-config-tutorial/testdata/project/api/v2/groupversion_info.go b/docs/book/src/component-config-tutorial/testdata/project/api/v2/groupversion_info.go index 015861968db..97d627cdc06 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/api/v2/groupversion_info.go +++ b/docs/book/src/component-config-tutorial/testdata/project/api/v2/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/component-config-tutorial/testdata/project/api/v2/projectconfig_types.go b/docs/book/src/component-config-tutorial/testdata/project/api/v2/projectconfig_types.go index ca653d8251f..3cdca35bf45 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/api/v2/projectconfig_types.go +++ b/docs/book/src/component-config-tutorial/testdata/project/api/v2/projectconfig_types.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/component-config-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go b/docs/book/src/component-config-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go index 60edc3005da..20154daf359 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go +++ b/docs/book/src/component-config-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/component-config-tutorial/testdata/project/go.mod b/docs/book/src/component-config-tutorial/testdata/project/go.mod index c7c37076aec..b13690830b9 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/go.mod +++ b/docs/book/src/component-config-tutorial/testdata/project/go.mod @@ -1,9 +1,70 @@ module tutorial.kubebuilder.io/project -go 1.16 +go 1.17 require ( k8s.io/apimachinery v0.21.2 k8s.io/client-go v0.21.2 sigs.k8s.io/controller-runtime v0.9.2 ) + +require ( + cloud.google.com/go v0.54.0 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.12 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-logr/zapr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.5 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.17.0 // indirect + golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.21.2 // indirect + k8s.io/apiextensions-apiserver v0.21.2 // indirect + k8s.io/component-base v0.21.2 // indirect + k8s.io/klog/v2 v2.8.0 // indirect + k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect + k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) diff --git a/docs/book/src/component-config-tutorial/testdata/project/hack/boilerplate.go.txt b/docs/book/src/component-config-tutorial/testdata/project/hack/boilerplate.go.txt index 99e0a002dd8..b54e305f300 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/hack/boilerplate.go.txt +++ b/docs/book/src/component-config-tutorial/testdata/project/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/component-config-tutorial/testdata/project/main.go b/docs/book/src/component-config-tutorial/testdata/project/main.go index 632948a5da5..1aa06d1a2c4 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/main.go +++ b/docs/book/src/component-config-tutorial/testdata/project/main.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/cert-manager.md b/docs/book/src/cronjob-tutorial/cert-manager.md index a8aed162d38..48d84ef5373 100644 --- a/docs/book/src/cronjob-tutorial/cert-manager.md +++ b/docs/book/src/cronjob-tutorial/cert-manager.md @@ -5,7 +5,7 @@ provisioning the certificates for the webhook server. Other solutions should also work as long as they put the certificates in the desired location. You can follow -[the cert manager documentation](https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html) +[the cert manager documentation](https://cert-manager.io/docs/installation/) to install it. Cert manager also has a component called CA injector, which is responsible for diff --git a/docs/book/src/cronjob-tutorial/cronjob-tutorial.md b/docs/book/src/cronjob-tutorial/cronjob-tutorial.md index fb41e8bbba0..bfe281e8ffe 100644 --- a/docs/book/src/cronjob-tutorial/cronjob-tutorial.md +++ b/docs/book/src/cronjob-tutorial/cronjob-tutorial.md @@ -69,3 +69,6 @@ Otherwise `--repo=` must be set. Read the [Go modules blogpost][go-modules-blogpost] if unfamiliar with the module system. + +[GOPATH-golang-docs]: https://golang.org/doc/code.html#GOPATH +[go-modules-blogpost]: https://blog.golang.org/using-go-modules \ No newline at end of file diff --git a/docs/book/src/cronjob-tutorial/running-webhook.md b/docs/book/src/cronjob-tutorial/running-webhook.md index 09e17179b94..114f6a807d7 100644 --- a/docs/book/src/cronjob-tutorial/running-webhook.md +++ b/docs/book/src/cronjob-tutorial/running-webhook.md @@ -19,14 +19,14 @@ You need to follow [this](./cert-manager.md) to install the cert manager bundle. Run the following command to build your image locally. ```bash -make docker-build +make docker-build docker-push IMG=/:tag ``` You don't need to push the image to a remote container registry if you are using -a kind cluster. You can directly load your local image to your kind cluster: +a kind cluster. You can directly load your local image to your specified kind cluster: ```bash -kind load docker-image your-image-name:your-tag +kind load docker-image :tag --name ``` ## Deploy Webhooks @@ -50,7 +50,7 @@ Now you can deploy it to your cluster by make deploy IMG=/:tag ``` -Wait a while til the webhook pod comes up and the certificates are provisioned. +Wait a while till the webhook pod comes up and the certificates are provisioned. It usually completes within 1 minute. Now you can create a valid CronJob to test your webhooks. The creation should diff --git a/docs/book/src/cronjob-tutorial/running.md b/docs/book/src/cronjob-tutorial/running.md index e444029c2a1..1465477f0d2 100644 --- a/docs/book/src/cronjob-tutorial/running.md +++ b/docs/book/src/cronjob-tutorial/running.md @@ -72,5 +72,13 @@ make docker-build docker-push IMG=/:tag make deploy IMG=/:tag ``` + + If we list cronjobs again like we did before, we should see the controller functioning again! diff --git a/docs/book/src/cronjob-tutorial/testdata/emptyapi.go b/docs/book/src/cronjob-tutorial/testdata/emptyapi.go index 2f020c58a0b..3a038efc121 100644 --- a/docs/book/src/cronjob-tutorial/testdata/emptyapi.go +++ b/docs/book/src/cronjob-tutorial/testdata/emptyapi.go @@ -1,5 +1,5 @@ /* -Copyright 2021. +Copyright 2022. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go b/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go index 22350b50691..9a1fc29be4e 100644 --- a/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go +++ b/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2021. +Copyright 2022. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/book/src/cronjob-tutorial/testdata/emptymain.go b/docs/book/src/cronjob-tutorial/testdata/emptymain.go index a11170f152c..84bf704f575 100644 --- a/docs/book/src/cronjob-tutorial/testdata/emptymain.go +++ b/docs/book/src/cronjob-tutorial/testdata/emptymain.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/finalizer_example.go b/docs/book/src/cronjob-tutorial/testdata/finalizer_example.go index 5676519e0f5..581ad647c18 100644 --- a/docs/book/src/cronjob-tutorial/testdata/finalizer_example.go +++ b/docs/book/src/cronjob-tutorial/testdata/finalizer_example.go @@ -66,7 +66,7 @@ func (r *CronJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct // The object is not being deleted, so if it does not have our finalizer, // then lets add the finalizer and update the object. This is equivalent // registering our finalizer. - if !containsString(cronJob.GetFinalizers(), myFinalizerName) { + if !controllerutil.ContainsFinalizer(cronJob, myFinalizerName) { controllerutil.AddFinalizer(cronJob, myFinalizerName) if err := r.Update(ctx, cronJob); err != nil { return ctrl.Result{}, err @@ -74,7 +74,7 @@ func (r *CronJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct } } else { // The object is being deleted - if containsString(cronJob.GetFinalizers(), myFinalizerName) { + if controllerutil.ContainsFinalizer(cronJob, myFinalizerName) { // our finalizer is present, so lets handle any external dependency if err := r.deleteExternalResources(cronJob); err != nil { // if fail to delete the external dependency here, return with error @@ -106,22 +106,3 @@ func (r *Reconciler) deleteExternalResources(cronJob *batch.CronJob) error { // multiple times for same object. } -// Helper functions to check and remove string from a slice of strings. -func containsString(slice []string, s string) bool { - for _, item := range slice { - if item == s { - return true - } - } - return false -} - -func removeString(slice []string, s string) (result []string) { - for _, item := range slice { - if item == s { - continue - } - result = append(result, item) - } - return -} diff --git a/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile b/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile index 4152680b742..456533d4c2d 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile +++ b/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.16 as builder +FROM golang:1.17 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_types.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_types.go index 32829d42881..4c89b0bdeba 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_types.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook.go index 716356560cf..a0c4f2a1129 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/groupversion_info.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/groupversion_info.go index 57645bc1725..62d7c0d57d2 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/groupversion_info.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go index 04249dd835d..e511a6aaf20 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go index 7aace525858..c29b119edb1 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/controllers/cronjob_controller.go b/docs/book/src/cronjob-tutorial/testdata/project/controllers/cronjob_controller.go index 6e741c55d3b..9cc7ee6ff99 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/controllers/cronjob_controller.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/controllers/cronjob_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/controllers/suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/controllers/suite_test.go index c3796b9c3a7..3ff70061484 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/controllers/suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/controllers/suite_test.go @@ -6,7 +6,7 @@ First, it will contain the necessary imports. */ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/go.mod b/docs/book/src/cronjob-tutorial/testdata/project/go.mod index 3714b94603a..7059d50b93d 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/go.mod +++ b/docs/book/src/cronjob-tutorial/testdata/project/go.mod @@ -1,6 +1,6 @@ module tutorial.kubebuilder.io/project -go 1.16 +go 1.17 require ( github.com/onsi/ginkgo v1.16.4 @@ -11,3 +11,65 @@ require ( k8s.io/client-go v0.21.2 sigs.k8s.io/controller-runtime v0.9.2 ) + +require ( + cloud.google.com/go v0.54.0 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.12 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-logr/zapr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.5 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.17.0 // indirect + golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apiextensions-apiserver v0.21.2 // indirect + k8s.io/component-base v0.21.2 // indirect + k8s.io/klog/v2 v2.8.0 // indirect + k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect + k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) diff --git a/docs/book/src/cronjob-tutorial/testdata/project/hack/boilerplate.go.txt b/docs/book/src/cronjob-tutorial/testdata/project/hack/boilerplate.go.txt index 884f7883e62..997e45eac61 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/hack/boilerplate.go.txt +++ b/docs/book/src/cronjob-tutorial/testdata/project/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/main.go b/docs/book/src/cronjob-tutorial/testdata/project/main.go index 3491ece3ee6..5a6eec30951 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/main.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/main.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/introduction.md b/docs/book/src/introduction.md index 186b1f250f7..4db659d5f42 100644 --- a/docs/book/src/introduction.md +++ b/docs/book/src/introduction.md @@ -23,7 +23,7 @@ Including: #### Kubernetes API extension developers -API extension developers will learn the principals and concepts behind implementing canonical +API extension developers will learn the principles and concepts behind implementing canonical Kubernetes APIs, as well as simple tools and libraries for rapid execution. This book covers pitfalls and misconceptions that extension developers commonly encounter. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile b/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile index 4152680b742..456533d4c2d 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile +++ b/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.16 as builder +FROM golang:1.17 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_types.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_types.go index 865c4d401e3..7d9ab40f7ba 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_types.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook.go index dfdfc7bae8a..2c3e2d50df7 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/groupversion_info.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/groupversion_info.go index 57645bc1725..62d7c0d57d2 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/groupversion_info.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go index 04249dd835d..e511a6aaf20 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go index 844bf6fd983..5b59c9e3ed5 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_types.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_types.go index 274a36b769d..c412efd6369 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_types.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_webhook.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_webhook.go index ea5436bf9b9..582f5d8dc19 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_webhook.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/cronjob_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/groupversion_info.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/groupversion_info.go index 8448382dbed..db2332fd800 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/groupversion_info.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go index b069bb46441..e0690977790 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go index 8f4cf0e2b32..3d559a08474 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/controllers/cronjob_controller.go b/docs/book/src/multiversion-tutorial/testdata/project/controllers/cronjob_controller.go index 6e741c55d3b..9cc7ee6ff99 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/controllers/cronjob_controller.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/controllers/cronjob_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/controllers/suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/controllers/suite_test.go index 3ca6dd53c52..59411057a8a 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/controllers/suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/controllers/suite_test.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/hack/boilerplate.go.txt b/docs/book/src/multiversion-tutorial/testdata/project/hack/boilerplate.go.txt index 99e0a002dd8..b54e305f300 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/hack/boilerplate.go.txt +++ b/docs/book/src/multiversion-tutorial/testdata/project/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/main.go b/docs/book/src/multiversion-tutorial/testdata/project/main.go index 6410e1289c5..749ea4bf021 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/main.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/main.go @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes authors. +Copyright 2022 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. diff --git a/docs/book/src/quick-start.md b/docs/book/src/quick-start.md index a62b75dd86d..7b9d0048211 100644 --- a/docs/book/src/quick-start.md +++ b/docs/book/src/quick-start.md @@ -199,6 +199,11 @@ make deploy IMG=/:tag ```