|
1 | 1 | # Artifacts
|
2 | 2 |
|
3 |
| -# Artifacts |
| 3 | +To test your controllers, you will need to use the tarballs containing the required binaries: |
4 | 4 |
|
5 |
| -<aside class="note warning"> |
6 |
| -<h1>IMPORTANT: Kubebuilder no longer produces artifacts</h1> |
| 5 | +```shell |
| 6 | +./bin/k8s/ |
| 7 | +└── 1.25.0-darwin-amd64 |
| 8 | + ├── etcd |
| 9 | + ├── kube-apiserver |
| 10 | + └── kubectl |
| 11 | +``` |
7 | 12 |
|
8 |
| -Kubebuilder has been building those artifacts binaries to allow users |
9 |
| -to use the [ENV TEST][env-test-doc] functionality provided by [controller-runtime][controller-runtime] |
10 |
| -for several years. However, Google Cloud Platform has [deprecated the Container Registry](https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr), |
11 |
| -which has been used to build and promote these binaries tarballs. |
| 13 | +These tarballs are released by [controller-tools](https://github.com/kubernetes-sigs/controller-tools), |
| 14 | +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). |
12 | 15 |
|
13 |
| -Additionally, ongoing changes and the phase-out of the previous GCP infrastructure mean |
14 |
| -that **Kubebuilder maintainers are no longer able to build or ensure the promotion of these binaries.** |
| 16 | +When you run `make envtest` or `make test`, the necessary tarballs are downloaded and properly |
| 17 | +configured for your project. |
15 | 18 |
|
16 |
| -Therefore, since those have been building to allow the controller-runtime |
17 |
| -[ENV TEST][env-test-doc] library to work, it has been started to be built by [controller-runtime][controller-runtime] itself |
18 |
| -under the [controller-gen releases page][controller-gen]. From [controller-runtime][controller-runtime] |
19 |
| -release `v0.19.0` the binaries will begin to be pulled out from this page instead. |
20 |
| -For more information, see the PR that introduces this change [here](https://github.com/kubernetes-sigs/controller-runtime/pull/2811). |
| 19 | +<aside class="note"> |
| 20 | +<h1>Setup ENV TEST tool</h1> |
| 21 | + |
| 22 | +To learn more about the tooling used to configure ENVTEST, which is utilized in the `setup-envtest` |
| 23 | +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) |
| 24 | +of its tooling. Additionally, you can find more information by reviewing the Kubebuilder [ENVTEST][env-test-doc] documentation. |
21 | 25 |
|
22 | 26 | </aside>
|
23 | 27 |
|
24 | 28 |
|
25 |
| -Kubebuilder publishes test binaries and container images in addition |
26 |
| -to the main binary releases. |
| 29 | +<aside class="note warning"> |
| 30 | +<h1>IMPORTANT: Action Required: Ensure that you no longer use https://storage.googleapis.com/kubebuilder-tools </h1> |
27 | 31 |
|
28 |
| -## **(Deprecated)** - Test Binaries (Used by ENV TEST) |
| 32 | +**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.** |
29 | 33 |
|
30 |
| -You can find test binary tarballs for all Kubernetes versions and host platforms at `https://go.kubebuilder.io/test-tools`. |
31 |
| -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}`. |
| 34 | +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). |
| 35 | +Also, binaries to test your controllers after k8s `1.29.3` will no longer be found in the old location. |
32 | 36 |
|
33 |
| -<aside class="note"> |
34 |
| -<h1>Setup ENV TEST tool</h1> |
35 |
| -To know more about the tooling used to configure ENVTEST which is used in the setup-envtest target in the Makefile |
36 |
| -of the projects build with Kubebuilder see the [README][readme] |
37 |
| -of its tooling. |
38 |
| -</aside> |
| 37 | +**New binaries are only promoted in the new location**. |
| 38 | + |
| 39 | +**You should ensure that your projects are using the new location.** |
| 40 | +Please ensure you use `setup-envtest` from the controller-runtime `release v0.19.0` to be able to download those. |
| 41 | +**This update is fully transparent for Kubebuilder users.** |
| 42 | + |
| 43 | +The artefacts for [ENVTEST][env-test-doc] k8s `1.31` are exclusively available at: [Controller Tools Releases][controller-gen]. |
39 | 44 |
|
| 45 | +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.** |
| 46 | + |
| 47 | +```shell |
| 48 | +ENVTEST_K8S_VERSION = 1.31.0 |
| 49 | +ENVTEST_VERSION ?= release-0.19 |
| 50 | +... |
| 51 | +.PHONY: envtest |
| 52 | +envtest: $(ENVTEST) ## Download setup-envtest locally if necessary. |
| 53 | +$(ENVTEST): $(LOCALBIN) |
| 54 | + $(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION)) |
| 55 | +``` |
| 56 | + |
| 57 | +</aside> |
40 | 58 |
|
41 | 59 | [env-test-doc]: ./envtest.md
|
42 | 60 | [controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime
|
43 | 61 | [controller-gen]: https://github.com/kubernetes-sigs/controller-tools/releases
|
44 |
| -[readme]: https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/README.md |
|
0 commit comments