From b0f73af64fc4d111a71b4ea52733d951c9b89194 Mon Sep 17 00:00:00 2001 From: Guillaume Rose Date: Thu, 10 Dec 2020 21:40:46 +0100 Subject: [PATCH] Don't create ClusterOperator during precreation step if it's present in overrides Using the installer, if a cluster operator is in overrides list, it is still created during the precreation step. When both the cluster operator and the deployment of an operator are overridden, the CVO (and the installer) waits for ever the end of the end of the provisioning. --- pkg/cvo/sync_worker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cvo/sync_worker.go b/pkg/cvo/sync_worker.go index 94b9fac0ee..c59658be88 100644 --- a/pkg/cvo/sync_worker.go +++ b/pkg/cvo/sync_worker.go @@ -678,6 +678,11 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w if task.Manifest.GVK != configv1.SchemeGroupVersion.WithKind("ClusterOperator") { continue } + ov, ok := getOverrideForManifest(work.Overrides, task.Manifest) + if ok && ov.Unmanaged { + klog.V(4).Infof("Skipping precreation of %s as unmanaged", task) + continue + } if err := w.builder.Apply(ctx, task.Manifest, payload.PrecreatingPayload); err != nil { klog.V(2).Infof("Unable to precreate resource %s: %v", task, err) continue