Skip to content

Commit

Permalink
[EV-5299] Update Degraded messages for Windows nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-nicolo committed Oct 24, 2024
1 parent 5231a47 commit f0e4812
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ func (r *ReconcilePolicyRecommendation) Reconcile(ctx context.Context, request r
return reconcile.Result{RequeueAfter: utils.StandardRetry}, nil
}

// Render a Policy Recommendation component for Windows if the cluster has Windows nodes.
// Policy Recommendation is not supported in combination with Windows nodes.
hasWindowsNodes, err := common.HasWindowsNodes(r.client)
if err != nil {
r.status.SetDegraded(operatorv1.ResourceNotReady, "OS not found", err, logc)
r.status.SetDegraded(operatorv1.ResourceReadError, "Unable to determine if there are Windows nodes", err, logc)
return reconcile.Result{}, err
}
if hasWindowsNodes {
r.status.SetDegraded(operatorv1.ResourceValidationError, "Unsupported OS (Windows)", err, logc)
r.status.SetDegraded(operatorv1.ResourceValidationError, "Policy Recommendation is not supported in combination with Windows nodes", err, logc)
return reconcile.Result{}, err
}

Expand Down

0 comments on commit f0e4812

Please sign in to comment.