Skip to content

Commit

Permalink
refactor: use ClusterHelper#isOpenShift in commons
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Dec 5, 2023
1 parent a5ee223 commit 3423f84
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -867,12 +866,7 @@ public String consoleURL() throws IOException {

@Override
public boolean isOpenShift() {
OpenShiftClient osClient = client.adapt(OpenShiftClient.class);
try {
return osClient.isSupported();
} catch (KubernetesClientException e) {
return e.getCode() == HttpURLConnection.HTTP_UNAUTHORIZED;
}
return ClusterHelper.isOpenShift(client);
}

@Override
Expand Down

0 comments on commit 3423f84

Please sign in to comment.