Skip to content

Commit 5407bad

Browse files
committed
Add Spring Boot Actuator dependencies and configure Kubernetes health probes
1 parent 1cabe25 commit 5407bad

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

clusters/homelab/udav-deployment.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ spec:
3131
name: udav-secrets
3232
readinessProbe:
3333
httpGet:
34-
path: /actuator/health
34+
path: /actuator/health/readiness
3535
port: http
3636
initialDelaySeconds: 30
3737
periodSeconds: 10
3838
livenessProbe:
3939
httpGet:
40-
path: /actuator/health
40+
path: /actuator/health/liveness
4141
port: http
4242
initialDelaySeconds: 60
4343
periodSeconds: 20
@@ -89,4 +89,3 @@ spec:
8989
name: udav
9090
port:
9191
name: http
92-

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
<groupId>org.springframework.boot</groupId>
5959
<artifactId>spring-boot-starter-data-jpa</artifactId>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.springframework.boot</groupId>
63+
<artifactId>spring-boot-starter-actuator</artifactId>
64+
</dependency>
6165

6266

6367

src/main/resources/application.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ logging.level.org.springframework.boot=WARN
5555
logging.level.org.springframework.web=WARN
5656
logging.level.org.texttechnologylab.udav.importer.JooqDatabaseWriter=ERROR
5757
spring.config.import=optional:file:.env[.properties]
58+
59+
# Kubernetes probe endpoints
60+
management.endpoint.health.probes.enabled=true
61+
management.endpoints.web.exposure.include=health,info
62+
management.endpoint.health.show-details=never

0 commit comments

Comments
 (0)