Merge pull request #19940 from yujuhong/fix_update

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-02-01 13:35:54 -08:00
commit 7e158006c0

View File

@ -161,12 +161,18 @@ func (s *podStorage) Merge(source string, change interface{}) error {
if len(deletes.Pods) > 0 { if len(deletes.Pods) > 0 {
s.updates <- *deletes s.updates <- *deletes
} }
if len(adds.Pods) > 0 || firstSet { if len(adds.Pods) > 0 {
s.updates <- *adds s.updates <- *adds
} }
if len(updates.Pods) > 0 { if len(updates.Pods) > 0 {
s.updates <- *updates s.updates <- *updates
} }
if firstSet && len(adds.Pods) == 0 && len(updates.Pods) == 0 {
// Send an empty update when first seeing the source and there are
// no ADD or UPDATE pods from the source. This signals kubelet that
// the source is ready.
s.updates <- *adds
}
// Only add reconcile support here, because kubelet doesn't support Snapshot update now. // Only add reconcile support here, because kubelet doesn't support Snapshot update now.
if len(reconciles.Pods) > 0 { if len(reconciles.Pods) > 0 {
s.updates <- *reconciles s.updates <- *reconciles