mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +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
|
/sitemap.xml SitemapR GET
|
||||||
|
|
||||||
/ HomeR GET
|
/ HomeR GET
|
||||||
|
/healthz HealthzR GET
|
||||||
/snapshots AllSnapshotsR GET
|
/snapshots AllSnapshotsR GET
|
||||||
|
|
||||||
/snapshot/#Text/*Texts OldSnapshotR GET
|
/snapshot/#Text/*Texts OldSnapshotR GET
|
||||||
|
|||||||
@ -32,7 +32,7 @@ spec:
|
|||||||
key: PGCONN
|
key: PGCONN
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /healthz
|
||||||
port: 3000
|
port: 3000
|
||||||
httpHeaders:
|
httpHeaders:
|
||||||
# Works around stackage-server's `forceSSL` redirect
|
# Works around stackage-server's `forceSSL` redirect
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /healthz
|
||||||
port: 3000
|
port: 3000
|
||||||
httpHeaders:
|
httpHeaders:
|
||||||
# Works around stackage-server's `forceSSL` redirect
|
# Works around stackage-server's `forceSSL` redirect
|
||||||
|
|||||||
@ -32,7 +32,7 @@ spec:
|
|||||||
key: PGCONN
|
key: PGCONN
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /healthz
|
||||||
port: 3000
|
port: 3000
|
||||||
httpHeaders:
|
httpHeaders:
|
||||||
# Works around stackage-server's `forceSSL` redirect
|
# Works around stackage-server's `forceSSL` redirect
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /healthz
|
||||||
port: 3000
|
port: 3000
|
||||||
httpHeaders:
|
httpHeaders:
|
||||||
# Works around stackage-server's `forceSSL` redirect
|
# Works around stackage-server's `forceSSL` redirect
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
module Handler.Home
|
module Handler.Home
|
||||||
( getHomeR
|
( getHomeR
|
||||||
|
, getHealthzR
|
||||||
, getAuthorsR
|
, getAuthorsR
|
||||||
, getInstallR
|
, getInstallR
|
||||||
, getOlderReleasesR
|
, getOlderReleasesR
|
||||||
@ -15,6 +16,9 @@ import Import
|
|||||||
import Stackage.Database
|
import Stackage.Database
|
||||||
import Yesod.GitRepo (grContent)
|
import Yesod.GitRepo (grContent)
|
||||||
|
|
||||||
|
getHealthzR :: Handler String
|
||||||
|
getHealthzR = return "OK"
|
||||||
|
|
||||||
-- This is a handler function for the G request method on the HomeR
|
-- This is a handler function for the G request method on the HomeR
|
||||||
-- resource pattern. All of your resource patterns are defined in
|
-- resource pattern. All of your resource patterns are defined in
|
||||||
-- config/routes
|
-- config/routes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user