mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Default RunRC to check every 10 seconds if an internval isn't provided. #7572
This commit is contained in:
parent
4f9046332d
commit
a248d0ccf9
@ -723,13 +723,17 @@ func RunRC(config RCConfig) error {
|
|||||||
image := config.Image
|
image := config.Image
|
||||||
replicas := config.Replicas
|
replicas := config.Replicas
|
||||||
interval := config.PollInterval
|
interval := config.PollInterval
|
||||||
|
|
||||||
maxContainerFailures := int(math.Max(1.0, float64(replicas)*.01))
|
maxContainerFailures := int(math.Max(1.0, float64(replicas)*.01))
|
||||||
current := 0
|
current := 0
|
||||||
same := 0
|
same := 0
|
||||||
label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name}))
|
label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name}))
|
||||||
podLists := newFifoQueue()
|
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))
|
By(fmt.Sprintf("%v Creating replication controller %s", time.Now(), name))
|
||||||
rc := &api.ReplicationController{
|
rc := &api.ReplicationController{
|
||||||
ObjectMeta: api.ObjectMeta{
|
ObjectMeta: api.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user