CrunchyData / postgres-operator-examples

Examples for deploying applications with PGO, the Postgres Operator from Crunchy Data
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
187 stars 4.63k forks source link

error: json: unknown field "includeTemplates" #245

Closed DC-Ops closed 8 months ago

DC-Ops commented 8 months ago

https://github.com/CrunchyData/postgres-operator-examples/blob/e02a70d683d954d8927a59e25d07d9c04c05fb63/kustomize/install/default/kustomization.yaml#L7

Hi,

I am facing below error when I tried to follow instructions here

kubectl apply --server-side -k kustomize/install/default error: json: unknown field "includeTemplates"

Initially I didn't have "kustomize" installed. I have got it installed now (kustomize version v5.3.0)

Can someone please help me understand why am I facing this issue?

Regards, Darshan Chaluvaraju

benjaminjb commented 8 months ago

Hi @DC-Ops, we've run into a problem like this with the Kustomize workflow for monitoring.

Here's the documentation: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/day-two/monitoring#install-using-older-kubectl

Can you try following those instructions? If it works, we'll need to add some instructions to our docs for this. Thanks for the feedback!

DC-Ops commented 8 months ago

@benjaminjb Thanks! using 'kustomize build' seems to work.

$kustomize build kustomize/install/default | kubectl apply -f - customresourcedefinition.apiextensions.k8s.io/pgadmins.postgres-operator.crunchydata.com created customresourcedefinition.apiextensions.k8s.io/pgupgrades.postgres-operator.crunchydata.com created serviceaccount/pgo created clusterrole.rbac.authorization.k8s.io/postgres-operator created clusterrolebinding.rbac.authorization.k8s.io/postgres-operator created deployment.apps/pgo created The CustomResourceDefinition "postgresclusters.postgres-operator.crunchydata.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

I am facing other issues which might not be related to this. But yes, this part needs to be updated in documentation.

DC-Ops commented 8 months ago

I am concerned about this line though! The CustomResourceDefinition "postgresclusters.postgres-operator.crunchydata.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

benjaminjb commented 8 months ago

You want to kubectl apply --server-side -f -

https://access.crunchydata.com/documentation/postgres-operator/latest/installation/kustomize#install

(We'll have to capture that when we adapt the monitoring install instructions for the operator.)

DC-Ops commented 8 months ago

That worked. Thanks!