You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff--gita/pkg/frame/controller/resourceconsist_controller.gob/pkg/frame/controller/resourceconsist_controller.go
index 57538cf..70ede67100644---a/pkg/frame/controller/resourceconsist_controller.go+++b/pkg/frame/controller/resourceconsist_controller.go
@@ -104,6+104,7 @@ funcwatch(ccontroller.Controller, mgrmanager.Manager, adapterReconcileAdaptereturnerr
}
+// todo, this can be optionalreturnc.Watch(employeeSource, employeeEventHandler, employeePredicateFuncs)
}
diff--gita/pkg/frame/controller/types.gob/pkg/frame/controller/types.goindex d678a52..8e093a1100644---a/pkg/frame/controller/types.go+++b/pkg/frame/controller/types.go
@@ -89,19+89,26 @@ typeReconcileRequeueOptionsinterface {
EmployeeSyncRequeueInterval() time.Duration
}
+// todo separate employer and employee// ReconcileAdapter is the interface that customized controllers should implement.typeReconcileAdapterinterface {
+// todo make it default, no need to implement a methodGetControllerName() string+// todo make it optional, since no need to be implemented if not follow podopslifecycle// GetSelectedEmployeeNames returns employees' names selected by employer-// note: in multi cluster case, if adapters deployed in fed and employees are under local, the format of employeeName-// should be "employeeName" + "#" + "clusterName"+// note: in multi cluster case, if adapters following PodOpsLifecycle deployed in fed and employees are under local,+// the format of employeeName should be "employeeName" + "#" + "clusterName"GetSelectedEmployeeNames(ctxcontext.Context, employerclient.Object) ([]string, error)
+// todo 命名修改,这里其实是变更employer、employee相关的资源,而不是变更employer employee+// todo discussion, shall we pass an interface between these methods, so that adapters can pass something+// GetExpectedEmployer and GetCurrentEmployer return expect/current status of employer from related backend providerGetExpectedEmployer(ctxcontext.Context, employerclient.Object) ([]IEmployer, error)
GetCurrentEmployer(ctxcontext.Context, employerclient.Object) ([]IEmployer, error)
+// todo discussion: do we need separate Create/Update/Delete// CreateEmployer/UpdateEmployer/DeleteEmployer handles creation/update/deletion of resources related to employer on related backend providerCreateEmployer(ctxcontext.Context, employerclient.Object, toCreates []IEmployer) ([]IEmployer, []IEmployer, error)
UpdateEmployer(ctx context.Context, employer client.Object, toUpdates []IEmployer) ([]IEmployer, []IEmployer, error)
The text was updated successfully, but these errors were encountered:
a few todos:
The text was updated successfully, but these errors were encountered: