append / to healthcheck url
This commit is contained in:
parent
22c6e5ddd7
commit
9abd4e0ea6
2 changed files with 5 additions and 1 deletions
|
|
@ -425,6 +425,10 @@ func (t *GCETranslator) HealthCheck(port int64) (*compute.HttpHealthCheck, error
|
|||
break
|
||||
}
|
||||
healthPath := rp.Handler.HTTPGet.Path
|
||||
// GCE requires a leading "/" for health check urls.
|
||||
if string(healthPath[0]) != "/" {
|
||||
healthPath = fmt.Sprintf("/%v", healthPath)
|
||||
}
|
||||
host := rp.Handler.HTTPGet.Host
|
||||
glog.Infof("Found custom health check for Service %v nodeport %v: %v%v", s.Name, port, host, healthPath)
|
||||
return &compute.HttpHealthCheck{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue