我已经定义了一个名为base-microservice的父图表,可以在mycompany.github.com/pages/base-microservice上找到
结构如下:
base-microservice
- templates
- deployment.yaml
- ingress.yaml
- service.yaml
- Chart.yaml
- values.yaml
- index.yaml
- base-microservice-0.1.0.tgz
Run Code Online (Sandbox Code Playgroud)
我想定义一个继承父图表的customapp图表.
结构如下:
customapp-service
- customapp
- Chart.yaml
- charts
- requirements.yaml
- values.yaml
- src
Run Code Online (Sandbox Code Playgroud)
requirements.yaml如下:
dependencies:
- name: base-microservice
repository: https://mycompany.github.com/pages/base-microservice
version: 0.1.0
Run Code Online (Sandbox Code Playgroud)
当我做
helm install --repo https://mycompany.github.com/pages/base-microservice --name customapp --values customapp/values.yaml
Run Code Online (Sandbox Code Playgroud)
它创建并部署base-microservice而不是customapp ..换句话说,我的自定义应用程序图表中的Chart.yaml和values.yaml不会覆盖在基础app中定义的内容.
请建议如何构建应用程序?
exceptionally似乎不允许在 CompletionStage的方法内重新抛出异常。
我需要检查某种异常,如果没有,我需要重新抛出它:
Future<JsonNode> futureSite = someClient.getSite(siteId, queryParams);
CompletionStage<JsonNode> outcome = FutureConverters.toJava(futureSite);
return outcome.thenApplyAsync((siteJson) -> {
Site site = Json.fromJson(siteJson, Site.class);
try {
return function.apply(site);
} catch (RequestException e) {
return e.result;
}
}, httpExecutionContext.current()).exceptionally(throwable -> {
if(throwable instanceof SomeClientException) {
if(((SomeClientException) throwable).httpStatusCode == 404) {
return entityNotFound("Site", siteId);
}
}
// let JSON parsing failures and other errors bubble up, TODO play2.5
throw throwable;
});
Run Code Online (Sandbox Code Playgroud)
throw throwable 错误说 unhandledException java.lang.Throwable
什么接口可能允许重新抛出异常?或者有更好的方法吗?
更新 :
我尝试了以下 Holger 的建议,但我仍然不确定在什么时候我可以重新抛出这个:
BaseController.java : …Run Code Online (Sandbox Code Playgroud)