charts icon indicating copy to clipboard operation
charts copied to clipboard

Unable to deploy operator : no matches for kind \"Pooler\"

Open Ludea opened this issue 9 months ago • 2 comments

I try to install operator with helm and default values, but get:

{"level":"info","ts":"2025-03-20T12:20:02.331028828Z","logger":"setup","msg":"Starting CloudNativePG Operator","version":"1.25.1","build":{"Version":"1.25.1","Commit":"c56e00d4","Date":"2025-02-28"}}
 {"level":"info","ts":"2025-03-20T12:20:02.331722123Z","logger":"setup","msg":"Listening for changes on all namespaces"}
 {"level":"info","ts":"2025-03-20T12:20:02.334366599Z","logger":"setup","msg":"Loading configuration from ConfigMap","namespace":"cnpg","name":"cnpg-controller-manager-config"}
 {"level":"info","ts":"2025-03-20T12:20:02.520118476Z","logger":"setup","msg":"Operator configuration loaded","configuration":{"webhookCertDir":"","pluginSocketDir":"/plugins","watchNamespace":"","operatorNamespace":"cnpg","operatorPullSecretName":"cnpg-pull-secret","operatorImageName":"ghcr.io/cloudnative-pg/cloudnative-pg:1.25.1","postgresImageName":"ghcr.io/cloudnative-pg/postgresql:17.4","inheritedAnnotations":null,"inheritedLabels":null,"monitoringQueriesConfigmap":"cnpg-default-monitoring","monitoringQueriesSecret":"","enableInstanceManagerInplaceUpdates":false,"enableAzurePVCUpdates":false,"certificateDuration":90,"expiringCheckThreshold":7,"createAnyService":false,"clustersRolloutDelay":0,"instancesRolloutDelay":0,"includePlugins":""}}
 {"level":"info","ts":"2025-03-20T12:20:02.529122845Z","logger":"setup","msg":"Kubernetes system metadata","haveSCC":false,"haveVolumeSnapshot":false,"availableArchitectures":[{"GoArch":"amd64"},{"GoArch":"arm64"}]}
 {"level":"error","ts":"2025-03-20T12:20:03.552369686Z","logger":"setup","msg":"unable to create controller","controller":"Cluster","error":"no matches for kind \"Pooler\" in version \"postgresql.cnpg.io/v1\"","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.RunController\n\tinternal/cmd/manager/controller/controller.go:226\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.NewCmd.func1\n\tinternal/cmd/manager/controller/cmd.go:43\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/[email protected]/command.go:1015\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/[email protected]/command.go:1148\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/[email protected]/command.go:1071\nmain.main\n\tcmd/manager/main.go:68\nruntime.main\n\t/opt/hostedtoolcache/go/1.24.0/x64/src/runtime/proc.go:283"}

Ludea avatar Mar 25 '25 12:03 Ludea

the exact commands you used to install it would be useful.

phisco avatar Mar 26 '25 07:03 phisco

I deploy chart through argocd

Ludea avatar Mar 26 '25 08:03 Ludea

yes cnpg via argocd is broken because of

CustomResourceDefinition.apiextensions.k8s.io "poolers.postgresql.cnpg.io" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes

laibe avatar Apr 02 '25 14:04 laibe

I saw this issue https://github.com/cloudnative-pg/charts/issues/325 and tried to apply

- ServerSideApply=true
- ForceApply=true

but still same here

Image

Failed sync attempt to 0.23.2: 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 (retried 5 times).

obs: k3s + srgocd

oprimogus avatar Apr 07 '25 14:04 oprimogus

If someone wants a quick fix while waiting for official support from dev, try this kustomize patches:

patches:
  - target:
      kind: CustomResourceDefinition
    patch: |-
      - op: add
        path: /metadata/annotations/argocd.argoproj.io~1sync-options
        value: ServerSideApply=true

ntcong avatar Apr 14 '25 05:04 ntcong

Any news on this?

Menschomat avatar Jun 20 '25 10:06 Menschomat

The manifests is required to use serverSide https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.22.2 this has been know for a year now, closing

sxd avatar Jul 11 '25 10:07 sxd