Skip to content

Commit 5ba593f

Browse files
committed
fix conversion
Signed-off-by: Tommy Hughes <[email protected]>
1 parent cf85bf7 commit 5ba593f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pkg/controller/operators/olm/apiservices.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func (a *Operator) areWebhooksAvailable(csv *v1alpha1.ClusterServiceVersion) (bo
472472
return false, err
473473
}
474474

475-
if crd.Spec.Conversion == nil || crd.Spec.Conversion.Strategy != "Webhook" || crd.Spec.Conversion.Webhook == nil || crd.Spec.Conversion.Webhook.ClientConfig == nil && crd.Spec.Conversion.Webhook.ClientConfig.CABundle == nil {
475+
if crd.Spec.Conversion == nil || crd.Spec.Conversion.Strategy != "Webhook" || crd.Spec.Conversion.Webhook == nil || crd.Spec.Conversion.Webhook.ClientConfig == nil || crd.Spec.Conversion.Webhook.ClientConfig.CABundle == nil {
476476
return false, fmt.Errorf("conversionWebhook not ready")
477477
}
478478
webhookCount++

pkg/controller/operators/olm/operator.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,12 @@ func (a *Operator) updateInstallStatus(csv *v1alpha1.ClusterServiceVersion, inst
23592359
return fmt.Errorf(msg)
23602360
}
23612361

2362-
if !webhooksInstalled || webhookErr != nil {
2362+
if webhookErr != nil {
2363+
csv.SetPhaseWithEventIfChanged(v1alpha1.CSVPhaseInstallReady, v1alpha1.CSVReasonWebhookInstallFailed, fmt.Sprintf("Webhook install failed: %s", webhookErr), now, a.recorder)
2364+
return webhookErr
2365+
}
2366+
2367+
if !webhooksInstalled {
23632368
msg := "webhooks not installed"
23642369
csv.SetPhaseWithEventIfChanged(requeuePhase, requeueConditionReason, msg, now, a.recorder)
23652370
if err := a.csvQueueSet.Requeue(csv.GetNamespace(), csv.GetName()); err != nil {

vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/clusterserviceversion_types.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)