mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Adds /healthz endpoint
And points k8s readiness and liveness probes on it
This commit is contained in:
parent
82f363c24a
commit
98d0d61958
@ -8,6 +8,7 @@
|
||||
/sitemap.xml SitemapR GET
|
||||
|
||||
/ HomeR GET
|
||||
/healthz HealthzR GET
|
||||
/snapshots AllSnapshotsR GET
|
||||
|
||||
/snapshot/#Text/*Texts OldSnapshotR GET
|
||||
|
||||
@ -32,7 +32,7 @@ spec:
|
||||
key: PGCONN
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /healthz
|
||||
port: 3000
|
||||
httpHeaders:
|
||||
# Works around stackage-server's `forceSSL` redirect
|
||||
@ -44,7 +44,7 @@ spec:
|
||||
successThreshold: 1
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /healthz
|
||||
port: 3000
|
||||
httpHeaders:
|
||||
# Works around stackage-server's `forceSSL` redirect
|
||||
|
||||
@ -32,7 +32,7 @@ spec:
|
||||
key: PGCONN
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /healthz
|
||||
port: 3000
|
||||
httpHeaders:
|
||||
# Works around stackage-server's `forceSSL` redirect
|
||||
@ -44,7 +44,7 @@ spec:
|
||||
successThreshold: 1
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /healthz
|
||||
port: 3000
|
||||
httpHeaders:
|
||||
# Works around stackage-server's `forceSSL` redirect
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
module Handler.Home
|
||||
( getHomeR
|
||||
, getHealthzR
|
||||
, getAuthorsR
|
||||
, getInstallR
|
||||
, getOlderReleasesR
|
||||
@ -15,6 +16,9 @@ import Import
|
||||
import Stackage.Database
|
||||
import Yesod.GitRepo (grContent)
|
||||
|
||||
getHealthzR :: Handler String
|
||||
getHealthzR = return "OK"
|
||||
|
||||
-- This is a handler function for the G request method on the HomeR
|
||||
-- resource pattern. All of your resource patterns are defined in
|
||||
-- config/routes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user