diff --git a/internal/controller/consoleplugin/consoleplugin_static_reconciler.go b/internal/controller/consoleplugin/consoleplugin_static_reconciler.go index 4b786c1b1..7d072c04c 100644 --- a/internal/controller/consoleplugin/consoleplugin_static_reconciler.go +++ b/internal/controller/consoleplugin/consoleplugin_static_reconciler.go @@ -41,6 +41,18 @@ func (r *CPReconciler) reconcileStatic(ctx context.Context, desired *flowslatest l := log.FromContext(ctx).WithName("console-plugin") ctx = log.IntoContext(ctx, l) + // Skip static reconciler on older OpenShift (feature not implemented) + if err := r.ClusterInfo.CheckClusterInfo(ctx, r.Client); err != nil { + l.Error(err, "unable to check cluster info") + } + if less415, err := r.ClusterInfo.IsOpenShiftVersionLessThan("4.15.0"); less415 { + l.Info("Static plugin not supported for this version of OpenShift; skipping") + r.Managed.TryDeleteAll(ctx) + return nil + } else if err != nil { + l.Error(err, "Could not determine if static plugin is supported; proceed with deploying") + } + // Retrieve current owned objects err := r.Managed.FetchAll(ctx) if err != nil {