Switch to empty ADD PodUpdate for PodConfigNotificationIncremental mode

This commit is contained in:
Dr. Stefan Schimanski 2015-10-14 15:38:44 +02:00
parent 5cfeb53057
commit 7dddec6799

View File

@ -159,13 +159,10 @@ func (s *podStorage) Merge(source string, change interface{}) error {
// deliver update notifications // deliver update notifications
switch s.mode { switch s.mode {
case PodConfigNotificationIncremental: case PodConfigNotificationIncremental:
if firstSet {
s.updates <- kubetypes.PodUpdate{Pods: s.MergedState().([]*api.Pod), Op: kubetypes.SET, Source: source}
}
if len(deletes.Pods) > 0 { if len(deletes.Pods) > 0 {
s.updates <- *deletes s.updates <- *deletes
} }
if len(adds.Pods) > 0 { if len(adds.Pods) > 0 || firstSet {
s.updates <- *adds s.updates <- *adds
} }
if len(updates.Pods) > 0 { if len(updates.Pods) > 0 {