-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
The ConfigMap is invalid: metadata.annotations: Too long: must have at most 262144 characters #820
Comments
This error is happening during kubectl apply phase for one of your ConfigMap resources, and is not just specific to helm. We use Theres not a workaround other than a Sync hook which performs the deploy in a manner different than apply (e.g. kubectl replace). Which helm chart is causing problems? |
This is a custom made helm chart with a bit config map that I currently need to deploy with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jessesuen This issue occurs when install Grafana with a large dashboard using ConfigMaps. Wouldn't it be better to use I am also curious to the sync hook workaround. |
I also have problem with grafana.
|
Using these annotations seems to have kinda-worked... I still get caught up on a few of the larger config-maps. They just won't sync with the same error. |
This does not seem to work in case of a grafana dashboards configmap. Please suggest a workaround / fix |
Same problem, annotations doesnt seem to work in case of Grafana chart. |
Same here. @kuznero can you reopen the issue? |
Hello @jessesuen where did you see argocd can use "create" instead of "apply"? Tried with
|
any deadline for fixing this issue ? |
We just ran into this on a CRD from Strimzi.io:
We obviously cannot have the CRD deleted and re-created for an upgrade.. what should we do? This is the resource it's trying to apply: https://github.com/strimzi/strimzi-kafka-operator/blob/0.22.1/install/cluster-operator/040-Crd-kafka.yaml |
The argoproj/gitops-engine#252 adds special handling for CRDs. Argo CD will try to just use K8S update request for CRDs if |
Similar thing happens with |
Hey @alexmt, @crenshaw-dev, now that argocd v2.5 is out, which solution would you recommend for the problem with CRD's being too long?
or
? |
In my experience,
$ braid add --branch main --path bitnami/kube-prometheus/crds https://github.com/bitnami/charts <local_path>/crds
source:
path: <path_to_crds>
repoURL: [email protected]:<username>/<repo>.git
targetRevision: <branch_or_commit>
syncPolicy:
syncOptions:
- Replace=true
source:
path: <path_to_app_set>
repoURL: [email protected]:<username>/<repo>.git
targetRevision: <branch_or_commit> |
@nallenscott Nice catch, but it seems a bit outdated. There is an semi official helm chart now that holds the Prometheus CRDs which natively allows setup annotations, if required. Local local copy required |
@jkroepke I tried that chart with and without |
Not talking about Replace and ServerSideApply. But using the Chart replaces the braid hack |
@jkroepke Clarified my comment. |
Additionally, it seems wise to manage CRDs externally, seeing as helm is unable to upgrade or delete them after they're deployed. From the argo-cd helm repo: https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd#custom-resource-definitions |
Couldnt argo just recognize this specific error message and use create on it? |
@davhdavh theoretically, but it's not always safe to Replace resources. I think it's better to leave it to the user to decide. Although, I do think it would be worth adding a note in the UI to say, "Maybe you can use Replace (with the usual safety caveats) or ServerSideApply." |
This resolves a bug with calico CRDs, which cannot be applied because of a metadata enforced by ArgoCD. argoproj/argo-cd#820
ServerSideApply doesn't fix the issue for me is there another way to fix the issue? specifically when using a helm type application |
* change `Replace` to `ServerSideApply` argoproj/argo-cd#820
More details here: argoproj/argo-cd#820
Does it apply to Argo CD managed helm charts? Can it be overwritten/overcome somehow?
The text was updated successfully, but these errors were encountered: