cloudnative-pg / charts

CloudNativePG Helm Charts
Apache License 2.0
138 stars 62 forks source link

installing new operator on a fresh new namespace fails #256

Closed antodoms closed 2 months ago

antodoms commented 2 months ago

just trying to figure out why the new helm deployment of the cloudnative-pg is failing for me.

Deployment Environment

EKS - 1.2.9 ArgoCD is being used to deploy the helm chart

Values.yaml

resources:
  limits:
    cpu: 100m
    memory: 200Mi
  requests:
    cpu: 100m
    memory: 100Mi

namespace = postgresoperator

error message on operator deployment

{"level":"info","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"Starting CloudNativePG Operator","version":"1.22.2","build":{"Version":"1.22.2","Commit":"bcdcd885","Date":"2024-03-14"}}
{"level":"info","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"Listening for changes on all namespaces"}
{"level":"info","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"Loading configuration from ConfigMap","namespace":"postgresoperator","name":"cnpg-controller-manager-config"}
{"level":"info","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"Operator configuration loaded","configuration":{"webhookCertDir":"","watchNamespace":"","operatorNamespace":"postgresoperator","operatorPullSecretName":"cnpg-pull-secret","operatorImageName":"ghcr.io/cloudnative-pg/cloudnative-pg:1.22.2","postgresImageName":"ghcr.io/cloudnative-pg/postgresql:16.2","inheritedAnnotations":null,"inheritedLabels":null,"monitoringQueriesConfigmap":"cnpg-default-monitoring","monitoringQueriesSecret":"","enableInstanceManagerInplaceUpdates":false,"enableAzurePVCUpdates":false,"enablePodDebugging":false,"certificateDuration":90,"expiringCheckThreshold":7,"createAnyService":false}}
{"level":"info","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"Kubernetes system metadata","systemUID":"d1b07591-b40e-46ae-8508-a1437cc9126c","haveSCC":false,"haveSeccompProfile":true,"haveVolumeSnapshot":false,"availableArchitectures":[{"GoArch":"amd64"},{"GoArch":"arm64"}]}
{"level":"error","ts":"2024-04-16T03:31:17Z","msg":"no operator deployment found with the filter","filter":"app.kubernetes.io/name=cloudnative-pg","error":"no operator deployment found","stacktrace":"github.com/cloudnative-pg/cloudnative-pg/pkg/management/log.(*logger).Error\n\tpkg/management/log/log.go:128\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.findOperatorDeploymentByFilter\n\tpkg/certs/operator_deployment.go:122\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.GetOperatorDeployment\n\tpkg/certs/operator_deployment.go:68\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.SetAsOwnedByOperatorDeployment\n\tpkg/certs/operator_deployment.go:41\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.(*PublicKeyInfrastructure).ensureRootCACertificate\n\tpkg/certs/k8s.go:184\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.PublicKeyInfrastructure.ensureCertificatesAreUpToDate\n\tpkg/certs/k8s.go:238\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.(*PublicKeyInfrastructure).Setup.func2\n\tpkg/certs/k8s.go:143\nk8s.io/client-go/util/retry.OnError.func1\n\tpkg/mod/k8s.io/client-go@v0.29.2/util/retry/util.go:51\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection\n\tpkg/mod/k8s.io/apimachinery@v0.29.2/pkg/util/wait/wait.go:145\nk8s.io/apimachinery/pkg/util/wait.ExponentialBackoff\n\tpkg/mod/k8s.io/apimachinery@v0.29.2/pkg/util/wait/backoff.go:461\nk8s.io/client-go/util/retry.OnError\n\tpkg/mod/k8s.io/client-go@v0.29.2/util/retry/util.go:50\ngithub.com/cloudnative-pg/cloudnative-pg/pkg/certs.(*PublicKeyInfrastructure).Setup\n\tpkg/certs/k8s.go:140\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.ensurePKI\n\tinternal/cmd/manager/controller/controller.go:385\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.RunController\n\tinternal/cmd/manager/controller/controller.go:229\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.NewCmd.func1\n\tinternal/cmd/manager/controller/cmd.go:40\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039\nmain.main\n\tcmd/manager/main.go:66\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.8/x64/src/runtime/proc.go:267"}
{"level":"error","ts":"2024-04-16T03:31:17Z","logger":"setup","msg":"unable to setup PKI infrastructure","error":"no operator deployment found","stacktrace":"github.com/cloudnative-pg/cloudnative-pg/pkg/management/log.(*logger).Error\n\tpkg/management/log/log.go:128\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.ensurePKI\n\tinternal/cmd/manager/controller/controller.go:387\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.RunController\n\tinternal/cmd/manager/controller/controller.go:229\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.NewCmd.func1\n\tinternal/cmd/manager/controller/cmd.go:40\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039\nmain.main\n\tcmd/manager/main.go:66\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.8/x64/src/runtime/proc.go:267"}
antodoms commented 2 months ago

i had to set the Values.yaml with the nameOverride value to fix the issue Values.yaml

nameOverride: "cloudnative-pg"