Skip to content

Commit

Permalink
feat(keel): add resource export endpoint (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
asher committed Oct 22, 2019
1 parent 0bfe700 commit 7659067
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Expand Up @@ -68,4 +68,12 @@ Map getApplicationDetails(

@GET("/vetos/{name}/rejections")
List<String> getVetoRejections(@Path("name") String name);

@GET("/export/{cloudProvider}/{account}/{type}/{name}")
Resource exportResource(
@Path("cloudProvider") String cloudProvider,
@Path("account") String account,
@Path("type") String type,
@Path("name") String name,
@Query("serviceAccount") String serviceAccount);
}
Expand Up @@ -27,6 +27,7 @@
import org.springframework.web.bind.annotation.RestController;
import retrofit.RetrofitError;
import retrofit.client.Header;
import retrofit.http.Query;

@RequestMapping("/managed")
@RestController
Expand Down Expand Up @@ -74,6 +75,19 @@ Resource deleteResource(@PathVariable("name") String name) {
return keelService.deleteResource(name);
}

@ApiOperation(
value = "Generate a keel resource definition for a deployed cloud resource",
response = Resource.class)
@RequestMapping(value = "/resources/export/{cloudProvider}/{account}/{type}/{name}", method = GET)
Resource exportResource(
@PathVariable("cloudProvider") String cloudProvider,
@PathVariable("account") String account,
@PathVariable("type") String type,
@PathVariable("name") String name,
@Query("serviceAccount") String serviceAccount) {
return keelService.exportResource(cloudProvider, account, type, name, serviceAccount);
}

@ApiOperation(value = "Get a delivery config manifest", response = DeliveryConfig.class)
@RequestMapping(value = "/delivery-configs/{name}", method = GET)
DeliveryConfig getManifest(@PathVariable("name") String name) {
Expand Down

0 comments on commit 7659067

Please sign in to comment.