Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubebuilder make install fails [again]: metadata.annotations: Too long #3903

Closed
ep4sh opened this issue May 9, 2024 · 1 comment
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ep4sh
Copy link

ep4sh commented May 9, 2024

What broke? What's expected?

Hi team, I'm trying to install CRD into the k8s kind cluster v1.29.2 but getting the know error.

 project (master) pwd
/home/ep4sh/go/src/kubebuilder/docs/book/src/cronjob-tutorial/testdata/project

 project (master) make manifests
/home/ep4sh/go/src/kubebuilder/docs/book/src/cronjob-tutorial/testdata/project/bin/controller-gen-v0.14.0 rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases

 project (master) k get nodes
NAME                 STATUS   ROLES           AGE   VERSION
kind-control-plane   Ready    control-plane   11m   v1.29.2

 project (master) make install
/home/ep4sh/go/src/kubebuilder/docs/book/src/cronjob-tutorial/testdata/project/bin/controller-gen-v0.14.0 rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/ep4sh/go/src/kubebuilder/docs/book/src/cronjob-tutorial/testdata/project/bin/kustomize-v5.3.0 build config/crd | kubectl apply -f -
The CustomResourceDefinition "cronjobs.batch.tutorial.kubebuilder.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
make: *** [Makefile:131: install] Error 1


I walked through some closed issues like: #2862

As I can see the history of the file, the desired option crd:maxDescLen=0 was removed:
c10168f

is that an error of my environment?
Thanks

Reproducing this issue

git clone https://github.com/kubernetes-sigs/kubebuilder.git
cd kubebuilder/docs/book/src/cronjob-tutorial/testdata/project
make manifests
make install

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"3.14.2", KubernetesVendor:"1.27.1", GitCommit:"d7b4febe6b673709100b780b5b99151c5e26a206", BuildDate:"2024-04-27T08:27:24Z", GoOs:"linux", GoArch:"amd64"}

PROJECT version

version: "3"

Plugin versions

project (master) cat PROJECT 
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: tutorial.kubebuilder.io
layout:
- go.kubebuilder.io/v4
projectName: project
repo: tutorial.kubebuilder.io/project
resources:
- api:
    crdVersion: v1
    namespaced: true
  controller: true
  domain: tutorial.kubebuilder.io
  group: batch
  kind: CronJob
  path: tutorial.kubebuilder.io/project/api/v1
  version: v1
  webhooks:
    defaulting: true
    validation: true
    webhookVersion: v1
version: "3"

Other versions

 project (master) go version
go version go1.22.3 linux/amd64

k8s kind:

 project (master) k get nodes
NAME                 STATUS   ROLES           AGE   VERSION
kind-control-plane   Ready    control-plane   11m   v1.29.2

Extra Labels

No response

Tasks

No tasks being tracked yet.
@ep4sh ep4sh added the kind/bug Categorizes issue or PR as related to a bug. label May 9, 2024
@camilamacedo86
Copy link
Member

Hi @ep4sh

The answer for your question is here: https://book.kubebuilder.io/faq#the-error-too-long-must-have-at-most-262144-bytes-is-faced-when-i-run-make-install-to-apply-the-crd-manifests-how-to-solve-it-why-this-error-is-faced

I am closing this one as sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants