Skip to content

Commit

Permalink
Fix url splitting & kubernetes service deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt committed May 4, 2020
1 parent 0e0fc6d commit 4908704
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,16 @@ public UninstallService destroyService(Region region, User user, final String pa
HelmInstallService helmService = getHelmInstallService(region);
int status = 0;
if (bulk) {
// If bulk in kub we ignore the path and delete every helm release
HelmLs[] releases = getHelmInstallService(region).listChartInstall(namespace);
for (int i = 0; i <releases.length; i++){
status = Math.max(0,helmService.uninstaller(path,namespace));
status = Math.max(0,helmService.uninstaller(releases[i].getName(),namespace));
}
}
else {
status = getHelmInstallService(region).uninstaller(path, namespace);
// Strip / if present
String cannonicalPath = path.startsWith("/") ? path.substring(1) : path;
status = getHelmInstallService(region).uninstaller(cannonicalPath, namespace);
}

result.setSuccess(status == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ private fr.insee.onyxia.model.service.Service mapAppToService(App app) {

List<String> uris = new ArrayList<String>();
if (app.getLabels().containsKey("ONYXIA_URL")) {
uris.add(app.getLabels().get("ONYXIA_URL"));
String onyxiaUrls = app.getLabels().get("ONYXIA_URL");
uris.addAll(Arrays.asList(onyxiaUrls.split(",")));
}
service.setUrls(uris);
List<String> internalUrls = new ArrayList<String>();
Expand Down

0 comments on commit 4908704

Please sign in to comment.