-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Describe the bug
As soon as a resource in a kcp workspace is requested to be deleted the api-syncagent will proceed to delete the corresponding resource in the service provider cluster. This does even happen if there are (other) finalizers set on the resource in kcp which should prevent this deletion behavior.
Related lines:
api-syncagent/internal/sync/object_syncer.go
Lines 94 to 98 in 6b75d0a
| func (s *objectSyncer) Sync(ctx context.Context, log *zap.SugaredLogger, source, dest syncSide) (requeue bool, err error) { | |
| // handle deletion: if source object is in deletion, delete the destination object (the clone) | |
| if source.object.GetDeletionTimestamp() != nil { | |
| return s.handleDeletion(ctx, log, source, dest) | |
| } |
Steps To Reproduce
- Create a resource for a synced API
- Add a custom finalizer "foo/bar"
- Request this resource to be deleted
- Watch API-SyncAgent to delete the resource in the service provider cluster
Expected Behaviour
I would expect the api-syncagent to respect finalizers and only delete a synced resource in the service provider cluster if there are no more finalizers (except for the own one) set on the resource in kcp.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.