-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve and make clear info about setup envtest and its binaries
- Loading branch information
1 parent
7b21ee0
commit 138ec8d
Showing
3 changed files
with
55 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,59 @@ | ||
# Artifacts | ||
|
||
# Artifacts | ||
|
||
<aside class="note warning"> | ||
<h1>IMPORTANT: Kubebuilder no longer produces artifacts</h1> | ||
<h1>IMPORTANT: Action Required: Ensure that you no longer use https://storage.googleapis.com/kubebuilder-tools </h1> | ||
|
||
**Artifacts provided under [https://storage.googleapis.com/kubebuilder-tools](https://storage.googleapis.com/kubebuilder-tools) are deprecated and Kubebuilder maintainers are no longer able to support, build, or ensure the promotion of these artifacts.** | ||
|
||
You will find the [ENVTEST][env-test-doc] binaries available in the new location from k8s release `1.28`, see: [https://github.com/kubernetes-sigs/controller-tools/blob/main/envtest-releases.yaml](https://github.com/kubernetes-sigs/controller-tools/blob/main/envtest-releases.yaml). | ||
Also, binaries to test your controllers after k8s `1.29.3` will no longer be found in the old location. | ||
|
||
Kubebuilder has been building those artifacts binaries to allow users | ||
to use the [ENV TEST][env-test-doc] functionality provided by [controller-runtime][controller-runtime] | ||
for several years. However, Google Cloud Platform has [deprecated the Container Registry](https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr), | ||
which has been used to build and promote these binaries tarballs. | ||
**New binaries are only promoted in the new location**. | ||
|
||
Additionally, ongoing changes and the phase-out of the previous GCP infrastructure mean | ||
that **Kubebuilder maintainers are no longer able to build or ensure the promotion of these binaries.** | ||
**You should ensure that your projects are using the new location.** | ||
Please ensure you use `setup-envtest` from the controller-runtime `release v0.19.0` to be able to download those. | ||
**This update is fully transparent for Kubebuilder users.** | ||
|
||
Therefore, since those have been building to allow the controller-runtime | ||
[ENV TEST][env-test-doc] library to work, it has been started to be built by [controller-runtime][controller-runtime] itself | ||
under the [controller-gen releases page][controller-gen]. From [controller-runtime][controller-runtime] | ||
release `v0.19.0` the binaries will begin to be pulled out from this page instead. | ||
For more information, see the PR that introduces this change [here](https://github.com/kubernetes-sigs/controller-runtime/pull/2811). | ||
The artefacts for [ENVTEST][env-test-doc] k8s `1.31` are exclusively available at: [Controller Tools Releases][controller-gen]. | ||
|
||
You can refer to the Makefile of the Kubebuilder scaffold and observe that the envtest setup is consistently aligned across all controller-runtime releases. Starting from `release-0.19`, it is configured to automatically download the artefact from the correct location, **ensuring that kubebuilder users are not impacted.** | ||
|
||
```shell | ||
ENVTEST_K8S_VERSION = 1.31.0 | ||
ENVTEST_VERSION ?= release-0.19 | ||
... | ||
.PHONY: envtest | ||
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary. | ||
$(ENVTEST): $(LOCALBIN) | ||
$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION)) | ||
``` | ||
</aside> | ||
|
||
To test your controllers, you will need to use the tarballs containing the required binaries: | ||
|
||
Kubebuilder publishes test binaries and container images in addition | ||
to the main binary releases. | ||
```shell | ||
./bin/k8s/ | ||
└── 1.25.0-darwin-amd64 | ||
├── etcd | ||
├── kube-apiserver | ||
└── kubectl | ||
``` | ||
|
||
## **(Deprecated)** - Test Binaries (Used by ENV TEST) | ||
These tarballs are released by [controller-tools](https://github.com/kubernetes-sigs/controller-tools), | ||
and you can find the list of available versions at: [envtest-releases.yaml](https://github.com/kubernetes-sigs/controller-tools/blob/main/envtest-releases.yaml). | ||
|
||
You can find test binary tarballs for all Kubernetes versions and host platforms at `https://go.kubebuilder.io/test-tools`. | ||
You can find a test binary tarball for a particular Kubernetes version and host platform at `https://go.kubebuilder.io/test-tools/${version}/${os}/${arch}`. | ||
When you run `make envtest` or `make test`, the necessary tarballs are downloaded and properly | ||
configured for your project. | ||
|
||
<aside class="note"> | ||
<h1>Setup ENV TEST tool</h1> | ||
To know more about the tooling used to configure ENVTEST which is used in the setup-envtest target in the Makefile | ||
of the projects build with Kubebuilder see the [README][readme] | ||
of its tooling. | ||
</aside> | ||
|
||
To learn more about the tooling used to configure ENVTEST, which is utilized in the `setup-envtest` | ||
target in the Makefile of projects built with Kubebuilder, see the [README](https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/README.md) | ||
of its tooling. Additionally, you can find more information by reviewing the Kubebuilder [ENVTEST][env-test-doc] documentation. | ||
|
||
</aside> | ||
|
||
[env-test-doc]: ./envtest.md | ||
[controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime | ||
[controller-gen]: https://github.com/kubernetes-sigs/controller-tools/releases | ||
[readme]: https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters