Re-add support for sync providers
This brings back support for sync providers by wrapping them in a provider that handles async notifications.
This commit is contained in:
10
node/pod.go
10
node/pod.go
@@ -238,7 +238,7 @@ func (pc *PodController) podStatusHandler(ctx context.Context, key string) (retE
|
||||
return pc.updatePodStatus(ctx, pod, key)
|
||||
}
|
||||
|
||||
func (pc *PodController) deletePodHandler(ctx context.Context, key string) error {
|
||||
func (pc *PodController) deletePodHandler(ctx context.Context, key string) (retErr error) {
|
||||
ctx, span := trace.StartSpan(ctx, "processDeletionReconcilationWorkItem")
|
||||
defer span.End()
|
||||
|
||||
@@ -255,6 +255,14 @@ func (pc *PodController) deletePodHandler(ctx context.Context, key string) error
|
||||
return nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if retErr == nil {
|
||||
if w, ok := pc.provider.(syncWrapper); ok {
|
||||
w._deletePodKey(ctx, key)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// If the pod has been deleted from API server, we don't need to do anything.
|
||||
k8sPod, err := pc.podsLister.Pods(namespace).Get(name)
|
||||
if errors.IsNotFound(err) {
|
||||
|
||||
Reference in New Issue
Block a user