mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
cmd/pomerium : restore /ping without hostname (#37)
Re-adding the hostless /ping for the authenticate service. Without these 4 lines, Pomerium fails to stay running when using the helm chart that's checked into the repo; the Kubernetes liveness/readiness probes don't see the pod as successfully running, and Kubernetes goes into an endless restart loop. I have tried the following: Adding httpHeaders: {name: "Host", value: "insert_redirect_uri_hostname_here"} to both probes to try to force it to recognize. Pomerium fails to stay running. Removing the probes from the deployment definition. Pomerium successfully stays running and responds correctly. Thus it's certain that it's one of the probes failing. Modifying the code here to log the request.host golang reports. It reports "10.x.x.x:443". (Actual pod internal IP address for the 10.x.x.x). That won't match the authHost.
This commit is contained in:
commit
9ca3ff4fa2
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@ func main() {
|
|||
|
||||
topMux := http.NewServeMux()
|
||||
if authenticateService != nil {
|
||||
// Need to handle ping without host lookup for LB
|
||||
topMux.HandleFunc("/ping", func(rw http.ResponseWriter, _ *http.Request) {
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintf(rw, "OK")
|
||||
})
|
||||
topMux.Handle(authHost+"/", authenticateService.Handler())
|
||||
}
|
||||
if proxyService != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue