1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: webhooks not registering when using name override ()

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-10-17 03:21:43 +02:00 committed by GitHub
parent b732158831
commit aedaa412a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,7 @@ func (c *runtime) IsRollingUpdate() bool {
} }
deployment, err := c.getDeployment() deployment, err := c.getDeployment()
if err != nil { if err != nil {
c.logger.Error(err, "failed to get deployment")
return true return true
} }
var replicas int32 = 1 var replicas int32 = 1
@ -104,7 +105,7 @@ func (c *runtime) getLease() (*coordinationv1.Lease, error) {
} }
func (c *runtime) getDeployment() (*appsv1.Deployment, error) { func (c *runtime) getDeployment() (*appsv1.Deployment, error) {
return c.deploymentLister.Deployments(config.KyvernoNamespace()).Get("kyverno") return c.deploymentLister.Deployments(config.KyvernoNamespace()).Get(config.KyvernoDeploymentName())
} }
func (c *runtime) check() bool { func (c *runtime) check() bool {