Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down