# Prometheus/ArgoCD : metadata.annotations: Too long: may not be more than 262144 bytes

**URL:** <https://discuss.prometheus.io/t/prometheus-argocd-metadata-annotations-too-long-may-not-be-more-than-262144-bytes/3421>\
**Category:** General Help/Support\
**Created:** [June 24, 2025, 10:55am UTC](https://discuss.prometheus.io/t/prometheus-argocd-metadata-annotations-too-long-may-not-be-more-than-262144-bytes/3421 "2025-06-24T10:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil12345678910](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@phil12345678910](https://discuss.prometheus.io/u/phil12345678910)\
**Post date:** [June 24, 2025, 10:55am UTC](https://discuss.prometheus.io/t/prometheus-argocd-metadata-annotations-too-long-may-not-be-more-than-262144-bytes/3421/1 "2025-06-24T10:55:12Z")

</div>

Hi,

I installed Grafana and I want to do the same with Prometheus

I use this manifest (sorry for the [DOT]'s but I could not create this thread otherwise)

> apiVersion: [argoproj.io/v1alpha1](http://argoproj.io/v1alpha1)  
> kind: Application  
> metadata:  
> name: prometheus  
> namespace: argocd  
> spec:  
> destination:  
> namespace: monitoring  
> server: [https://kubernetes](https://kubernetes)[DOT]default[DOT]svc  
> project: default  
> source:  
> repoURL: https[REDACTED]prometheus-community[DOT]github[DOT]io/helm-charts  
> chart: kube-prometheus-stack  
> targetRevision: 75.4.0  
> helm:  
> values: |  
> grafana:  
> enabled: true  
> prometheus:  
> prometheusSpec:  
> serviceMonitorSelectorNilUsesHelmValues: false  
> syncPolicy:  
> automated:  
> prune: true  
> selfHeal: true

and I get this error message

> Failed sync attempt to 75.4.0: one or more synchronization tasks completed unsuccessfully, reason: CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “prometheuses[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes,error when patching “/dev/shm/3786734477”: CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “scrapeconfigs[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes,CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “thanosrulers[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes,resource mapping not found for name: “prometheus-kube-prometheus-alertmanager” namespace: “monitoring” from “/dev/shm/3342191378”: no matches for kind “Alertmanager” in version “monitoring[dot]coreos[dot]com/v1” ensure CRDs are installed first,resource mapping not found for name: “prometheus-kube-prometheus-prometheus” namespace: “monitoring” from “/dev/shm/1231157910”: no matches for kind “Prometheus” in version “monitoring[dot]coreos[dot]com/v1” ensure CRDs are installed first,error when patching “/dev/shm/3997111724”: CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “alertmanagerconfigs[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes,CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “alertmanagers[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes,CustomResourceDefinition[dot]apiextensions[dot]k8s[dot]io “prometheusagents[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes (retried 5 times).

I tried installing CRD’s manual

> The CustomResourceDefinition “alertmanagers[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes  
> The CustomResourceDefinition “prometheuses[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes  
> The CustomResourceDefinition “thanosrulers[dot]monitoring[dot]coreos[dot]com” is invalid: metadata.annotations: Too long: may not be more than 262144 bytes

from this thread

> (sorry, once again cannot paste url, this is ludicrous, come on)

I tried

> kubectl apply --server-side --force-conflicts -f prometheus.yaml

same issue

any help appreciated

---

<div class="post-metadata">

**Author:** ![phil12345678910](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@phil12345678910](https://discuss.prometheus.io/u/phil12345678910)\
**Post date:** [June 24, 2025, 4:15pm UTC](https://discuss.prometheus.io/t/prometheus-argocd-metadata-annotations-too-long-may-not-be-more-than-262144-bytes/3421/2 "2025-06-24T16:15:09Z")

</div>

ok found the answer here, not sure why it did not work from the command line though

[Sync Options - Argo CD - Declarative GitOps CD for Kubernetes](https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-apply)
