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

CustomResourceDefinition.apiextensions.k8s.io "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes #11269

Open
3 tasks
ssharma2089 opened this issue Nov 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ssharma2089
Copy link

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug
Getting error "Too long: must have at most 262144 bytes" after upgrading to v2.5.2
Added server side sync option in application level.

Expected behavior
After applying server side apply, it should throw an error.

Screenshots

Screenshot_345

@ssharma2089 ssharma2089 added the bug Something isn't working label Nov 11, 2022
@werwolfby
Copy link

werwolfby commented Jan 16, 2023

@ssharma2089 this helped me.
I've added this to my application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
    ...
spec:
  ...
  syncPolicy:
    ...
    syncOptions:
      - CreateNamespace=true
      - Replace=true # This is required to update CRDs

Which fixed the issue.

@ktzsolt
Copy link

ktzsolt commented Oct 28, 2024

Also you can use ServerSideApply if replace is not possible for your use case.
https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-apply

syncPolicy:
  syncOptions:
  - ServerSideApply=true 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants