File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
pkg/controllers/resources/namespaces Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"github.com/loft-sh/vcluster/pkg/syncer/synccontext"
11
11
"github.com/loft-sh/vcluster/pkg/syncer/translator"
12
12
syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types"
13
- "github.com/loft-sh/vcluster/pkg/util/translate"
14
13
corev1 "k8s.io/api/core/v1"
15
14
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
16
15
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -110,7 +109,7 @@ func (s *namespaceSyncer) Sync(ctx *synccontext.SyncContext, event *synccontext.
110
109
111
110
func (s * namespaceSyncer ) SyncToVirtual (ctx * synccontext.SyncContext , event * synccontext.SyncToVirtualEvent [* corev1.Namespace ]) (_ ctrl.Result , retErr error ) {
112
111
// virtual object is not here anymore, so we delete
113
- if event .VirtualOld != nil || translate . ShouldDeleteHostObject ( event .Host ) {
112
+ if event .VirtualOld != nil || event .Host . DeletionTimestamp != nil {
114
113
return patcher .DeleteHostObject (ctx , event .Host , event .VirtualOld , "virtual object was deleted" )
115
114
}
116
115
You can’t perform that action at this time.
0 commit comments