charts icon indicating copy to clipboard operation
charts copied to clipboard

poolers.postgresql.cnpg.io CRD metadata.annotations Too long

Open debugger24 opened this issue 1 year ago • 5 comments

Unable to deploy helm chart using ArgoCD. Getting following error

Failed sync attempt to : one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "poolers.postgresql.cnpg.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

debugger24 avatar Jun 30 '24 00:06 debugger24

You need to set it to use server side apply iirc

phisco avatar Jun 30 '24 02:06 phisco

Applied this change to ArgoCD Application and resolved the issue:

apiVersion: argoproj.io/v1alpha1 kind: Application spec: syncPolicy: syncOptions: - ServerSideApply=true

pmontagna avatar Jul 02 '24 16:07 pmontagna

We ran into this issue several times.

It really should be in the docs somewhere or in the chart README.

Stevenpc3 avatar Jul 11 '24 15:07 Stevenpc3

should run it with --server-side: kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml

and i did not get where should i modify documentation

mehrdadbn9 avatar Jan 03 '25 19:01 mehrdadbn9

I came across this today aswell, writing here to be part of the conversation.

should run it with --server-side: kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml

and i did not get where should i modify documentation What @mehrdadbn9 wrote resolved it locally for me when trying with 'minikube'.

Interesting to note that on my k3s homelab, this wasn't an issue when setting it up.

NeverW8 avatar Jan 09 '25 09:01 NeverW8

I hit this today. I'm not using the helm chart. Just the bare operator. The only solution I found was --server-side --force-conflicts. I'm on Kubernetes 1.29.10 on Azure AKS.

jmealo avatar Mar 31 '25 16:03 jmealo

Hi, @debugger24. I'm Dosu, and I'm helping the charts team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The issue involved a failure in deploying a Helm chart using ArgoCD due to the poolers.postgresql.cnpg.io CRD's metadata.annotations field exceeding the size limit.
  • @phisco suggested using server-side apply, which resolved the issue as confirmed by @pmontagna.
  • Multiple users, including @Stevenpc3 and @mehrdadbn9, emphasized the need for documentation of this solution.
  • @NeverW8 and @jmealo also resolved similar issues using --server-side --force-conflicts.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the charts repository. If so, you can keep the discussion open by commenting on the issue.
  • Otherwise, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jun 30 '25 16:06 dosubot[bot]

Issue is not stale. I ran into this today as well and would have been completely stuck without the help of this thread.

sarendipitee avatar Jul 08 '25 06:07 sarendipitee

Issue is not stale. I ran into this today as well and would have been completely stuck without the help of this thread.

Same here

0sax avatar Jul 08 '25 10:07 0sax

should run it with --server-side: kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml

This resolved the issue for me!

ddlingo avatar Aug 06 '25 14:08 ddlingo

The issue really is that the CRD does not allow me to specify a separate annotation.

If it did I could just pass something like

crds:
  annotations:
    argocd.argoproj.io/sync-options: ServerSideApply=true

And be done with it

For reference on how to do this the external secrets operator might be a good reference

https://artifacthub.io/packages/helm/external-secrets-operator/external-secrets?modal=template&template=crds/acraccesstoken.yaml

xmj avatar Aug 27 '25 09:08 xmj