Skip to content

Commit

Permalink
📖 Upgrade controller-gen used to generated the docs and remove redire…
Browse files Browse the repository at this point in the history
…cts for artefact images

This PR update the deps used to generate the data in the docs.
It should update the markers to address kubernetes-sigs#4009

Furthermore, for we are able to move forward here we need to remove the redirect for `https://go.kubebuilder.io/images` and `gcr.io/kubebuilder/thirdparty` which are deprecated and/or no longer used.

We are either adding a note in the in the Artefacts page to clarify that ENV TEST binaries are no longer produced by Kubebuilder and its build and promotion was moved to controller-gen.

Close: kubernetes-sigs#4009
  • Loading branch information
camilamacedo86 committed Jul 11, 2024
1 parent c8f4c5f commit b24b1ab
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/book/install-and-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ chmod +x /tmp/mdbook

echo "grabbing the latest released controller-gen"
go version
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.1
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0

# make sure we add the go bin directory to our path
gobin=$(go env GOBIN)
Expand Down
36 changes: 30 additions & 6 deletions docs/book/src/reference/artifacts.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
# Artifacts

<aside class="note warning">
<h1>IMPORTANT: Kubebuilder no longer produces artifacts</h1>

Kubebuilder has been building those artifacts binaries to allow users
uses [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 tar of binaries.

Additionally, ongoing changes and the phase-out of the previous GCP infrastructure mean
that **Kubebuilder maintainers are no longer able to support, build, or ensure the promotion of these binaries.**

Therefore, since those has been building to allow the controller-runtime
[ENV TEST][env-test-doc] libary work it has been started to be build by [controller-runtime][controller-runtime] itself
under [controller-gen releases page][controller-gen]. From [controller-runtime][controller-runtime]
release `v0.19.0` the binaries will began 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>

Kubebuilder publishes test binaries and container images in addition
to the main binary releases.

## Test Binaries
## **(Deprecated)** - Test Binaries (Used by ENV TEST)

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}`.

## Container Images
<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](https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/README.md)
of its tooling.
</aside>


You can find all container image versions for a particular platform at `https://go.kubebuilder.io/images/${os}/${arch}`
or at `gcr.io/kubebuilder/thirdparty-${os}-${arch}`.
You can find the container image for a particular Kubernetes version and host platform at `https://go.kubebuilder.io/images/${os}/${arch}/${version}`
or at `gcr.io/kubebuilder/thirdparty-${os}-${arch}:${version}`.
[env-test-doc]: ./envtest.md
[controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime
[controller-gen]: https://github.com/kubernetes-sigs/controller-tools/releases
7 changes: 7 additions & 0 deletions docs/book/src/reference/envtest.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ testEnv = &envtest.Environment{
}
```
<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](https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/README.md)
of its tooling.
</aside>
[metrics]: https://book.kubebuilder.io/reference/metrics.html
[envtest]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/envtest
[setup-envtest]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest
Expand Down
27 changes: 1 addition & 26 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
base = "docs/book"
command = "GO_VERSION=1.20 ./install-and-build.sh"
command = "GO_VERSION=1.22 ./install-and-build.sh"
publish = "docs/book/book"
functions = "docs/book/functions"

Expand Down Expand Up @@ -121,31 +121,6 @@
status = 302
force = true

# Image redirects.
[[redirects]]
from = "https://go.kubebuilder.io/images"
to = "gcr.io/kubebuilder"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/images/:os"
to = "https://go.kubebuilder.io/images/:os/amd64"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/images/:os/:arch"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/images/:os/:arch/:k8sversion"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch::k8sversion"
status = 302
force = true

# custom 404 handling -- this may need to be last -- netlify docs are unclear
[[redirects]]
from = "/*"
Expand Down

0 comments on commit b24b1ab

Please sign in to comment.