Skip to content

Commit

Permalink
pao:hypershift: check if in hypershift first
Browse files Browse the repository at this point in the history
Checking the feature gate first will result with an error on hypershift since it's not yet supported.

Signed-off-by: Talor Itzhak <[email protected]>
  • Loading branch information
Tal-or committed May 15, 2024
1 parent ad768e2 commit 911eab4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,14 @@ func (r *PerformanceProfileReconciler) Reconcile(ctx context.Context, req ctrl.R

func (r *PerformanceProfileReconciler) isMixedCPUsEnabled(profile *performancev2.PerformanceProfile) bool {
if !r.FeatureGate.Enabled(apiconfigv1.FeatureGateMixedCPUsAllocation) {
func (r *PerformanceProfileReconciler) isMixedCPUsEnabled(object client.Object) bool {
if ntoconfig.InHyperShift() {
return false
}
if config.InHyperShift() {
if !r.FeatureGate.Enabled(apiconfigv1.FeatureGateMixedCPUsAllocation) {
return false
}
return profileutil.IsMixedCPUsEnabled(profile)
return profileutil.IsMixedCPUsEnabled(object.(*performancev2.PerformanceProfile))
}

func hasFinalizer(obj client.Object, finalizer string) bool {
Expand Down

0 comments on commit 911eab4

Please sign in to comment.