kubebuilder
kubebuilder copied to clipboard
EnvTest setup docs need to be updated
What do you want to happen?
The ENV TEST was changed. So, we need to update the docs to clarifies that as add the new instructions. See: https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest#where-does-it-put-all-those-binaries
Then, would be very nice instead of removing the current instructions make it clear when it loses its supports.
Also, note that we probably have related steps in the migration guide from v2 to v3 which seems that needs to be revisited.
Extra Labels
/kind documentation
c/c @varshaprasad96
/cc @varshaprasad96
/assign @varshaprasad96
Running make test
on the kubebuilder project itself on my Apple M1 (darwin/arm64) results in this:
Running kubebuilder integration tests
Building kubebuilder
Installing e2e tools with setup-envtest
unable to fetch checksum for requested version: unable fetch metadata for kubebuilder-tools-1.23.1-darwin-arm64.tar.gz -- got status "404 Not Found" from GCS
make: *** [test-integration] Error 2
Is there any progress on the darwin/arm64 for the kubebuilder-tools? I couldn't find any issue on that. I could of course locally hack it and force envtest to use amd64 instead but that is a rather nasty solution.
We need to update the kubebuilder-tools in : https://github.com/kubernetes-sigs/kubebuilder/blob/tools-releases/ probably to make it work.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
Can I suggest that we download the envtest tools to a relative dir? It's clear and obvious where the binaries are downloaded and would get automatically cleaned up if run in a CI pipeline.
.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out
Happy to contribute if there is agreement.
Hi @rumstead,
Thank you for looking to contribute, see that it is done already ( you have an old scaffold version ):
https://github.com/kubernetes-sigs/kubebuilder/blob/f2e7a0e214ab4f2bd21b4c3f2ef32eb6f4391445/testdata/project-v4/Makefile#L129-L132
@camilamacedo86 Sorry my comment was unclear. I am actually talking about this line which downloads the k8s binaries to use for the integration tests:
https://github.com/kubernetes-sigs/kubebuilder/blob/f2e7a0e214ab4f2bd21b4c3f2ef32eb6f4391445/testdata/project-v4/Makefile#L59
I am using the project-v3 scaffolding which also has that for envtest
.
Sorry for my mistake. In the past, we needed to add the KUBEBUILDER_ASSETS in a specific location. We need to check how it is implemented now in controller runtime and if we can have the KUBEBUILDER_ASSETS in any place. Anyway, please feel free to check it out and open PR with our proposed solution. Then, we can discuss that easily.
Please, feel free to contribute with Kubebuilder and propose anything that you see that we could change to make things better :-)