Skip to content

Commit e3a0421

Browse files
committed
fix: corrected check for OpenShift cluster (redhat-developer#216)
Signed-off-by: Andre Dietisheim <[email protected]>
1 parent c9630d8 commit e3a0421

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/com/redhat/devtools/intellij/common/kubernetes/ClusterHelper.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ private ClusterHelper() {
2525
}
2626

2727
public static boolean isOpenShift(KubernetesClient client) {
28-
OpenShiftClient osClient = client.adapt(OpenShiftClient.class);
29-
try {
30-
return osClient.isSupported();
31-
} catch (KubernetesClientException e) {
32-
return e.getCode() == HttpURLConnection.HTTP_UNAUTHORIZED;
33-
}
28+
return client.hasApiGroup(OpenShiftClient.BASE_API_GROUP, false);
3429
}
3530

3631
public static ClusterInfo getClusterInfo(KubernetesClient client) {

0 commit comments

Comments
 (0)