Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CLI flags, controller structure and controller configs (#506)
* Refactor CLI flags * Address review comments * Address review comments from @unmarshall * refactored handling of flags and setting up of mgr and reconcilers * [WIP] Minor changes to controllers/secret package, start adding test/utils package * changes to etcdcopybackuptask controller and refactored some utility methods * [WIP] Add controllers/etcdcopybackupstask package, adapt tests * minor refactoring to the secret controller * minor refactoring of etcdcopybackuptask reconciler * initial changes for compaction lease controller * added add-license-headers makefile target * missed adding addlicenseheader script. Other misc changes * renamed controller packages * renamed compactionlease to compaction, parameterized add-license-headers makefile target * addition changes for compaction controller * fixed some compilation issues and started to add files for etcd controller * added refactored code for etcd controller * Add unit tests for controllers/secret,etcdcopybackupstask packages Adapt integration tests for controllers/secret,etcdcopybackupstask Segregate functions into test utils Clean up reconciler code Run make add-licence-headers * Refactor test utils TODO: re-organise context passing to test utils Move compaction tests to test/integration/controllers/compaction * Update golang image versions in CI pipeline * [WIP] Refactor custodian controller code Remove pkg/{config,flags} * Moved to golang 1.19.5 Deleted etcd_controller as it has been moved to its own package Changed secret reconciler unit test * Refactor pkg/health packages to not use custodian config Removed controller_ref_manager.go entirely as it is no longer used Renamed custodian.EtcdMemberConfig fields * Create named controllers * added tests for etcdcopybackupstask and some minor refactoring * Named controller for compaction * changed usage of deprecated methods * restructured api, moved names specific functions to now be directly defined on etcd struct, removed usage of deprecated methods * added license headers * Remove pkg/utils/names.go and adapt related functions * Move {etcd,custodian}-controller tests to test/integration/controllers/{etcd,custodian} suites Minor fixes * Run `make add-license-headers YEAR=2023` * Fix copy-paste error in custodian controller config * added tests for pkg/utils/statefulset and other misc changes * removed deprecated methods * added unit tests for pkg/utils * added license headers to new files * Fix integration tests Remove deprecated functions from pointer package * multiple fixes for integration tests * WIP commit to fix compaction integration tests * refactored integration tests and adjusted controllers * small optimization in chart handling in etcd * fixed etcd reconciler integration tests * Handle missing objects from etcd charts * Remove unused functions from test/utils/manager.go * added docstrings and removed commented code * Fix integration tests for compaction controller * Fix `make test` * Fix controller/secret tests * Fix test and test-integration CI scripts * Minor cleanups for integration tests * Fix copy-paste error for integration/etcdcopybackupstask test * Resolve linter warnings * Use namespace string in integration tests instead of testNamespace object * Adapt sample etcd resource for easier local testing * Apply suggestions from code review Review comments from Aaron Co-authored-by: Aaron Francis Fernandes <[email protected]> * addressed review comment from aaron, added type for a constant * corrected compilation error due to accepting partial change from aaron * Add validation for controller configs derived from CLI flags * refactored validation, introduced generics * added license headers to new files * reordered imports * addressed review comment from abhishek * addressed review comments from Shreyas * Rename AddToManager to RegisterWIthManager; rename files controllers/*/add.go to controllers/*register.go * Progress sample etcd rpelicas from 1 to 3 * Fix linter errors, cleanup rebase issue --------- Co-authored-by: Madhav Bhargava <[email protected]> Co-authored-by: Aaron Francis Fernandes <[email protected]>
- Loading branch information