Skip to content

Commit

Permalink
Payload healthchecks og toString i test endepunkt
Browse files Browse the repository at this point in the history
  • Loading branch information
thburnett committed Sep 14, 2023
1 parent 6c7cd2d commit ac0f73e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .nais/payload-processor-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ metadata:
"team": "team-emottak"
spec:
image: {{image}}
liveness:
path: "/internal/health/liveness"
port: 8080
initialDelay: 30
timeout: 10
failureThreshold: 10
readiness:
path: "/internal/health/readiness"
port: 8080
initialDelay: 30
timeout: 10
failureThreshold: 10
replicas:
min: 1
max: 1
Expand Down
2 changes: 1 addition & 1 deletion payload-processor/src/main/kotlin/no/nav/emottak/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private fun Application.serverSetup() {
processedPayload = testByteArray
)
val prosessertMelding = processor.processOutgoing(melding)
call.respondText(prosessertMelding.header.messageId)
call.respondText(prosessertMelding.toString())
}

post("/payload") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import io.prometheus.client.exporter.common.TextFormat
fun Routing.registerHealthEndpoints(
collectorRegistry: CollectorRegistry = CollectorRegistry.defaultRegistry,
) {
get("/alive") {
get("/internal/health/liveness") {
call.respondText("I'm alive! :)")
}
get("/ready") {
get("/internal/health/readiness") {
call.respondText("I'm ready! :)")
}
get("/prometheus") {
Expand Down

0 comments on commit ac0f73e

Please sign in to comment.