- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.6k
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.
Description
What broke? What's expected?
Following the kubebuilder book, the make install step fails with the error message:
The CustomResourceDefinition "cronjobs.batch.tutorial.kubebuilder.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytesAs described in this post the issue derives from the auto-generated annotation when running kubectl apply.
Running the same command with kubectl create or kubectl replace works.
I was wondering how to correct this issue. Possible approaches:
- easy, workaround: insert a warning into the book stating this problem and telling the user to edit the make install;
- easy, workaround, fragile: make the installtarget slightly more intelligent and dynamically chooseapply,createorreplacedepending on whether the CRDs exist and on the possible error;
- harder: solve the problem on kubectl apply- here a further discussion needs to be triggered on whether we even want to solve this issue and what impacts that could generate (not sure it would be backwards compatible)
- within kubectl applymake a more detailed error and suggest usage ofcreateorreplacecommands instead.
Reproducing this issue
Follow the kubebuilder book up to the make install in this book section.
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"v3.10.0-110-gd9c14df9", KubernetesVendor:"unknown", GitCommit:"d9c14df9d84fafd08c9ec88441e9ce218ad6effa", BuildDate:"2023-06-16T09:47:40Z", GoOs:"darwin", GoArch:"arm64"}
PROJECT version
version: "3"
Plugin versions
- go.kubebuilder.io/v4Other versions
- 
go version go1.20.4 darwin/arm64 
- 
sigs.k8s.io/controller-runtime v0.15.0 
Extra Labels
/kind documentation
RafalSkolasinski
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.