Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to setup PKI infrastructure, error: cnpg-mutating-webhook-configuration not found #344

Open
donchev7 opened this issue Jul 31, 2024 · 3 comments
Labels
chart( operator ) Related to the operator (cloudnative-pg) chart

Comments

@donchev7
Copy link

Hi,

When deploying the helm chart with mutating webhook disabled:

webhook:
  mutating:
    create: false

I get an error:

{"level":"error","ts":"2024-07-30T13:33:16Z","logger":"setup","msg":"unable to setup PKI infrastructure","error":"mutatingwebhookconfigurations.admissionregistration.k8s.io \"cnpg-mutating-webhook-configuration\" not found","stacktrace":"github.com/cloudnative-pg/cloudnative-pg/pkg/management/log.(*logger).Error\n\tpkg/management/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.ensurePKI\n\tinternal/cmd/manager/controller/controller.go:380\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/controller.RunController\n\tinternal/cmd/manager/controller/controller.go:222\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/[email protected]/command.go:983\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/[email protected]/command.go:1115\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/[email protected]/command.go:1039\nmain.main\n\tcmd/manager/main.go:66\nruntime.main\n\t/opt/hostedtoolcache/go/1.22.4/x64/src/runtime/proc.go:271"}

I believe this is due to the helm chart not properly configuring the certificate directory when mutating webhooks are disabled.

Should I create a PR for this?

@donchev7
Copy link
Author

Same issue as this

@itay-grudev itay-grudev added the chart( operator ) Related to the operator (cloudnative-pg) chart label Aug 1, 2024
@itay-grudev
Copy link
Collaborator

@donchev7 A PR would be very appreciated!

@icekom
Copy link

icekom commented Dec 17, 2024

Anyone looking for a workaround see my comment here. Imo before fixing this in the chart CNPG itself should implement an option to completely disable all admission functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart( operator ) Related to the operator (cloudnative-pg) chart
Projects
None yet
Development

No branches or pull requests

3 participants