Skip to content

Commit 647dee9

Browse files
Yavor16Yavor16
authored andcommitted
Initial impl
1 parent 687819e commit 647dee9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

multiapps-controller-core/src/main/java/org/cloudfoundry/multiapps/controller/core/model/SupportedParameters.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public class SupportedParameters {
5858
public static final String HEALTH_CHECK_TIMEOUT = "health-check-timeout";
5959
public static final String HEALTH_CHECK_TYPE = "health-check-type";
6060
public static final String HEALTH_CHECK_HTTP_ENDPOINT = "health-check-http-endpoint";
61+
public static final String READINESS_HEALTH_CHECK_TYPE = "readiness-health-check-type";
62+
public static final String READINESS_HEALTH_CHECK_HTTP_ENDPOINT = "readiness-health-check-http-endpoint";
63+
public static final String READINESS_HEALTH_CHECK_INVOCATION_TIMEOUT = "readiness-health-check-invocation-timeout";
64+
public static final String READINESS_HEALTH_CHECK_INTERVAL = "readiness-health-check-interval";
6165
public static final String UPLOAD_TIMEOUT = "upload-timeout";
6266
public static final String STAGE_TIMEOUT = "stage-timeout";
6367
public static final String START_TIMEOUT = "start-timeout";

multiapps-controller-core/src/main/java/org/cloudfoundry/multiapps/controller/core/parser/StagingParametersParser.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ public Staging parse(List<Map<String, Object>> parametersList) {
3030
String healthCheckHttpEndpoint = (String) PropertiesUtil.getPropertyValue(parametersList,
3131
SupportedParameters.HEALTH_CHECK_HTTP_ENDPOINT,
3232
getDefaultHealthCheckHttpEndpoint(healthCheckType));
33+
String readinessHealthCheckType = (String) PropertiesUtil.getPropertyValue(parametersList,
34+
SupportedParameters.READINESS_HEALTH_CHECK_TYPE, null);
35+
String readinessHealthCheckHttpEndpoint = (String) PropertiesUtil.getPropertyValue(parametersList,
36+
SupportedParameters.READINESS_HEALTH_CHECK_HTTP_ENDPOINT,
37+
getDefaultHealthCheckHttpEndpoint(readinessHealthCheckType));
38+
Integer readinessHealthCheckInvocationTimeout = (Integer) PropertiesUtil.getPropertyValue(parametersList,
39+
SupportedParameters.READINESS_HEALTH_CHECK_INVOCATION_TIMEOUT,
40+
null);
41+
Integer readinessHealthCheckInterval = (Integer) PropertiesUtil.getPropertyValue(parametersList,
42+
SupportedParameters.READINESS_HEALTH_CHECK_INTERVAL,
43+
null);
3344
Boolean isSshEnabled = (Boolean) PropertiesUtil.getPropertyValue(parametersList, SupportedParameters.ENABLE_SSH, null);
3445
DockerInfo dockerInfo = new DockerInfoParser().parse(parametersList);
3546
return ImmutableStaging.builder()
@@ -40,6 +51,10 @@ public Staging parse(List<Map<String, Object>> parametersList) {
4051
.invocationTimeout(healthCheckInvocationTimeout)
4152
.healthCheckType(healthCheckType)
4253
.healthCheckHttpEndpoint(healthCheckHttpEndpoint)
54+
.readinessHealthCheckType(readinessHealthCheckType)
55+
.readinessHealthCheckHttpEndpoint(readinessHealthCheckHttpEndpoint)
56+
.readinessHealthCheckTimeout(readinessHealthCheckInvocationTimeout)
57+
.readinessHealthCheckInterval(readinessHealthCheckInterval)
4358
.isSshEnabled(isSshEnabled)
4459
.dockerInfo(dockerInfo)
4560
.build();

0 commit comments

Comments
 (0)