Default RunRC to check every 10 seconds if an internval isn't provided. #7572

This commit is contained in:
Robert Rati 2015-06-03 14:59:29 -04:00
parent 4f9046332d
commit a248d0ccf9

View File

@ -723,13 +723,17 @@ func RunRC(config RCConfig) error {
image := config.Image
replicas := config.Replicas
interval := config.PollInterval
maxContainerFailures := int(math.Max(1.0, float64(replicas)*.01))
current := 0
same := 0
label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name}))
podLists := newFifoQueue()
// Default to 10 second polling/check interval
if interval <= 0 {
interval = 10
}
By(fmt.Sprintf("%v Creating replication controller %s", time.Now(), name))
rc := &api.ReplicationController{
ObjectMeta: api.ObjectMeta{