poolers.postgresql.cnpg.io CRD metadata.annotations Too long
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
You need to set it to use server side apply iirc
Applied this change to ArgoCD Application and resolved the issue:
apiVersion: argoproj.io/v1alpha1 kind: Application spec: syncPolicy: syncOptions: - ServerSideApply=true
We ran into this issue several times.
It really should be in the docs somewhere or in the chart README.
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
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.
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.
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.ioCRD'smetadata.annotationsfield 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!
Issue is not stale. I ran into this today as well and would have been completely stuck without the help of this thread.
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
should run it with --server-side: kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml
This resolved the issue for me!
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