Skip to content

Commit 78f14b6

Browse files
committed
[BZ #2048441] Fix a bug in deletion of webhook service for replacement
The condition that checks for an error with the webhook service deletion is based on the wrong variable, and the return statement is never reached, which leads to a continuous error when OLM tries to replace the webhook service on certain conditions Signed-off-by: orenc1 <[email protected]>
1 parent 623572b commit 78f14b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/install/certresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func (i *StrategyDeploymentInstaller) installCertRequirementsForDeployment(deplo
246246

247247
// Delete the Service to replace
248248
deleteErr := i.strategyClient.GetOpClient().DeleteService(service.GetNamespace(), service.GetName(), &metav1.DeleteOptions{})
249-
if err != nil && !k8serrors.IsNotFound(deleteErr) {
249+
if deleteErr != nil && !k8serrors.IsNotFound(deleteErr) {
250250
return nil, nil, fmt.Errorf("could not delete existing service %s", service.GetName())
251251
}
252252
}

0 commit comments

Comments
 (0)