diff --git a/pkg/controller/policyrecommendation/policyrecommendation_controller.go b/pkg/controller/policyrecommendation/policyrecommendation_controller.go index b2abb6b55b..9ce19e426e 100644 --- a/pkg/controller/policyrecommendation/policyrecommendation_controller.go +++ b/pkg/controller/policyrecommendation/policyrecommendation_controller.go @@ -284,6 +284,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) {