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

fix: webhooks not registering when using name override (#4992)

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()
if err != nil {
c.logger.Error(err, "failed to get deployment")
return true
}
var replicas int32 = 1
@ -104,7 +105,7 @@ func (c *runtime) getLease() (*coordinationv1.Lease, 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 {