🔧 Appen svarer på isalive og isready
Co-authored-by: Markus A. R. Johansen <markus.aleksander.rakil.johansen@nav.no> Co-authored-by: Amalie Erdal Mansåker <amalie.erdal.mansaker@nav.no> Co-authored-by: Helene Arnesen <helene.arnesen@nav.no> Co-authored-by: Øydis Kind Refsum <oydis.kind.refsum@nav.no> Co-authored-by: Christian Bülow Skovborg <christian.bulow.skovborg@nav.no>
This commit is contained in:
parent
2197a1b5b0
commit
d671beda1d
2 changed files with 12 additions and 0 deletions
|
@ -28,6 +28,12 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin
|
||||||
get("/") {
|
get("/") {
|
||||||
call.respondText("Hello World!")
|
call.respondText("Hello World!")
|
||||||
}
|
}
|
||||||
|
get("/isalive"){
|
||||||
|
call.respondText("ALIVE")
|
||||||
|
}
|
||||||
|
get("/isready"){
|
||||||
|
call.respondText("READY")
|
||||||
|
}
|
||||||
post("/test") {
|
post("/test") {
|
||||||
val test = call.receive<Test>()
|
val test = call.receive<Test>()
|
||||||
call.respond(status = HttpStatusCode.Created, message = test)
|
call.respond(status = HttpStatusCode.Created, message = test)
|
||||||
|
|
6
nais.yml
6
nais.yml
|
@ -8,6 +8,12 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
image: {{ image }}
|
image: {{ image }}
|
||||||
port: 8080
|
port: 8080
|
||||||
|
liveness:
|
||||||
|
path: isalive
|
||||||
|
initialDelay: 5
|
||||||
|
readyness:
|
||||||
|
path: isready
|
||||||
|
initialDelay: 5
|
||||||
replicas:
|
replicas:
|
||||||
min: 1
|
min: 1
|
||||||
max: 2
|
max: 2
|
||||||
|
|
Reference in a new issue