mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Stop the bleeding for #6059
This commit is contained in:
parent
96bdee8c28
commit
6be09c5e97
@ -18,6 +18,8 @@ limitations under the License.
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache"
|
||||||
@ -40,7 +42,9 @@ func newSourceApiserverFromLW(lw cache.ListerWatcher, updates chan<- interface{}
|
|||||||
}
|
}
|
||||||
updates <- kubelet.PodUpdate{pods, kubelet.SET, kubelet.ApiserverSource}
|
updates <- kubelet.PodUpdate{pods, kubelet.SET, kubelet.ApiserverSource}
|
||||||
}
|
}
|
||||||
cache.NewReflector(lw, &api.Pod{}, cache.NewUndeltaStore(send, cache.MetaNamespaceKeyFunc), 0).Run()
|
// TODO: the 30 second poll loop is here to mitigate #6059 and
|
||||||
|
// shouldn't be neeeded once that is resolved.
|
||||||
|
cache.NewReflector(lw, &api.Pod{}, cache.NewUndeltaStore(send, cache.MetaNamespaceKeyFunc), 30*time.Second).Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
func getHostFieldLabel(apiVersion string) string {
|
func getHostFieldLabel(apiVersion string) string {
|
||||||
|
@ -143,7 +143,9 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys util.StringSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Watch and queue pods that need scheduling.
|
// Watch and queue pods that need scheduling.
|
||||||
cache.NewReflector(f.createUnassignedPodLW(), &api.Pod{}, f.PodQueue, 0).Run()
|
// TODO: the 30 second poll loop is here to mitigate #6059 and
|
||||||
|
// shouldn't be neeeded once that is resolved.
|
||||||
|
cache.NewReflector(f.createUnassignedPodLW(), &api.Pod{}, f.PodQueue, 30*time.Second).Run()
|
||||||
|
|
||||||
// Pass through all events to the scheduled pod store, but on a deletion,
|
// Pass through all events to the scheduled pod store, but on a deletion,
|
||||||
// also remove from the assumed pods.
|
// also remove from the assumed pods.
|
||||||
|
Loading…
Reference in New Issue
Block a user