Readiness probe health check

This commit is contained in:
Prashanth Balasubramanian 2016-05-28 22:02:39 -07:00
parent 32ac61e7e3
commit f84ca54831
12 changed files with 217 additions and 94 deletions

View file

@ -109,7 +109,7 @@ func (b *Backends) Get(port int64) (*compute.BackendService, error) {
func (b *Backends) create(igs []*compute.InstanceGroup, namedPort *compute.NamedPort, name string) (*compute.BackendService, error) {
// Create a new health check
if err := b.healthChecker.Add(namedPort.Port, ""); err != nil {
if err := b.healthChecker.Add(namedPort.Port); err != nil {
return nil, err
}
hc, err := b.healthChecker.Get(namedPort.Port)
@ -152,6 +152,10 @@ func (b *Backends) Add(port int64) error {
return err
}
}
// we won't find any igs till the node pool syncs nodes.
if len(igs) == 0 {
return nil
}
if err := b.edgeHop(be, igs); err != nil {
return err
}