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

kubectl apply -f crds.yaml fails with metadata.annotations: Too long error #215

Closed
zhuopeng opened this issue Feb 11, 2021 · 1 comment
Closed

Comments

@zhuopeng
Copy link

To reproduce
kubectl apply -f helm/solr-operator/crds/crds.yaml

getting error
customresourcedefinition.apiextensions.k8s.io/solrbackups.solr.bloomberg.com configured Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply customresourcedefinition.apiextensions.k8s.io/solrcollectionaliases.solr.bloomberg.com configured customresourcedefinition.apiextensions.k8s.io/solrcollections.solr.bloomberg.com configured customresourcedefinition.apiextensions.k8s.io/solrprometheusexporters.solr.bloomberg.com configured The CustomResourceDefinition "solrclouds.solr.bloomberg.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

It happens for any version >0.2.6

It is likely related to this kubernetes/kubectl#712. When using kubectl apply to install CRD, kubectl apply use "last-applied-configuration" to store previous CRD configuration. And it exceed the limit.

@HoustonPutman
Copy link
Contributor

Use kubectl replace instead, it's what we use in the Makefile now. For CRDs, replace is better than apply, even without the annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants