Closed EricGregMiller closed 3 weeks ago
Hi @EricGregMiller!
This is due to a limitation with kubectl apply
, that can fortunately be addressed by using Server-Side Apply. More specifically, simply use the --server-side
flag with kubectl apply
:
$ kubectl apply --server-side -f postgres-operator.crunchydata.com_postgresclusters.yaml
customresourcedefinition.apiextensions.k8s.io/postgresclusters.postgres-operator.crunchydata.com serverside-applied
And you should then be able to successfully install the various CRD's.
Thanks for your feedback. it really helps since now I at least know what is happening. I got pulled away but should be able to try this soon. For our setup we probably need ArgoCD to support server-side apply and it looks like they are working on it.
stumbled into same problem yet. i can confirm that
syncPolicy:
syncOptions:
- ServerSideApply=true
will help you @EricGregMiller
Overview
I get an error when I try to manually add the postgres-operator.crunchydata.com_postgresclusters CRD. The error is "The CustomResourceDefinition "postgresclusters.postgres-operator.crunchydata.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes"
Environment
Steps to Reproduce
REPO
This is what it looks like. The following uses kubectl apply in an attempt to create the problem CRD.
The same error occurs if I try to load from a folder. Three of the CRDs are OK but postgres-operator.crunchydata.com_postgresclusters fails with the same error. The templates folder contains the four PGO CRD definitions.
If I install with a helm chart all four CRDs install OK. For the following I have a simple helm chart in the postgres-crds folder with the four CRDs in the chart's templates folder.
EXPECTED
No error for any postgres-operator.crunchydata.com_postgresclusters CRD creation scenario.
ACTUAL
Error when I use kubectl apply with either the individual manifest file or with a folder containing the manifest file.
I also get errors when I try to run using an in-house tool built upon ArgoCD. That's more complex and I don't expect you to deal with it. But it is why this bug is making my life difficult.
Logs
I am not sure what logs would help with this but just let me know what you'd like and I'll do my best to provide.