From 49ed638a189c8ce9649bf91c3261cea65121d169 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 25 Nov 2024 10:01:54 +0100 Subject: [PATCH] Demonstrate Spring-Boot health probes in Cloudfoundry (#380) This PR demonstrates the liveness and readiness health probes in Cloudfoundry as described here: https://docs.cloudfoundry.org/devguide/deploy-apps/healthchecks.html --- mta-multi-tenant.yaml | 4 ++++ mta-single-tenant.yaml | 4 ++++ srv/src/main/resources/application.yaml | 1 + 3 files changed, 9 insertions(+) diff --git a/mta-multi-tenant.yaml b/mta-multi-tenant.yaml index e42d3ad2..1293b234 100644 --- a/mta-multi-tenant.yaml +++ b/mta-multi-tenant.yaml @@ -14,6 +14,10 @@ modules: memory: 1024M disk-quota: 512M buildpack: sap_java_buildpack_jakarta + health-check-type: http + health-check-http-endpoint: /actuator/health/liveness + readiness-health-check-type: http + readiness-health-check-http-endpoint: /actuator/health/readiness properties: SPRING_PROFILES_ACTIVE: cloud,sandbox CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-" diff --git a/mta-single-tenant.yaml b/mta-single-tenant.yaml index 81038a49..e7252ba0 100644 --- a/mta-single-tenant.yaml +++ b/mta-single-tenant.yaml @@ -14,6 +14,10 @@ modules: memory: 1024M disk-quota: 512M buildpack: sap_java_buildpack_jakarta + health-check-type: http + health-check-http-endpoint: /actuator/health/liveness + readiness-health-check-type: http + readiness-health-check-http-endpoint: /actuator/health/readiness properties: SPRING_PROFILES_ACTIVE: cloud,sandbox JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']" diff --git a/srv/src/main/resources/application.yaml b/srv/src/main/resources/application.yaml index dad875b3..6766721d 100644 --- a/srv/src/main/resources/application.yaml +++ b/srv/src/main/resources/application.yaml @@ -28,6 +28,7 @@ management: health: show-components: always show-details: always + probes.enabled: true endpoints: web: exposure: