The liveness, readiness, and startup probes for Spring Boot applications are not always created for workloads in TAP
search cancel

The liveness, readiness, and startup probes for Spring Boot applications are not always created for workloads in TAP

book

Article ID: 378215

calendar_today

Updated On:

Products

VMware Tanzu Application Platform

Issue/Introduction

When creating spring boot workloads in TAP, you may notice that the liveness, readiness, and startup probes are not always created for the pods. This can happen even though the workloads run in the same namespace and created with the same wokrload.yaml file. 

Cause

The Spring Boot convention adds a label (conventions.carto.run/framework: spring-boot) to the PodTemplateSpec that describes the framework associated with the workload, and adds an annotation (boot.spring.io/version: VERSION-NO) that describes the Spring Boot version of the dependency.

If either conventions.carto.run/framework or boot.spring.io/version is not found in the PodIntent of the workload, this means the Spring Boot convention is not applied to the PodTemplateSpec object. As a result, the customized liveness, readiness, and startup probes are not applied to the pods.

Resolution

Review the source codes of the workload and make sure all the following conditions are met. Or the Spring Boot Actuator Probes convention is not applied.

  • The spring-boot-actuator dependency exists and is >= 2.6
  • The JAVA_TOOL_OPTIONS environment variable does not include the following properties or, if either of the properties is included, it is set to a value of true:
    • -Dmanagement.health.probes.enabled
    • -Dmanagement.endpoint.health.probes.add-additional-paths

For more detailed information, please refer to Spring Boot Actuator Probes convention