Skip to content

Commit e1b6b77

Browse files
Fix logic to enable openshift (#37)
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent 25a0df6 commit e1b6b77

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/feature_installer/helpers.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
pkgerr "errors"
2222
"fmt"
2323
"net/http"
24+
"slices"
2425
"sort"
2526
"time"
2627

@@ -89,10 +90,8 @@ func GetAPIGroups() []string {
8990

9091
func initializeFakeServer(profileBinding *profilev1alpha1.ManagedClusterProfileBinding) (*http.Server, *pkg.Server, *rest.Config, *api.Config) {
9192
var fakeOpenShift bool
92-
if profileBinding != nil && profileBinding.Spec.Features != nil {
93-
if _, ok := profileBinding.Spec.Features["aceshifter"]; ok {
94-
fakeOpenShift = true
95-
}
93+
if profileBinding != nil {
94+
fakeOpenShift = slices.Contains(profileBinding.Spec.ClusterMetadata.ClusterManagers, kmapi.ClusterManagerOpenShift.Name())
9695
}
9796

9897
opts := pkg.NewOptions(fakeOpenShift, GetAPIGroups()...)

0 commit comments

Comments
 (0)