Skip to content

Commit

Permalink
Merge pull request #1257 from cloudfoundry/anthony-health-check2
Browse files Browse the repository at this point in the history
Health Check: with Yavor squashed commit with proper CLA and fixed compilation and tests
  • Loading branch information
anthonydahanne authored Dec 6, 2024
2 parents dd6fbf3 + 7bb0534 commit 35753d7
Show file tree
Hide file tree
Showing 32 changed files with 525 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ bin/
.factorypath
.gradle
.history/
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
import org.cloudfoundry.client.v3.processes.ProcessState;
import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource;
import org.cloudfoundry.client.v3.processes.ProcessUsage;
import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck;
import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType;
import org.cloudfoundry.client.v3.routes.Application;
import org.cloudfoundry.client.v3.routes.Destination;
import org.cloudfoundry.client.v3.routes.Process;
Expand Down Expand Up @@ -807,6 +809,16 @@ void getProcess() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -1627,6 +1639,16 @@ void listProcesses() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -1685,6 +1707,16 @@ void listProcesses() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -2052,6 +2084,16 @@ void scale() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import org.cloudfoundry.client.v3.processes.ProcessState;
import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource;
import org.cloudfoundry.client.v3.processes.ProcessUsage;
import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck;
import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType;
import org.cloudfoundry.client.v3.processes.ScaleProcessRequest;
import org.cloudfoundry.client.v3.processes.ScaleProcessResponse;
import org.cloudfoundry.client.v3.processes.TerminateProcessInstanceRequest;
Expand Down Expand Up @@ -121,6 +123,16 @@ void get() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -309,6 +321,16 @@ void list() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -367,6 +389,16 @@ void list() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -458,6 +490,16 @@ void scale() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down Expand Up @@ -545,6 +587,16 @@ void update() {
.endpoint(null)
.build())
.build())
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.type(ReadinessHealthCheckType.PORT)
.data(
Data.builder()
.interval(null)
.timeout(null)
.endpoint(null)
.build())
.build())
.metadata(
Metadata.builder()
.annotations(Collections.emptyMap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down Expand Up @@ -68,6 +76,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down Expand Up @@ -68,6 +76,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"endpoint": null
}
},
"readiness_health_check": {
"type": "port",
"data": {
"interval": null,
"endpoint": null,
"invocation_timeout": null
}
},
"metadata": {
"annotations": {},
"labels": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface CloudFoundryClient {
/**
* The currently supported Cloud Controller API version
*/
String SUPPORTED_API_VERSION = "2.233.0";
String SUPPORTED_API_VERSION = "2.245.0";

/**
* Main entry point to the Cloud Foundry Application Usage Events Client API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import org.cloudfoundry.Nullable;
import org.cloudfoundry.client.v3.ToOneRelationship;
import org.immutables.value.Value;

Expand All @@ -34,4 +36,10 @@ abstract class _ApplicationRelationships {
@JsonProperty("space")
abstract ToOneRelationship getSpace();

/**
* The current droplet relationship
*/
@JsonProperty("current_droplet")
@Nullable
abstract ToOneRelationship getCurrentDroplet();
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,11 @@ public abstract class Deployment extends Resource {
@JsonProperty("strategy")
@Nullable
public abstract DeploymentStrategy getStrategy();

/**
* The options for the deployment
*/
@JsonProperty("options")
@Nullable
public abstract Options getOptions();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2013-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.cloudfoundry.client.v3.deployments;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.immutables.value.Value;

@JsonDeserialize
@Value.Immutable
abstract class _Options {

/**
* The The maximum number of new instances to deploy simultaneously
*/
@JsonProperty("max_in_flight")
abstract Integer getMaxInFlight();

}
Loading

0 comments on commit 35753d7

Please sign in to comment.