Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public String resolveControlPlaneUrl(String serviceName) {
* @return The base URL of the control plane.
*/
public String resolveControlPlaneUrl(String serviceName, String namespace, int port) {
// If service name already ends with the cluster local suffix, use it as is.
if (serviceName.endsWith(".svc.cluster.local")) {
return "http://" + serviceName + ":" + port;
}
// If service name contains a dot, assume it's qualified with namespace.
if (serviceName.contains(".")) {
return "http://" + serviceName + ".svc.cluster.local:" + port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ public String authenticate(String controlPlaneBaseUrl, String organization)
"Authentication failed with status " + response.statusCode()
+ ": " + response.body());
}
} catch (IOException | InterruptedException e) {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ReshaprAuthenticationException("Interrupted while authenticating with reShapr control plane", e);
} catch (IOException e) {
throw new ReshaprAuthenticationException("Failed to authenticate with reShapr control plane", e);
}
}
Expand Down