Skip to content

Commit

Permalink
fix: wrong name of variable and func lead to always return self-managed
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
  • Loading branch information
zdtsw committed Nov 11, 2024
1 parent 92251e4 commit 0ef0905
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ func getPlatform(ctx context.Context, cli client.Client) (Platform, error) {
case "OpenDataHub":
return OpenDataHub, nil
case "ManagedRHOAI":
return SelfManagedRhoai, nil
return ManagedRhoai, nil
case "SelfManagedRHOAI":
return SelfManagedRhoai, nil
default:
// fall back to detect platform if ODH_PLATFORM_TYPE env is not provided in CSV or set to ""
if platform, err := detectManagedRhoai(ctx, cli); err != nil {
return Unknown, err
} else if platform == SelfManagedRhoai {
return SelfManagedRhoai, nil
} else if platform == ManagedRhoai {
return ManagedRhoai, nil
}
return detectSelfManaged(ctx, cli)
}
Expand Down

0 comments on commit 0ef0905

Please sign in to comment.