agent: CRD `grafanaagents.monitoring.grafana.com` cannot be deployed because of annotation length
What’s wrong?
I’ve been using Grafana Agent Helm chart for a while now successfully, but it looks like the latest version can’t be deployed because of the annotation length.
Full error is: one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "grafanaagents.monitoring.grafana.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes (retried 5 times).
Steps to reproduce
Deploy the grafana-agent-operator version 0.2.16 using Helm and ArgoCD with this chart:
apiVersion: v2
name: grafana
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: grafana-agent-operator
version: 0.2.16
repository: https://grafana.github.io/helm-charts
System information
k3s v1.27.2+k3s1, Linux 5.15.0-73-generic
Software version
Grafana Agent Operator 0.2.16
Configuration
# This is my `values.yaml` file used for this Helm chart
grafana-agent-operator:
kubeletService:
namespace: grafana
serviceName: kubelet
Logs
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 28
- Comments: 15 (1 by maintainers)
as a workaround the descriptions can be deleted from the CRD:
For reference, here is my Argo app that worked and includes the server-side apply
@dangmai I had the same issue. A workaround is to use server-side apply https://kubernetes.io/docs/reference/using-api/server-side-apply/
Please don’t comment with +1; comments aren’t how we prioritize issues and it’s only causing more noise in our notifications.
Instead, please thumbs up the original issue. I’ll be marking the +1 comments as off-topic so the conversation is more focused.
+1 here. The last functional/deployable version of this CR is the v0.33.2.
@eduanb Thank you for pointing me to that, it leads me down the rabbit hole researching about this issue, and it looks like other charts have run into this before, most prominently this one: https://github.com/prometheus-community/helm-charts/issues/1500 There are some workarounds there for different tools (ArgoCD, pulumi, etc.).
The exact workaround I used is this one: https://github.com/prometheus-community/helm-charts/issues/1500#issuecomment-1132907207
I’ll leave it up to the maintainers to decide whether this is a bug or not.