-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resource exporter/importer and unit test
1. exporter serviceexport_controller is responsible to reconcile ServiceExport resource in member cluster and write wrapped ResourceExport into leader cluster, meanwhile it will watch Service and Endpoints change via event mapping and update ResourceExport when exported Service/Endpoints are updated. resourceexport_controller is responsible to reconcile ResourceExport resources and computes all ResourceExports from different member clusters into one ResourceExport in leader cluster if the resources are exported with the same namespaced name and the same kind, for this moment, we only support Service, Endpoints kind. service_controller is mainly do Service clean up, it will reconcile any Service with AntreaMCServiceAnnotation in member cluster and clean up it when there is no corresponding ResourceImport in leader cluster. 2. importer remote_resourceimport_controller watches leader cluster's ResourceImport events and create corresponding ServiceImport, Service and Endpoints with AntreaMCServiceAnnotation in member cluster. ServiceImport name will be the same as exported Service, new created Service and Endpoints will have an antrea multicluster prefix. Notes: serviceexport_controller, service_controller and remote_resourceimport_controller will run only in member cluster, resourceexport_controller will run only in leader cluster. 3. stale controller stale controller is mainly for special cases when resource is deleted during controller restarting in leader or member cluster, it will be triggered once only when controller starts. 4. add unit test codes. Signed-off-by: Lan Luo <[email protected]>
- Loading branch information
1 parent
6e66fcb
commit c86cf1a
Showing
26 changed files
with
3,968 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.