-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4083 from camilamacedo86/improve-doc-art
📖 (cleanup and enhance) improve and make clear info about setup envtest and its binaries and that old location is deprecated
- Loading branch information
Showing
3 changed files
with
59 additions
and
41 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,61 @@ | ||
# Artifacts | ||
|
||
# Artifacts | ||
To test your controllers, you will need to use the tarballs containing the required binaries: | ||
|
||
<aside class="note warning"> | ||
<h1>IMPORTANT: Kubebuilder no longer produces artifacts</h1> | ||
```shell | ||
./bin/k8s/ | ||
└── 1.25.0-darwin-amd64 | ||
├── etcd | ||
├── kube-apiserver | ||
└── kubectl | ||
``` | ||
|
||
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. | ||
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). | ||
|
||
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.** | ||
When you run `make envtest` or `make test`, the necessary tarballs are downloaded and properly | ||
configured for your project. | ||
|
||
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). | ||
<aside class="note"> | ||
<h1>Setup ENV TEST tool</h1> | ||
|
||
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> | ||
|
||
|
||
Kubebuilder publishes test binaries and container images in addition | ||
to the main binary releases. | ||
<aside class="note warning"> | ||
<h1>IMPORTANT: Action Required: Ensure that you no longer use https://storage.googleapis.com/kubebuilder-tools </h1> | ||
|
||
## **(Deprecated)** - Test Binaries (Used by ENV TEST) | ||
**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 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}`. | ||
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. | ||
|
||
<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> | ||
**New binaries are only promoted in the new location**. | ||
|
||
**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.** | ||
|
||
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> | ||
|
||
[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