Skip to content

Commit 3d54350

Browse files
committed
restructure mutations to be more extensible
On-behalf-of: @SAP [email protected]
1 parent 1b5392e commit 3d54350

File tree

15 files changed

+741
-452
lines changed

15 files changed

+741
-452
lines changed

internal/controller/sync/controller.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ func Create(
103103
remoteDummy.SetGroupVersionKind(remoteGVK)
104104

105105
// create the syncer that holds the meat&potatoes of the synchronization logic
106-
mutator := mutation.NewMutator(pubRes.Spec.Mutation)
106+
mutator, err := mutation.NewMutator(pubRes.Spec.Mutation)
107+
if err != nil {
108+
return nil, fmt.Errorf("failed to create mutator: %w", err)
109+
}
110+
107111
syncer, err := sync.NewResourceSyncer(log, localManager.GetClient(), virtualWorkspaceCluster.GetClient(), pubRes, localCRD, mutator, stateNamespace, agentName)
108112
if err != nil {
109113
return nil, fmt.Errorf("failed to create syncer: %w", err)

internal/mutation/mutation.go

Lines changed: 0 additions & 154 deletions
This file was deleted.

internal/mutation/mutation_test.go

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)