Skip to content

Commit

Permalink
[EV-5299] Disable Policy Recommendation for Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-nicolo committed Oct 25, 2024
1 parent b87243f commit 30ad410
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,17 @@ func (r *ReconcilePolicyRecommendation) Reconcile(ctx context.Context, request r
return reconcile.Result{RequeueAfter: utils.StandardRetry}, nil
}

// Policy Recommendation is not supported in combination with Windows nodes.
hasWindowsNodes, err := common.HasWindowsNodes(r.client)
if err != nil {
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, "Policy Recommendation is not supported in combination with Windows nodes", err, logc)
return reconcile.Result{}, err
}

license, err := utils.FetchLicenseKey(ctx, r.client)
if err != nil {
if errors.IsNotFound(err) {
Expand Down

0 comments on commit 30ad410

Please sign in to comment.