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:
parent
5fef84afd1
commit
278dbba316
2 changed files with 3 additions and 7 deletions
|
@ -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](
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue