From d671beda1d1b4956c10c460de66242f6625aef4d Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Thu, 13 Jul 2023 10:18:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Appen=20svarer=20p=C3=A5=20isali?= =?UTF-8?q?ve=20og=20isready?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Markus A. R. Johansen Co-authored-by: Amalie Erdal Mansåker Co-authored-by: Helene Arnesen Co-authored-by: Øydis Kind Refsum Co-authored-by: Christian Bülow Skovborg --- .../src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt | 6 ++++++ nais.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt b/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt index 6e6d0c1..ea8ae17 100644 --- a/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt +++ b/backend/src/main/kotlin/no/nav/helse/sprik/plugins/Routing.kt @@ -28,6 +28,12 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin get("/") { call.respondText("Hello World!") } + get("/isalive"){ + call.respondText("ALIVE") + } + get("/isready"){ + call.respondText("READY") + } post("/test") { val test = call.receive() call.respond(status = HttpStatusCode.Created, message = test) diff --git a/nais.yml b/nais.yml index a145fdb..c5901ec 100644 --- a/nais.yml +++ b/nais.yml @@ -8,6 +8,12 @@ metadata: spec: image: {{ image }} port: 8080 + liveness: + path: isalive + initialDelay: 5 + readyness: + path: isready + initialDelay: 5 replicas: min: 1 max: 2