1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix: new cert manager controller never returns error (#4789)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-10-03 15:48:34 +02:00 committed by GitHub
parent 5fef84afd1
commit 278dbba316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View file

@ -393,11 +393,7 @@ func main() {
logger.Error(err, "failed to initialize CertRenewer")
os.Exit(1)
}
certManager, err := certmanager.NewController(kubeKyvernoInformer.Core().V1().Secrets(), certRenewer)
if err != nil {
logger.Error(err, "failed to initialize CertManager")
os.Exit(1)
}
certManager := certmanager.NewController(kubeKyvernoInformer.Core().V1().Secrets(), certRenewer)
webhookController := webhookcontroller.NewController(
metrics.ObjectClient[*corev1.Secret](

View file

@ -33,7 +33,7 @@ type controller struct {
secretQueue chan bool
}
func NewController(secretInformer corev1informers.SecretInformer, certRenewer *tls.CertRenewer) (Controller, error) {
func NewController(secretInformer corev1informers.SecretInformer, certRenewer *tls.CertRenewer) Controller {
manager := &controller{
renewer: certRenewer,
secretLister: secretInformer.Lister(),
@ -44,7 +44,7 @@ func NewController(secretInformer corev1informers.SecretInformer, certRenewer *t
AddFunc: manager.addSecretFunc,
UpdateFunc: manager.updateSecretFunc,
})
return manager, nil
return manager
}
func (m *controller) Run(ctx context.Context, workers int) {